Outlook Calendar (prototype)

Re: Outlook Calendar (prototype)

Postby Maurizio » Sat Jan 29, 2011 9:54 am

Daniel and Crespo

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

Maurizio
http://www.nipeservice.com


Image
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Re: Outlook Calendar (prototype)

Postby MdaSolution » 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
User avatar
MdaSolution
 
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: Outlook Calendar (prototype)

Postby James Bott » Sat Jan 29, 2011 7:56 pm

Maurizio,

Please describe the changes you made.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Outlook Calendar (prototype)

Postby Maurizio » Mon Jan 31, 2011 8: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
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Re: Outlook Calendar (prototype)

Postby MdaSolution » Mon Jan 31, 2011 9: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
User avatar
MdaSolution
 
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: Outlook Calendar (prototype)

Postby MdaSolution » Mon Jan 31, 2011 9:15 am

I can see only these variables :
oView:dDate
oView:nStartHour
oView:nEndHour
FWH .. BC582.. xharbour
User avatar
MdaSolution
 
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: Outlook Calendar (prototype)

Postby MdaSolution » Mon Jan 31, 2011 9: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
User avatar
MdaSolution
 
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: Outlook Calendar (prototype)

Postby MdaSolution » Tue Feb 01, 2011 9:06 am

Daniel or Reinaldo,
Can You tell us How Make it Please ?
FWH .. BC582.. xharbour
User avatar
MdaSolution
 
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: Outlook Calendar (prototype)

Postby Andrés González » Fri Feb 04, 2011 8: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.
Last edited by Andrés González on Fri Feb 04, 2011 11:54 am, edited 1 time in total.
Saludos

Andrés González desde Mallorca
User avatar
Andrés González
 
Posts: 628
Joined: Thu Jan 19, 2006 10:45 am
Location: Mallorca

Re: Outlook Calendar (prototype)

Postby Maurizio » Fri Feb 04, 2011 11:06 am

Hello

Modify METHOD PaintHeader

dFirstDateWeek += 1

Regards Maurizio
www.nipeservice.com
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Re: Outlook Calendar (prototype)

Postby Andrés González » Fri Feb 04, 2011 11:50 am

Thanks Maurizio working perfectly.
Saludos

Andrés González desde Mallorca
User avatar
Andrés González
 
Posts: 628
Joined: Thu Jan 19, 2006 10:45 am
Location: Mallorca

Re: Outlook Calendar (prototype)

Postby Silvio » 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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: Outlook Calendar (prototype)

Postby Silvio » 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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: Outlook Calendar (prototype)

Postby Silvio » 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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: Outlook Calendar (prototype)

Postby Silvio » 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

Image

Write YOur impressions!!


Code: Select all  Expand view


  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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 70 guests