26. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 3/31/2017 10:45:42 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

26.1 Files compared

# Location File Last Modified
1 CPRS v31A.zip\CPRS v31A\VITL5_P34_src.zip\Source\VITALSCOMMON fGMV_DateTimeDLG.pas Tue Dec 13 18:25:58 2016 UTC
2 CPRS v31A.zip\CPRS v31A\VITL5_P34_src.zip\Source\VITALSCOMMON fGMV_DateTimeDLG.pas Fri Mar 31 15:01:11 2017 UTC

26.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 842
Changed 1 2
Inserted 0 0
Removed 0 0

26.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

26.4 Active regular expressions

No regular expressions were active.

26.5 Comparison detail

  1   unit fGMV_ DateTimeDL G;
  2   {
  3   ========== ========== ========== ========== ========== ========== ========== ==========
  4   *
  5   *       Ap plication:   Vitals
  6   *       Re vision:      $Revisio n: 1 $  $M odtime: 9/ 08/08 1:43 p $
  7   *       De veloper:      PII                              
  8   *       Si te:          Hines OI FO
  9   *
  10   *       De scription:   This is  an Date/Ti me Selecti on Dialog
  11   *
  12   *       No tes:         Original ly compile d in Delph i V
  13   *                       Uses rou tines from  uGMV-Comm on module:
  14   *                          uGMV- Common.Cal lServer(.. .) -- to c all 'GMV G ET CURRENT  TIME' rou tine,
  15   *                                                      to reteive  M-date/ti me
  16   *                          uGMV- Common.FMD ateTimeToW indowsDate Time(...)
  17   *                                                         -- to c onvert M-d ate/time
  18   *
  19   ========== ========== ========== ========== ========== ========== ========== ==========
  20   *       $A rchive: /V itals/5.0  (Version 5 .0)/5.0.23  (Patch 23 )/VITALS_5 _0_23_8/So urce/VITAL SCOMMON/fG MV_DateTim eDLG.pas $
  21   *
  22   * $History : fGMV_Dat eTimeDLG.p as $
  23    * 
  24    * ******* **********   Version  1  ******* **********
  25    * User: V haishandri a Date: 8/ 12/09    T ime: 8:29a
  26    * Created  in $/Vita ls/5.0 (Ve rsion 5.0) /5.0.23 (P atch 23)/V ITALS_5_0_ 23_8/Sourc e/VITALSCO MMON
  27    * 
  28    * ******* **********   Version  1  ******* **********
  29    * User: V haishandri a Date: 3/ 09/09    T ime: 3:38p
  30    * Created  in $/Vita ls/5.0 (Ve rsion 5.0) /5.0.23 (P atch 23)/V ITALS_5_0_ 23_6/Sourc e/VITALSCO MMON
  31    * 
  32    * ******* **********   Version  1  ******* **********
  33    * User: V haishandri a Date: 1/ 13/09    T ime: 1:26p
  34    * Created  in $/Vita ls/5.0 (Ve rsion 5.0) /5.0.23 (P atch 23)/V ITALS_5_0_ 23_4/Sourc e/VITALSCO MMON
  35    * 
  36    * ******* **********   Version  1  ******* **********
  37    * User: V haishandri a Date: 5/ 14/07    T ime: 10:30 a
  38    * Created  in $/Vita ls GUI 200 7/Vitals-5 -0-18/VITA LSDATETIME
  39    *
  40    * ******* **********   Version  1  ******* **********
  41    * User: V haishandri a Date: 5/ 16/06    T ime: 5:43p
  42    * Created  in $/Vita ls/VITALS- 5-0-18/Vit alsDateTim e
  43    * GUI v.  5.0.18 upd ates the d efault vit al type IE Ns with th e local
  44    * values.
  45    *
  46    * ******* **********   Version  1  ******* **********
  47    * User: V haishandri a Date: 5/ 16/06    T ime: 5:33p
  48    * Created  in $/Vita ls/Vitals- 5-0-18/VIT ALS-5-0-18 /VitalsDat eTime
  49    *
  50    * ******* **********   Version  1  ******* **********
  51    * User: V haishandri a Date: 5/ 24/05    T ime: 3:37p
  52    * Created  in $/Vita ls/Vitals  GUI  v 5.0 .2.1 -5.0. 3.1 - Patc h GMVR-5-7  (CASMed,  CCOW) - De lphi 6/Vit alsDateTim e
  53    *
  54    * ******* **********   Version  1  ******* **********
  55    * User: V haishandri a Date: 4/ 16/04    T ime: 4:21p
  56    * Created  in $/Vita ls/Vitals  GUI Versio n 5.0.3 (C COW, CPRS,  Delphi 7) /VITALSDAT ETIME
  57    *
  58    * ******* **********   Version  2  ******* **********
  59    * User: V haishandri a Date: 2/ 02/04    T ime: 5:18p
  60    * Updated  in $/Vita lsLite/Dat eTimeDLL
  61    *
  62    * ******* **********   Version  1  ******* **********
  63    * User: V haishandri a Date: 1/ 30/04    T ime: 4:34p
  64    * Created  in $/Vita lsLite/Dat eTimeDLL
  65    *
  66    * ******* **********   Version  1  ******* **********
  67    * User: V haishandri a Date: 1/ 15/04    T ime: 3:06p
  68    * Created  in $/Vita lsLite/Vit alsLiteDLL
  69    * Vitals  Lite DLL
  70    *
  71   }
  72  
  73   interface
  74  
  75   uses
  76     Windows,  Messages,  SysUtils,  Classes,  Graphics,  Controls,  Forms, Dia logs,
  77     StdCtrls , Buttons,  ComCtrls,  ExtCtrls;
  78  
  79   type
  80     TfGMV_Da teTime = c lass(TForm )
  81       Panel1 : TPanel;
  82       grpBox DT: TGroup Box;
  83       Panel2 : TPanel;
  84       pnlDat e: TPanel;
  85       Panel5 : TPanel;
  86       bbtnTo day: TBitB tn;
  87       mncCal endar: TMo nthCalenda r;
  88       Panel6 : TPanel;
  89       lbxHou rs: TListB ox;
  90       lbxMin utes: TLis tBox;
  91       Panel4 : TPanel;
  92       bbtnMi dnight: TB itBtn;
  93       bbtnNo w: TBitBtn ;
  94       SpeedB utton2: TS peedButton ;
  95       SpeedB utton1: TS peedButton ;
  96       edtTim e: TEdit;
  97       pnlDat eTimeText:  TPanel;
  98       Label1 : TLabel;
  99       bbtnYe sterday: T BitBtn;
  100       bbtnTo morrow: TB itBtn;
  101       Timer1 : TTimer;
  102       Label2 : TLabel;
  103       proced ure FormCr eate(Sende r: TObject );
  104       proced ure lbxHou rsClick(Se nder: TObj ect);
  105       proced ure lbxMin utesClick( Sender: TO bject);
  106       proced ure edtTim eKeyPress( Sender: TO bject; var  Key: Char );
  107       proced ure bbtnNo wClick(Sen der: TObje ct);
  108       proced ure bbtnMi dnightClic k(Sender:  TObject);
  109       proced ure bbtnTo dayClick(S ender: TOb ject);
  110       proced ure SpeedB utton1Clic k(Sender:  TObject);
  111       proced ure SpeedB utton2Clic k(Sender:  TObject);
  112       proced ure edtTim eChange(Se nder: TObj ect);
  113       proced ure mncCal endarClick (Sender: T Object);
  114       proced ure SetDat eTimeText;
  115       proced ure Update Text;
  116       proced ure bbtnYe sterdayCli ck(Sender:  TObject);
  117       proced ure bbtnTo morrowClic k(Sender:  TObject);
  118       proced ure FormAc tivate(Sen der: TObje ct);
  119       proced ure Timer1 Timer(Send er: TObjec t);
  120       proced ure FormKe yPress(Sen der: TObje ct; var Ke y: Char);
  121     private
  122       { Priv ate declar ations }
  123       dltTim e: TDateTi me;
  124       proced ure SetDat eTime;
  125       functi on TimeIsV alid(h, m:  Integer):  Boolean;
  126       proced ure SetBut tonState;
  127       proced ure setSer verDelay;
  128     public
  129       { Publ ic declara tions }
  130     end;
  131  
  132   var
  133     fGMV_Dat eTime: TfG MV_DateTim e;
  134  
  135   implementa tion
  136  
  137   uses
  138     uGMV_Com mon,
  139     uGMV_Eng ine, uGMV_ Const
  140     ;
  141  
  142   {$IFDEF DA TETIMEDLL}
  143   var
  144     PrevApp:  TApplicat ion;
  145     PrevScre en: TScree n;
  146   {$ENDIF}
  147  
  148   {$R *.DFM}
  149  
  150   procedure  TfGMV_Date Time.FormC reate(Send er: TObjec t);
  151   begin
  152   //{$IFDEF  DLL}
  153     // fix R emedy 1540 38 ------- ---------- ---------- ---------- ---------- ---- start
  154     // prior  to this f ix the cod e was used  within DL L only
  155     setServe rDelay;
  156   //{$ELSE}
  157   //  dltTim e := 0;
  158   //  edtTim e.Text :=  FormatDate Time('hh:m m',Now);
  159   //{$ENDIF}
  160     // fix R emedy 1540 38 ------- ---------- ---------- ---------- ---------- ------ end
  161     Caption  := 'Select  Date & Ti me up to '  + FormatD ateTime('m m/dd/yyyy  hh:mm', mn cCalendar. MaxDate);
  162   end;
  163  
  164   procedure  TfGMV_Date Time.setSe rverDelay;
  165   var
  166     aNow: TD ateTime;
  167     s: strin g;
  168     f: Real;
  169   begin
  170     aNow :=  Now;
  171     try
  172       s := g etCurrentD ateTime;
  173       if s < > '' then
  174       try
  175         f :=  StrToFloa t(s);
  176         f :=  FMDateTim eToWindows DateTime(f );
  177         dltT ime := aNo w - f;
  178         aNow  := f;
  179       except
  180         on E : EConvert Error do
  181         begi n
  182           Me ssageDlg(' Unable to  set client  to the se rvers time .', mtWarn ing, [mbok ], 0);
  183           dl tTime := 0 ;
  184           aN ow := Now;
  185           ed tTime.Text  := Format DateTime(' hh:mm', aN ow);
  186         end;
  187       end;
  188     except
  189       on E:  EConvertEr ror do
  190         Mess ageDlg('Un able to ge t the serv ers time.' , mtWarnin g, [mbok],  0);
  191     end;
  192     grpBoxDT .Caption : = '';
  193     mncCalen dar.MaxDat e := aNow;
  194     mncCalen dar.Date : = mncCalen dar.MaxDat e;
  195   end;
  196  
  197   procedure  TfGMV_Date Time.SetDa teTime;
  198   var
  199     S: strin g;
  200     i, j: In teger;
  201   begin
  202     try
  203       i := S trToInt(lb xHours.Ite ms[lbxHour s.ItemInde x]);
  204     except
  205       i := 0 ;
  206     end;
  207     try
  208       S := l bxMinutes. Items[lbxM inutes.Ite mIndex];
  209       while  (pos('0',  S) = 1) or  (pos(':',  S) = 1) d o
  210         S :=  copy(s, 2 , Length(S ) - 1);
  211       if pos (' --', S)  = 1 then
  212         j :=  0
  213       else
  214         j :=  StrToInt( Piece(S, '  ', 1));
  215     except
  216       j := 0 ;
  217     end;
  218     if TimeI sValid(i,  j) then
  219       edtTim e.Text :=  Format('%2 .2d:%2.2d' , [i, j])
  220     else
  221     begin
  222       Messag eDlg('Sorr y, you can not select  a future  date or ti me' + #13  + #13 +
  223         'or  date more  than 1 yea r old'
  224         , mt Error, [mb Ok], 0)
  225     end;
  226     SetDateT imeText;
  227   end;
  228  
  229   procedure  TfGMV_Date Time.lbxHo ursClick(S ender: TOb ject);
  230   begin
  231     SetDateT ime;
  232   end;
  233  
  234   procedure  TfGMV_Date Time.lbxMi nutesClick (Sender: T Object);
  235   begin
  236     SetDateT ime;
  237   end;
  238  
  239   procedure  TfGMV_Date Time.edtTi meKeyPress (Sender: T Object; va r Key: Cha r);
  240   begin
  241     if Key =  #13 then
  242     begin
  243       try
  244         Upda teText;
  245       except
  246         Mess ageDlg('In valid time  string.',  mtError,  [mbOk], 0) ;
  247         acti vecontrol  := edtTime ;
  248       end;
  249     end;
  250   end;
  251  
  252   procedure  TfGMV_Date Time.Updat eText;
  253   begin
  254     begin
  255       try
  256         SetD ateTimeTex t;
  257       except
  258         Mess ageDlg('Ch eck time v alue!', mt Error, [mb Yes, mbCan cel], 0);
  259       end;
  260     end;
  261   end;
  262  
  263   procedure  TfGMV_Date Time.bbtnN owClick(Se nder: TObj ect);
  264   var
  265     aNow: TD ateTime;
  266   begin
  267     setServe rDelay;
  268     aNow :=  Now - dltT ime;
  269  
  270     edtTime. Text := Fo rmatDateTi me(GMV_Tim eFormat, a Now);
  271     try
  272       mncCal endar.MinD ate := 0;
  273       mncCal endar.MinD ate := aNo w - 365;
  274     except
  275     end;
  276     mncCalen dar.MaxDat e := aNow;
  277     mncCalen dar.Date : = aNow;
  278     caption  := 'Select  Date & Ti me up to '  + FormatD ateTime('m m/dd/yyyy  hh:mm', mn cCalendar. MaxDate);
  279  
  280     SetButto nState;
  281     updateTe xt;
  282     try
  283       lbxHou rs.ItemInd ex := -1;
  284       lbxMin utes.ItemI ndex := -1 ;
  285     except
  286     end;
  287   end;
  288  
  289   procedure  TfGMV_Date Time.bbtnM idnightCli ck(Sender:  TObject);
  290   begin
  291     edtTime. Text := Fo rmatDateTi me('hh:mm' , 0);
  292     updateTe xt;
  293     try
  294       lbxHou rs.ItemInd ex := -1;
  295       lbxMin utes.ItemI ndex := -1 ;
  296     except
  297     end;
  298   end;
  299  
  300   procedure  TfGMV_Date Time.bbtnT odayClick( Sender: TO bject);
  301   begin
  302     mncCalen dar.Date : = Now - dl tTime;
  303     SetDateT imeText;
  304     bbtnTomo rrow.Enabl ed := Fals e;
  305   end;
  306  
  307   procedure  TfGMV_Date Time.Speed Button1Cli ck(Sender:  TObject);
  308   var
  309     T: TDate Time;
  310   begin
  311     try
  312       T := S trToTime(e dtTime.Tex t);
  313       if (T  + trunc(mn cCalendar. Date)) - m ncCalendar .MaxDate >  2 / 24 /  3600 then
  314         Mess ageDlg('So rry, you c annot sele ct a futur e date or  time', //A AN 10/30/2 002
  315           mt Error, [mb Ok], 0) // AAN 10/30/ 2002
  316       else i f (T + tru nc(mncCale ndar.Date) ) < mncCal endar.MinD ate then
  317         Mess ageDlg('So rry, you c annot sele ct a date  more than  1 year old ', //AAN 2 003/06/04
  318           mt Error, [mb Ok], 0) // AAN 2003/0 6/04
  319       else
  320         Moda lResult :=  mrOK
  321     except
  322       Messag eDlg('Inva lid time s tring.', m tError, [m bOk], 0);
  323       active control :=  edtTime;
  324     end;
  325   end;
  326  
  327   procedure  TfGMV_Date Time.Speed Button2Cli ck(Sender:  TObject);
  328   begin
  329     ModalRes ult := mrC ancel;
  330   end;
  331  
  332   procedure  TfGMV_Date Time.edtTi meChange(S ender: TOb ject);
  333   begin
  334     SetDateT imeText;
  335   end;
  336  
  337   procedure  TfGMV_Date Time.SetDa teTimeText ;
  338   begin
  339     pnlDateT imeText.Ca ption := F ormatDateT ime('    m m/dd/yy ',  mncCalend ar.Date) +  edtTime.T ext;
  340   end;
  341  
  342   procedure  TfGMV_Date Time.mncCa lendarClic k(Sender:  TObject);
  343   begin
  344     SetDateT imeText;
  345     SetButto nState;
  346   end;
  347  
  348   function T fGMV_DateT ime.TimeIs Valid(h, m : Integer) : boolean;
  349   begin
  350     result : =
  351       (trunc (mncCalend ar.Date) +  h / 24 +  m / 24 / 6 0 < mncCal endar.MaxD ate)
  352       and
  353       (mncCa lendar.Min Date < tru nc(mncCale ndar.Date)  + h / 24  + m / 24 /  60);
  354   end;
  355  
  356   procedure  TfGMV_Date Time.bbtnY esterdayCl ick(Sender : TObject) ;
  357   begin
  358     try
  359       mncCal endar.Date  := mncCal endar.Date  - 1;
  360       Update Text;
  361       SetBut tonState;
  362     except
  363     end;
  364   end;
  365  
  366   procedure  TfGMV_Date Time.bbtnT omorrowCli ck(Sender:  TObject);
  367   begin
  368     try
  369       mncCal endar.Date  := mncCal endar.Date  + 1;
  370       Update Text;
  371       SetBut tonState;
  372     except
  373     end;
  374   end;
  375  
  376   procedure  TfGMV_Date Time.SetBu ttonState;
  377   begin
  378     if trunc (mncCalend ar.Date) =  trunc(mnc Calendar.M axDate) th en
  379       bbtnTo morrow.Ena bled := Fa lse
  380     else
  381       bbtnTo morrow.Ena bled := Tr ue;
  382     if trunc (mncCalend ar.Date) =  trunc(mnc Calendar.M inDate) th en
  383       bbtnYe sterday.En abled := F alse
  384     else
  385       bbtnYe sterday.En abled := T rue;
  386   end;
  387  
  388   procedure  TfGMV_Date Time.FormA ctivate(Se nder: TObj ect);
  389   begin
  390     updateTe xt;
  391     SetButto nState;
  392   end;
  393  
  394   procedure  TfGMV_Date Time.Timer 1Timer(Sen der: TObje ct);
  395   var
  396     aNow: TD ateTime;
  397   begin
  398     try
  399       aNow : = Now - dl tTime;
  400       label2 .Caption : = FormatDa teTime(GMV _DateTimeF ormat, aNo w);
  401       mncCal endar.MaxD ate := aNo w;
  402     except
  403     end;
  404   end;
  405  
  406   procedure  TfGMV_Date Time.FormK eyPress(Se nder: TObj ect; var K ey: Char);
  407   begin
  408     if Key =  char(VK_E SCAPE) the n
  409       ModalR esult := m rCancel;
  410   end;
  411  
  412   {$IFDEF DA TETIMEDLL}
  413   initializa tion
  414     PrevApp  := Applica tion;
  415     PrevScre en := Scre en;
  416  
  417   finalizati on
  418     Applicat ion := Pre vApp;
  419     Screen : = PrevScre en;
  420   {$ENDIF}
  421   end.
  422