FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Outlook Calendar (prototype)
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Re: Outlook Calendar (prototype)
Posted: Sat Jan 29, 2011 09:54 AM
Daniel and Crespo

a very good job , I have tested it and this my first improvement .

Maurizio
http://www.nipeservice.com


Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
Re: Outlook Calendar (prototype)
Posted: Sat Jan 29, 2011 10:24 AM

can you explain us how you insert a new record and create box color into ?
Do you use mouse move or not ?

FWH .. BC582.. xharbour
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Outlook Calendar (prototype)
Posted: Sat Jan 29, 2011 07:56 PM

Maurizio,

Please describe the changes you made.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Re: Outlook Calendar (prototype)
Posted: Mon Jan 31, 2011 08:09 AM

Hello James

In the method ::oCalex:LoadDates you cann specify the color

nColorText and aGrad

::oCalex:LoadDates( ( ::cAlias )->START,;
( ::cAlias )->END, ;
( ::cAlias )->DSTART, ;
( ::cAlias )->DEND, ;
( ::cAlias )->TEXT, ;
( ::cAlias )->SUBJECT ,;
nColorText,;
{ { 1.00,aGrad,16777215 },{ 0.00,16777215,aGrad } };
)

You cann use this for call a Dialog

::oCalex:bLDblClick := {|nRow, nCol, nKeyFlags | ::Dialog(nRow, nCol, nKeyFlags)}

in the Dialog you have the value

::oCalex:oCalInfo:nStart 
::oCalex:oCalInfo:nEnd  
::oCalex:oCalInfo:dStart 
::oCalex:oCalInfo:dEnd

Regards Maurizio

Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
Re: Outlook Calendar (prototype)
Posted: Mon Jan 31, 2011 09:08 AM

Sorry,
but I add a method Dialog_InS(nRow, nCol, nKeyFlags) to SampleCalex

and I insert this row at buildcalex method line 162
::oCalex:bLDblClick := {|nRow, nCol, nKeyFlags |::Dialog_InS(nRow, nCol, nKeyFlags)}
before of ::oPanelCalex:oClient = ::oCalex

on Dialog_Ins method I insert only these lines :

METHOD Dialog_InS(nRow, nCol, nKeyFlags) CLASS SampleCalex
?"w"
msginfo(::oCalex:oCalInfo:nStart)
msginfo(::oCalex:oCalInfo:nEnd )
msginfo(dtoc(::oCalex:oCalInfo:dStart))
msginfo(::oCalex:oCalInfo:dEnd)

RETURN nil

when I click o n a cell it make this error

Error description: Error BASE/1004 Class: 'NIL' has no exported method: NSTART

where is the error ?

FWH .. BC582.. xharbour
Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
Re: Outlook Calendar (prototype)
Posted: Mon Jan 31, 2011 09:15 AM

I can see only these variables :
oView:dDate
oView:nStartHour
oView:nEndHour

FWH .. BC582.. xharbour
Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
Re: Outlook Calendar (prototype)
Posted: Mon Jan 31, 2011 09:31 AM

NOT RUN !!!
MAKE ERROR!!

METHOD Dialog_InS(nRow, nCol, nKeyFlags) CLASS SampleCalex

Local oFrmIns
Local cIniFecha
Local cFinFecha
Local cIniTime
Local cFinTime

Local oGet[4]

cIniFecha := ::oCalex:oCalInfo:dStart
cFinFecha := ::oCalex:oCalInfo:dEnd
cIniTime := ::oCalex:oCalInfo:nStart
cFinTime := ::oCalex:oCalInfo:nEnd

DEFINE DIALOG oFrmIns

@ 5, 3 SAY "&Date:" SIZE 25, 7 PIXEL OF oFrmIns COLOR 0, 14215660
@ 4, 42 GET oGet[1] VAR cIniFecha SIZE 30, 10 PIXEL OF oFrmIns

ACTIVATE DIALOG oFrmIns

RETURN nil

FWH .. BC582.. xharbour
Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
Re: Outlook Calendar (prototype)
Posted: Tue Feb 01, 2011 09:06 AM

Daniel or Reinaldo,
Can You tell us How Make it Please ?

FWH .. BC582.. xharbour
Posts: 632
Joined: Thu Jan 19, 2006 10:45 AM
Re: Outlook Calendar (prototype)
Posted: Fri Feb 04, 2011 08:54 AM

Mdasolution, you code works perfectly. I add just the code and no problems, it just show all the data when we dobleclick in an appointment.

Someone knows how to start the calendar in Monday or what I have to modify for it ?

Thanks.

Saludos



Andrés González desde Mallorca
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Re: Outlook Calendar (prototype)
Posted: Fri Feb 04, 2011 11:06 AM

Hello

Modify METHOD PaintHeader

dFirstDateWeek += 1

Regards Maurizio

www.nipeservice.com

Posts: 632
Joined: Thu Jan 19, 2006 10:45 AM
Re: Outlook Calendar (prototype)
Posted: Fri Feb 04, 2011 11:50 AM

Thanks Maurizio working perfectly.

Saludos



Andrés González desde Mallorca
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: Outlook Calendar (prototype)
Posted: Sat Feb 05, 2011 11:05 AM

run ok for me thanks Mda and Maurizio

how I can have the subject field ?

this for modfy a record

and to insert a new record do you found a solution ?

Best Regards, Saludos



Falconi Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: Outlook Calendar (prototype)
Posted: Sat Feb 05, 2011 11:14 AM

Maurizio,
I made on
METHOD GetFirstDateWeek() CLASS TCalEx

if ::Classname() != "TDAYVIEW" .or. ::Classname() != "TMonthView"
dFirstDateWeek += 1
endif

it run only for TDAYVIEW but not for tmonthview

Best Regards, Saludos



Falconi Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: Outlook Calendar (prototype)
Posted: Sat Feb 05, 2011 11:28 AM

HOW i CAN MAKE TO SHOW ON TDAYVIEW

FROM 00:00 TO 24:00 ?

AND THE SAME FOR THE WEEK

THANKS

Best Regards, Saludos



Falconi Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: Outlook Calendar (prototype)
Posted: Sat Feb 05, 2011 12:10 PM
For all :

New two methods to insert to CLASS TCalEx

METHOD RButtonDown( nRow, nCol, nKeyFlags )

it create a simply menu popup with these operation

call a function to insert or modifiy a record
Set a date
Go to a date
set Interval

as you can see on this picture



Write YOur impressions!!


Code (fw): Select all Collapse
  METHOD RButtonDown( nRow, nCol, nKeyFlags )  CLASS TCalEx

     Local oMenu
     Local oThis  := self

     if ::Classname() != "TDAYVIEW" .or. ::Classname() != "TWEEKVIEW"

 if ::bRClicked != nil
   return Eval( ::bRClicked, nRow, nCol, nKeyFlags, Self )
endif


MENU oMenu POPUP
MENUITEM "New appointment" ACTION msginfo("New Record")
MENUITEM "Today"           ACTION (::SetDate( date() )   ,::oDayView:refresh())
MENUITEM "Go to date "     ACTION (::GotoDate(nRow, nCol) ,::oDayView:refresh())

MENUITEM "Interval"
MENU
   MENUITEM "5 minutes"   ACTION (::oDayView:SetInterval( 5 )  ,::oDayView:refresh())
   MENUITEM "10 minutes"  ACTION (::oDayView:SetInterval( 10 ) ,::oDayView:refresh())
   MENUITEM "15 minutes"  ACTION (::oDayView:SetInterval( 15 ) ,::oDayView:refresh())
   MENUITEM "20 minutes"  ACTION (::oDayView:SetInterval( 20 ) ,::oDayView:refresh())
   MENUITEM "30 minutes"  ACTION (::oDayView:SetInterval( 30 ) ,::oDayView:refresh())
   MENUITEM "60 minutes"  ACTION (::oDayView:SetInterval( 60 ) ,::oDayView:refresh())
   ENDMENU
ENDMENU
ACTIVATE POPUP oMenu OF oThis AT nRow, nCol
ENDIF

return nil

#include "dtpicker.ch"

 METHOD GotoDate()   CLASS TCalEx     //add by silvio
   LOCAL oDlg, oGet, lChg:=.F. ,oBut[2]
   LOCAL dDate:=Date()
   DEFINE DIALOG oDlg SIZE 210,80  TITLE "Go to a date"
   @ 0.8,2  DTPICKER  oGet VAR dDate  OF oDlg  SIZE 80,10;
                    ON CHANGE oGet:Refresh()
     @ 0.2, 2 SAY "Select a new date"   OF oDlg  SIZE 80,7
     @  28,    2 BUTTON oBut[1]   Prompt "&Confirm"   SIZE  30,  10 PIXEL OF oDlg ACTION (lChg:=.T.,oDlg:End())
     @  28,  35 BUTTON oBut[2]   Prompt "Ca&ncel"   SIZE  30,  10 PIXEL OF oDlg ACTION (lChg:=.F.,oDlg:End()) CANCEL
   ACTIVATE DIALOG oDlg CENTER
   IF lChg
      ::SetDate(dDate)
   ENDIF
   RETURN (NIL)
Best Regards, Saludos



Falconi Silvio