Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #12916 > unrolled thread
| Started by | aurora baccio <aurorabaccio@gmail.com> |
|---|---|
| First post | 2020-03-09 10:02 -0700 |
| Last post | 2020-03-22 16:12 +0100 |
| Articles | 15 — 4 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
cccalendar aurora baccio <aurorabaccio@gmail.com> - 2020-03-09 10:02 -0700
Re: cccalendar "Glen Townsley" <coogee.2015@gmail.com> - 2020-03-10 04:03 +1000
Re: cccalendar "Urs Eggmann" <Urs.Eggmann@shinternet.ch> - 2020-03-09 21:51 +0100
Re: cccalendar aurora baccio <aurorabaccio@gmail.com> - 2020-03-11 06:40 -0700
Re: cccalendar "Urs Eggmann" <Urs.Eggmann@shinternet.ch> - 2020-03-11 22:28 +0100
Re: cccalendar aurora baccio <aurorabaccio@gmail.com> - 2020-03-12 00:15 -0700
Re: cccalendar aurora baccio <aurorabaccio@gmail.com> - 2020-03-12 07:10 -0700
Re: cccalendar "Urs Eggmann" <Urs.Eggmann@shinternet.ch> - 2020-03-12 20:20 +0100
Re: cccalendar Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2020-03-12 23:05 +0100
Re: cccalendar "Urs Eggmann" <Urs.Eggmann@shinternet.ch> - 2020-03-13 20:59 +0100
Re: cccalendar aurora baccio <aurorabaccio@gmail.com> - 2020-03-14 01:12 -0700
Re: cccalendar "Urs Eggmann" <Urs.Eggmann@shinternet.ch> - 2020-03-14 22:21 +0100
Re: cccalendar aurora baccio <aurorabaccio@gmail.com> - 2020-03-15 01:38 -0700
Re: cccalendar aurora baccio <aurorabaccio@gmail.com> - 2020-03-22 02:15 -0700
Re: cccalendar "Urs Eggmann" <Urs.Eggmann@shinternet.ch> - 2020-03-22 16:12 +0100
| From | aurora baccio <aurorabaccio@gmail.com> |
|---|---|
| Date | 2020-03-09 10:02 -0700 |
| Subject | cccalendar |
| Message-ID | <60fa3510-d017-4200-8059-cf690e3ee833@googlegroups.com> |
Good evening, I have turned cccalendar into a bookshop and am looking for an agenda. I can't get the Easter calculation to work. It gives me the year 2000. in the CalendarNuovo_Maschera class I inserted export odccusCalendar and in initi of the same class I launched the Feiertage () method. What is missing ? Thank you auraro baccio
[toc] | [next] | [standalone]
| From | "Glen Townsley" <coogee.2015@gmail.com> |
|---|---|
| Date | 2020-03-10 04:03 +1000 |
| Message-ID | <r460g5$1576$1@gioia.aioe.org> |
| In reply to | #12916 |
Aurora, I'm not familiar with cccalendar, but maybe SetEpoch() is what you need, Cheers Glen Townsley "aurora baccio" wrote in message news:60fa3510-d017-4200-8059-cf690e3ee833@googlegroups.com... Good evening, I have turned cccalendar into a bookshop and am looking for an agenda. I can't get the Easter calculation to work. It gives me the year 2000. in the CalendarNuovo_Maschera class I inserted export odccusCalendar and in initi of the same class I launched the Feiertage () method. What is missing ? Thank you auraro baccio
[toc] | [prev] | [next] | [standalone]
| From | "Urs Eggmann" <Urs.Eggmann@shinternet.ch> |
|---|---|
| Date | 2020-03-09 21:51 +0100 |
| Message-ID | <hcnp2rFp6fvU1@mid.individual.net> |
| In reply to | #12916 |
Hi Aurora, I'm sorry, with that tiny information it is really difficult to give a hint. The method Feiertage(..) is a method of ccCalendar and uses the function OsterSonntag(Year as INT) This function returns the of Easter-Sunday as a DATE . Func can be used without the ccCalendar. Urs "aurora baccio" <aurorabaccio@gmail.com> schrieb im Newsbeitrag news:60fa3510-d017-4200-8059-cf690e3ee833@googlegroups.com... > Good evening, > I have turned cccalendar into a bookshop and am looking for an agenda. > I can't get the Easter calculation to work. It gives me the year 2000. > in the CalendarNuovo_Maschera class I inserted export odccusCalendar and > in initi of the same class I launched the Feiertage () method. > What is missing ? > Thank you > auraro baccio
[toc] | [prev] | [next] | [standalone]
| From | aurora baccio <aurorabaccio@gmail.com> |
|---|---|
| Date | 2020-03-11 06:40 -0700 |
| Message-ID | <08d589a5-297a-4b84-b212-454646894b16@googlegroups.com> |
| In reply to | #12916 |
Il giorno lunedì 9 marzo 2020 18:02:34 UTC+1, aurora baccio ha scritto:
> Good evening,
> I have turned cccalendar into a bookshop and am looking for an agenda.
> I can't get the Easter calculation to work. It gives me the year 2000.
> in the CalendarNuovo_Maschera class I inserted export odccusCalendar and in initi of the same class I launched the Feiertage () method.
> What is missing ?
> Thank you
> auraro baccio
I hope to be clearer:
I created a datadialog and created the calendar mask.
No problem.
I must indicate the Easter date. In the postinit method of the datadialog I write:
oSysMenu := self:EnableSystemMenu(true)
EnableMenuItem(oSysMenu:Handle(),1,_or(_or(MF_DISABLED,MF_GRAYED),MF_BYPOSITION))
*self:Origin := CenterDataWindow(self,self:owner)
self:Caption :="Agenda appuntamenti"
IF AScan(aChildWindows,self:Caption) != 0 // se esiste già
*WarningBox{self,self:Caption,"ATTENZIONE !! Maschera già attivata "}:Show()
FabMessageInfo("Maschera già attivata","Agenda appuntamenti")
self:ENDWindow()
RETURN nil
ELSE
AddChildWindow(self:Caption) // altrimenti l'aggiunge all'array di controllo
ENDIF
self:oDCPasqua:Value := self:oDCcusCalendar:dOstern
the following error is created
Visual Objects (Version 2.8. Build 3.2838), Version 2.8 SP4b
11-03-2020 14:27:51
Application: C:\Prg28CavSS\CavalieriSS.DBG
Error message:
--------------
Error Code: 19 [ VARIABLE NOT INITIALIZED ]
Subsystem: BASE
Function: IVARGET
Argument: {(0x0000)0x00000000} CLASS
CallStack:
CALENDARIONUOVO_MASCHERA:POSTINIT (Line:20)
CALENDARIONUOVO_MASCHERA:INIT (Line:83)
MAINWINDOW:GESTIONECALENDARIO (Line:5)
APP:START (Line:100)
START (Line:6)
in the classroom
CLASS CalendarioNuovo_Maschera INHERIT DATADIALOG
PROTECT oDCCustomControl1 AS CCCALENDAR
PROTECT oCCPushButton1 AS PUSHBUTTON
PROTECT oCCPushButton2 AS PUSHBUTTON
PROTECT oCCPushButton3 AS PUSHBUTTON
PROTECT oCCPushButton4 AS PUSHBUTTON
PROTECT oCCPushButton5 AS PUSHBUTTON
PROTECT oCCPushButton6 AS PUSHBUTTON
PROTECT oCCPushButton7 AS PUSHBUTTON
PROTECT oCCPushButton8 AS PUSHBUTTON
PROTECT oCCPushButton9 AS PUSHBUTTON
PROTECT oCCPushButton10 AS PUSHBUTTON
PROTECT oCCPushButton11 AS PUSHBUTTON
PROTECT oCCPushButton12 AS PUSHBUTTON
PROTECT oCCEsci AS PUSHBUTTON
PROTECT oDCPasqua AS SINGLELINEEDIT
//{{%UC%}} USER CODE STARTS HERE (do NOT remove this line)
*EXPORT oDCcusCalendar as CCCALENDAR
hidden oDCcusCalendar as CCCALENDAR
what's the mistake?
thank you
aurora baccio
[toc] | [prev] | [next] | [standalone]
| From | "Urs Eggmann" <Urs.Eggmann@shinternet.ch> |
|---|---|
| Date | 2020-03-11 22:28 +0100 |
| Message-ID | <hct3gqFsu0oU1@mid.individual.net> |
| In reply to | #12922 |
Hi Aurora,
I think you have painted the dialog with the painter and the
CLASS CalendarioNuovo_Maschera INHERIT DATADIALOG
contains the CustomControl. If that is so, the two lines after the line
//{{%UC%}} USER CODE STARTS HERE (do NOT remove this line)
do not make sense.
In the PostInit you must call the oDCCustomControl1 and not oDCcusCalendar
That is not initialized as far as I can see.
Probably you need to insert here self:oDCCustomControl1:Actualize(ToDay)
Regards
Urs
"aurora baccio" <aurorabaccio@gmail.com> schrieb im Newsbeitrag
news:08d589a5-297a-4b84-b212-454646894b16@googlegroups.com...
Il giorno lunedì 9 marzo 2020 18:02:34 UTC+1, aurora baccio ha scritto:
> Good evening,
> I have turned cccalendar into a bookshop and am looking for an agenda.
> I can't get the Easter calculation to work. It gives me the year 2000.
> in the CalendarNuovo_Maschera class I inserted export odccusCalendar and
> in initi of the same class I launched the Feiertage () method.
> What is missing ?
> Thank you
> auraro baccio
I hope to be clearer:
I created a datadialog and created the calendar mask.
No problem.
I must indicate the Easter date. In the postinit method of the datadialog I
write:
oSysMenu := self:EnableSystemMenu(true)
EnableMenuItem(oSysMenu:Handle(),1,_or(_or(MF_DISABLED,MF_GRAYED),MF_BYPOSITION))
*self:Origin := CenterDataWindow(self,self:owner)
self:Caption :="Agenda appuntamenti"
IF AScan(aChildWindows,self:Caption) != 0 // se esiste già
*WarningBox{self,self:Caption,"ATTENZIONE !! Maschera già attivata "}:Show()
FabMessageInfo("Maschera già attivata","Agenda appuntamenti")
self:ENDWindow()
RETURN nil
ELSE
AddChildWindow(self:Caption) // altrimenti l'aggiunge all'array di
controllo
ENDIF
self:oDCPasqua:Value := self:oDCcusCalendar:dOstern
the following error is created
Visual Objects (Version 2.8. Build 3.2838), Version 2.8 SP4b
11-03-2020 14:27:51
Application: C:\Prg28CavSS\CavalieriSS.DBG
Error message:
--------------
Error Code: 19 [ VARIABLE NOT INITIALIZED ]
Subsystem: BASE
Function: IVARGET
Argument: {(0x0000)0x00000000} CLASS
CallStack:
CALENDARIONUOVO_MASCHERA:POSTINIT (Line:20)
CALENDARIONUOVO_MASCHERA:INIT (Line:83)
MAINWINDOW:GESTIONECALENDARIO (Line:5)
APP:START (Line:100)
START (Line:6)
in the classroom
CLASS CalendarioNuovo_Maschera INHERIT DATADIALOG
PROTECT oDCCustomControl1 AS CCCALENDAR
PROTECT oCCPushButton1 AS PUSHBUTTON
PROTECT oCCPushButton2 AS PUSHBUTTON
PROTECT oCCPushButton3 AS PUSHBUTTON
PROTECT oCCPushButton4 AS PUSHBUTTON
PROTECT oCCPushButton5 AS PUSHBUTTON
PROTECT oCCPushButton6 AS PUSHBUTTON
PROTECT oCCPushButton7 AS PUSHBUTTON
PROTECT oCCPushButton8 AS PUSHBUTTON
PROTECT oCCPushButton9 AS PUSHBUTTON
PROTECT oCCPushButton10 AS PUSHBUTTON
PROTECT oCCPushButton11 AS PUSHBUTTON
PROTECT oCCPushButton12 AS PUSHBUTTON
PROTECT oCCEsci AS PUSHBUTTON
PROTECT oDCPasqua AS SINGLELINEEDIT
//{{%UC%}} USER CODE STARTS HERE (do NOT remove this line)
*EXPORT oDCcusCalendar as CCCALENDAR
hidden oDCcusCalendar as CCCALENDAR
what's the mistake?
thank you
aurora baccio
[toc] | [prev] | [next] | [standalone]
| From | aurora baccio <aurorabaccio@gmail.com> |
|---|---|
| Date | 2020-03-12 00:15 -0700 |
| Message-ID | <0cd5d73a-8204-471c-843f-161dbfbd0369@googlegroups.com> |
| In reply to | #12916 |
Il giorno lunedì 9 marzo 2020 18:02:34 UTC+1, aurora baccio ha scritto: > Good evening, > I have turned cccalendar into a bookshop and am looking for an agenda. > I can't get the Easter calculation to work. It gives me the year 2000. > in the CalendarNuovo_Maschera class I inserted export odccusCalendar and in initi of the same class I launched the Feiertage () method. > What is missing ? > Thank you > auraro baccio ok aurora baccio
[toc] | [prev] | [next] | [standalone]
| From | aurora baccio <aurorabaccio@gmail.com> |
|---|---|
| Date | 2020-03-12 07:10 -0700 |
| Message-ID | <0c54f23a-8471-48df-8f72-41adda35afa7@googlegroups.com> |
| In reply to | #12916 |
Il giorno lunedì 9 marzo 2020 18:02:34 UTC+1, aurora baccio ha scritto: > Good evening, > I have turned cccalendar into a bookshop and am looking for an agenda. > I can't get the Easter calculation to work. It gives me the year 2000. > in the CalendarNuovo_Maschera class I inserted export odccusCalendar and in initi of the same class I launched the Feiertage () method. > What is missing ? > Thank you > auraro baccio two problems. In the angenda that I build there are days of non-work that I coded in an archive called 'calendar'. To select the day to view, use the MouseButtonDoubleClick method. In this method, how do I recall the calendar archive? And above all how can I recall the datadialog that contains the archive of the day? thank you aurora baccio
[toc] | [prev] | [next] | [standalone]
| From | "Urs Eggmann" <Urs.Eggmann@shinternet.ch> |
|---|---|
| Date | 2020-03-12 20:20 +0100 |
| Message-ID | <hcvgg4Fdt1eU1@mid.individual.net> |
| In reply to | #12925 |
Hi Aurora, Without the source code it is somewhere between difficult and impossible to give you some useful tips(blind flying...g) <two problems. <In the angenda that I build there are days of non-work that I coded in an archive called <'calendar'. <To select the day to view, use the MouseButtonDoubleClick method. <In this method, how do I recall the calendar archive? What is that archive? a database, a textfile or what? <And above all how can I recall the datadialog that contains the archive of the day? <thank you What is the archive of the day? regards urs
[toc] | [prev] | [next] | [standalone]
| From | Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> |
|---|---|
| Date | 2020-03-12 23:05 +0100 |
| Message-ID | <p1cl6fhtb9j76pcef95f4gkv3oq81j3pnr@4ax.com> |
| In reply to | #12926 |
Aurora, I agree with Urs, and I suspect that the language barrier does not make it easier. Do you know https://www.deepl.com/translator? It's free, write your questions in your language, copy it there, copy the result there in English, or for Urs even better, in German, and post it here. The translation quality is amazing. Sono d'accordo con Urs e sospetto che la barriera linguistica non la renda più facile. Conoscete https://www.deepl.com/translator? È gratuito, scrivete le vostre domande nella vostra lingua, copiatele lì, copiate il risultato lì in inglese, o per Urs ancora meglio, in tedesco, e postatelo qui. La qualità della traduzione è sorprendente. My italian is non-existent ;), the above is 1:1 from the url.... >Hi Aurora, > >Without the source code it is somewhere between difficult and impossible to >give you some useful tips(blind flying...g) > ><two problems. ><In the angenda that I build there are days of non-work that I coded in an >archive called <'calendar'. ><To select the day to view, use the MouseButtonDoubleClick method. ><In this method, how do I recall the calendar archive? > >What is that archive? a database, a textfile or what? > > > ><And above all how can I recall the datadialog that contains the archive of >the day? ><thank you > >What is the archive of the day? > >regards >urs Regards Karl
[toc] | [prev] | [next] | [standalone]
| From | "Urs Eggmann" <Urs.Eggmann@shinternet.ch> |
|---|---|
| Date | 2020-03-13 20:59 +0100 |
| Message-ID | <hd272aFpugU1@mid.individual.net> |
| In reply to | #12927 |
Hallo Karl, Besten Dank für Deinen Hinweis! Ciao, Karl, Grazie mille per il vostro suggerimento! Hello, Karl, Thank you very much for your hint! regards Urs "Karl Faller" <mail_withoutthat_@_drei-f_andthat_.de> schrieb im Newsbeitrag news:p1cl6fhtb9j76pcef95f4gkv3oq81j3pnr@4ax.com... > Aurora, > I agree with Urs, and I suspect that the language barrier does not > make it easier. Do you know https://www.deepl.com/translator? It's > free, write your questions in your language, copy it there, copy the > result there in English, or for Urs even better, in German, and post > it here. The translation quality is amazing. > > Sono d'accordo con Urs e sospetto che la barriera linguistica non la > renda più facile. Conoscete https://www.deepl.com/translator? È > gratuito, scrivete le vostre domande nella vostra lingua, copiatele > lì, copiate il risultato lì in inglese, o per Urs ancora meglio, in > tedesco, e postatelo qui. La qualità della traduzione è sorprendente. > > My italian is non-existent ;), the above is 1:1 from the url.... > > >>Hi Aurora, >> >>Without the source code it is somewhere between difficult and impossible >>to >>give you some useful tips(blind flying...g) >> >><two problems. >><In the angenda that I build there are days of non-work that I coded in an >>archive called <'calendar'. >><To select the day to view, use the MouseButtonDoubleClick method. >><In this method, how do I recall the calendar archive? >> >>What is that archive? a database, a textfile or what? >> >> >> >><And above all how can I recall the datadialog that contains the archive >>of >>the day? >><thank you >> >>What is the archive of the day? >> >>regards >>urs > Regards > > Karl
[toc] | [prev] | [next] | [standalone]
| From | aurora baccio <aurorabaccio@gmail.com> |
|---|---|
| Date | 2020-03-14 01:12 -0700 |
| Message-ID | <6e977778-931d-4f1a-bc85-037f5a65771b@googlegroups.com> |
| In reply to | #12916 |
Il giorno lunedì 9 marzo 2020 18:02:34 UTC+1, aurora baccio ha scritto:
> Good evening,
> I have turned cccalendar into a bookshop and am looking for an agenda.
> I can't get the Easter calculation to work. It gives me the year 2000.
> in the CalendarNuovo_Maschera class I inserted export odccusCalendar and in initi of the same class I launched the Feiertage () method.
> What is missing ?
> Thank you
> auraro baccio
METHOD DrawDays( hDC , dDatum ) CLASS ccCalendar // Metodo con sabato colorato
LOCAL nDays, nCol, nRow , nColBegin ,i as int
* LOCAL nIndex AS INT
LOCAL rect is _WINRECT
LOCAL dDateForWeekCalc, dDate as date
local DataDiPasqua := self:dOstern as date
* nBeginn := timeGetTime() // Für Zeitmessungen während der Entwicklung
SetBkMode(hDC, TRANSPARENT) // Sonst stehen die Tage auf kleinen weissen Rechteckchen...
SelectObject(hDC , self:oFont_actual:Handle() )
self:aDays := {} // Array mit Tag, Column, Row und Index für die grafischen Spielereien
// Erster Tag des Monats Primo giorno del mese
self:dFirst := ConDate(Year(dDatum),Month(dDatum),1 )
dDate := self:dFirst - 1 // Startdate für das Array aDays Data di inizio dell'array aDays
// Letzter Tag des Monats L'ultimo giorno del mese
self:dLast := self:LastDayofMonth(dDatum)
dDateForWeekCalc := self:dFirst // Datum zur Berechnung der Woche.
// Anzahl Tage im Monat Numero di giorni al mese
nDays := self:dLast - self:dFirst+1
// In welcher Kolonne (== Wochentag) startet die Tabelle? In quale colonna (== giorno della settimana) inizia la tabella?
nColBegin := nCol := DoWGer(self:dFirst ) // Montag als erster Tag der Woche (VO hat den Sonntag....)
// Die Reihe ist immer die erste La riga è sempre la prima
nRow := 1
FOR i := 1 to nDays
// Rechteck für die Woche des Monats
// Wird mehrfach gerechnet, wäre noch zu verbessern
// Rettangolo per la settimana del mese
// Se ci sono più calcoli, c'è ancora spazio per miglioramenti
rect.left :=0
rect.top := 35 + nRow * self:nHoeheRechteck
rect.right := rect.left+self:nBreiteRechteck
rect.bottom := rect.top +self:nHoeheRechteck - 2 // minus 2, sonst ist das Grid weg....
SetTextColor(hDC, RGB(0,0,255))
// Draw the number of week Disegna il numero della settimana
DrawText(hDC,String2Psz(Str( WeekFeser( dDateForWeekCalc ) ,2,0) ) ,2,@rect,DT_CENTER+DT_VCENTER+DT_SINGLELINE)
// Set the rect for the text Imposta il rettangolo per il testo
rect.left :=nCol * self:nBreiteRechteck
rect.top := 35 + nRow * self:nHoeheRechteck
rect.right := rect.left + self:nBreiteRechteck
rect.bottom := rect.top+self:nHoeheRechteck
// Draw the text Disegna il testo
SetTextColor(hDC, RGB(0,0,0))
***************************** festa del 1 gennaio
IF i == 1 .and. Month(dDatum) == 1
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 6 gennaio
IF i == 6 .and. Month(dDatum) == 1
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 25 aprile
IF i == 25 .and. Month(dDatum) == 4
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 1 maggio
IF i == 1 .and. Month(dDatum) == 5
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 2 giugno
if i==2 .and.Month(dDatum)==6
SetTextColor(hDC, RGB(250,0,0))
endif
***************************** festa del 15 agosto
IF i == 15 .and. Month(dDatum) == 8
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 1 novembre
IF i == 1 .and. Month(dDatum) == 11
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 8 dicembre
IF i ==8 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 13 dicembre santa lucia patrona da siracusa
IF i == 13 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 25 dicembre santo natale
IF i == 25 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 26 dicembre santo stefano
IF i == 26 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 26 dicembre santo stefano
IF i == Day(DataDiPasqua)+1 .and. Month(dDatum) == Month(DataDiPasqua)
SetTextColor(hDC, RGB(250,0,0))
ENDIF
****************************************************************************
DrawText(hDC,String2Psz(Str(i,2,0) ),2,@rect,DT_CENTER+DT_VCENTER+DT_SINGLELINE)
// nIndex := ( nRow - 1) * 7 + nCol
AAdd (self:aDays , { i , nCol , nRow, ( nRow - 1) * 7 + nCol , dDate + i } )
// "Universal-Array für Tage, Spalten, Reihen und Datums des Monats
* ? i , " " , nCol , " " , nRow , " " , ( nRow - 1) * 7 + nCol
// Quando è sabato ... // Wenn es Sonntag ist....
* IF Mod( nCol , 6 ) == 0
IF nCol == 6
SetTextColor(hDC, RGB(0,200,200))
rect.left := nCol * self:nBreiteRechteck
rect.top := 35 + nRow * self:nHoeheRechteck
rect.right := rect.left + self:nBreiteRechteck
rect.bottom := rect.top + self:nHoeheRechteck
*DrawText(hDC,String2Psz(Str(i,2,0) ),2,@rect,DT_CENTER+DT_VCENTER+DT_SINGLELINE)
SetTextColor(hDC, RGB(0,0,0))
***************************** festa del 1 gennaio
IF i == 1 .and. Month(dDatum) == 1
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 6 gennaio
IF i == 6 .and. Month(dDatum) == 1
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 25 aprile
IF i == 25 .and. Month(dDatum) == 4
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 1 maggio
IF i == 1 .and. Month(dDatum) == 5
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 2 giugno
if i==2 .and.Month(dDatum)==6
SetTextColor(hDC, RGB(250,0,0))
endif
***************************** festa del 15 agosto
IF i == 15 .and. Month(dDatum) == 8
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 1 novembre
IF i == 1 .and. Month(dDatum) == 11
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 8 dicembre
IF i ==8 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 13 dicembre santa lucia patrona da siracusa
IF i == 13 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 25 dicembre santo natale
IF i == 25 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 26 dicembre santo stefano
IF i == 26 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
****************************************************************************
DrawText(hDC,String2Psz(Str(i,2,0) ),2,@rect,DT_CENTER+DT_VCENTER+DT_SINGLELINE)
ELSEIF nCol == 7 // Quando è domenica ... // Wenn es Sonntag ist....
SetTextColor(hDC, RGB(255,0,0))
rect.left := nCol * self:nBreiteRechteck
rect.top := 35 + nRow * self:nHoeheRechteck
rect.right := rect.left + self:nBreiteRechteck
rect.bottom := rect.top + self:nHoeheRechteck
DrawText(hDC,String2Psz(Str(i,2,0) ),2,@rect,DT_CENTER+DT_VCENTER+DT_SINGLELINE)
SetTextColor(hDC, RGB(0,0,0))
***************************** festa del 1 gennaio
IF i == 1 .and. Month(dDatum) == 1
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 6 gennaio
IF i == 6 .and. Month(dDatum) == 1
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 25 aprile
IF i == 25 .and. Month(dDatum) == 4
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 1 maggio
IF i == 1 .and. Month(dDatum) == 5
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 2 giugno
if i==2 .and.Month(dDatum)==6
SetTextColor(hDC, RGB(250,0,0))
endif
***************************** festa del 15 agosto
IF i == 15 .and. Month(dDatum) == 8
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 1 novembre
IF i == 1 .and. Month(dDatum) == 11
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 8 dicembre
IF i ==8 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 13 dicembre santa lucia patrona da siracusa
IF i == 13 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 25 dicembre santo natale
IF i == 25 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 26 dicembre santo stefano
IF i == 26 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
****************************************************************************
nCol := 0 // Reset nCol
nRow ++
dDateForWeekCalc += 7
ENDIF
nCol ++ //
NEXT i
IF Between(Today() , self:dFirst , self:dLast)
self:FrameCell(Today(),hDC )
ENDIF
* ShowArray(SELF:aDays)
* nEnde := timeGetTime()
* ? nDauer := nEnde - nBeginn , ' milliSec'
RETURN nil
attached in drawdays method modified according to your instructions. as you can see, not only national holidays but also Easter Monday are marked in red.
now from the method doubleclick I have to select the agenda that interests me to open but first I have to know if the selected day is a working day or not.
To do this I have to read an external .dbf to cccalendar (if the 'festive' field is marked 'F' then on that day you do not work and a message appears to that effect).
I can't create this procedure.
Thank you
aurora baccio
[toc] | [prev] | [next] | [standalone]
| From | "Urs Eggmann" <Urs.Eggmann@shinternet.ch> |
|---|---|
| Date | 2020-03-14 22:21 +0100 |
| Message-ID | <hd51tnFj48vU1@mid.individual.net> |
| In reply to | #12929 |
Ciao, Aurora,
Ho scritto questo testo in tedesco, come ha suggerito Karl e poi l'ho
tradotto. prova anche questo.
Per favore inviatemi il dbf con le vacanze al mio indirizzo e-mail. Proverò
poi qualcosa con il metodo MouseButtonDoubleclick.
Saluti
Urs
"aurora baccio" <aurorabaccio@gmail.com> schrieb im Newsbeitrag
news:6e977778-931d-4f1a-bc85-037f5a65771b@googlegroups.com...
Il giorno lunedì 9 marzo 2020 18:02:34 UTC+1, aurora baccio ha scritto:
> Good evening,
> I have turned cccalendar into a bookshop and am looking for an agenda.
> I can't get the Easter calculation to work. It gives me the year 2000.
> in the CalendarNuovo_Maschera class I inserted export odccusCalendar and
> in initi of the same class I launched the Feiertage () method.
> What is missing ?
> Thank you
> auraro baccio
METHOD DrawDays( hDC , dDatum ) CLASS ccCalendar // Metodo con sabato
colorato
LOCAL nDays, nCol, nRow , nColBegin ,i as int
* LOCAL nIndex AS INT
LOCAL rect is _WINRECT
LOCAL dDateForWeekCalc, dDate as date
local DataDiPasqua := self:dOstern as date
* nBeginn := timeGetTime() // Für Zeitmessungen während der Entwicklung
SetBkMode(hDC, TRANSPARENT) // Sonst stehen die Tage auf kleinen weissen
Rechteckchen...
SelectObject(hDC , self:oFont_actual:Handle() )
self:aDays := {} // Array mit Tag, Column, Row und Index für die grafischen
Spielereien
// Erster Tag des Monats Primo giorno del mese
self:dFirst := ConDate(Year(dDatum),Month(dDatum),1 )
dDate := self:dFirst - 1 // Startdate für das Array aDays Data di inizio
dell'array aDays
// Letzter Tag des Monats L'ultimo giorno del mese
self:dLast := self:LastDayofMonth(dDatum)
dDateForWeekCalc := self:dFirst // Datum zur Berechnung der Woche.
// Anzahl Tage im Monat Numero di giorni al mese
nDays := self:dLast - self:dFirst+1
// In welcher Kolonne (== Wochentag) startet die Tabelle? In quale
colonna (== giorno della settimana) inizia la tabella?
nColBegin := nCol := DoWGer(self:dFirst ) // Montag als erster Tag der Woche
(VO hat den Sonntag....)
// Die Reihe ist immer die erste La riga è sempre la prima
nRow := 1
FOR i := 1 to nDays
// Rechteck für die Woche des Monats
// Wird mehrfach gerechnet, wäre noch zu verbessern
// Rettangolo per la settimana del mese
// Se ci sono più calcoli, c'è ancora spazio per miglioramenti
rect.left :=0
rect.top := 35 + nRow * self:nHoeheRechteck
rect.right := rect.left+self:nBreiteRechteck
rect.bottom := rect.top +self:nHoeheRechteck - 2 // minus 2, sonst ist das
Grid weg....
SetTextColor(hDC, RGB(0,0,255))
// Draw the number of week Disegna il numero della settimana
DrawText(hDC,String2Psz(Str( WeekFeser( dDateForWeekCalc ) ,2,0) )
,2,@rect,DT_CENTER+DT_VCENTER+DT_SINGLELINE)
// Set the rect for the text Imposta il rettangolo per il testo
rect.left :=nCol * self:nBreiteRechteck
rect.top := 35 + nRow * self:nHoeheRechteck
rect.right := rect.left + self:nBreiteRechteck
rect.bottom := rect.top+self:nHoeheRechteck
// Draw the text Disegna il testo
SetTextColor(hDC, RGB(0,0,0))
***************************** festa del 1 gennaio
IF i == 1 .and. Month(dDatum) == 1
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 6 gennaio
IF i == 6 .and. Month(dDatum) == 1
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 25 aprile
IF i == 25 .and. Month(dDatum) == 4
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 1 maggio
IF i == 1 .and. Month(dDatum) == 5
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 2 giugno
if i==2 .and.Month(dDatum)==6
SetTextColor(hDC, RGB(250,0,0))
endif
***************************** festa del 15 agosto
IF i == 15 .and. Month(dDatum) == 8
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 1 novembre
IF i == 1 .and. Month(dDatum) == 11
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 8 dicembre
IF i ==8 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 13 dicembre santa lucia patrona da
siracusa
IF i == 13 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 25 dicembre santo natale
IF i == 25 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 26 dicembre santo stefano
IF i == 26 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 26 dicembre santo stefano
IF i == Day(DataDiPasqua)+1 .and. Month(dDatum) == Month(DataDiPasqua)
SetTextColor(hDC, RGB(250,0,0))
ENDIF
****************************************************************************
DrawText(hDC,String2Psz(Str(i,2,0) ),2,@rect,DT_CENTER+DT_VCENTER+DT_SINGLELINE)
// nIndex := ( nRow - 1) * 7 + nCol
AAdd (self:aDays , { i , nCol , nRow, ( nRow - 1) * 7 + nCol , dDate + i } )
// "Universal-Array für Tage, Spalten, Reihen und Datums des Monats
* ? i , " " , nCol , " " , nRow , " " , ( nRow - 1) * 7 + nCol
// Quando è sabato ... // Wenn es Sonntag ist....
* IF Mod( nCol , 6 ) == 0
IF nCol == 6
SetTextColor(hDC, RGB(0,200,200))
rect.left := nCol * self:nBreiteRechteck
rect.top := 35 + nRow * self:nHoeheRechteck
rect.right := rect.left + self:nBreiteRechteck
rect.bottom := rect.top + self:nHoeheRechteck
*DrawText(hDC,String2Psz(Str(i,2,0) ),2,@rect,DT_CENTER+DT_VCENTER+DT_SINGLELINE)
SetTextColor(hDC, RGB(0,0,0))
***************************** festa del 1 gennaio
IF i == 1 .and. Month(dDatum) == 1
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 6 gennaio
IF i == 6 .and. Month(dDatum) == 1
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 25 aprile
IF i == 25 .and. Month(dDatum) == 4
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 1 maggio
IF i == 1 .and. Month(dDatum) == 5
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 2 giugno
if i==2 .and.Month(dDatum)==6
SetTextColor(hDC, RGB(250,0,0))
endif
***************************** festa del 15 agosto
IF i == 15 .and. Month(dDatum) == 8
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 1 novembre
IF i == 1 .and. Month(dDatum) == 11
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 8 dicembre
IF i ==8 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 13 dicembre santa lucia patrona da
siracusa
IF i == 13 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 25 dicembre santo natale
IF i == 25 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 26 dicembre santo stefano
IF i == 26 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
****************************************************************************
DrawText(hDC,String2Psz(Str(i,2,0) ),2,@rect,DT_CENTER+DT_VCENTER+DT_SINGLELINE)
ELSEIF nCol == 7 // Quando è domenica ... // Wenn es Sonntag ist....
SetTextColor(hDC, RGB(255,0,0))
rect.left := nCol * self:nBreiteRechteck
rect.top := 35 + nRow * self:nHoeheRechteck
rect.right := rect.left + self:nBreiteRechteck
rect.bottom := rect.top + self:nHoeheRechteck
DrawText(hDC,String2Psz(Str(i,2,0) ),2,@rect,DT_CENTER+DT_VCENTER+DT_SINGLELINE)
SetTextColor(hDC, RGB(0,0,0))
***************************** festa del 1 gennaio
IF i == 1 .and. Month(dDatum) == 1
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 6 gennaio
IF i == 6 .and. Month(dDatum) == 1
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 25 aprile
IF i == 25 .and. Month(dDatum) == 4
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 1 maggio
IF i == 1 .and. Month(dDatum) == 5
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 2 giugno
if i==2 .and.Month(dDatum)==6
SetTextColor(hDC, RGB(250,0,0))
endif
***************************** festa del 15 agosto
IF i == 15 .and. Month(dDatum) == 8
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 1 novembre
IF i == 1 .and. Month(dDatum) == 11
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 8 dicembre
IF i ==8 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 13 dicembre santa lucia patrona da
siracusa
IF i == 13 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 25 dicembre santo natale
IF i == 25 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
***************************** festa del 26 dicembre santo stefano
IF i == 26 .and. Month(dDatum) == 12
SetTextColor(hDC, RGB(250,0,0))
ENDIF
****************************************************************************
nCol := 0 // Reset nCol
nRow ++
dDateForWeekCalc += 7
ENDIF
nCol ++ //
NEXT i
IF Between(Today() , self:dFirst , self:dLast)
self:FrameCell(Today(),hDC )
ENDIF
* ShowArray(SELF:aDays)
* nEnde := timeGetTime()
* ? nDauer := nEnde - nBeginn , ' milliSec'
RETURN nil
attached in drawdays method modified according to your instructions. as you
can see, not only national holidays but also Easter Monday are marked in
red.
now from the method doubleclick I have to select the agenda that interests
me to open but first I have to know if the selected day is a working day or
not.
To do this I have to read an external .dbf to cccalendar (if the 'festive'
field is marked 'F' then on that day you do not work and a message appears
to that effect).
I can't create this procedure.
Thank you
aurora baccio
[toc] | [prev] | [next] | [standalone]
| From | aurora baccio <aurorabaccio@gmail.com> |
|---|---|
| Date | 2020-03-15 01:38 -0700 |
| Message-ID | <a746453b-ed37-4c1b-938d-f142927cb249@googlegroups.com> |
| In reply to | #12930 |
Il giorno sabato 14 marzo 2020 22:50:49 UTC+1, Urs Eggmann ha scritto:
> Ciao, Aurora,
> Ho scritto questo testo in tedesco, come ha suggerito Karl e poi l'ho
> tradotto. prova anche questo.
>
> Per favore inviatemi il dbf con le vacanze al mio indirizzo e-mail. Proverò
> poi qualcosa con il metodo MouseButtonDoubleclick.
> Saluti
> Urs
>
> "aurora baccio" <aurorabaccio@gmail.com> schrieb im Newsbeitrag
> news:6e977778-931d-4f1a-bc85-037f5a65771b@googlegroups.com...
> Il giorno lunedì 9 marzo 2020 18:02:34 UTC+1, aurora baccio ha scritto:
> > Good evening,
> > I have turned cccalendar into a bookshop and am looking for an agenda.
> > I can't get the Easter calculation to work. It gives me the year 2000.
> > in the CalendarNuovo_Maschera class I inserted export odccusCalendar and
> > in initi of the same class I launched the Feiertage () method.
> > What is missing ?
> > Thank you
> > auraro baccio
>
> METHOD DrawDays( hDC , dDatum ) CLASS ccCalendar // Metodo con sabato
> colorato
>
> LOCAL nDays, nCol, nRow , nColBegin ,i as int
> * LOCAL nIndex AS INT
> LOCAL rect is _WINRECT
> LOCAL dDateForWeekCalc, dDate as date
> local DataDiPasqua := self:dOstern as date
> * nBeginn := timeGetTime() // Für Zeitmessungen während der Entwicklung
>
> SetBkMode(hDC, TRANSPARENT) // Sonst stehen die Tage auf kleinen weissen
> Rechteckchen...
> SelectObject(hDC , self:oFont_actual:Handle() )
>
> self:aDays := {} // Array mit Tag, Column, Row und Index für die grafischen
> Spielereien
> // Erster Tag des Monats Primo giorno del mese
> self:dFirst := ConDate(Year(dDatum),Month(dDatum),1 )
> dDate := self:dFirst - 1 // Startdate für das Array aDays Data di inizio
> dell'array aDays
>
> // Letzter Tag des Monats L'ultimo giorno del mese
> self:dLast := self:LastDayofMonth(dDatum)
> dDateForWeekCalc := self:dFirst // Datum zur Berechnung der Woche.
>
> // Anzahl Tage im Monat Numero di giorni al mese
> nDays := self:dLast - self:dFirst+1
>
> // In welcher Kolonne (== Wochentag) startet die Tabelle? In quale
> colonna (== giorno della settimana) inizia la tabella?
> nColBegin := nCol := DoWGer(self:dFirst ) // Montag als erster Tag der Woche
> (VO hat den Sonntag....)
>
> // Die Reihe ist immer die erste La riga è sempre la prima
> nRow := 1
>
> FOR i := 1 to nDays
> // Rechteck für die Woche des Monats
> // Wird mehrfach gerechnet, wäre noch zu verbessern
> // Rettangolo per la settimana del mese
> // Se ci sono più calcoli, c'è ancora spazio per miglioramenti
> rect.left :=0
> rect.top := 35 + nRow * self:nHoeheRechteck
> rect.right := rect.left+self:nBreiteRechteck
> rect.bottom := rect.top +self:nHoeheRechteck - 2 // minus 2, sonst ist das
> Grid weg....
> SetTextColor(hDC, RGB(0,0,255))
>
> // Draw the number of week Disegna il numero della settimana
> DrawText(hDC,String2Psz(Str( WeekFeser( dDateForWeekCalc ) ,2,0) )
> ,2,@rect,DT_CENTER+DT_VCENTER+DT_SINGLELINE)
>
> // Set the rect for the text Imposta il rettangolo per il testo
> rect.left :=nCol * self:nBreiteRechteck
> rect.top := 35 + nRow * self:nHoeheRechteck
> rect.right := rect.left + self:nBreiteRechteck
> rect.bottom := rect.top+self:nHoeheRechteck
>
> // Draw the text Disegna il testo
> SetTextColor(hDC, RGB(0,0,0))
> ***************************** festa del 1 gennaio
> IF i == 1 .and. Month(dDatum) == 1
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 6 gennaio
> IF i == 6 .and. Month(dDatum) == 1
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 25 aprile
> IF i == 25 .and. Month(dDatum) == 4
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 1 maggio
> IF i == 1 .and. Month(dDatum) == 5
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 2 giugno
> if i==2 .and.Month(dDatum)==6
> SetTextColor(hDC, RGB(250,0,0))
> endif
> ***************************** festa del 15 agosto
> IF i == 15 .and. Month(dDatum) == 8
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 1 novembre
> IF i == 1 .and. Month(dDatum) == 11
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 8 dicembre
> IF i ==8 .and. Month(dDatum) == 12
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 13 dicembre santa lucia patrona da
> siracusa
> IF i == 13 .and. Month(dDatum) == 12
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 25 dicembre santo natale
> IF i == 25 .and. Month(dDatum) == 12
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 26 dicembre santo stefano
> IF i == 26 .and. Month(dDatum) == 12
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 26 dicembre santo stefano
> IF i == Day(DataDiPasqua)+1 .and. Month(dDatum) == Month(DataDiPasqua)
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ****************************************************************************
> DrawText(hDC,String2Psz(Str(i,2,0) ),2,@rect,DT_CENTER+DT_VCENTER+DT_SINGLELINE)
>
> // nIndex := ( nRow - 1) * 7 + nCol
> AAdd (self:aDays , { i , nCol , nRow, ( nRow - 1) * 7 + nCol , dDate + i } )
> // "Universal-Array für Tage, Spalten, Reihen und Datums des Monats
> * ? i , " " , nCol , " " , nRow , " " , ( nRow - 1) * 7 + nCol
> // Quando è sabato ... // Wenn es Sonntag ist....
> * IF Mod( nCol , 6 ) == 0
> IF nCol == 6
> SetTextColor(hDC, RGB(0,200,200))
> rect.left := nCol * self:nBreiteRechteck
> rect.top := 35 + nRow * self:nHoeheRechteck
> rect.right := rect.left + self:nBreiteRechteck
> rect.bottom := rect.top + self:nHoeheRechteck
>
> *DrawText(hDC,String2Psz(Str(i,2,0) ),2,@rect,DT_CENTER+DT_VCENTER+DT_SINGLELINE)
> SetTextColor(hDC, RGB(0,0,0))
> ***************************** festa del 1 gennaio
> IF i == 1 .and. Month(dDatum) == 1
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 6 gennaio
> IF i == 6 .and. Month(dDatum) == 1
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 25 aprile
> IF i == 25 .and. Month(dDatum) == 4
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 1 maggio
> IF i == 1 .and. Month(dDatum) == 5
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 2 giugno
> if i==2 .and.Month(dDatum)==6
> SetTextColor(hDC, RGB(250,0,0))
> endif
> ***************************** festa del 15 agosto
> IF i == 15 .and. Month(dDatum) == 8
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 1 novembre
> IF i == 1 .and. Month(dDatum) == 11
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 8 dicembre
> IF i ==8 .and. Month(dDatum) == 12
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 13 dicembre santa lucia patrona da
> siracusa
> IF i == 13 .and. Month(dDatum) == 12
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 25 dicembre santo natale
> IF i == 25 .and. Month(dDatum) == 12
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 26 dicembre santo stefano
> IF i == 26 .and. Month(dDatum) == 12
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ****************************************************************************
> DrawText(hDC,String2Psz(Str(i,2,0) ),2,@rect,DT_CENTER+DT_VCENTER+DT_SINGLELINE)
>
> ELSEIF nCol == 7 // Quando è domenica ... // Wenn es Sonntag ist....
> SetTextColor(hDC, RGB(255,0,0))
> rect.left := nCol * self:nBreiteRechteck
> rect.top := 35 + nRow * self:nHoeheRechteck
> rect.right := rect.left + self:nBreiteRechteck
> rect.bottom := rect.top + self:nHoeheRechteck
> DrawText(hDC,String2Psz(Str(i,2,0) ),2,@rect,DT_CENTER+DT_VCENTER+DT_SINGLELINE)
> SetTextColor(hDC, RGB(0,0,0))
> ***************************** festa del 1 gennaio
> IF i == 1 .and. Month(dDatum) == 1
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 6 gennaio
> IF i == 6 .and. Month(dDatum) == 1
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 25 aprile
> IF i == 25 .and. Month(dDatum) == 4
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 1 maggio
> IF i == 1 .and. Month(dDatum) == 5
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 2 giugno
> if i==2 .and.Month(dDatum)==6
> SetTextColor(hDC, RGB(250,0,0))
> endif
> ***************************** festa del 15 agosto
> IF i == 15 .and. Month(dDatum) == 8
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 1 novembre
> IF i == 1 .and. Month(dDatum) == 11
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 8 dicembre
> IF i ==8 .and. Month(dDatum) == 12
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 13 dicembre santa lucia patrona da
> siracusa
> IF i == 13 .and. Month(dDatum) == 12
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 25 dicembre santo natale
> IF i == 25 .and. Month(dDatum) == 12
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ***************************** festa del 26 dicembre santo stefano
> IF i == 26 .and. Month(dDatum) == 12
> SetTextColor(hDC, RGB(250,0,0))
> ENDIF
> ****************************************************************************
> nCol := 0 // Reset nCol
> nRow ++
> dDateForWeekCalc += 7
> ENDIF
> nCol ++ //
> NEXT i
> IF Between(Today() , self:dFirst , self:dLast)
> self:FrameCell(Today(),hDC )
> ENDIF
>
> * ShowArray(SELF:aDays)
> * nEnde := timeGetTime()
> * ? nDauer := nEnde - nBeginn , ' milliSec'
>
> RETURN nil
>
> attached in drawdays method modified according to your instructions. as you
> can see, not only national holidays but also Easter Monday are marked in
> red.
> now from the method doubleclick I have to select the agenda that interests
> me to open but first I have to know if the selected day is a working day or
> not.
> To do this I have to read an external .dbf to cccalendar (if the 'festive'
> field is marked 'F' then on that day you do not work and a message appears
> to that effect).
> I can't create this procedure.
> Thank you
> aurora baccio
Ich habe Ihnen geantwortet
danke für Ihre Hilfe
aurora baccio
[toc] | [prev] | [next] | [standalone]
| From | aurora baccio <aurorabaccio@gmail.com> |
|---|---|
| Date | 2020-03-22 02:15 -0700 |
| Message-ID | <db23e056-efb6-4d5c-99c5-e71cf9596dfb@googlegroups.com> |
| In reply to | #12916 |
Il giorno lunedì 9 marzo 2020 18:02:34 UTC+1, aurora baccio ha scritto: > Good evening, > I have turned cccalendar into a bookshop and am looking for an agenda. > I can't get the Easter calculation to work. It gives me the year 2000. > in the CalendarNuovo_Maschera class I inserted export odccusCalendar and in initi of the same class I launched the Feiertage () method. > What is missing ? > Thank you > auraro baccio Ich wünsche Ihnen einen schönen Sonntag, Ich glaube, ich habe die Probleme mit der Buchhandlung gelöst. Jetzt müssen Sie nur noch einen Doppelklick ausführen in der Anlage sind die vorgenommenen Änderungen METHOD MouseButtonDown(oME) CLASS ccCalendar *LOCAL nRow, nCol, nIndex AS INT LOCAL nRow, nCol, nIndex as dword LOCAL x, y AS INT LOCAL nColBegin , nFound AS DWORD LOCAL nButtonID AS INT LOCAL LallowedArea as LOGIC local DataSelezionata as date SUPER:MouseButtonDoubleClick(oME) ***************** IF LallowedArea **self:Owner:oDCProvaData:TextValue := LTrim(Str(nFound) ) + ". " + LTrim(CMonth(self:dActualDate) ) + ". " +LTrim(Str(Year(self:dActualDate) ) ) *? NTrim(nFound) *? NTrim(Month(self:dActualDate)) *? NTrim(Year(self:dActualDate)) *? CToD(NTrim(nFound) + "/" + NTrim(Month(self:dActualDate) ) + "/" +NTrim(Year(self:dActualDate) ) ) *_Wait() *self:Owner:Owner:Owner:oDCDataOggi:TextValue := NTrim(nFound) + "/" + NTrim(Month(self:dActualDate) ) + "/" +NTrim(Year(self:dActualDate) ) DataSelezionata := CToD(NTrim(nFound) + "/" + NTrim(Month(self:dActualDate) ) + "/" +NTrim(Year(self:dActualDate) ) ) Send(self:Owner,#DateChanged, DataSelezionata) ENDIF return nil Damit übertrage ich das mich interessierende Datum in die Agenda-Klasse (in diesem Fall CalendarNew_Mask) und fahre fort. danke für alles, immer aurora baccio
[toc] | [prev] | [next] | [standalone]
| From | "Urs Eggmann" <Urs.Eggmann@shinternet.ch> |
|---|---|
| Date | 2020-03-22 16:12 +0100 |
| Message-ID | <hdpdjuFsj52U1@mid.individual.net> |
| In reply to | #12938 |
Hi Aurora, Nice to hear that it works now. If the class structure is designt very carful, with the necessary access and assign methods the OOP is fascinating tool. Regards and success Urs Ciao Aurora, Mi fa piacere sapere che ora funziona.Se la struttura della classe è designata molto carina, con l'accesso necessario e l'assegnazione dei metodi, l'OOP è uno strumento affascinante. Saluti e successo Urs "aurora baccio" <aurorabaccio@gmail.com> schrieb im Newsbeitrag news:db23e056-efb6-4d5c-99c5-e71cf9596dfb@googlegroups.com... Il giorno lunedì 9 marzo 2020 18:02:34 UTC+1, aurora baccio ha scritto: > Good evening, > I have turned cccalendar into a bookshop and am looking for an agenda. > I can't get the Easter calculation to work. It gives me the year 2000. > in the CalendarNuovo_Maschera class I inserted export odccusCalendar and > in initi of the same class I launched the Feiertage () method. > What is missing ? > Thank you > auraro baccio Ich wünsche Ihnen einen schönen Sonntag, Ich glaube, ich habe die Probleme mit der Buchhandlung gelöst. Jetzt müssen Sie nur noch einen Doppelklick ausführen in der Anlage sind die vorgenommenen Änderungen METHOD MouseButtonDown(oME) CLASS ccCalendar *LOCAL nRow, nCol, nIndex AS INT LOCAL nRow, nCol, nIndex as dword LOCAL x, y AS INT LOCAL nColBegin , nFound AS DWORD LOCAL nButtonID AS INT LOCAL LallowedArea as LOGIC local DataSelezionata as date SUPER:MouseButtonDoubleClick(oME) ***************** IF LallowedArea **self:Owner:oDCProvaData:TextValue := LTrim(Str(nFound) ) + ". " + LTrim(CMonth(self:dActualDate) ) + ". " +LTrim(Str(Year(self:dActualDate) ) ) *? NTrim(nFound) *? NTrim(Month(self:dActualDate)) *? NTrim(Year(self:dActualDate)) *? CToD(NTrim(nFound) + "/" + NTrim(Month(self:dActualDate) ) + "/" +NTrim(Year(self:dActualDate) ) ) *_Wait() *self:Owner:Owner:Owner:oDCDataOggi:TextValue := NTrim(nFound) + "/" + NTrim(Month(self:dActualDate) ) + "/" +NTrim(Year(self:dActualDate) ) DataSelezionata := CToD(NTrim(nFound) + "/" + NTrim(Month(self:dActualDate) ) + "/" +NTrim(Year(self:dActualDate) ) ) Send(self:Owner,#DateChanged, DataSelezionata) ENDIF return nil Damit übertrage ich das mich interessierende Datum in die Agenda-Klasse (in diesem Fall CalendarNew_Mask) und fahre fort. danke für alles, immer aurora baccio
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web