Changeset 830 for cprs/trunk/CPRS-Chart/fGraphProfiles.pas
- Timestamp:
- Jul 7, 2010, 4:51:54 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/trunk/CPRS-Chart/fGraphProfiles.pas
r456 r830 5 5 uses 6 6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 7 ComCtrls, StdCtrls, ExtCtrls, CheckLst, ORCtrls, ORFn, uGraphs, uCore; 7 ComCtrls, StdCtrls, ExtCtrls, CheckLst, ORCtrls, ORFn, uGraphs, rCore, uCore, 8 fBase508Form, VA508AccessibilityManager; 8 9 9 10 type 10 TfrmGraphProfiles = class(T Form)11 TfrmGraphProfiles = class(TfrmBase508Form) 11 12 btnAdd: TButton; 12 13 btnAddAll: TButton; … … 28 29 lblSelection: TLabel; 29 30 lblSelectionInfo: TLabel; 30 lblSource: TLabel;31 31 lstActualItems: TORListBox; 32 32 lstDrugClass: TListBox; 33 33 lstItemsDisplayed: TORListBox; 34 lstItems TopSelection: TORListBox;34 lstItemsSelection: TORListBox; 35 35 lstScratch: TListBox; 36 lstSource: TORListBox;37 36 lstTests: TListBox; 38 37 pnlApply: TPanel; … … 47 46 lblSave: TLabel; 48 47 lblClose: TLabel; 48 lblUser: TLabel; 49 pnlAllSources: TPanel; 50 pnlSources: TPanel; 51 lblSource: TLabel; 52 lstSources: TORListBox; 53 pnlOtherSources: TPanel; 54 pnlOtherSourcesUser: TPanel; 55 lblOtherPersons: TLabel; 56 cboUser: TORComboBox; 57 pnlOtherSourcesBottom: TPanel; 58 lstOtherSources: TORListBox; 59 btnViews: TButton; 60 btnDefinitions: TButton; 61 pnlOtherViews: TPanel; 62 lblOtherViews: TLabel; 63 lblSelectOthers: TLabel; 64 splViews: TSplitter; 49 65 procedure FormCreate(Sender: TObject); 50 66 procedure FormShow(Sender: TObject); … … 52 68 53 69 procedure btnClearClick(Sender: TObject); 54 procedure btnDeleteClick(Sender: TObject);55 70 procedure btnCloseClick(Sender: TObject); 56 procedure btn RemoveClick(Sender: TObject);71 procedure btnDefinitionsClick(Sender: TObject); 57 72 procedure btnRemoveAllClick(Sender: TObject); 58 73 procedure btnRemoveOneClick(Sender: TObject); 59 procedure btnRenameClick(Sender: TObject); 60 procedure btnSaveClick(Sender: TObject); 61 62 procedure radSourceAllClick(Sender: TObject); 63 74 procedure btnViewsClick(Sender: TObject); 64 75 procedure cboAllItemsClick(Sender: TObject); 65 76 procedure cboAllItemsChange(Sender: TObject); 66 77 procedure cboAllItemsNeedData(Sender: TObject; const StartFrom: String; 67 78 Direction, InsertAt: Integer); 79 procedure cboUserClick(Sender: TObject); 80 procedure cboUserNeedData(Sender: TObject; const StartFrom: string; 81 Direction, InsertAt: Integer); 68 82 procedure lstItemsDisplayedChange(Sender: TObject); 69 83 procedure lstItemsDisplayedDblClick(Sender: TObject); 70 procedure lstSourceChange(Sender: TObject); 71 procedure lstSourceDblClick(Sender: TObject); 84 procedure lstSourcesChange(Sender: TObject); 85 procedure lstSourcesDblClick(Sender: TObject); 86 procedure lstSourcesEnter(Sender: TObject); 87 procedure lstSourcesExit(Sender: TObject); 88 procedure radSourceAllClick(Sender: TObject); 89 90 procedure btnDeleteClick(Sender: TObject); 91 procedure btnRenameClick(Sender: TObject); 92 procedure btnSaveClick(Sender: TObject); 72 93 73 94 procedure AddToList(aItem: string; aListBox: TORListBox); … … 75 96 aListBox: TORListBox; var addtolist: boolean); 76 97 procedure AssignHints; 77 procedure AssignProfile(aList: TStrings; aProfile: string); 98 procedure AssignProfile(aList: TStrings; aProfile: string; UserNum: integer; allitems: boolean); 99 procedure AssignProfilePre(aList: TStrings; var aProfile: string; UserNum: integer); 100 procedure AssignProfilePost(aList: TStrings; var aProfile, typedata: string); 78 101 procedure CheckPublic; 79 procedure FillSource ;80 81 function ProfileExists(aName: string; aType: integer): boolean;102 procedure FillSource(aList: TORListBox); 103 function ProfileExists(aName, aType: string): boolean; 104 procedure btnAddAllClick(Sender: TObject); 82 105 private 83 { Private declarations }84 106 FHintPauseTime: integer; 85 107 FPublicEditor: boolean; … … 88 110 procedure wmNCLButtonDown(var Msg: TWMNCLButtonDown); message WM_NCLBUTTONDOWN; 89 111 public 90 { Public declarations } 112 procedure AllItemsAfter(var filetype, typedata: string); 113 procedure AllItemsBefore(var typedata: string); 114 procedure IDProfile(var profilename, proftype: string); 115 procedure ListBoxSetup(Sender: TObject); 116 procedure ComboBoxSetup(Sender: TObject); 117 procedure Report(aListBox: TORListBox); 118 function GetProfileName(infotitle, info: string; var newprofilename: string): boolean; 91 119 end; 92 120 … … 94 122 frmGraphProfiles: TfrmGraphProfiles; 95 123 96 procedure DialogOptionsGraphProfiles(topvalue, leftvalue, fontsize: integer; 97 var actiontype: boolean); 98 procedure DialogGraphProfiles(fontsize: integer; var actionOK: boolean; 124 procedure DialogOptionsGraphProfiles(var actiontype: boolean); 125 procedure DialogGraphProfiles(var actionOK: boolean; 99 126 var checkaction: boolean; aGraphSetting: TGraphSetting; 100 127 var aProfname, aProfilestring, aSection: string; … … 107 134 108 135 uses 109 rGraphs; 110 111 procedure DialogOptionsGraphProfiles(topvalue, leftvalue, fontsize: integer; 112 var actiontype: boolean); 136 rGraphs, fGraphData, fGraphOthers, fRptBox, VAUtils; 137 138 procedure DialogOptionsGraphProfiles(var actiontype: boolean); 113 139 // create the form and make it modal, return an action 114 140 var 115 141 FGraphSetting: TGraphSetting; 116 aList, AllTypes: TStrings; 117 dfntype, listline, settings, settings1, t1, t2: string; 142 settings: string; 118 143 actionOK, checkaction: boolean; 119 counter , i: integer;144 counter: integer; 120 145 aSelections, profile, profilestring, section: string; 121 146 begin 122 aList := TStringList.Create; 123 FastAssign(rpcGetGraphSettings, aList); 124 if aList.Count < 1 then 125 begin 126 showmessage('CPRS is not configured for graphing.'); 127 aList.Free; 147 if (GtslData = nil) then 148 begin 149 ShowMsg(TXT_NOGRAPHING); 128 150 exit; 129 151 end; 130 t1 := aList[0]; t2 := aList[1]; // t1 are personal, t2 public settings 131 if length(t1) > 0 then settings := t1 132 else settings := t2; 133 SetPiece(settings, '|', 8, Piece(t2, '|', 8)); 134 settings1 := Piece(settings, '|', 1); 135 Alltypes := TStringList.Create; 136 FastAssign(rpcGetTypes('0', true), AllTypes); 137 for i := 0 to AllTypes.Count - 1 do 138 begin 139 listline := AllTypes[i]; 140 dfntype := UpperCase(Piece(listline, '^', 1)); 141 SetPiece(listline, '^', 1, dfntype); 142 AllTypes[i] := listline; 143 end; 152 settings := GetCurrentSetting; 144 153 FGraphSetting := GraphSettingsInit(settings); 145 154 checkaction := false; … … 148 157 counter := BIG_NUMBER; 149 158 aSelections :=''; 150 DialogGraphProfiles( fontsize,actionOK, checkaction, FGraphSetting,159 DialogGraphProfiles(actionOK, checkaction, FGraphSetting, 151 160 profile, profilestring, section, Patient.DFN, counter, aSelections); 152 161 FGraphSetting.Free; 153 aList.Free; 154 end; 155 156 procedure DialogGraphProfiles(fontsize: integer; var actionOK: boolean; 162 end; 163 164 procedure DialogGraphProfiles(var actionOK: boolean; 157 165 var checkaction: boolean; aGraphSetting: TGraphSetting; 158 166 var aProfname, aProfilestring, aSection: string; … … 161 169 var 162 170 i: integer; 163 counter, profile, profileitem, profiletype: string;171 astring, counter, profile, profileitem, profiletype, profiletext: string; 164 172 frmGraphProfiles: TfrmGraphProfiles; 165 173 begin … … 181 189 end; 182 190 if length(aSelections) > 0 then 183 lstSource.Items.Insert(0, '-3^<current selections>^' + aSelections); 191 begin 192 if GtslViews.Count = 0 then 193 GtslViews.Insert(0, VIEW_CURRENT + '^<current selections>^' + aSelections) 194 else if Piece(GtslViews[0], '^', 1) <> VIEW_CURRENT then 195 GtslViews.Insert(0, VIEW_CURRENT + '^<current selections>^' + aSelections) 196 else if GtslViews.Count > 0 then 197 GtslViews[0] := VIEW_CURRENT + '^<current selections>^' + aSelections; 198 end; 184 199 ResizeAnchoredFormToFont(frmGraphProfiles); 185 200 ShowModal; 186 201 actionOK := (btnClose.Tag = 1); 202 profiletext := ''; 187 203 aProfname := ''; 188 204 if actionOK then … … 197 213 for i := 0 to Items.Count - 1 do 198 214 begin 199 profiletype := Piece(Items[i], '^', 1); 200 profileitem := Piece(Items[i], '^', 2); 215 astring := Items[i]; 216 profiletext := profiletext + Piece(astring, '^', 3) + '^'; 217 profiletype := Piece(astring, '^', 1); 218 if profiletype = '8925' then 219 profileitem := UpperCase(Piece(astring, '^', 3)) 220 else 221 profileitem := Piece(astring, '^', 2); 201 222 profile := profile + profiletype + '~' + profileitem + '~|'; 202 223 end; 203 aCounter := aCounter + 1; 204 counter := inttostr(aCounter); 205 aProfileString := '^<view' + counter + '>^' + profile; 224 if (GtslViews.Count > 0) and (Piece(GtslViews[0], '^', 1) = VIEW_CURRENT) then 225 counter := inttostr(GtslViews.Count) 226 else 227 counter := inttostr(GtslViews.Count + 1); 228 aProfileString := '<view' + counter + '>^' + profile + '^' + profiletext; 229 GtslViews.Add(aProfileString); 230 aCounter := strtointdef(counter, BIG_NUMBER); 206 231 with aGraphSetting do 207 232 begin … … 214 239 ItemsForDisplay := lstActualItems.Items; 215 240 end; 216 end;241 end; 217 242 end; 218 243 finally … … 223 248 procedure TfrmGraphProfiles.FormCreate(Sender: TObject); 224 249 begin 225 FillSource; 226 FPublicEditor := rpcPublicEdit; 250 FPublicEditor := GraphPublicEditor; 227 251 end; 228 252 229 253 procedure TfrmGraphProfiles.FormShow(Sender: TObject); 230 254 begin 255 if GtslData = nil then 256 begin 257 radSourceAll.Checked := true; 258 //radSourcePat.Enabled := false; 259 end 260 else if GtslData.Count < 1 then 261 begin 262 radSourceAll.Checked := true; 263 //radSourcePat.Enabled := false; 264 end; 231 265 cboAllItems.Visible := radSourceAll.Checked; 266 FillSource(lstSources); 267 cboUser.InitLongList(''); 232 268 FHintPauseTime := Application.HintHidePause; 233 269 Application.HintHidePause := 9000; // uses a longer hint pause time 234 270 end; 235 271 272 procedure TfrmGraphProfiles.FormClose(Sender: TObject; var Action: TCloseAction); 273 begin 274 Application.HintHidePause := FHintPauseTime; 275 end; 276 277 procedure TfrmGraphProfiles.radSourceAllClick(Sender: TObject); 278 var 279 dfn: string; 280 begin 281 if Sender = radSourceAll then 282 begin 283 lstItemsSelection.Visible := false; 284 cboAllItems.Visible := true; 285 end 286 else 287 begin 288 if radSourcePat.Tag = 0 then 289 begin 290 dfn := lblClose.Hint; 291 FastAssign(rpcGetAllItems(dfn), lstTests.Items); // items for patient 292 FastAssign(rpcGetItems('50.605', dfn), lstDrugClass.Items); 293 radSourcePat.Tag := 1; 294 end; 295 cboAllItems.Visible := false; 296 lstItemsSelection.Visible := true; 297 end; 298 if lstSources.ItemIndex > 0 then 299 begin 300 lstSources.Tag := BIG_NUMBER; 301 lstSourcesChange(lstSources); 302 end 303 else if lstSources.ItemIndex > 0 then 304 begin 305 lstOtherSources.Tag := BIG_NUMBER; 306 lstSourcesChange(lstOtherSources); 307 end; 308 end; 309 310 procedure TfrmGraphProfiles.lstSourcesChange(Sender: TObject); 311 var 312 UserNum: int64; 313 filetype, typedata: string; 314 aListBox, oppositeListBox: TORListBox; 315 viewselected: boolean; 316 begin 317 CheckPublic; 318 aListBox := (Sender as TORListBox); 319 if aListBox = lstSources then 320 begin 321 oppositeListBox := lstOtherSources; 322 UserNum := User.DUZ; 323 end 324 else 325 begin 326 oppositeListBox := lstSources; 327 UserNum := cboUser.ItemID; 328 end; 329 if aListBox.Tag <> BIG_NUMBER then 330 exit; 331 oppositeListBox.ItemIndex := -1; 332 cboAllItems.Items.Clear; 333 cboAllItems.Text := ''; 334 if aListBox.ItemIndex = -1 then exit; 335 typedata := aListBox.Items[aListBox.ItemIndex]; 336 if pos(LLS_FRONT, typedata) > 0 then // <clear all selections> 337 begin 338 lstItemsSelection.Clear; 339 cboAllItems.Items.Clear; 340 cboAllItems.Text := ''; 341 exit; 342 end; 343 filetype := Piece(typedata, '^', 1); 344 if (filetype = VIEW_PERSONAL) 345 or (filetype = VIEW_PUBLIC) 346 or (filetype = VIEW_LABS) 347 or (filetype = VIEW_TEMPORARY) 348 or (filetype = VIEW_CURRENT) then 349 begin 350 RadSourceAll.Checked := true; 351 RadSourcePat.Enabled := false; 352 AssignProfile(cboAllItems.Items, typedata, UserNum, false); 353 FastAssign(cboAllItems.Items, lstItemsSelection.Items); 354 viewselected := true; 355 end 356 else 357 begin 358 RadSourcePat.Enabled := true; 359 AllItemsBefore(typedata); 360 AllItemsAfter(filetype, typedata); 361 viewselected := false; 362 end; 363 lstItemsSelection.Visible := viewselected or radSourcePat.Checked; 364 cboAllItems.Visible := not lstItemsSelection.Visible; 365 cboAllItemsChange(cboAllItems); 366 end; 367 368 procedure TfrmGraphProfiles.lstSourcesEnter(Sender: TObject); 369 begin 370 (Sender as TORListBox).Tag := BIG_NUMBER; 371 end; 372 373 procedure TfrmGraphProfiles.lstSourcesExit(Sender: TObject); 374 begin 375 (Sender as TORListBox).Tag := 0; 376 end; 377 378 procedure TfrmGraphProfiles.lstSourcesDblClick(Sender: TObject); 379 begin 380 if cboAllItems.Visible then 381 begin 382 if cboAllItems.Items.Count < 1 then exit; 383 cboAllItems.ItemIndex := 0; 384 cboAllItemsClick(cboAllItems); 385 end 386 else 387 begin 388 if lstItemsSelection.Items.Count < 1 then exit; 389 //lstItemsSelection.Selected[0] := true; 390 cboAllItemsClick(lstItemsSelection); 391 btnAddAllClick(self); 392 end; 393 end; 394 395 procedure TfrmGraphProfiles.cboUserClick(Sender: TObject); 396 begin 397 FillSource(lstOtherSources); 398 if cboUser.ItemIndex <> -1 then 399 lblOtherViews.Caption := cboUser.DisplayText[cboUser.ItemIndex] + ' Views:' 400 else 401 lblOtherViews.Caption := 'Other Views:' 402 end; 403 404 procedure TfrmGraphProfiles.cboUserNeedData(Sender: TObject; 405 const StartFrom: string; Direction, InsertAt: Integer); 406 begin 407 cboUser.ForDataUse(SubSetOfPersons(StartFrom, Direction)); 408 end; 409 410 procedure TfrmGraphProfiles.cboAllItemsChange(Sender: TObject); 411 //var 412 //astring: string; 413 begin 414 if (Sender is TORListBox) then 415 btnClear.Enabled := btnSave.Enabled or ((Sender as TORListBox).Items.Count > 0) 416 else if (Sender is TORComboBox) then 417 btnClear.Enabled := btnSave.Enabled or ((Sender as TORComboBox).Items.Count > 0); 418 if lstItemsSelection.Visible then 419 begin 420 btnAddAll.Enabled := lstItemsSelection.Items.Count > 0; 421 btnAdd.Enabled := lstItemsSelection.ItemIndex > -1; 422 //if btnAdd.Enabled then 423 //astring := lstItemsSelection.Items[lstItemsSelection.ItemIndex]; 424 end 425 else 426 begin 427 btnAddAll.Enabled := cboAllItems.Items.Count > 0; 428 btnAdd.Enabled := cboAllItems.ItemIndex > -1; 429 end; 430 end; 431 432 procedure TfrmGraphProfiles.cboAllItemsClick(Sender: TObject); 433 var 434 i: integer; 435 begin 436 if Sender is TButton then 437 begin 438 if lstItemsSelection.Visible then 439 begin 440 if Sender = btnAddAll then 441 begin 442 for i := 0 to lstItemsSelection.Items.Count - 1 do 443 begin 444 lstItemsSelection.Selected[i] := true; 445 lstItemsSelection.ItemIndex := i; 446 ListBoxSetup(lstItemsSelection); 447 end; 448 lstItemsSelection.Clear; 449 end 450 else 451 begin 452 lstItemsDisplayed.ItemIndex := 0; 453 ListBoxSetup(lstItemsSelection); 454 end; 455 lstItemsDisplayedChange(self); 456 CheckToClear; 457 exit; 458 end 459 else 460 begin 461 if Sender = btnAdd then 462 begin 463 ComboBoxSetup(cboAllItems); 464 lstItemsDisplayedChange(self); 465 CheckToClear; 466 exit; 467 end; 468 end; 469 end; 470 if (Sender is TORComboBox) then 471 ComboBoxSetup(Sender) 472 else if (Sender is TORListBox) then 473 ListBoxSetup(Sender) 474 else exit; 475 lstItemsDisplayedChange(self); 476 CheckToClear; 477 end; 478 479 procedure TfrmGraphProfiles.cboAllItemsNeedData(Sender: TObject; 480 const StartFrom: String; Direction, InsertAt: Integer); 481 var 482 filetype: string; 483 begin 484 if lstSources.ItemIndex = -1 then exit; 485 filetype := Piece(lstSources.Items[lstSources.ItemIndex], '^', 1); 486 cboAllItems.ForDataUse(rpcLookupItems(filetype, StartFrom, Direction)); 487 end; 488 489 procedure TfrmGraphProfiles.lstItemsDisplayedChange(Sender: TObject); 490 begin 491 btnSave.Enabled := lstItemsDisplayed.Items.Count > 0; 492 btnSavePublic.Enabled := btnSave.Enabled and FPublicEditor; 493 btnRemoveAll.Enabled := btnSave.Enabled; 494 btnAdd.Enabled := (cboAllItems.Visible and (cboAllItems.ItemIndex > -1)) 495 or (lstItemsSelection.Visible and (lstItemsSelection.ItemIndex > -1)); 496 btnRemoveOne.Enabled := btnSave.Enabled and (lstItemsDisplayed.ItemIndex > -1); 497 btnClear.Enabled := btnSave.Enabled or (lstItemsSelection.Items.Count > 0); 498 if btnSave.Enabled and pnlApply.Visible then btnClose.Caption := 'Close and Display' 499 else btnClose.Caption := 'Close'; 500 end; 501 502 procedure TfrmGraphProfiles.lstItemsDisplayedDblClick(Sender: TObject); 503 var 504 line: string; 505 begin 506 if lstItemsDisplayed.ItemIndex < 0 then exit; 507 line := lstItemsDisplayed.Items[lstItemsDisplayed.ItemIndex]; 508 lstItemsDisplayed.Items.Delete(lstItemsDisplayed.ItemIndex); 509 QualifierDelete(line); 510 lstItemsDisplayedChange(self); 511 end; 512 513 procedure TfrmGraphProfiles.btnAddAllClick(Sender: TObject); 514 begin 515 if cboAllItems.Visible then 516 begin 517 if cboAllItems.Items.Count < 1 then exit; 518 cboAllItems.ItemIndex := 0; 519 cboAllItemsClick(cboAllItems); 520 end 521 else 522 begin 523 if lstItemsSelection.Items.Count < 1 then exit; 524 cboAllItemsClick(btnAddAll); 525 end; 526 end; 527 528 procedure TfrmGraphProfiles.btnRemoveOneClick(Sender: TObject); 529 begin 530 lstItemsDisplayedDblClick(self); 531 CheckToClear; 532 end; 533 534 procedure TfrmGraphProfiles.btnRemoveAllClick(Sender: TObject); 535 begin 536 lstItemsDisplayed.Clear; 537 lstItemsDisplayedChange(self); 538 CheckToClear; 539 end; 540 541 procedure TfrmGraphProfiles.btnDefinitionsClick(Sender: TObject); 542 var 543 firstpublic, firstpersonal, firstlabs: boolean; 544 i, j: integer; 545 aLine, aProfile, filetype, aString, front, back, piece2: string; 546 aList, templist: TStringList; 547 begin 548 front := Piece(LLS_FRONT, '^', 2); 549 back := Piece(LLS_BACK, '^', 1); 550 templist := TStringList.Create; 551 aList := TStringList.Create; 552 lstScratch.Clear; 553 lstScratch.Sorted := false; 554 firstpublic := true; 555 firstpersonal := true; 556 firstlabs := true; 557 for i := 0 to lstSources.Items.Count - 1 do 558 begin 559 aLine := lstSources.Items[i]; 560 filetype := Piece(aLine, '^', 1); 561 aProfile := Piece(aLine, '^', 2); 562 if (filetype = VIEW_PERSONAL) 563 or (filetype = VIEW_PUBLIC) 564 or (filetype = VIEW_LABS) then 565 begin 566 if (filetype = VIEW_PUBLIC) and firstpublic then 567 begin 568 templist.Add(' '); 569 templist.Add(front + copy('Public Views' + back, 0, 60)); 570 firstpublic := false; 571 end 572 else 573 if (filetype = VIEW_PERSONAL) and firstpersonal then 574 begin 575 templist.Add(' '); 576 templist.Add(front + copy('Personal Views' + back, 0, 60)); 577 firstpersonal := false; 578 end 579 else 580 if (filetype = VIEW_LABS) and firstlabs then 581 begin 582 templist.Add(' '); 583 templist.Add(front + copy('Lab Groups' + back, 0, 60)); 584 firstlabs := false; 585 end; 586 AssignProfile(aList, aLine, User.DUZ, true); 587 templist.Add(aProfile); 588 for j := 0 to aList.Count - 1 do 589 begin 590 aLine := aList[j]; 591 piece2 := Piece(aLine, '^', 2); 592 if strtointdef(copy(piece2, 0, 1), -1) > 0 then 593 begin 594 aString := Piece(aLine, '^', 3); 595 if copy(aString, 0, 1) = '_' then 596 aString := copy(aString, 2, length(aString)); 597 templist.Add(' ' + aString); 598 end 599 else 600 begin 601 602 end; 603 end; 604 end; 605 end; 606 if cboUser.ItemIndex > -1 then 607 begin 608 firstpersonal := true; 609 firstlabs := true; 610 templist.Add(''); 611 templist.Add(''); 612 templist.Add('Views and Lab Groups for ' + cboUser.Text); 613 for i := 0 to lstOtherSources.Items.Count - 1 do 614 begin 615 aLine := lstOtherSources.Items[i]; 616 filetype := Piece(aLine, '^', 1); 617 aProfile := Piece(aLine, '^', 2); 618 if (filetype = VIEW_PERSONAL) 619 or (filetype = VIEW_LABS) then 620 begin 621 if (filetype = VIEW_PERSONAL) and firstpersonal then 622 begin 623 templist.Add(' '); 624 templist.Add(front + copy('Views' + back, 0, 60)); 625 firstpersonal := false; 626 end 627 else 628 if (filetype = VIEW_LABS) and firstlabs then 629 begin 630 templist.Add(' '); 631 templist.Add(front + copy('Lab Groups' + back, 0, 60)); 632 firstlabs := false; 633 end; 634 AssignProfile(aList, aLine, cboUser.ItemID, true); 635 templist.Add(aProfile); 636 for j := 0 to aList.Count - 1 do 637 begin 638 aLine := aList[j]; 639 piece2 := Piece(aLine, '^', 2); 640 if strtointdef(copy(piece2, 0, 1), -1) > 0 then 641 begin 642 aString := Piece(aLine, '^', 3); 643 if copy(aString, 0, 1) = '_' then 644 aString := copy(aString, 2, length(aString)); 645 templist.Add(' ' + aString); 646 end; 647 end; 648 end; 649 end; 650 end; 651 templist.Insert(0, 'Definitions of Views and Lab Groups'); 652 templist.Insert(1, ''); 653 templist.Insert(2,'Your Personal Views, Public Views, and Lab Groups'); 654 ReportBox(templist, 'Views and Lab Groups', true); 655 templist.Free; 656 aList.Free; 657 end; 658 236 659 procedure TfrmGraphProfiles.btnClearClick(Sender: TObject); 237 660 begin 238 661 lstItemsDisplayed.Items.Clear; 239 lstItems TopSelection.Items.Clear;662 lstItemsSelection.Items.Clear; 240 663 cboAllItems.Items.Clear; 241 664 cboAllItems.Text :=''; 242 665 lstItemsDisplayedChange(self); 243 666 cboAllItemsChange(self); 244 lstSource.ItemIndex := -1; 667 lstSources.ItemIndex := -1; 668 lstOtherSources.ItemIndex := -1; 245 669 end; 246 670 … … 250 674 info, profilename, profname, proftype: string; 251 675 begin 252 if lstSource .ItemIndex < 0 then253 begin 254 showmessage('You must select a valid View for deletion.');676 if lstSources.ItemIndex < 0 then 677 begin 678 ShowMsg('You must select a valid View for deletion.'); 255 679 exit; 256 680 end; 257 681 publicview := false; 258 682 profilename := ''; 259 info := lstSource .Items[lstSource.ItemIndex];683 info := lstSources.Items[lstSources.ItemIndex]; 260 684 proftype := Piece(info, '^', 1); 261 685 profname := Piece(info, '^', 2); 262 if proftype = '-1'then686 if proftype = VIEW_PERSONAL then 263 687 profilename := profname 264 else if (proftype = '-2') and FPublicEditor then688 else if (proftype = VIEW_PUBLIC) and FPublicEditor then 265 689 begin 266 690 profilename := profname; … … 269 693 else 270 694 begin 271 showmessage('You must select a valid View for deletion.');695 ShowMsg('You must select a valid View for deletion.'); 272 696 exit; 273 697 end; … … 299 723 btnClearClick(self); 300 724 lstItemsDisplayed.Items.Clear; 301 lstItems TopSelection.Items.Clear;725 lstItemsSelection.Items.Clear; 302 726 cboAllItems.Items.Clear; 303 727 cboAllItems.Text :=''; 304 FormCreate(self); 728 GraphDataOnUser; 729 FormShow(self); 305 730 lstItemsDisplayedChange(self); 306 731 btnDelete.Enabled := false; 307 732 btnRename.Enabled := false; 733 if lstSources.Count > 0 then 734 lstSources.ItemIndex := 0; 308 735 end; 309 736 … … 311 738 var 312 739 profentered, publicview: boolean; 313 i, match: integer;314 a Name, aType, info, infotitle: string;315 newprofilename, profilename, profname, proftype: string;316 begin 317 if lstSource .ItemIndex < 0 then318 begin 319 showmessage('You must select a valid View to rename.');740 i, j: integer; 741 astring, info, infotitle, newprofilename, profile, profileitem, profilename, profiletype, profname, proftype: string; 742 aList: TStrings; 743 begin 744 if lstSources.ItemIndex < 0 then 745 begin 746 ShowMsg('You must select a valid View to rename.'); 320 747 exit; 321 748 end; 322 749 publicview := false; 323 750 profilename := ''; 324 info := lstSource .Items[lstSource.ItemIndex];751 info := lstSources.Items[lstSources.ItemIndex]; 325 752 proftype := Piece(info, '^', 1); 326 753 profname := Piece(info, '^', 2); 327 if proftype = '-1'then754 if proftype = VIEW_PERSONAL then 328 755 profilename := profname 329 else if (proftype = '-2') and FPublicEditor then756 else if (proftype = VIEW_PUBLIC) and FPublicEditor then 330 757 begin 331 758 profilename := profname; … … 334 761 else 335 762 begin 336 showmessage('You must select a valid View to rename.');763 ShowMsg('You must select a valid View to rename.'); 337 764 end; 338 765 btnRemoveAllClick(self); 339 lstSource DblClick(self);766 lstSourcesDblClick(self); 340 767 if publicview then 341 768 begin … … 349 776 info := 'Enter a new name for ' + profilename + '.' 350 777 end; 351 profentered := InputQuery(infotitle, info, newprofilename);778 profentered := GetProfileName(infotitle, info, newprofilename); 352 779 if not profentered then exit; 353 if newprofilename = '' then exit;354 780 info := ''; 355 if not ProfileExists(newprofilename, -2) and publicview then781 if not ProfileExists(newprofilename, VIEW_PUBLIC) and publicview then 356 782 info := 'The Public View, ' + profilename + ', will be changed to ' 357 783 + newprofilename + #13 + 'Is this OK?' 358 else if not ProfileExists(newprofilename, -1) then784 else if not ProfileExists(newprofilename, VIEW_PERSONAL) then 359 785 info := 'Your Personal View, ' + profilename + ', will be changed to ' 360 786 + newprofilename + #13 + 'Is this OK?'; 361 787 if length(info) > 0 then 362 begin363 788 if MessageDlg(info, mtConfirmation, [mbYes, mbNo], 0) <> mrYes then exit; 364 if publicview then 365 begin 366 FastAssign(rpcGetGraphProfiles(UpperCase(profilename), '1', 1), lstScratch.Items); 367 rpcDeleteGraphProfile(UpperCase(profilename), '1'); 368 rpcSetGraphProfile(newprofilename, '1', lstScratch.Items); 369 btnClose.Tag := 1; 370 proftype := '-2'; 371 end 789 aList := TStringList.Create; 790 profile := ''; 791 aList.Clear; 792 j := 1; 793 with lstItemsDisplayed do 794 for i := 0 to Items.Count - 1 do 795 begin 796 astring := Items[i]; 797 profiletype := Piece(astring, '^', 1); 798 if profiletype = '8925' then 799 profileitem := UpperCase(Piece(astring, '^', 3)) 372 800 else 373 begin 374 FastAssign(rpcGetGraphProfiles(UpperCase(profilename), '0', 1), lstScratch.Items); 375 rpcDeleteGraphProfile(UpperCase(profilename), '0'); 376 rpcSetGraphProfile(newprofilename, '0', lstScratch.Items); 377 btnClose.Tag := 1; 378 proftype := '-1'; 379 end; 380 end; 381 if length(newprofilename) > 0 then 382 lblSave.Hint := newprofilename; 383 btnClearClick(self); 384 lstScratch.Items.Clear; 385 lstSource.Items.Clear; 386 FormCreate(btnSave); 387 match := -1; 388 profilename := UpperCase(newprofilename); 389 for i := lstSource.Items.Count - 1 downto 0 do 390 begin 391 info := lstSource.Items[i]; 392 aType := Piece(info, '^', 1); 393 aName := Piece(info, '^', 2); 394 if (UpperCase(aName) = newprofilename) and (aType = proftype) then 395 begin 396 match := i; 397 break; 398 end; 399 end; 400 if match = -1 then exit; 401 lstSource.ItemIndex := match; 402 lstSourceChange(self); 403 end; 404 405 procedure TfrmGraphProfiles.btnCloseClick(Sender: TObject); 406 begin 407 if lstItemsDisplayed.Items.Count > 0 then 801 profileitem := Piece(astring, '^', 2); 802 profile := profile + profiletype + '~' + profileitem + '~|'; 803 j := j + 1; 804 if (j mod 10) = 0 then 805 if length(profile) > 0 then 806 begin 807 aList.Add(UpperCase(profile)); 808 profile := ''; 809 end; 810 end; 811 if length(profile) > 0 then 812 begin 813 aList.Add(UpperCase(profile)); 814 profile := ''; 815 end; 816 if publicview then 817 begin 818 proftype := VIEW_PUBLIC; 819 rpcDeleteGraphProfile(UpperCase(profilename), '1'); 820 rpcSetGraphProfile(newprofilename, '1', aList); 408 821 btnClose.Tag := 1; 409 Close; 410 end; 411 412 procedure TfrmGraphProfiles.btnRemoveClick(Sender: TObject); 413 begin 414 if lstItemsDisplayed.ItemIndex < 0 then exit; 415 lstItemsDisplayed.Items.Delete(lstItemsDisplayed.ItemIndex); 416 CheckToClear; 417 end; 418 419 procedure TfrmGraphProfiles.btnRemoveAllClick(Sender: TObject); 420 begin 421 lstItemsDisplayed.Clear; 422 lstItemsDisplayedChange(self); 423 CheckToClear; 424 end; 425 426 procedure TfrmGraphProfiles.btnRemoveOneClick(Sender: TObject); 427 begin 428 lstItemsDisplayedDblClick(self); 429 CheckToClear; 430 end; 431 432 procedure TfrmGraphProfiles.CheckToClear; 433 begin 434 if cboAllItems.Visible and (cboAllItems.Items.Count = 0) then 435 lstSource.ItemIndex := -1 436 else if lstItemsTopSelection.Visible and (lstItemsTopSelection.Items.Count = 0) then 437 lstSource.ItemIndex := -1; 438 if lstSource.ItemIndex = -1 then 439 begin 440 btnAdd.Enabled := false; 441 btnAddAll.Enabled := false; 442 end; 822 end 823 else 824 begin 825 proftype := VIEW_PERSONAL; 826 rpcDeleteGraphProfile(UpperCase(profilename), '0'); 827 rpcSetGraphProfile(newprofilename, '0', aList); 828 btnClose.Tag := 1; 829 end; 830 aList.Free; 831 IDProfile(newprofilename, proftype); 443 832 end; 444 833 … … 446 835 var 447 836 profentered, puplicedit: boolean; 448 i, j , match: integer;449 a Name, aType, info, infotitle, profile, profileitem, profilename, profiletype, profname, proftype: string;837 i, j: integer; 838 astring, info, infotitle, profile, profileitem, profilename, profiletype, profname, proftype: string; 450 839 aList: TStrings; 451 840 begin … … 453 842 if lstItemsDisplayed.Items.Count < 1 then exit; 454 843 profilename := ''; 455 if lstSource.ItemIndex > -1 then 456 begin 457 info := lstSource.Items[lstSource.ItemIndex]; 458 proftype := Piece(info, '^', 1); 459 profname := Piece(info, '^', 2); 460 profilename := profname; 844 if lstSources.ItemIndex > -1 then 845 begin 846 info := lstSources.Items[lstSources.ItemIndex]; 847 if pos(LLS_FRONT, info) < 1 then 848 begin 849 proftype := Piece(info, '^', 1); 850 profname := Piece(info, '^', 2); 851 profilename := profname; 852 end; 461 853 end; 462 854 if puplicedit then … … 472 864 + #13 + 'If you are editing a View, enter the View''s name to overwrite it.'; 473 865 end; 474 profentered := InputQuery(infotitle, info, profilename);866 profentered := GetProfileName(infotitle, info, profilename); 475 867 if not profentered then exit; 476 if profilename = '' then exit;477 if (length(profilename) < 3) or (length(profilename) > 30) then478 begin479 showmessage('Not accepted - names of views must be 3-30 characters.');480 exit;481 end;482 868 info := ''; 483 if ProfileExists(profilename, -2) and FPublicEditor and puplicedit then869 if ProfileExists(profilename, VIEW_PUBLIC) and FPublicEditor and puplicedit then 484 870 info := 'The Public View, ' + profilename + ', will be overwritten.' 485 871 + #13 + 'Is this OK?' 486 else if ProfileExists(profilename, -1) and (not puplicedit) then872 else if ProfileExists(profilename, VIEW_PERSONAL) and (not puplicedit) then 487 873 info := 'Your Personal View, ' + profilename + ', will be overwritten.' 488 874 + #13 + 'Is this OK?'; … … 496 882 for i := 0 to Items.Count - 1 do 497 883 begin 498 profiletype := Piece(Items[i], '^', 1); 499 profileitem := Piece(Items[i], '^', 2); 884 astring := Items[i]; 885 profiletype := Piece(astring, '^', 1); 886 if profiletype = '8925' then 887 profileitem := UpperCase(Piece(astring, '^', 3)) 888 else 889 profileitem := Piece(astring, '^', 2); 500 890 profile := profile + profiletype + '~' + profileitem + '~|'; 501 j := j + 1;891 j := j + 1; 502 892 if (j mod 10) = 0 then 503 893 if length(profile) > 0 then … … 514 904 if puplicedit then 515 905 begin 516 proftype := '-2';906 proftype := VIEW_PUBLIC; 517 907 rpcSetGraphProfile(profilename, '1', aList); 518 908 btnClose.Tag := 1; … … 520 910 else 521 911 begin 522 proftype := '-1';912 proftype := VIEW_PERSONAL; 523 913 rpcSetGraphProfile(profilename, '0', aList); 524 914 btnClose.Tag := 1; 525 915 end; 526 if length(profilename) > 0 then527 lblSave.Hint := profilename;528 btnClearClick(self);529 lstScratch.Items.Clear;530 lstSource.Items.Clear;531 FormCreate(btnSave);532 match := -1;533 profilename := UpperCase(profilename);534 for i := lstSource.Items.Count - 1 downto 0 do535 begin536 info := lstSource.Items[i];537 aType := Piece(info, '^', 1);538 aName := Piece(info, '^', 2);539 if (UpperCase(aName) = profilename) and (aType = proftype) then540 begin541 match := i;542 break;543 end;544 end;545 916 aList.Free; 546 if match = -1 then exit; 547 lstSource.ItemIndex := match; 548 lstSourceChange(self); 917 IDProfile(profilename, proftype); 918 end; 919 920 procedure TfrmGraphProfiles.btnCloseClick(Sender: TObject); 921 begin 922 if lstItemsDisplayed.Items.Count > 0 then 923 btnClose.Tag := 1; 924 Close; 925 end; 926 927 procedure TfrmGraphProfiles.btnViewsClick(Sender: TObject); 928 begin // not used 929 pnlOtherSources.Visible := not pnlOtherSources.Visible; 930 if pnlOtherSources.Visible then 931 btnViews.Caption := 'Hide other views' 932 else 933 btnViews.Caption := 'Show other views'; 934 DialogGraphOthers(1); 549 935 end; 550 936 … … 553 939 typedata: string; 554 940 begin 555 if lstSource .ItemIndex = -1 then941 if lstSources.ItemIndex = -1 then 556 942 begin 557 943 btnDelete.Enabled := false; … … 559 945 exit; 560 946 end; 561 typedata := lstSource .Items[lstSource.ItemIndex];562 btnDelete.Enabled := (Piece(typedata, '^', 1) = '-1')563 or ((Piece(typedata, '^', 1) = '-2') and FPublicEditor);947 typedata := lstSources.Items[lstSources.ItemIndex]; 948 btnDelete.Enabled := (Piece(typedata, '^', 1) = VIEW_PERSONAL) 949 or ((Piece(typedata, '^', 1) = VIEW_PUBLIC) and FPublicEditor); 564 950 btnRename.Enabled := btnDelete.Enabled; 565 951 end; 566 952 567 procedure TfrmGraphProfiles.radSourceAllClick(Sender: TObject); 568 var 569 dfn: string; 570 begin 571 if Sender = radSourceAll then 572 begin 573 lstItemsTopSelection.Visible := false; 574 cboAllItems.Visible := true; 575 end 576 else 577 begin 578 if radSourcePat.Tag = 0 then 579 begin 580 dfn := lblClose.Hint; 581 FastAssign(rpcGetAllItems(dfn), lstTests.Items); //*** using a DFN, get all items 582 FastAssign(rpcGetItems('50.605', dfn), lstDrugClass.Items); 583 radSourcePat.Tag := 1; 584 end; 585 cboAllItems.Visible := false; 586 lstItemsTopSelection.Visible := true; 587 end; 588 lstSourceChange(self); 589 end; 590 591 procedure TfrmGraphProfiles.cboAllItemsClick(Sender: TObject); 953 procedure TfrmGraphProfiles.ListBoxSetup(Sender: TObject); 592 954 var 593 955 profileselected: boolean; 594 956 i: integer; 595 first, profileitem, selection, subtype: string; 596 begin 597 if Sender is TButton then 598 begin 599 if lstItemsTopSelection.Visible then 600 begin 601 if Sender = btnAddAll then 602 lstItemsTopSelection.ItemIndex := 0; 603 Sender := lstItemsTopSelection; 604 end 605 else 606 begin 607 if Sender = btnAddAll then 608 cboAllItems.ItemIndex := 0; 609 Sender := cboAllItems; 610 end; 611 end; 612 if Sender is TORListBox then 957 selection, first, profileitem: string; 958 begin 613 959 with (Sender as TORListBox) do 614 960 begin … … 632 978 else 633 979 AddToList(selection, lstItemsDisplayed); 634 if ItemIndex = 0 then Clear; //profile or type <any>980 //if ItemIndex = 0 then Clear; //profile or type <any> 635 981 ItemIndex := -1; 636 end 637 else if Sender is TORComboBox then 982 end; 983 end; 984 985 procedure TfrmGraphProfiles.ComboBoxSetup(Sender: TObject); 986 var 987 profileselected: boolean; 988 i: integer; 989 selection, first, profileitem, subtype: string; 990 begin 638 991 with (Sender as TORComboBox) do 639 992 begin … … 669 1022 if ItemIndex = 0 then Clear; //profile or type <any> 670 1023 ItemIndex := -1; 671 end 672 else exit; 673 lstItemsDisplayedChange(self); 674 CheckToClear; 675 end; 676 677 procedure TfrmGraphProfiles.cboAllItemsChange(Sender: TObject); 678 begin 679 if (Sender is TORListBox) then 680 btnClear.Enabled := btnSave.Enabled or ((Sender as TORListBox).Items.Count > 0) 681 else if (Sender is TORComboBox) then 682 btnClear.Enabled := btnSave.Enabled or ((Sender as TORComboBox).Items.Count > 0); 683 if lstItemsTopSelection.Visible then 684 begin 685 btnAddAll.Enabled := lstItemsTopSelection.Items.Count > 0; 686 btnAdd.Enabled := lstItemsTopSelection.ItemIndex > -1; 687 end 688 else 689 begin 690 btnAddAll.Enabled := cboAllItems.Items.Count > 0; 691 btnAdd.Enabled := cboAllItems.ItemIndex > -1; 692 end; 693 end; 694 695 procedure TfrmGraphProfiles.cboAllItemsNeedData(Sender: TObject; 696 const StartFrom: String; Direction, InsertAt: Integer); 697 var 698 filetype: string; 699 begin 700 if lstSource.ItemIndex = -1 then exit; 701 filetype := Piece(lstSource.Items[lstSource.ItemIndex], '^', 1); 702 cboAllItems.ForDataUse(rpcLookupItems(filetype, StartFrom, Direction)); 703 end; 704 705 procedure TfrmGraphProfiles.lstItemsDisplayedChange(Sender: TObject); 706 begin 707 btnSave.Enabled := lstItemsDisplayed.Items.Count > 0; 708 btnSavePublic.Enabled := btnSave.Enabled and FPublicEditor; 709 btnRemoveAll.Enabled := btnSave.Enabled; 710 btnAdd.Enabled := (cboAllItems.Visible and (cboAllItems.ItemIndex > -1)) 711 or (lstItemsTopSelection.Visible and (lstItemsTopSelection.ItemIndex > -1)); 712 btnRemoveOne.Enabled := btnSave.Enabled and (lstItemsDisplayed.ItemIndex > -1); 713 btnClear.Enabled := btnSave.Enabled or (lstItemsTopSelection.Items.Count > 0); 714 if btnSave.Enabled and pnlApply.Visible then btnClose.Caption := 'Close and Display' 715 else btnClose.Caption := 'Close'; 716 end; 717 718 procedure TfrmGraphProfiles.lstItemsDisplayedDblClick(Sender: TObject); 719 var 720 line: string; 721 begin 722 if lstItemsDisplayed.ItemIndex < 0 then exit; 723 line := lstItemsDisplayed.Items[lstItemsDisplayed.ItemIndex]; 724 lstItemsDisplayed.Items.Delete(lstItemsDisplayed.ItemIndex); 725 QualifierDelete(line); 726 lstItemsDisplayedChange(self); 1024 end; 1025 end; 1026 1027 procedure TfrmGraphProfiles.Report(aListBox: TORListBox); 1028 var 1029 profileselected: boolean; 1030 i: integer; 1031 selection, first, profileitem, subtype: string; 1032 begin 1033 with aListBox do 1034 begin 1035 if ItemIndex < 0 then exit; 1036 selection := Items[ItemIndex]; 1037 subtype := Piece(Items[0], '^', 3); 1038 subtype := Piece(subtype, ':', 2); 1039 subtype := copy(subtype, 2, length(subtype)); 1040 subtype := Piece(subtype, ' ', 1); 1041 if UpperCase(copy(selection, 1, 5)) = '63AP;' then 1042 selection := copy(selection, 1, 4) + '^A;' + copy(selection, 6, 1) + ';' 1043 + Piece(selection, '^', 2) + '^' + subtype + ': ' + Piece(selection, '^', 3) 1044 else if UpperCase(copy(selection, 1, 5)) = '63MI;' then 1045 selection := copy(selection, 1, 4) + '^M;' + copy(selection, 6, 1) + ';' 1046 + Piece(selection, '^', 2) + '^' + subtype + ': ' + Piece(selection, '^', 3); 1047 if length(Piece(selection, '_', 2)) > 0 then 1048 selection := Piece(selection, '_', 1) + ' ' + Piece(selection, '_', 2); 1049 first := Piece(selection, '^', 1); 1050 if first = '' then exit; // line 1051 profileselected := strtointdef(Piece(selection, '^', 2), 0) < 0; 1052 if profileselected then 1053 begin 1054 for i := 2 to Items.Count - 1 do 1055 begin 1056 profileitem := Items[i]; 1057 if length(Piece(profileitem, '_', 2)) > 0 then 1058 profileitem := Piece(profileitem, '_', 1) + ' ' + Piece(profileitem, '_', 2); //*****???? ^ 1059 AddToList(profileitem, lstItemsDisplayed); 1060 end; 1061 end 1062 else 1063 AddToList(selection, lstItemsDisplayed); 1064 if ItemIndex = 0 then Clear; //profile or type <any> 1065 ItemIndex := -1; 1066 end; 1067 end; 1068 1069 procedure TfrmGraphProfiles.CheckToClear; 1070 begin 1071 if (cboAllItems.Visible and (cboAllItems.Items.Count = 0)) 1072 or (lstItemsSelection.Visible and (lstItemsSelection.Items.Count = 0)) then 1073 begin 1074 lstSources.ItemIndex := -1; 1075 lstOtherSources.ItemIndex := -1; 1076 btnAdd.Enabled := false; 1077 btnAddAll.Enabled := false; 1078 end; 727 1079 end; 728 1080 … … 746 1098 end; 747 1099 748 procedure TfrmGraphProfiles. lstSourceChange(Sender: TObject);1100 procedure TfrmGraphProfiles.AllItemsBefore(var typedata: string); 749 1101 var 750 1102 i: integer; 751 filetype, itemdata, typedata: string; 752 begin 753 cboAllItems.Items.Clear; 754 cboAllItems.Text := ''; 755 CheckPublic; 756 if lstSource.ItemIndex = -1 then exit; 757 typedata := lstSource.Items[lstSource.ItemIndex]; 758 if typedata = LLS_LINE then 759 begin 760 cboAllItems.Items.Clear; 761 cboAllItems.Text := ''; 762 exit; 763 end; 764 filetype := Piece(typedata, '^', 1); 765 if filetype = '-1' then 766 AssignProfile(cboAllItems.Items, typedata) 767 else 768 if filetype = '-2' then 769 AssignProfile(cboAllItems.Items, typedata) 770 else 771 if filetype = '-3' then // current selections 772 begin 773 AssignProfile(cboAllItems.Items, typedata); 774 end 775 else 1103 begin 776 1104 with cboAllItems.Items do 777 1105 begin … … 783 1111 if Piece(typedata, '^', 2) = '63AP' then 784 1112 begin 785 for i := 0 to lstSource .Items.Count - 1 do786 if copy(lstSource .Items[i], 1, 5) = '63AP;' then787 begin 788 typedata := lstSource .Items[i];1113 for i := 0 to lstSources.Items.Count - 1 do 1114 if copy(lstSources.Items[i], 1, 5) = '63AP;' then 1115 begin 1116 typedata := lstSources.Items[i]; 789 1117 typedata := '0^' + Piece(typedata, '^', 1) + '^ ' + Piece(typedata, '^', 2) + ' <any>'; 790 1118 Add(typedata); … … 793 1121 else if Piece(typedata, '^', 2) ='63MI' then 794 1122 begin 795 for i := 0 to lstSource .Items.Count - 1 do796 if copy(lstSource .Items[i], 1, 5) = '63MI;' then797 begin 798 typedata := lstSource .Items[i];1123 for i := 0 to lstSources.Items.Count - 1 do 1124 if copy(lstSources.Items[i], 1, 5) = '63MI;' then 1125 begin 1126 typedata := lstSources.Items[i]; 799 1127 typedata := '0^' + Piece(typedata, '^', 1) + '^ ' + Piece(typedata, '^', 2) + ' <any>'; 800 1128 Add(typedata); … … 802 1130 end; 803 1131 end; 804 cboAllItemsChange(cboAllItems); 805 CheckPublic; 806 if lstSource.ItemIndex = -1 then exit; 807 typedata := lstSource.Items[lstSource.ItemIndex]; 808 if typedata = LLS_LINE then 809 begin 810 lstItemsTopSelection.Clear; 811 exit; 812 end; 813 filetype := Piece(typedata, '^', 1); 814 if filetype = '-1' then 815 AssignProfile(lstItemsTopSelection.Items, typedata) 816 else 817 if filetype = '-2' then 818 AssignProfile(lstItemsTopSelection.Items, typedata) 819 else 820 if filetype = '-3' then 821 begin 822 AssignProfile(lstItemsTopSelection.Items, typedata); 823 end 824 else 825 with lstItemsTopSelection.Items do 1132 end; 1133 1134 procedure TfrmGraphProfiles.AllItemsAfter(var filetype, typedata: string); 1135 var 1136 i: integer; 1137 itemdata, itemname: string; 1138 begin 1139 with lstItemsSelection.Items do 826 1140 begin 827 1141 Clear; 828 lstItemsTopSelection.Sorted := true; 829 typedata := '0^' + Piece(typedata, '^', 1) + '^ ' + Piece(typedata, '^', 2) + ' <any>'; 1142 lstItemsSelection.Sorted := true; 1143 itemname := Piece(typedata, '^', 3); 1144 if copy(itemname, 1, 1) = ' ' then 1145 begin 1146 itemname := copy(itemname, 2, length(itemname)); // strip preceding space 1147 typedata := '0^' + Piece(typedata, '^', 2) + '^ ' + itemname; 1148 end 1149 else 1150 typedata := '0^' + Piece(typedata, '^', 1) + '^ ' + itemname; 830 1151 Insert(0, typedata); 831 1152 Insert(1, '^' + LLS_LINE); 832 if filetype = '63AP' then 833 begin 834 lstItems TopSelection.Sorted := false;835 for i := 0 to lstSource .Items.Count - 1 do836 if copy(lstSource .Items[i], 1, 5) = '63AP;' then837 begin 838 typedata := lstSource .Items[i];1153 if filetype = '63AP' then // finish subitems *********** 1154 begin 1155 lstItemsSelection.Sorted := false; 1156 for i := 0 to lstSources.Items.Count - 1 do 1157 if copy(lstSources.Items[i], 1, 5) = '63AP;' then 1158 begin 1159 typedata := lstSources.Items[i]; 839 1160 typedata := '0^' + Piece(typedata, '^', 1) + '^ ' + Piece(typedata, '^', 2) + ' <any>'; 840 1161 Add(typedata); … … 843 1164 else if filetype ='63MI' then 844 1165 begin 845 lstItems TopSelection.Sorted := false;846 for i := 0 to lstSource .Items.Count - 1 do847 if copy(lstSource .Items[i], 1, 5) = '63MI;' then848 begin 849 typedata := lstSource .Items[i];1166 lstItemsSelection.Sorted := false; 1167 for i := 0 to lstSources.Items.Count - 1 do 1168 if copy(lstSources.Items[i], 1, 5) = '63MI;' then 1169 begin 1170 typedata := lstSources.Items[i]; 850 1171 typedata := '0^' + Piece(typedata, '^', 1) + '^ ' + Piece(typedata, '^', 2) + ' <any>'; 851 1172 Add(typedata); … … 886 1207 Add(itemdata); 887 1208 end; 888 cboAllItemsChange(lstItemsTopSelection); 889 end; 890 end; 891 892 procedure TfrmGraphProfiles.lstSourceDblClick(Sender: TObject); 893 begin 894 if cboAllItems.Visible then 895 begin 896 if cboAllItems.Items.Count < 1 then exit; 897 cboAllItems.ItemIndex := 0; 898 cboAllItemsClick(cboAllItems); 899 end 900 else 901 begin 902 if lstItemsTopSelection.Items.Count < 1 then exit; 903 lstItemsTopSelection.Selected[0] := true; 904 cboAllItemsClick(lstItemsTopSelection); 1209 cboAllItemsChange(lstItemsSelection); 905 1210 end; 906 1211 end; … … 990 1295 end; 991 1296 992 procedure TfrmGraphProfiles.AssignProfile(aList: TStrings; aProfile: string); 993 var 994 ext, stop: boolean; 995 i, j, k: integer; 996 dfn, itemname, itemnums, itempart, itempart1, itempart2, itemtest, typedata, teststring: string; 997 begin 998 ext := radSourceAll.Checked; 999 if ext then 1000 begin 1001 if Piece(aProfile, '^', 1) = '-2' then 1002 FastAssign(rpcGetGraphProfiles(UpperCase(Piece(aProfile, '^', 2)), '1', 1), aList) 1003 else 1004 1005 if Piece(aProfile, '^', 1) = '-3' then // current selection on list 1006 begin 1007 if radSourcePat.Tag = 0 then 1008 begin 1009 dfn := lblClose.Hint; 1010 FastAssign(rpcGetAllItems(dfn), lstTests.Items); //*** using a DFN, get all items 1011 FastAssign(rpcGetItems('50.605', dfn), lstDrugClass.Items); 1012 radSourcePat.Tag := 1; 1013 end; 1014 typedata := '0^-1^ ' + Piece(aProfile, '^', 2); 1015 aProfile := Piece(aProfile, '^', 3); 1016 aList.Clear; 1017 aList.Add(typedata); 1018 aList.Add('^' + LLS_LINE); 1019 for i := 1 to BIG_NUMBER do 1020 begin 1021 itempart := Piece(aProfile, '|', i); 1022 if itempart = '' then exit; 1023 itempart1 := Piece(itempart, '~', 1); 1024 itempart2 := Piece(itempart, '~', 2); 1025 itemnums := itempart1 + '^' + itempart2; 1026 itemname := ''; 1027 for k := 0 to lstTests.Items.Count - 1 do 1028 begin 1029 itemtest := UpperCase(Pieces(lstTests.Items[k], '^', 1, 2)); 1030 if itemtest = itemnums then 1031 begin 1032 itemname := Piece(lstTests.Items[k], '^', 3); 1033 itemnums := itemnums + '^' + itemname; 1034 aList.Add(itemnums); 1035 break; 1036 end; 1037 end; 1038 end; 1039 end 1040 1041 else 1042 FastAssign(rpcGetGraphProfiles(UpperCase(Piece(aProfile, '^', 2)), '0', 1), aList); 1043 for i := 0 to aList.Count -1 do 1044 begin 1045 teststring := aList[i]; 1046 if Piece(teststring, '^', 1) = '0' then 1047 aList[i] := '0^' + Piece(teststring, '^', 2) + '^_' + Piece(teststring, '^', 3); 1297 procedure TfrmGraphProfiles.AssignProfile(aList: TStrings; aProfile: string; UserNum: integer; allitems: boolean); 1298 var 1299 i, k: integer; 1300 preprofile, typedata, typepart, typeone, typetwo, testname, teststring: string; 1301 itempart, itempart1, itempart2, itemnums, itemname, itemtest: string; 1302 begin 1303 preprofile := aProfile; 1304 aList.Clear; 1305 if Piece(aProfile, '^', 1) = VIEW_TEMPORARY then 1306 begin 1307 typedata := Piece(aProfile, '^', 3); 1308 for i := 1 to BIG_NUMBER do 1309 begin 1310 typepart := Piece(typedata, '|', i); 1311 if typepart = '' then 1312 break; 1313 testname := Piece(aProfile, '^', i + 3); 1314 typeone := Piece(typepart, '~', 1); 1315 typetwo := Piece(typepart, '~', 2); 1316 aList.Add(typeone + '^' + typetwo + '^' + testname); 1048 1317 end; 1049 1318 typedata := '0^' + Piece(aProfile, '^', 1) + '^ ' + Piece(aProfile, '^', 2); … … 1052 1321 exit; 1053 1322 end; 1054 if Piece(aProfile, '^', 1) = '-2' then 1055 begin 1056 FastAssign(rpcGetGraphProfiles(UpperCase(Piece(aProfile, '^', 2)), '1', 0), lstScratch.Items); 1323 if Piece(aProfile, '^', 1) = VIEW_CURRENT then // current selection on list 1324 begin 1057 1325 typedata := '0^-1^ ' + Piece(aProfile, '^', 2); 1058 end 1059 else 1060 if Piece(aProfile, '^', 1) = '-3' then // current selection on list 1326 aProfile := Piece(aProfile, '^', 3); 1327 aList.Add(typedata); 1328 aList.Add('^' + LLS_LINE); 1329 for i := 1 to BIG_NUMBER do 1330 begin 1331 itempart := Piece(aProfile, '|', i); 1332 if itempart = '' then exit; 1333 itempart1 := Piece(itempart, '~', 1); 1334 itempart2 := Piece(itempart, '~', 2); 1335 itemnums := itempart1 + '^' + itempart2; 1336 itemname := ''; 1337 for k := 0 to GtslItems.Count - 1 do 1338 begin 1339 itemtest := UpperCase(Pieces(GtslItems[k], '^', 1, 2)); 1340 if Piece(itemtest, '^', 1) = '63' then 1341 itemtest := Piece(itemtest, '.', 1); // works ok but could also remove spec parens on name 1342 if itemtest = itemnums then 1343 begin 1344 itemname := Piece(GtslItems[k], '^', 4); 1345 itemnums := itemnums + '^' + itemname; 1346 aList.Add(itemnums); 1347 break; 1348 end; 1349 end; 1350 end; 1351 typedata := '0^' + Piece(aProfile, '^', 1) + '^ ' + Piece(aProfile, '^', 2); 1352 aList.Insert(0, typedata); 1353 aList.Insert(1, '^' + LLS_LINE); 1354 exit; 1355 end; 1356 if radSourceAll.Checked or allitems then 1357 begin 1358 AssignProfilePre(aList, aProfile, UserNum); 1359 for i := 0 to aList.Count - 1 do 1360 begin 1361 teststring := aList[i]; 1362 if Piece(teststring, '^', 1) = '0' then 1363 aList[i] := '0^' + Piece(teststring, '^', 2) + '^_' + Piece(teststring, '^', 3); 1364 end; 1365 exit; 1366 end; 1367 if Piece(aProfile, '^', 1) = VIEW_LABS then 1061 1368 begin 1062 1369 lstScratch.Items.Clear; 1063 lstScratch.Items.Add(Piece(aProfile, '^', 3)); 1370 FastAssign(GetATestGroup(strtointdef(Piece(Piece(aProfile, '^', 2), ')', 1), -1), UserNum), aList); 1371 for i := 0 to aList.Count - 1 do 1372 aList[i] := '63^' + aList[i]; 1373 end 1374 else 1375 if Piece(aProfile, '^', 1) = VIEW_PUBLIC then 1376 begin 1377 FastAssign(GetGraphProfiles(UpperCase(Piece(aProfile, '^', 2)), '1', 0, 0), lstScratch.Items); 1064 1378 typedata := '0^-1^ ' + Piece(aProfile, '^', 2); 1065 aProfile := '-1^' + Piece(aProfile, '^', 2) + '^'; 1066 end 1067 else 1068 begin 1069 FastAssign(rpcGetGraphProfiles(UpperCase(Piece(aProfile, '^', 2)), '0', 0), lstScratch.Items); 1379 end 1380 else 1381 begin 1382 FastAssign(GetGraphProfiles(UpperCase(Piece(aProfile, '^', 2)), '0', 0, UserNum), lstScratch.Items); 1070 1383 typedata := '0^' + Piece(aProfile, '^', 1) + '^ ' + Piece(aProfile, '^', 2); 1071 1384 end; 1385 if Piece(aProfile, '^', 1) = VIEW_LABS then 1386 exit; 1072 1387 for i := 0 to lstScratch.Items.Count - 1 do 1073 1388 aProfile := aProfile + lstScratch.Items[i]; 1074 1389 aProfile := Piece(aProfile, '^', 3); 1390 AssignProfilePost(aList, aProfile, typedata); 1391 end; 1392 1393 procedure TfrmGraphProfiles.AssignProfilePre(aList: TStrings; var aProfile: string; UserNum: integer); 1394 var 1395 i: integer; 1396 begin 1397 if Piece(aProfile, '^', 1) = VIEW_LABS then 1398 begin 1399 FastAssign(GetATestGroup(strtointdef(Piece(Piece(aProfile, '^', 2), ')', 1), -1), UserNum), aList); 1400 for i := 0 to aList.Count - 1 do 1401 aList[i] := '63^' + aList[i]; 1402 end 1403 else 1404 if Piece(aProfile, '^', 1) = VIEW_PUBLIC then 1405 FastAssign(GetGraphProfiles(UpperCase(Piece(aProfile, '^', 2)), '1', 1, 0), aList) 1406 else 1407 if Piece(aProfile, '^', 1) = VIEW_PERSONAL then 1408 FastAssign(GetGraphProfiles(UpperCase(Piece(aProfile, '^', 2)), '0', 1, UserNum), aList) 1409 else 1410 FastAssign(GetGraphProfiles(UpperCase(Piece(aProfile, '^', 2)), '0', 1, UserNum), aList); 1411 end; 1412 1413 procedure TfrmGraphProfiles.AssignProfilePost(aList: TStrings; var aProfile, typedata: string); 1414 var 1415 stop: boolean; 1416 i, j, k: integer; 1417 itempart, itempart1, itempart2, itemnums, itemname, itemtest: string; 1418 begin 1075 1419 aList.Clear; 1076 1420 aList.Add(typedata); … … 1086 1430 if itempart1 = '0' then 1087 1431 begin 1088 for j := 0 to lstSource .Items.Count - 1 do1089 if itempart2 = Piece(lstSource .Items[j], '^', 1) then1432 for j := 0 to lstSources.Items.Count - 1 do 1433 if itempart2 = Piece(lstSources.Items[j], '^', 1) then 1090 1434 begin 1091 itemname := Piece(lstSource .Items[j], '^', 2);1435 itemname := Piece(lstSources.Items[j], '^', 2); 1092 1436 break; 1093 1437 end; … … 1127 1471 end; 1128 1472 1129 procedure TfrmGraphProfiles.FillSource; 1130 var 1131 i: integer; 1132 dfntype, listline: string; 1133 begin 1134 with lstSource do 1135 begin 1473 procedure TfrmGraphProfiles.FillSource(aList: TORListBox); 1474 var 1475 i, UserNum: integer; 1476 dfntype, firstline, listline: string; 1477 begin 1478 with aList do 1479 begin 1480 Clear; 1481 firstline := ''; 1136 1482 Sorted := true; 1137 1483 OnClick := OnChange; // turn off onchange event when loading 1138 1484 OnChange := nil; 1139 FastAssign(rpcGetTypes('0', true), Items); 1140 for i := 0 to Items.Count - 1 do 1141 begin 1142 listline := Items[i]; 1143 dfntype := UpperCase(Piece(listline, '^', 1)); 1144 SetPiece(listline, '^', 1, dfntype); 1145 Items[i] := listline; 1146 end; 1147 //Items.Add('50.605^Drug Class'); 1485 if aList = lstSources then // user 1486 begin 1487 FastAssign(rpcGetTypes('0', true), Items); //*** use GtslAllTypes ??? 1488 for i := 0 to Items.Count - 1 do 1489 begin 1490 listline := Items[i]; 1491 dfntype := UpperCase(Piece(listline, '^', 1)); 1492 SetPiece(listline, '^', 1, dfntype); 1493 Items[i] := listline; 1494 end; 1495 Sorted := false; 1496 Items.Insert(0, LLS_FRONT + copy('Types' + LLS_BACK, 0, 30) + '^0'); 1497 UserNum := User.DUZ; 1498 if GtslViews.Count > 0 then 1499 begin 1500 Items.Add(LLS_FRONT + copy('Temporary Views' + LLS_BACK, 0, 30) + '^0'); 1501 for i := 0 to GtslViews.Count - 1 do 1502 begin 1503 listline := GtslViews[i]; 1504 if Piece(listline, '^', 1) = VIEW_CURRENT then 1505 Items.Add(listline) 1506 else 1507 Items.Add(VIEW_TEMPORARY + '^' + listline + '^'); 1508 end; 1509 end; 1510 end 1511 else // other user 1512 begin 1513 UserNum := cboUser.ItemIEN; 1514 Sorted := false; 1515 end; 1516 FastAssign(GetGraphProfiles('1', '0', 0, UserNum), lstScratch.Items); 1517 lstScratch.Sorted := true; 1518 if lstScratch.Items.Count > 0 then 1519 begin 1520 Items.Add(LLS_FRONT + copy('Personal Views' + LLS_BACK, 0, 30) + '^0'); 1521 for i := 0 to lstScratch.Items.Count - 1 do 1522 Items.Add(VIEW_PERSONAL + '^' + lstScratch.Items[i] + '^'); 1523 end; 1524 FastAssign(GetGraphProfiles('1', '1', 0, 0), lstScratch.Items); 1525 lstScratch.Sorted := true; 1526 if (lstScratch.Items.Count > 0) and (aList = lstSources) then 1527 begin 1528 Items.Add(LLS_FRONT + copy('Public Views' + LLS_BACK, 0, 30) + '^0'); 1529 for i := 0 to lstScratch.Items.Count - 1 do 1530 Items.Add(VIEW_PUBLIC + '^' + lstScratch.Items[i] + '^'); 1531 end; 1532 FastAssign(rpcTestGroups(UserNum), lstScratch.Items); 1533 lstScratch.Sorted := true; 1534 if lstScratch.Items.Count > 0 then 1535 begin 1536 Items.Add(LLS_FRONT + copy('Lab Groups' + LLS_BACK, 0, 30) + '^0'); 1537 for i := 0 to lstScratch.Items.Count - 1 do 1538 Items.Add(VIEW_LABS + '^' + Piece(lstScratch.Items[i], '^', 2) + '^' + Piece(lstScratch.Items[i], '^', 1)); 1539 end; 1148 1540 OnChange := OnClick; 1149 1541 OnClick := nil; 1150 Sorted := false; 1151 FastAssign(rpcGetGraphProfiles('1', '0', 0), lstScratch.Items); 1152 if lstScratch.Items.Count > 0 then 1153 begin 1154 Items.Add(LLS_LINE); 1155 for i := 0 to lstScratch.Items.Count - 1 do 1156 Items.Add('-1^' + lstScratch.Items[i] + '^'); 1157 end; 1158 FastAssign(rpcGetGraphProfiles('1', '1', 0), lstScratch.Items); 1159 if lstScratch.Items.Count > 0 then 1160 begin 1161 Items.Add(LLS_LINE); 1162 for i := 0 to lstScratch.Items.Count - 1 do 1163 Items.Add('-2^' + lstScratch.Items[i] + '^'); 1164 end; 1165 end; 1166 end; 1167 1168 function TfrmGraphProfiles.ProfileExists(aName: string; aType: integer): boolean; 1169 var 1170 i, sourcetype: integer; 1171 info, profilename: string; 1542 end; 1543 end; 1544 1545 function TfrmGraphProfiles.ProfileExists(aName, aType: string): boolean; 1546 var 1547 i: integer; 1548 info, sourcetype, profilename: string; 1172 1549 begin 1173 1550 Result := false; 1174 1551 aName := UpperCase(aName); 1175 for i := lstSource .Items.Count - 1 downto 0 do1176 begin 1177 info := lstSource .Items[i];1552 for i := lstSources.Items.Count - 1 downto 0 do 1553 begin 1554 info := lstSources.Items[i]; 1178 1555 profilename := Piece(info, '^', 2); 1179 sourcetype := strtointdef(Piece(info, '^', 1), 0);1556 sourcetype := Piece(info, '^', 1); 1180 1557 if (UpperCase(profilename) = aName) and (aType = sourcetype) then 1181 1558 begin … … 1196 1573 lblSelectionInfo.Hint := HINT_SELECTION_INFO; 1197 1574 lblSource.Hint := HINT_SOURCE; 1198 lstSource.Hint := HINT_SOURCE; 1575 lstSources.Hint := HINT_SOURCE; 1576 pnlSources.Hint := HINT_SOURCE; 1577 pnlAllSources.Hint := HINT_SOURCE; 1578 splViews.Hint := HINT_SOURCE; 1579 lblSelectOthers.Hint := HINT_OTHER_SOURCE; 1580 lblOtherViews.Hint := HINT_OTHER_SOURCE; 1581 lstOtherSources.Hint := HINT_OTHER_SOURCE; 1582 pnlOtherSources.Hint := HINT_OTHER_SOURCE; 1583 pnlOtherSourcesBottom.Hint := HINT_OTHER_SOURCE; 1584 pnlOtherViews.Hint := HINT_OTHER_SOURCE; 1585 lblOtherViews.Hint := HINT_OTHER_SOURCE; 1586 lblSelectOthers.Hint := HINT_OTHER_SOURCE; 1587 lblOtherPersons.Hint := HINT_OTHERS; 1588 cboUser.Hint := HINT_OTHERS; 1589 pnlOtherSourcesUser.Hint := HINT_OTHERS; 1590 btnDefinitions.Hint := HINT_BTN_DEFINITION; 1199 1591 lblSelection.Hint := HINT_SELECTION; 1200 lstItems TopSelection.Hint := HINT_SELECTION;1592 lstItemsSelection.Hint := HINT_SELECTION; 1201 1593 cboAllItems.Hint := HINT_SELECTION; 1202 1594 lblDisplay.Hint := HINT_DISPLAY; … … 1221 1613 Msg.Result := 0; // ignore biHelp border icon 1222 1614 AssignHints; 1223 ShowM essage('Help is now available.' + #13 +1615 ShowMsg('Help is now available.' + #13 + 1224 1616 'By pausing over a list or control, hints will appear.'); 1225 1617 end … … 1228 1620 end; 1229 1621 1230 procedure TfrmGraphProfiles.FormClose(Sender: TObject; 1231 var Action: TCloseAction); 1232 begin 1233 Application.HintHidePause := FHintPauseTime; 1622 function TfrmGraphProfiles.GetProfileName(infotitle, info: string; var newprofilename: string): boolean; 1623 begin 1624 Result := InputQuery(infotitle, info, newprofilename); 1625 if not Result then exit; 1626 if newprofilename = '' then 1627 begin 1628 Result := false; 1629 exit; 1630 end; 1631 if (length(newprofilename) < 3) 1632 or (length(newprofilename) > 30) 1633 or (Pos('^', newprofilename) > 0) 1634 or (Pos('|', newprofilename) > 0) 1635 or (Pos('~', newprofilename) > 0) then 1636 begin 1637 ShowMsg('Not accepted - names of views must be 3-30 characters.'); 1638 Result := false; 1639 exit; 1640 end; 1641 end; 1642 1643 procedure TfrmGraphProfiles.IDProfile(var profilename, proftype: string); 1644 var 1645 i, match: integer; 1646 info, aName, aType: string; 1647 begin 1648 if length(profilename) > 0 then 1649 lblSave.Hint := profilename; 1650 //btnClearClick(self); 1651 lstScratch.Items.Clear; 1652 lstSources.Items.Clear; 1653 GraphDataOnUser; 1654 FormShow(btnSave); 1655 match := -1; 1656 profilename := UpperCase(profilename); 1657 for i := lstSources.Items.Count - 1 downto 0 do 1658 begin 1659 info := lstSources.Items[i]; 1660 aType := Piece(info, '^', 1); 1661 aName := Piece(info, '^', 2); 1662 if (UpperCase(aName) = profilename) and (aType = proftype) then 1663 begin 1664 match := i; 1665 break; 1666 end; 1667 end; 1668 if match = -1 then exit; 1669 lstSources.ItemIndex := match; 1670 lstSources.Tag := BIG_NUMBER; 1671 lstSourcesChange(lstSources); 1234 1672 end; 1235 1673
Note:
See TracChangeset
for help on using the changeset viewer.