Changeset 488 for cprs


Ignore:
Timestamp:
Sep 11, 2008, 4:34:46 PM (16 years ago)
Author:
Kevin Toppenberg
Message:

Added debug log form

Location:
cprs/branches/GUI-config
Files:
4 added
11 edited

Legend:

Unmodified
Added
Removed
  • cprs/branches/GUI-config/GUI_Config.dof

    r476 r488  
    101101UsePackages=0
    102102[Parameters]
    103 RunParams=s=192.168.3.111 p=9230
     103RunParams=s=192.168.3.111 p=9230 debug=enable
    104104HostApplication=
    105105Launcher=
  • cprs/branches/GUI-config/GUI_Config.dpr

    r476 r488  
    4242  CreateTemplateU in 'CreateTemplateU.pas' {CreateTemplateForm},
    4343  SkinFormU in 'SkinFormU.pas' {SkinForm},
    44   BatchAddU in 'BatchAddU.pas' {BatchAddForm};
     44  BatchAddU in 'BatchAddU.pas' {BatchAddForm},
     45  DebugU in 'DebugU.pas' {DebugForm};
    4546
    4647{$R *.res}
     
    6263  Application.CreateForm(TCreateTemplateForm, CreateTemplateForm);
    6364  Application.CreateForm(TBatchAddForm, BatchAddForm);
     65  Application.CreateForm(TDebugForm, DebugForm);
    6466  MainForm.Initialize;
    6567  Application.Run;
  • cprs/branches/GUI-config/GUI_Config.dsk

    r482 r488  
    11[Closed Files]
    2 File_0=SourceModule,'P:\Vista\GUI-config\SkinStuff\ipSkinManager.dcu',0,1,1,11,5,0,0
    3 File_1=SourceModule,'P:\Vista\GUI-config\PostU.pas',0,1,162,47,166,0,0
    4 File_2=SourceModule,'P:\Vista\GUI-config\SelDateTimeU.pas',0,1,1,1,5,0,0
    5 File_3=SourceModule,'C:\Program Files\Borland\Delphi7\Projects\Vista\CPRS-Lib\ORFn.pas',0,1,610,1,621,0,0
    6 File_4=SourceModule,'C:\Program Files\Borland\Delphi7\Projects\Vista\CPRS-Lib\ORCtrls.pas',0,1,1171,1,1182,0,0
    7 File_5=SourceModule,'c:\program files\borland\delphi7\projects\vista\cprs-1.0.23.15\broker\source\Trpcb.pas',0,1,1013,1,1021,0,0
    8 File_6=SourceModule,'C:\Program Files\Borland\Delphi7\Projects\Vista\CPRS-Lib\ORNet.pas',0,1,53,1,65,0,0
     2File_0=SourceModule,'P:\Vista\GUI-config\MainU.dfm',0,1,1,1,1,0,0
     3File_1=SourceModule,'P:\Vista\GUI-config\SkinStuff\ipSkinManager.dcu',0,1,1,11,5,0,0
     4File_2=SourceModule,'P:\Vista\GUI-config\PostU.pas',0,1,162,47,166,0,0
     5File_3=SourceModule,'P:\Vista\GUI-config\SelDateTimeU.pas',0,1,1,1,5,0,0
     6File_4=SourceModule,'C:\Program Files\Borland\Delphi7\Projects\Vista\CPRS-Lib\ORFn.pas',0,1,610,1,621,0,0
     7File_5=SourceModule,'C:\Program Files\Borland\Delphi7\Projects\Vista\CPRS-Lib\ORCtrls.pas',0,1,1171,1,1182,0,0
     8File_6=SourceModule,'c:\program files\borland\delphi7\projects\vista\cprs-1.0.23.15\broker\source\Trpcb.pas',0,1,1013,1,1021,0,0
     9File_7=SourceModule,'C:\Program Files\Borland\Delphi7\Projects\Vista\CPRS-Lib\ORNet.pas',0,1,53,1,65,0,0
    910
    1011[Modules]
    1112Module0=P:\Vista\GUI-config\MainU.pas
    12 Module1=P:\Vista\GUI-config\GUI_Config.dpr
    13 Module2=P:\Vista\GUI-config\SkinFormU.pas
    14 Module3=P:\Vista\GUI-config\LookupU.pas
    15 Module4=P:\Vista\GUI-config\CPRS-Lib\ORCtrls.pas
    16 Module5=P:\Vista\GUI-config\BatchAddU.pas
    17 Module6=P:\Vista\GUI-config\SubfilesU.pas
     13Module1=P:\vista\GUI-config\DebugU.pas
     14Module2=P:\Vista\GUI-config\GUI_Config.dpr
     15Module3=P:\Vista\GUI-config\CPRS-Lib\ORCtrls.pas
     16Module4=P:\Vista\GUI-config\SkinFormU.pas
     17Module5=P:\Vista\GUI-config\SubfilesU.pas
     18Module6=P:\Vista\GUI-config\BatchAddU.pas
    1819Module7=P:\Vista\GUI-config\frmSplash.pas
    19 Module8=c:\program files\borland\delphi7\source\vcl\OleCtrls.pas
    20 Count=9
     20Module8=c:\program files\borland\delphi7\source\rtl\Win\ShellAPI.pas
     21Module9=c:\program files\borland\delphi7\source\vcl\OleCtrls.pas
     22Module10=P:\Vista\GUI-config\LookupU.pas
     23Count=11
    2124EditWindowCount=1
    2225
     
    2629FormOnTop=0
    2730
     31[P:\vista\GUI-config\DebugU.pas]
     32ModuleType=SourceModule
     33FormState=1
     34FormOnTop=0
     35
    2836[P:\Vista\GUI-config\GUI_Config.dpr]
    2937ModuleType=SourceModule
     
    3139FormOnTop=0
    3240
     41[P:\Vista\GUI-config\CPRS-Lib\ORCtrls.pas]
     42ModuleType=SourceModule
     43FormState=0
     44FormOnTop=0
     45
    3346[P:\Vista\GUI-config\SkinFormU.pas]
    3447ModuleType=SourceModule
     
    3649FormOnTop=0
    3750
     51[P:\Vista\GUI-config\SubfilesU.pas]
     52ModuleType=SourceModule
     53FormState=1
     54FormOnTop=0
     55
     56[P:\Vista\GUI-config\BatchAddU.pas]
     57ModuleType=SourceModule
     58FormState=1
     59FormOnTop=0
     60
     61[P:\Vista\GUI-config\frmSplash.pas]
     62ModuleType=SourceModule
     63FormState=0
     64FormOnTop=0
     65
     66[c:\program files\borland\delphi7\source\rtl\Win\ShellAPI.pas]
     67ModuleType=SourceModule
     68FormState=0
     69FormOnTop=0
     70
     71[c:\program files\borland\delphi7\source\vcl\OleCtrls.pas]
     72ModuleType=SourceModule
     73FormState=0
     74FormOnTop=0
     75
    3876[P:\Vista\GUI-config\LookupU.pas]
    3977ModuleType=SourceModule
     
    4179FormOnTop=0
    4280
    43 [P:\Vista\GUI-config\CPRS-Lib\ORCtrls.pas]
    44 ModuleType=SourceModule
    45 FormState=0
    46 FormOnTop=0
    47 
    48 [P:\Vista\GUI-config\BatchAddU.pas]
    49 ModuleType=SourceModule
    50 FormState=1
    51 FormOnTop=0
    52 
    53 [P:\Vista\GUI-config\SubfilesU.pas]
    54 ModuleType=SourceModule
    55 FormState=1
    56 FormOnTop=0
    57 
    58 [P:\Vista\GUI-config\frmSplash.pas]
    59 ModuleType=SourceModule
    60 FormState=0
    61 FormOnTop=0
    62 
    63 [c:\program files\borland\delphi7\source\vcl\OleCtrls.pas]
    64 ModuleType=SourceModule
    65 FormState=0
    66 FormOnTop=0
    67 
    6881[C:\Program Files\Borland\Delphi7\Projects\ProjectGroup1.bpg]
    6982FormState=0
     
    7184
    7285[EditWindow0]
    73 ViewCount=9
     86ViewCount=11
    7487CurrentView=0
    7588View0=0
     
    8295View7=7
    8396View8=8
     97View9=9
     98View10=10
    8499CodeExplorer=CodeExplorer@EditWindow0
    85100MessageView=MessageView@EditWindow0
     
    101116BottomPanelSize=205
    102117BottomPanelClients=WatchWindow,MessageView@EditWindow0
    103 BottomPanelData=00000400010000000B0000004D65737361676556696577000300000000000002CD0000000000000001000000008B010000000000000100000001580300000000000002000000006C000000000000000200000002BE0000000000000003000000000000000000000000030000000000000000000000000300000000AC0100000000000003000000005803000000000000030000000058030000000000000300000000580300000000000003000000005803000000000000030000000058030000000000000200000000D80000000000000001000000005803000000000000010000000058030000000000000100000000AC0100000000000001000000005803000000000000010000000058030000000000000100000000AC010000000000000100000000C401000000000000010000000066000000000000000100000000D7020000000000000100000000160300000000000001000000001603000000000000010000000016030000000000000100000000160300000000000001000000008B0100000000000001000000008B0100000000000001000000008B010000000000000100000000F8020000000000000100000000FD02000000000000010000000016030000000000000100000000160300000000000001000000007E010000000000000100000000000300000B000000576174636857696E646F770100000000000300000B0000004D65737361676556696577FFFFFFFF
     118BottomPanelData=00000400010000000B000000576174636857696E646F77000300000000000002CD0000000000000001000000008B010000000000000100000001580300000000000002000000006C000000000000000200000002BE0000000000000003000000000000000000000000030000000000000000000000000300000000AC0100000000000003000000005803000000000000030000000058030000000000000300000000580300000000000003000000005803000000000000030000000058030000000000000200000000D80000000000000001000000005803000000000000010000000058030000000000000100000000AC0100000000000001000000005803000000000000010000000058030000000000000100000000AC010000000000000100000000C401000000000000010000000066000000000000000100000000D7020000000000000100000000160300000000000001000000001603000000000000010000000016030000000000000100000000160300000000000001000000008B0100000000000001000000008B0100000000000001000000008B010000000000000100000000F8020000000000000100000000FD02000000000000010000000016030000000000000100000000160300000000000001000000007E01000000000000010000000100030000000000000200000000CD0000000B0000004D657373616765566965770200000000CD0000000000000001000000000003000000000000FFFFFFFF
    104119
    105120[View0]
    106121Module=P:\Vista\GUI-config\MainU.pas
    107 CursorX=1
    108 CursorY=1872
    109 TopLine=1869
     122CursorX=3
     123CursorY=33
     124TopLine=25
    110125LeftCol=1
    111126
    112127[View1]
     128Module=P:\vista\GUI-config\DebugU.pas
     129CursorX=13
     130CursorY=13
     131TopLine=1
     132LeftCol=1
     133
     134[View2]
    113135Module=P:\Vista\GUI-config\CPRS-Lib\ORCtrls.pas
    114136CursorX=1
    115 CursorY=3981
    116 TopLine=3973
    117 LeftCol=1
    118 
    119 [View2]
     137CursorY=1
     138TopLine=1
     139LeftCol=1
     140
     141[View3]
    120142Module=P:\Vista\GUI-config\LookupU.pas
    121143CursorX=11
     
    124146LeftCol=1
    125147
    126 [View3]
     148[View4]
    127149Module=c:\program files\borland\delphi7\source\vcl\OleCtrls.pas
    128150CursorX=12
     
    131153LeftCol=1
    132154
    133 [View4]
     155[View5]
    134156Module=P:\Vista\GUI-config\SubfilesU.pas
    135157CursorX=5
     
    138160LeftCol=1
    139161
    140 [View5]
     162[View6]
    141163Module=P:\Vista\GUI-config\SkinFormU.pas
     164CursorX=16
     165CursorY=95
     166TopLine=87
     167LeftCol=1
     168
     169[View7]
     170Module=c:\program files\borland\delphi7\source\rtl\Win\ShellAPI.pas
    142171CursorX=1
    143 CursorY=170
    144 TopLine=162
    145 LeftCol=1
    146 
    147 [View6]
     172CursorY=1
     173TopLine=1
     174LeftCol=1
     175
     176[View8]
    148177Module=P:\Vista\GUI-config\GUI_Config.dpr
    149178CursorX=1
    150 CursorY=66
    151 TopLine=59
    152 LeftCol=1
    153 
    154 [View7]
     179CursorY=68
     180TopLine=60
     181LeftCol=1
     182
     183[View9]
    155184Module=P:\Vista\GUI-config\frmSplash.pas
    156185CursorX=20
     
    159188LeftCol=1
    160189
    161 [View8]
     190[View10]
    162191Module=P:\Vista\GUI-config\BatchAddU.pas
    163192CursorX=16
     
    177206WatchShowColumnHeaders=1
    178207Create=1
    179 Visible=1
     208Visible=0
    180209State=0
    181210Left=12
    182 Top=0
     211Top=102
    183212Width=756
    184 Height=205
     213Height=103
    185214MaxLeft=-1
    186215MaxTop=-1
    187216ClientWidth=756
    188 ClientHeight=205
    189 TBDockHeight=205
     217ClientHeight=103
     218TBDockHeight=103
    190219LRDockWidth=421
    191220Dockable=1
     
    290319SplitPos=114
    291320ArrangeBy=Name
    292 SelectedItem=OnNeedData
     321SelectedItem=Name
    293322ExpandedItems=Anchors,Options
    294323HiddenCategories=Legacy
     
    494523[MessageView@EditWindow0]
    495524Create=1
    496 Visible=0
    497 State=0
    498 Left=396
     525Visible=1
     526State=0
     527Left=12
    499528Top=0
    500 Width=372
    501 Height=122
    502 MaxLeft=-1
    503 MaxTop=-1
    504 ClientWidth=372
    505 ClientHeight=122
    506 TBDockHeight=122
     529Width=756
     530Height=205
     531MaxLeft=-1
     532MaxTop=-1
     533ClientWidth=756
     534ClientHeight=205
     535TBDockHeight=205
    507536LRDockWidth=443
    508537Dockable=1
  • cprs/branches/GUI-config/MainU.dfm

    r482 r488  
    12411241    Left = 496
    12421242    Top = 16
    1243     object File1: TMenuItem
     1243    object FileMenu: TMenuItem
    12441244      Caption = '&File'
    12451245      object AboutMenu: TMenuItem
     
    12471247        OnClick = AboutMenuClick
    12481248      end
    1249       object Exit1: TMenuItem
     1249      object ExitMenuItem: TMenuItem
    12501250        Caption = 'E&xit'
    1251         OnClick = Exit1Click
     1251        OnClick = ExitMenuItemClick
    12521252      end
    12531253    end
  • cprs/branches/GUI-config/MainU.pas

    r476 r488  
    8181    BasicUsersGrid: TStringGrid;
    8282    MainMenu: TMainMenu;
    83     File1: TMenuItem;
    84     Exit1: TMenuItem;
     83    FileMenu: TMenuItem;
     84    ExitMenuItem: TMenuItem;
    8585    AboutMenu: TMenuItem;
    8686    CloneBtn: TBitBtn;
     
    148148    procedure btnUsersApplyClick(Sender: TObject);
    149149    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    150     procedure Exit1Click(Sender: TObject);
     150    procedure ExitMenuItemClick(Sender: TObject);
    151151    procedure UserPageControlDrawTab(Control: TCustomTabControl; TabIndex: Integer; const Rect: TRect; Active: Boolean);
    152152    procedure AboutMenuClick(Sender: TObject);
     
    207207    CachedWPField : TStringList;
    208208    FVisibleGridIdx : integer;
     209    procedure ShowDebugClick(Sender: TObject);   
     210    function FindParam(Param : string) : string;
    209211    function GetCurrentUserName : string;
    210212    procedure SetCursorImage(Cursor : TCursor);
     
    247249    CurrentUserName: string;
    248250    LastSelTreeNode : TTreeNode;
     251    DebugMode : boolean;
    249252    function GetUserLine(CurrentUserData : TStringList; Grid : TStringGrid; ARow:integer) :integer;
    250253    function GetLineInfo(Grid : TStringGrid; CurrentUserData : TStringList; ARow: integer) : tFileEntry;
     
    280283  frmSplash, Trpcb  , LookupU, SubfilesU, SetSelU, SelDateTimeU, PostU,
    281284  FMErrorU, AboutU, PleaseWaitU, EditTextU, CreateTemplateU, SkinFormU,
    282   BatchAddU;
     285  BatchAddU, DebugU;
    283286
    284287{$R *.dfm}
     
    289292  var tempMenu,tempSubMenu : TMenuItem;   
    290293  begin
     294    DebugMode := (FindParam('debug')='enable');
     295    if DebugMode then begin
     296      DebugForm.show;
     297      tempMenu := TMenuItem.Create(FileMenu);
     298      tempMenu.Caption := '&Show Debug Log';
     299      tempMenu.OnClick := ShowDebugClick;
     300      FileMenu.Add(tempMenu);
     301    end; 
    291302    {$IFDEF USE_SKINS}
     303    DebugForm.Memo.Lines.Add('Adding Menus');
    292304    tempMenu := TMenuItem.Create(MainMenu);
    293305    tempMenu.Caption := '&Appearance';
     
    299311    {$ENDIF}
    300312
     313    DebugForm.Memo.Lines.Add('Showing Splash');
    301314    SplashForm.show;
    302315 
     
    313326    CachedWPField := TStringList.Create; 
    314327 
     328    DebugForm.Memo.Lines.Add('Adding Grid Info');
    315329    AddGridInfo(BasicUsersGrid,CurrentUserData,true,LoadUserData,'200',btnUsersApply,btnUsersRevert);
    316330    AddGridInfo(AdvancedUsersGrid,CurrentUserData,false,LoadUserData,'200',btnUsersApply,btnUsersRevert);   
     
    322336
    323337    MainForm.Visible := false;
     338    DebugForm.Memo.Lines.Add('Trying to connect to server');
    324339    if not ORNet.ConnectToServer(RPC_CONTEXT) then begin
     340      DebugForm.Memo.Lines.Add('Failed connection.  Closing.');
    325341      Close;
    326342      Exit;
    327343    end;
     344    DebugForm.Memo.Lines.Add('Connected to server!');
    328345    Application.ProcessMessages;
    329346    LastSelTreeNode := nil; 
     
    332349    BasicTemplate.Sorted := false;
    333350   
     351    DebugForm.Memo.Lines.Add('Initializing Combo Boxes');
    334352    InitORCombobox(PatientORComboBox,'A');
    335353    InitORCombobox(FileORComboBox,'A');
     
    347365    {$IFDEF USE_SKINS}
    348366    if SkinForm.cbSkinAtStartup.Checked then begin
     367      DebugForm.Memo.Lines.Add('Activating Skins');
    349368      SkinForm.ActivateCurrentSkin;   
    350369    end;
    351370    {$ENDIF}
    352371   
    353     self.Visible := true;
     372    self.Visible := true;   
    354373    SplashForm.Hide; 
    355   end;
    356 
     374    DebugForm.Memo.Lines.Add('Done Initializing.');   
     375  end;
     376
     377  function TMainForm.FindParam(Param : string) : string;
     378  //Searches command line parameters for Param.  If found, then value returned.
     379  //Case insensitive
     380  //Must be in 'param=value' format, i.e. must have '='
     381  var  i : integer;
     382       tempS : string;   
     383  begin
     384    Result := '';
     385    Param := LowerCase(Param);
     386    for i := 1 to ParamCount do begin
     387      tempS := LowerCase (ParamStr(i));
     388      if Pos(Param,tempS)>0 then Result := Piece(tempS,'=',2);
     389    end;
     390  end; 
     391
     392 
    357393  procedure TMainForm.AddGridInfo(Grid: TStringGrid;
    358394                                  Data : TStringList;
     
    15361572  end;
    15371573
    1538   procedure TMainForm.Exit1Click(Sender: TObject);
     1574  procedure TMainForm.ExitMenuItemClick(Sender: TObject);
    15391575  begin
    15401576       Close;
     
    19702006  end;
    19712007
     2008  procedure TMainForm.ShowDebugClick(Sender: TObject);
     2009  begin
     2010    DebugForm.Show;
     2011  end;
     2012 
    19722013  procedure TMainForm.ChangeSkinClick(Sender: TObject);
    19732014  var result : TModalResult;
Note: See TracChangeset for help on using the changeset viewer.