- Timestamp:
- Jul 7, 2010, 1:44:28 PM (14 years ago)
- Location:
- cprs/branches/GUI-config
- Files:
-
- 11 added
- 16 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
cprs/branches/GUI-config/FMErrorU.dfm
r542 r828 12 12 Font.Style = [] 13 13 OldCreateOrder = False 14 Position = poOwnerFormCenter 14 15 DesignSize = ( 15 16 474 -
cprs/branches/GUI-config/GUI_Config.dsk
r756 r828 1 1 [Closed Files] 2 File_0=SourceModule,'P:\vista\GUI-config\PostU.pas',0,1,34,62,10,0,0 3 File_1=SourceModule,'P:\vista\GUI-config\SkinFormU.pas',0,1,87,16,95,0,0 4 File_2=SourceModule,'P:\Vista\GUI-config\CPRS-Lib\ORNet.pas',0,1,1,1,310,0,0 5 File_3=SourceModule,'c:\program files\borland\delphi7\source\vcl\OleCtrls.pas',0,1,85,27,96,0,0 6 File_4=SourceModule,'P:\vista\GUI-config\BDK32\Source\ccowrpcbroker.pas',0,1,44,29,45,0,0 7 File_5=SourceModule,'P:\vista\GUI-config\BDK32\Source\VERGENCECONTEXTORLib_TLB.pas',0,1,1104,11,1110,0,0 8 File_6=SourceModule,'P:\vista\GUI-config\BDK32\Source\TRPCB.pas',0,1,1045,1,1059,0,0 9 File_7=SourceModule,'P:\vista\GUI-config\CreateTemplateU.pas',0,1,140,11,145,0,0 10 File_8=SourceModule,'P:\vista\GUI-config\SetSelU.pas',0,1,1,1,1,1,0 2 File_0=SourceModule,'P:\vista\GUI-config\MainU.dfm',0,1,1,1,1,0,0 3 File_1=SourceModule,'P:\Vista\GUI-config\CPRS-Lib\ORCtrls.pas',0,1,293,1,305,0,0 4 File_2=SourceModule,'P:\Vista\GUI-config\CPRS-Lib\ORFn.pas',0,1,613,1,623,0,0 5 File_3=SourceModule,'P:\vista\GUI-config\BDK32\Source\wsockc.pas',0,1,1333,1,1346,0,0 6 File_4=SourceModule,'P:\vista\GUI-config\PostU.pas',0,1,34,62,10,0,0 7 File_5=SourceModule,'P:\vista\GUI-config\SkinFormU.pas',0,1,87,16,95,0,0 8 File_6=SourceModule,'P:\Vista\GUI-config\CPRS-Lib\ORNet.pas',0,1,1,1,310,0,0 9 File_7=SourceModule,'c:\program files\borland\delphi7\source\vcl\OleCtrls.pas',0,1,85,27,96,0,0 10 File_8=SourceModule,'P:\vista\GUI-config\BDK32\Source\ccowrpcbroker.pas',0,1,44,29,45,0,0 11 File_9=SourceModule,'P:\vista\GUI-config\BDK32\Source\VERGENCECONTEXTORLib_TLB.pas',0,1,1104,11,1110,0,0 11 12 12 13 [Modules] 13 14 Module0=P:\vista\GUI-config\MainU.pas 14 Module1=P:\ Vista\GUI-config\CPRS-Lib\ORFn.pas15 Module1=P:\vista\GUI-config\FMErrorU.pas 15 16 Module2=P:\vista\GUI-config\GUI_Config.dpr 16 Module3=P:\vista\GUI-config\AboutU.pas 17 Module4=P:\vista\GUI-config\frmSplash.pas 18 Module5=P:\vista\GUI-config\BDK32\Source\wsockc.pas 19 Count=6 17 Module3=P:\vista\GUI-config\frmSplash.pas 18 Module4=P:\vista\GUI-config\AboutU.pas 19 Module5=P:\vista\GUI-config\LookupU.pas 20 Module6=P:\vista\GUI-config\DebugU.pas 21 Count=7 20 22 EditWindowCount=1 21 23 … … 23 25 ModuleType=SourceModule 24 26 FormState=1 25 FormOnTop=0 26 27 [P:\Vista\GUI-config\CPRS-Lib\ORFn.pas] 27 FormOnTop=1 28 29 [P:\vista\GUI-config\FMErrorU.pas] 30 ModuleType=SourceModule 31 FormState=1 32 FormOnTop=0 33 34 [P:\vista\GUI-config\GUI_Config.dpr] 28 35 ModuleType=SourceModule 29 36 FormState=0 30 37 FormOnTop=0 31 38 32 [P:\vista\GUI-config\ GUI_Config.dpr]39 [P:\vista\GUI-config\frmSplash.pas] 33 40 ModuleType=SourceModule 34 41 FormState=0 … … 37 44 [P:\vista\GUI-config\AboutU.pas] 38 45 ModuleType=SourceModule 39 FormState= 140 FormOnTop=0 41 42 [P:\vista\GUI-config\ frmSplash.pas]43 ModuleType=SourceModule 44 FormState= 145 FormOnTop=0 46 47 [P:\vista\GUI-config\ BDK32\Source\wsockc.pas]46 FormState=0 47 FormOnTop=0 48 49 [P:\vista\GUI-config\LookupU.pas] 50 ModuleType=SourceModule 51 FormState=0 52 FormOnTop=0 53 54 [P:\vista\GUI-config\DebugU.pas] 48 55 ModuleType=SourceModule 49 56 FormState=0 … … 55 62 56 63 [EditWindow0] 57 ViewCount= 664 ViewCount=7 58 65 CurrentView=0 59 66 View0=0 … … 63 70 View4=4 64 71 View5=5 72 View6=6 65 73 CodeExplorer=CodeExplorer@EditWindow0 66 74 MessageView=MessageView@EditWindow0 67 75 Create=1 68 76 Visible=1 69 State=0 70 Left=167 71 Top=159 72 Width=775 73 Height=552 74 MaxLeft=-782 75 MaxTop=261 76 ClientWidth=767 77 ClientHeight=518 77 State=2 78 Left=440 79 Top=155 80 Width=584 81 Height=330 82 MaxLeft=-4 83 MaxTop=104 84 MaxWidth=1032 85 MaxHeight=634 86 ClientWidth=1024 87 ClientHeight=600 78 88 LeftPanelSize=0 79 89 LeftPanelClients=CodeExplorer@EditWindow0 80 90 LeftPanelData=00000400010000000C000000436F64654578706C6F726572000000000000000000000000000000000001000000000000000000000000FFFFFFFF 81 91 RightPanelSize=0 82 BottomPanelSize= 15592 BottomPanelSize=0 83 93 BottomPanelClients=MessageView@EditWindow0 84 BottomPanelData=000004000 0000000FF02000000000000029B00000000000000010000000000000000000000000100000000FF020000000000000100000000FF0200000B0000004D65737361676556696577FFFFFFFF94 BottomPanelData=00000400010000000B0000004D657373616765566965770004000000000000029B00000000000000010000000000000000000000000100000000FF020000000000000100000000BC030000000000000100000000BC030000000000000100000000000400000B0000004D65737361676556696577FFFFFFFF 85 95 86 96 [View0] 87 97 Module=P:\vista\GUI-config\MainU.pas 98 CursorX=17 99 CursorY=1782 100 TopLine=1775 101 LeftCol=1 102 103 [View1] 104 Module=P:\vista\GUI-config\DebugU.pas 88 105 CursorX=1 89 CursorY=1588 90 TopLine=1579 91 LeftCol=1 92 93 [View1] 94 Module=P:\Vista\GUI-config\CPRS-Lib\ORFn.pas 95 CursorX=1 96 CursorY=623 97 TopLine=613 106 CursorY=26 107 TopLine=1 98 108 LeftCol=1 99 109 100 110 [View2] 101 Module=P:\vista\GUI-config\ BDK32\Source\wsockc.pas102 CursorX= 1103 CursorY= 1479104 TopLine= 1466111 Module=P:\vista\GUI-config\FMErrorU.pas 112 CursorX=36 113 CursorY=53 114 TopLine=45 105 115 LeftCol=1 106 116 107 117 [View3] 118 Module=P:\vista\GUI-config\LookupU.pas 119 CursorX=55 120 CursorY=112 121 TopLine=25 122 LeftCol=1 123 124 [View4] 108 125 Module=P:\vista\GUI-config\AboutU.pas 109 126 CursorX=1 … … 112 129 LeftCol=1 113 130 114 [View 4]131 [View5] 115 132 Module=P:\vista\GUI-config\frmSplash.pas 116 CursorX= 1117 CursorY=6 7133 CursorX=26 134 CursorY=60 118 135 TopLine=56 119 136 LeftCol=1 120 137 121 [View 5]138 [View6] 122 139 Module=P:\vista\GUI-config\GUI_Config.dpr 123 140 CursorX=1 124 141 CursorY=66 125 TopLine= 46142 TopLine=55 126 143 LeftCol=1 127 144 128 145 [Watches] 129 Count= 5146 Count=6 130 147 Watch0='MainMenu.items.count',256,0,18,1,0,'Watches' 131 148 Watch1='tempInfo',256,0,18,1,0,'Watches' … … 133 150 Watch3='Strings.count',256,0,18,1,0,'Watches' 134 151 Watch4='Self.Height',256,0,18,1,0,'Watches' 152 Watch5='SettingsPageControl.ActivePageindex',256,0,18,1,0,'Watches' 135 153 136 154 [WatchWindow] … … 140 158 Visible=0 141 159 State=0 142 Left= 0143 Top= 0160 Left=125 161 Top=202 144 162 Width=764 145 Height= 129163 Height=235 146 164 MaxLeft=-1 147 165 MaxTop=-1 148 166 ClientWidth=756 149 ClientHeight= 103167 ClientHeight=209 150 168 TBDockHeight=103 151 169 LRDockWidth=421 … … 153 171 154 172 [Breakpoints] 155 Count= 12156 Breakpoint0='P:\vista\GUI-config\MainU.pas',18 79,'',0,1,'',1,0,0,'',1,'','',''173 Count=9 174 Breakpoint0='P:\vista\GUI-config\MainU.pas',1886,'',0,1,'',1,0,0,'',1,'','','' 157 175 Breakpoint1='P:\vista\GUI-config\AboutU.pas',109,'',0,1,'',1,0,0,'',1,'','','' 158 Breakpoint2='P:\vista\GUI-config\MainU.pas',2081,'',0,1,'',1,0,0,'',1,'','','' 159 Breakpoint3='P:\vista\GUI-config\MainU.pas',2088,'',0,1,'',1,0,0,'',1,'','','' 160 Breakpoint4='P:\vista\GUI-config\MainU.pas',2104,'',0,1,'',1,0,0,'',1,'','','' 161 Breakpoint5='P:\vista\GUI-config\MainU.pas',2001,'',0,1,'',1,0,0,'',1,'','','' 162 Breakpoint6='P:\vista\GUI-config\MainU.pas',2036,'',0,1,'',1,0,0,'',1,'','','' 163 Breakpoint7='P:\vista\GUI-config\MainU.pas',414,'',0,1,'',1,0,0,'',1,'','','' 164 Breakpoint8='P:\vista\GUI-config\MainU.pas',1295,'',0,1,'',1,0,0,'',1,'','','' 165 Breakpoint9='P:\vista\GUI-config\MainU.pas',2199,'',0,1,'',1,0,0,'',1,'','','' 166 Breakpoint10='P:\vista\GUI-config\MainU.pas',1586,'',0,1,'',1,0,0,'',1,'','','' 167 Breakpoint11='P:\vista\GUI-config\MainU.pas',1592,'',0,1,'',1,0,0,'',1,'','','' 176 Breakpoint2='P:\vista\GUI-config\MainU.pas',2088,'',0,1,'',1,0,0,'',1,'','','' 177 Breakpoint3='P:\vista\GUI-config\MainU.pas',2095,'',0,1,'',1,0,0,'',1,'','','' 178 Breakpoint4='P:\vista\GUI-config\MainU.pas',2111,'',0,1,'',1,0,0,'',1,'','','' 179 Breakpoint5='P:\vista\GUI-config\MainU.pas',2008,'',0,1,'',1,0,0,'',1,'','','' 180 Breakpoint6='P:\vista\GUI-config\MainU.pas',2206,'',0,1,'',1,0,0,'',1,'','','' 181 Breakpoint7='P:\vista\GUI-config\MainU.pas',1593,'',0,1,'',1,0,0,'',1,'','','' 182 Breakpoint8='P:\vista\GUI-config\MainU.pas',1750,'',0,1,'',1,0,0,'',1,'','','' 168 183 169 184 [AddressBreakpoints] … … 173 188 Create=1 174 189 Visible=1 175 State= 0176 Left= 0177 Top= 0178 Width=1 024190 State=2 191 Left=887 192 Top=173 193 Width=137 179 194 Height=112 180 195 MaxLeft=-1 181 196 MaxTop=-1 182 ClientWidth=1016 197 MaxWidth=1032 198 MaxHeight=112 199 ClientWidth=1024 183 200 ClientHeight=78 184 201 … … 219 236 Visible=0 220 237 State=0 221 Left= 0222 Top= 0238 Left=145 239 Top=114 223 240 Width=800 224 241 Height=561 … … 260 277 LRDockWidth=250 261 278 Dockable=1 262 SplitPos= 73279 SplitPos=114 263 280 ArrangeBy=Name 264 SelectedItem= OnClick265 ExpandedItems= Anchors,Menu,Options281 SelectedItem=Caption 282 ExpandedItems=Menu,Options 266 283 HiddenCategories=Legacy 267 284 … … 292 309 Visible=0 293 310 State=0 294 Left= 0295 Top= 0296 Width= 1024297 Height= 210298 MaxLeft=-1 299 MaxTop=-1 300 ClientWidth= 1016301 ClientHeight= 184311 Left=417 312 Top=181 313 Width=416 314 Height=437 315 MaxLeft=-1 316 MaxTop=-1 317 ClientWidth=408 318 ClientHeight=411 302 319 TBDockHeight=355 303 320 LRDockWidth=233 … … 466 483 [MessageView@EditWindow0] 467 484 Create=1 468 Visible= 1485 Visible=0 469 486 State=0 470 487 Left=12 471 488 Top=0 472 Width= 755489 Width=1012 473 490 Height=155 474 491 MaxLeft=-1 475 492 MaxTop=-1 476 ClientWidth= 755493 ClientWidth=1012 477 494 ClientHeight=155 478 495 TBDockHeight=155 … … 488 505 Visible=1 489 506 State=0 490 Left=1 2491 Top=1 39507 Left=16 508 Top=128 492 509 Width=266 493 510 Height=577 … … 500 517 Dockable=1 501 518 TabPosition=0 502 ActiveTab=Object Inspector519 ActiveTab=Object TreeView 503 520 TabDockClients=PropertyInspector,ObjectTree 504 521 -
cprs/branches/GUI-config/MainU.pas
r756 r828 37 37 {$ENDIF} 38 38 Trpcb, //needed for .ptype types 39 ValEdit ;39 ValEdit, SortStringGrid; 40 40 41 41 type … … 49 49 50 50 TGridInfo = class; //forward declaration 51 TGridDataLoader = procedure (GridInfo: TGridInfo) of object; 51 TGridDataLoader = procedure (GridInfo: TGridInfo) of object; 52 52 TGridInfo = class (TObject) 53 53 public 54 Grid : TS tringGrid; //doesn't own object54 Grid : TSortStringGrid; //doesn't own object 55 55 FileNum : string; 56 56 IENS : string; … … 61 61 ApplyBtn : TButton; 62 62 RevertBtn : TButton; 63 end; 63 end; 64 64 65 65 … … 79 79 Panel5: TPanel; 80 80 ApplicationEvents: TApplicationEvents; 81 AdvancedUsersGrid: TS tringGrid;82 BasicUsersGrid: TS tringGrid;81 AdvancedUsersGrid: TSortStringGrid; 82 BasicUsersGrid: TSortStringGrid; 83 83 MainMenu: TMainMenu; 84 84 FileMenu: TMenuItem; … … 92 92 SettingsPageControl: TPageControl; 93 93 tsBasicSettings: TTabSheet; 94 BasicSettingsGrid: TS tringGrid;94 BasicSettingsGrid: TSortStringGrid; 95 95 tsAdvancedSettings: TTabSheet; 96 AdvancedSettingsGrid: TS tringGrid;96 AdvancedSettingsGrid: TSortStringGrid; 97 97 Panel3: TPanel; 98 98 btnSettingsApply: TBitBtn; … … 108 108 PatientsPageControl: TPageControl; 109 109 tsBasicPatients: TTabSheet; 110 BasicPatientGrid: TS tringGrid;110 BasicPatientGrid: TSortStringGrid; 111 111 tsAdvancedPatients: TTabSheet; 112 AdvancedPatientGrid: TS tringGrid;112 AdvancedPatientGrid: TSortStringGrid; 113 113 Panel9: TPanel; 114 114 btnPatientApply: TBitBtn; … … 124 124 AnyFilePageControl: TPageControl; 125 125 TabSheet2: TTabSheet; 126 AnyFileGrid: TS tringGrid;126 AnyFileGrid: TSortStringGrid; 127 127 Panel14: TPanel; 128 128 btnAdvancedApply: TBitBtn; … … 214 214 procedure SetCursorImage(Cursor : TCursor); 215 215 function FileNumForSettingsNode (Node : TTreeNode) : string; 216 function GetVisibleGrid: TS tringGrid;216 function GetVisibleGrid: TSortStringGrid; 217 217 function GetVisibleGridInfo : TGridInfo; 218 function GetInfoForGrid(Grid : TS tringGrid) : TGridInfo;219 function GetInfoIndexForGrid(Grid : TS tringGrid) : integer;220 procedure SetVisibleGridIdx(Grid : TS tringGrid);218 function GetInfoForGrid(Grid : TSortStringGrid) : TGridInfo; 219 function GetInfoIndexForGrid(Grid : TSortStringGrid) : integer; 220 procedure SetVisibleGridIdx(Grid : TSortStringGrid); 221 221 procedure GetUsersList(UsersList : TStringList; HideInactive: boolean); 222 222 procedure GetRecordsList(RecordsList : TStringList; FileNum : string); … … 236 236 //procedure GetAnyfileInfo(FileNum : String; IENS : String; Data : TStringList); 237 237 function FindInStrings(fieldNum : string; Strings : TStringList; var fileNum : string) : integer; 238 procedure CompileChanges(Grid : TS tringGrid; CurrentUserData,Changes : TStringList);239 function PostChanges(Grid : TS tringGrid) : TModalResult;238 procedure CompileChanges(Grid : TSortStringGrid; CurrentUserData,Changes : TStringList); 239 function PostChanges(Grid : TSortStringGrid) : TModalResult; 240 240 function PostVisibleGrid: TModalResult; 241 procedure LoadAnyGrid(Grid : TS tringGrid; BasicMode: boolean; FileNum,IENS : string; CurrentData : TStringList);241 procedure LoadAnyGrid(Grid : TSortStringGrid; BasicMode: boolean; FileNum,IENS : string; CurrentData : TStringList); 242 242 function DisuserChanged(Changes: TStringList) : boolean; 243 243 procedure DrawTab(Control: TCustomTabControl; TabIndex: Integer; const Rect: TRect; Active: Boolean); 244 244 function DoCloneRecord(FileNum, SourceIENS, New01Field : String) : string; 245 245 function DoCloneUser(SourceIENS, New01Field : String) : string; 246 function GetGridHint(Grid : TS tringGrid; FileNum : string; ACol, ARow : integer) : string;247 function FieldHelp(FileNum, FieldNum, HelpStyle : string) : string;248 procedure DoRevert(BasicGrid,AdvancedGrid : TS tringGrid);246 function GetGridHint(Grid : TSortStringGrid; FileNum : string; ACol, ARow : integer) : string; 247 function FieldHelp(FileNum, IENS, FieldNum, HelpStyle : string) : string; 248 procedure DoRevert(BasicGrid,AdvancedGrid : TSortStringGrid); 249 249 public 250 250 { Public declarations } … … 252 252 LastSelTreeNode : TTreeNode; 253 253 DebugMode : boolean; 254 function GetUserLine(CurrentUserData : TStringList; Grid : TS tringGrid; ARow:integer) :integer;255 function GetLineInfo(Grid : TS tringGrid; CurrentUserData : TStringList; ARow: integer) : tFileEntry;254 function GetUserLine(CurrentUserData : TStringList; Grid : TSortStringGrid; ARow:integer) :integer; 255 function GetLineInfo(Grid : TSortStringGrid; CurrentUserData : TStringList; ARow: integer) : tFileEntry; 256 256 function IsSubFile(FieldDef: string ; var SubFileNum : string) : boolean; 257 257 function IsWPField(FileNum,FieldNum : string) : boolean; … … 261 261 Procedure GetBlankFileInfo(FileNum : string; BlankList : TStringList); 262 262 procedure GetOneRecord(FileNum, IENS : string; Data, BlankFileInfo : TStringList); 263 procedure AddGridInfo(Grid: TS tringGrid; Data : TStringList; BasicMode : boolean;263 procedure AddGridInfo(Grid: TSortStringGrid; Data : TStringList; BasicMode : boolean; 264 264 DataLoader : TGridDataLoader; FileNum : string; 265 265 ApplyBtn,RevertBtn : TButton); 266 266 procedure LoadAnyGridFromInfo(GridInfo : TGridInfo); 267 procedure ClearGrid(Grid : TS tringGrid);267 procedure ClearGrid(Grid : TSortStringGrid); 268 268 procedure RegisterGridInfo(GridInfo : TGridInfo); 269 269 procedure UnRegisterGridInfo(GridInfo : TGridInfo); … … 398 398 399 399 400 procedure TMainForm.AddGridInfo(Grid: TS tringGrid;400 procedure TMainForm.AddGridInfo(Grid: TSortStringGrid; 401 401 Data : TStringList; 402 402 BasicMode : boolean; … … 1036 1036 1037 1037 1038 procedure TMainForm.ClearGrid(Grid : TS tringGrid);1038 procedure TMainForm.ClearGrid(Grid : TSortStringGrid); 1039 1039 var i:integer; 1040 1040 begin … … 1048 1048 1049 1049 1050 procedure TMainForm.LoadAnyGrid(Grid : TS tringGrid; //the TStringGrid to load1050 procedure TMainForm.LoadAnyGrid(Grid : TSortStringGrid; //the TSortStringGrid to load 1051 1051 BasicMode: boolean; 1052 1052 FileNum : string; … … 1077 1077 //This assumes that GridInfo already has loaded info. 1078 1078 var 1079 Grid : TS tringGrid; //the TStringGrid to load1079 Grid : TSortStringGrid; //the TSortStringGrid to load 1080 1080 BasicMode: boolean; 1081 1081 FileNum : string; … … 1083 1083 CurrentData : TStringList; 1084 1084 1085 procedure LoadOneLine (Grid : TS tringGrid; oneEntry : string; GridRow : integer);1085 procedure LoadOneLine (Grid : TSortStringGrid; oneEntry : string; GridRow : integer); 1086 1086 var 1087 1087 tempFile,IENS : string; … … 1208 1208 GridFileNum : string; 1209 1209 UserLine : integer; 1210 Grid : TS tringGrid;1210 Grid : TSortStringGrid; 1211 1211 IEN : int64; 1212 1212 IENS : string; … … 1216 1216 begin 1217 1217 if FLoadingGrid then exit; //prevent pseudo-clicks during loading... 1218 Grid := (Sender as TS tringGrid);1218 Grid := (Sender as TSortStringGrid); 1219 1219 GridInfo := GetInfoForGrid(Grid); 1220 1220 if GridInfo=nil then exit; … … 1301 1301 1302 1302 1303 function TMainForm.GetLineInfo(Grid : TS tringGrid; CurrentUserData : TStringList; ARow: integer) : tFileEntry;1303 function TMainForm.GetLineInfo(Grid : TSortStringGrid; CurrentUserData : TStringList; ARow: integer) : tFileEntry; 1304 1304 var fieldNum : string; 1305 1305 oneEntry : string; … … 1327 1327 end; 1328 1328 1329 function TMainForm.GetUserLine(CurrentUserData : TStringList; Grid : TS tringGrid; ARow: integer) : integer;1329 function TMainForm.GetUserLine(CurrentUserData : TStringList; Grid : TSortStringGrid; ARow: integer) : integer; 1330 1330 var fieldNum: string; 1331 1331 tempFileNum : string; … … 1429 1429 end; 1430 1430 1431 function TMainForm.GetVisibleGrid: TS tringGrid;1431 function TMainForm.GetVisibleGrid: TSortStringGrid; 1432 1432 begin 1433 1433 if FVisibleGridIdx > -1 then begin … … 1438 1438 end; 1439 1439 1440 function TMainForm.GetInfoForGrid(Grid : TS tringGrid) : TGridInfo;1440 function TMainForm.GetInfoForGrid(Grid : TSortStringGrid) : TGridInfo; 1441 1441 var i : integer; 1442 1442 begin … … 1450 1450 1451 1451 1452 function TMainForm.GetInfoIndexForGrid(Grid : TS tringGrid) : integer;1452 function TMainForm.GetInfoIndexForGrid(Grid : TSortStringGrid) : integer; 1453 1453 var s : string; 1454 1454 begin … … 1457 1457 end; 1458 1458 1459 procedure TMainForm.SetVisibleGridIdx(Grid : TS tringGrid);1459 procedure TMainForm.SetVisibleGridIdx(Grid : TSortStringGrid); 1460 1460 begin 1461 1461 FVisibleGridIdx := GetInfoIndexForGrid(Grid); … … 1463 1463 1464 1464 1465 procedure TMainForm.CompileChanges(Grid : TS tringGrid; CurrentUserData,Changes : TStringList);1465 procedure TMainForm.CompileChanges(Grid : TSortStringGrid; CurrentUserData,Changes : TStringList); 1466 1466 //Output format: 1467 1467 // FileNum^IENS^FieldNum^FieldName^newValue^oldValue … … 1479 1479 for row := 1 to Grid.RowCount-1 do begin 1480 1480 Entry := GetLineInfo(Grid,CurrentUserData, row); 1481 //Reject any value containing a "^" , ":" , ";"1481 //Reject any value containing a "^" 1482 1482 //Do we need an @ here as well? 1483 if (AnsiPos('^',Entry.newvalue) > 0) or //(AnsiPos(':',Entry.newvalue) > 0) or //elh Taken out because : used in time 1484 (AnsiPos(';',Entry.newvalue) > 0)then begin 1483 if AnsiPos('^',Entry.newvalue) > 0 then begin //or (AnsiPos(':',Entry.newvalue) > 0) or (AnsiPos(';',Entry.newvalue) > 0) //elh Taken out because : used in time 1485 1484 messagedlg('Invalid value entered for ' + Entry.Fieldname + #13 + #10 1486 1485 + #13 + #10 + 'Invalid Entry: ' + Entry.newvalue + #13 + #10 + … … 1514 1513 1515 1514 1516 function TMainForm.PostChanges(Grid : TS tringGrid) : TModalResult;1515 function TMainForm.PostChanges(Grid : TSortStringGrid) : TModalResult; 1517 1516 //Results: mrNone -- no post done (not needed) 1518 1517 // mrCancel -- user pressed cancel on confirmation screen. … … 1729 1728 end; 1730 1729 1731 function TMainForm.FieldHelp(FileNum, FieldNum, HelpStyle : string) : string;1730 function TMainForm.FieldHelp(FileNum, IENS, FieldNum, HelpStyle : string) : string; 1732 1731 var 1733 1732 RPCResult: string; … … 1737 1736 begin 1738 1737 Result := ''; 1739 SrchStr := FileNum + '^' + FieldNum + '^' + HelpStyle ;1738 SrchStr := FileNum + '^' + FieldNum + '^' + HelpStyle + '^' + IENS; 1740 1739 Idx := CachedHelpIdx.IndexOf(SrchStr); 1741 1740 if Idx = -1 then begin … … 1775 1774 end; 1776 1775 1777 function TMainForm.GetGridHint(Grid : TS tringGrid; FileNum : string; ACol, ARow : integer) : string;1776 function TMainForm.GetGridHint(Grid : TSortStringGrid; FileNum : string; ACol, ARow : integer) : string; 1778 1777 var fieldNum : string; 1778 GridInfo : TGridInfo; 1779 1779 begin 1780 1780 Result := ''; 1781 1781 //Result := 'Row=' + IntToStr(ARow) + ', Col='+ IntToStr(ACol); 1782 1782 if ARow > Grid.RowCount-1 then exit; 1783 if (ARow < 0) or (ACol < 0) then exit;1783 if (ARow < 1) or (ACol < 0) then exit; 1784 1784 if ACol=0 then begin 1785 Result := 'This is the database field NUMBER'; 1785 Result := 'This is the database field NUMBER'; 1786 1786 end else if ACol=1 then begin 1787 Result := 'This is the database field NAME'; 1787 Result := 'This is the database field NAME'; 1788 1788 end else begin 1789 1789 fieldNum := Grid.Cells[0,ARow]; … … 1797 1797 result := 'Clicking will open new window...'; 1798 1798 end else begin 1799 Result := FieldHelp(FileNum, fieldNum, '?'); 1800 end; 1799 GridInfo := GetInfoForGrid(Grid); 1800 Result := FieldHelp(FileNum, GridInfo.IENS, fieldNum, '?'); 1801 end; 1801 1802 end; 1802 1803 end; … … 1830 1831 if VisibleGridInfo = nil then exit; 1831 1832 if VisibleGridInfo.Grid = nil then exit; 1832 if (ClassName='TS tringGrid') then begin1833 if (ClassName='TSortStringGrid') then begin 1833 1834 VisibleGridInfo.Grid.MouseToCell(Pos.X,Pos.Y,ACol,ARow); 1834 1835 HintInfo.HintStr := GetGridHint(VisibleGridInfo.Grid,VisibleGridInfo.FileNum,ACol, ARow); … … 1969 1970 ModalResult := PostVisibleGrid; 1970 1971 if ModalResult = mrNo then exit; 1971 FileNum := FileORComboBox.ItemID; 1972 FileNum := FileORComboBox.ItemID; 1972 1973 IEN := RecordORComboBox.ItemID; //get info from selected record 1973 1974 if IEN=0 then exit; … … 2193 2194 2194 2195 2195 procedure TMainForm.DoRevert(BasicGrid,AdvancedGrid : TS tringGrid);2196 procedure TMainForm.DoRevert(BasicGrid,AdvancedGrid : TSortStringGrid); 2196 2197 //BasicGrid doesn't have to be supplied. Can be nil value. 2197 2198 //AdvancedGrid is required. -
cprs/branches/GUI-config/SubfilesU.dfm
r542 r828 73 73 Align = alClient 74 74 TabOrder = 1 75 object SubFileGrid: TS tringGrid75 object SubFileGrid: TSortStringGrid 76 76 Left = 1 77 77 Top = 1 -
cprs/branches/GUI-config/SubfilesU.pas
r542 r828 30 30 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 31 31 StrUtils, MainU, 32 Dialogs, StdCtrls, ExtCtrls, Grids, ComCtrls, Buttons ;32 Dialogs, StdCtrls, ExtCtrls, Grids, ComCtrls, Buttons, SortStringGrid; 33 33 34 34 type … … 36 36 Panel1: TPanel; 37 37 TreeView: TTreeView; 38 SubFileGrid: TS tringGrid;38 SubFileGrid: TSortStringGrid; 39 39 Splitter1: TSplitter; 40 40 SubFileLabel: TLabel; … … 75 75 GridInfo : TGridInfo; 76 76 ModifiedForm : boolean; //Used to see if current record is unsaved 77 procedure CompileChanges(Grid : TS tringGrid; CurrentUser,Changes : TStringList);78 procedure PostChanges(Grid : TS tringGrid; IENS : string; SilentMode : boolean = false);77 procedure CompileChanges(Grid : TSortStringGrid; CurrentUser,Changes : TStringList); 78 procedure PostChanges(Grid : TSortStringGrid; IENS : string; SilentMode : boolean = false); 79 79 procedure GetAllSubRecords(SubFileNum, ParentIENS : string; SubRecsList : TStringList); 80 80 procedure InitTreeView; … … 296 296 297 297 298 procedure TSubfileForm.PostChanges(Grid : TS tringGrid; IENS : string; SilentMode : boolean);298 procedure TSubfileForm.PostChanges(Grid : TSortStringGrid; IENS : string; SilentMode : boolean); 299 299 300 300 function NewIENS(oldIENS : string; PostResults : TStringList) : string; … … 340 340 end; 341 341 342 procedure TSubfileForm.CompileChanges(Grid : TS tringGrid; CurrentUser,Changes : TStringList);342 procedure TSubfileForm.CompileChanges(Grid : TSortStringGrid; CurrentUser,Changes : TStringList); 343 343 //Output format: 344 344 // FileNum^IENS^FieldNum^FieldName^newValue^oldValue
Note:
See TracChangeset
for help on using the changeset viewer.