FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Outlook Calendar (prototype)
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: Outlook Calendar (prototype)
Posted: Sat Feb 05, 2011 09:35 PM

Please, where I cand download the latest source to test it?.

Thank you.

FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: Outlook Calendar (prototype)
Posted: Sat Feb 05, 2011 09:57 PM

in this post

Best Regards, Saludos



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

for the method METHOD RButtonDown( nRow, nCol, nKeyFlags ) I made
someone Know How insert check to menu popup please ?

Best Regards, Saludos



Falconi Silvio
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Outlook Calendar (prototype)
Posted: Sat Feb 05, 2011 10:40 PM
Silvio wrote: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)


Sorry, but i don't like...
i think, we dont need inside the class a popup... it's responsibility of programmers, call custom process after push "right button", same way "left button"
i leave the code until
Code (fw): Select all Collapse
 if ::bRClicked != nil
   return Eval( ::bRClicked, nRow, nCol, nKeyFlags, Self )
endif

if the program is write in french, italian or spanish... we can not use this feature (understand?)

really should say you, THANKS, you 're unique try modify and share code of this powerful class

i will post a new sample (without source code)
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: Outlook Calendar (prototype)
Posted: Sat Feb 05, 2011 10:44 PM

ok Daniel
it was only a test If you see Microsoft Outlook and go to a day view click on r button you can see a popup
I think we can leave "the setinterval menu", gotodate, set date

Important first - Can you found a solution for insert and modify a record and the possibility to select from x time to y time with mouse

Best Regards, Saludos



Falconi Silvio
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Outlook Calendar (prototype)
Posted: Sat Feb 05, 2011 10:53 PM
Hello...

it's a new sample, new features

download sample here: http://www.sitasoft.net/fivewin/samples/calex1.zip

created xbase command,
Code (fw): Select all Collapse
#xcommand DEFINE CALEX <oCalex>;
          [ <of: OF, WINDOW, DIALOG, PANEL> <oWnd> ];
          [ FIRST_DATE <nFirst> ];
       => ;
           [ Calex_SetFirstDate( <nFirst> ) ];;
           <oCalex> := TCalex():New( <oWnd> )

#xcommand DEFINE MONTH [ VIEW ] <of: OF, CALEX> <oCalex>;
          [ ON SELECT VIEW <uSelectView> ] ;
          [ ON SELECT DAY <uSelected> ] ;
          [ ON SELECT WEEK <uWeek> ] ;
          [ ON NEXT <uNext> ] ;
          [ ON PREV <uPrev> ] ;
          [ ON DELETE <uDelete> ];
          [ START HOUR <nStart> ];
          [ END HOUR <nEnd> ];
          [ <lActivate: ACTIVATE> ];
       => ;
          WITH OBJECT <oCalex>;;
             [ :oMonthView:bSelectView   := \{ | Self, oLast| <uSelectView> \} ] ;;
             [ :oMonthView:bSelected     := \{ | Self, dDate| <uSelected> \} ] ;;
             [ :oMonthView:bSelectedWeek := \{ | Self, nWeek, dDate | <uWeek> \} ] ;;
             [ :oMonthView:bOnNext       := \{ | Self, dDate| <uNext> \} ] ;;
             [ :oMonthView:bOnPrev       := \{ | Self, dDate| <uPrev> \} ] ;;
             [ :oMonthView:bOnDelete     := \{ | Self, nIdx | <uDelete> \} ] ;;
             [ :oMonthView:nStartHour    := <nStart> ] ;;
             [ :oMonthView:nEndHour      := <nEnd> ];;
             [ If( <.lActivate.>, :SetMonthView(), ) ];;
          END <oCalex>
          
#xcommand DEFINE DAY [ VIEW ] <of: OF, CALEX> <oCalex>;
          [ ON SELECT VIEW <uSelectView> ] ;
          [ ON LEFT CLICK <uSelected> ] ;
          [ ON RIGHT CLICK <uRSelected> ];          
          [ ON NEXT <uNext> ] ;
          [ ON DELETE <uDelete> ];
          [ ON PREV <uPrev> ] ;
          [ START HOUR <nStart> ];
          [ END HOUR <nEnd> ];
          [ INTERVAL <nInterval> ];
          [ AMPM <lAmPm> ];
          [ <lActivate: ACTIVATE> ];
       => ;
          WITH OBJECT <oCalex>;;
             [ :oDayView:bSelected     := \{ | nRow, nCol, Self, dDateFrom, nTimeFrom, nTimeTo | <uSelected> \} ] ;;
             [ :oDayView:bSelectView   := \{ | Self, oLast| <uSelectView> \} ] ;;
             [ :oDayView:bOnNext       := \{ | Self, dDate| <uNext> \} ] ;;
             [ :oDayView:bOnPrev       := \{ | Self, dDate| <uPrev> \} ] ;;
             [ :oDayView:bOnDelete   := \{ | Self, nIdx | <uDelete> \} ] ;;
             [ :oDayView:bRSelected    := \{ | nRow, nCol, Self, dDateFrom, dDateTo, nTimeFrom, nTimeTo | <uRSelected> \} ] ;;             
             [ :oDayView:nStartHour    := <nStart> ] ;;
             [ :oDayView:nEndHour      := <nEnd> ];;
             [ :oDayView:SetInterval( <nInterval> ) ];;
             [ :oDayView:lAmPm         := <.lAmPm.> ];;
             [ If( <.lActivate.>, :SetDayView(), ) ];;
          END <oCalex>          


#xcommand DEFINE WEEK [ VIEW ] <of: OF, CALEX> <oCalex>;
          [ ON SELECT VIEW <uSelectView> ] ;
          [ ON LEFT CLICK <uSelected> ] ;
          [ ON RIGHT CLICK <uRSelected> ];
          [ ON NEXT <uNext> ] ;
          [ ON PREV <uPrev> ] ;
          [ ON DELETE <uDelete> ];
          [ START HOUR <nStart> ];
          [ END HOUR <nEnd> ];
          [ INTERVAL <nInterval> ];
          [ AMPM <lAmPm> ];
          [ <lActivate: ACTIVATE> ];
       => ;
          WITH OBJECT <oCalex>;;
             [ :oWeekView:bSelected     := \{ | nRow, nCol, Self, dDateFrom, dDateTo, nTimeFrom, nTimeTo | <uSelected> \} ] ;;
             [ :oWeekView:bSelectView   := \{ | Self, oLast | <uSelectView> \} ] ;;
             [ :oWeekView:bOnNext       := \{ | Self, dDate | <uNext> \} ] ;;
             [ :oWeekView:bOnPrev       := \{ | Self, dDate | <uPrev> \} ] ;;
             [ :oWeekView:bRSelected    := \{ | nRow, nCol, Self, dDateFrom, dDateTo, nTimeFrom, nTimeTo | <uRSelected> \} ] ;;
             [ :oWeekView:bOnDelete     := \{ | Self, nIdx | <uDelete> \} ] ;;
             [ :oWeekView:nStartHour    := <nStart> ] ;;
             [ :oWeekView:nEndHour      := <nEnd> ];;
             [ :oWeekView:SetInterval( <nInterval> ) ];;
             [ :oWeekView:lAmPm         := <.lAmPm.> ];;
             [ If( <.lActivate.>, ( :SetWeekView(), :Resize() ), ) ];;
          END <oCalex>



select multiple rows


adding data, launch action with Right Button



Select all day, click in header


select / action over "dates" (delete/modify)


Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: Outlook Calendar (prototype)
Posted: Sun Feb 06, 2011 03:59 PM

fantastic !!!
on zip there is not the sources of classes modified!!!!!!!

Best Regards, Saludos



Falconi Silvio
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Outlook Calendar (prototype)
Posted: Sun Feb 06, 2011 05:05 PM
Silvio...

Daniel Garcia-Gil wrote:i will post a new sample (without source code)


i will no share source code (no yet), maybe i will post a LIB
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: Outlook Calendar (prototype)
Posted: Sun Feb 06, 2011 09:25 PM

Daniel,

Do you sell the source or it will be included in FW?

Thank you.

FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 632
Joined: Thu Jan 19, 2006 10:45 AM
Re: Outlook Calendar (prototype)
Posted: Mon Feb 07, 2011 07:36 PM
Daniel, please just the METHOD Calex_SetFirstDate( nFirst ) to follow your sample.
Code (fw): Select all Collapse
#xcommand DEFINE CALEX <oCalex>;
          [ <of: OF, WINDOW, DIALOG, PANEL> <oWnd> ];
          [ FIRST_DATE <nFirst> ];
       => ;
           [ Calex_SetFirstDate( <nFirst> ) ];;
           <oCalex> := TCalex():New( <oWnd> )



Thanks
Saludos



Andrés González desde Mallorca
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Outlook Calendar (prototype)
Posted: Mon Feb 07, 2011 08:32 PM

Andres...

Calex_SetFirstDate( nFirst ) is not a method is a function to set first date of week, only work to calex project

Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Outlook Calendar (prototype)
Posted: Mon Feb 07, 2011 08:34 PM
Hello

this a link to download library... (i didnt tested with xharbour)

http://www.sitasoft.net/fivewin/files/calexlib.zip
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: Outlook Calendar (prototype)
Posted: Tue Feb 08, 2011 08:20 AM

How I can translate the names of the days and mounths ?

Best Regards, Saludos



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

Daniel,
with xharbour not run

Progetto: main, Ambiente: xFive_Pelles:
[1]:iLink32.Exe -Gn -aa -Tpe -s @main.bcl
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Error: Unresolved external '_HB_FUNCLSLOCKDEF' referenced from C:\WORK\PRG\AGENDA\LIB\CALEXX.LIB|tcalex
Error: Unresolved external '
HB_FUN_HB_HASH' referenced from C:\WORK\PRG\AGENDA\LIB\CALEXX.LIB|tcalex
Error: Unresolved external '_HB_FUN
_CLSUNLOCKDEF' referenced from C:\WORK\PRG\AGENDA\LIB\CALEXX.LIB|tcalex
Error: Unresolved external '_HB_FUN_HB_HHASKEY' referenced from C:\WORK\PRG\AGENDA\LIB\CALEXX.LIB|tmonthv
Error: Unresolved external '_HB_FUN_HB_HGET' referenced from C:\WORK\PRG\AGENDA\LIB\CALEXX.LIB|tmonthv
Error: Unresolved external '_HB_FUN_HB_HSET' referenced from C:\WORK\PRG\AGENDA\LIB\CALEXX.LIB|tmonthv
Error: Unresolved external '_HB_FUN_FW_GT' referenced from C:\WORK\PRG\AGENDA\LIB\CALEXX.LIB|tmonthv
Error: Unresolved external '_HB_FUN_HB_HDEL' referenced from C:\WORK\PRG\AGENDA\LIB\CALEXX.LIB|tcalex
Error: Unresolved external '_HB_FUN_HB_HEVAL' referenced from C:\WORK\PRG\AGENDA\LIB\CALEXX.LIB|tcalex

Best Regards, Saludos



Falconi Silvio
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Outlook Calendar (prototype)
Posted: Tue Feb 08, 2011 09:38 AM

Silvio

Link fixed... download again