source: cprs/branches/foia-cprs/CPRS-Chart/Options/fOptions.pas@ 1705

Last change on this file since 1705 was 460, checked in by Kevin Toppenberg, 16 years ago

Uploading from OR_30_258

File size: 24.0 KB
Line 
1unit fOptions;
2
3interface
4
5uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
6 Buttons, ComCtrls, ExtCtrls, ORCtrls, OrFn, Dialogs, ORDtTmRng, fBAOptionsDiagnoses,
7 uBAGlobals;
8
9type
10 TfrmOptions = class(TForm)
11 pnlMain: TPanel;
12 pnlBottom: TPanel;
13 pagOptions: TPageControl;
14 tsCoverSheet: TTabSheet;
15 tsNotifications: TTabSheet;
16 btnOK: TButton;
17 btnCancel: TButton;
18 btnApply: TButton;
19 tsOrderChecks: TTabSheet;
20 tsListsTeams: TTabSheet;
21 lblCoverReminderDesc: TMemo;
22 lblCoverReminders: TStaticText;
23 lblCoverDaysDesc: TMemo;
24 lblCoverDays: TStaticText;
25 btnCoverDays: TButton;
26 bvlCoverDays: TBevel;
27 btnCoverReminders: TButton;
28 bvlCoverReminders: TBevel;
29 imgCoverDays: TImage;
30 imgCoverReminders: TImage;
31 lblPatientSelectionDesc: TMemo;
32 lblPatientSelection: TStaticText;
33 btnPatientSelection: TButton;
34 bvlPatientSelection: TBevel;
35 btnPersonalLists: TButton;
36 imgPatientSelection: TImage;
37 lblNotificationsOptions: TStaticText;
38 lblNotifications: TStaticText;
39 bvlNotifications: TBevel;
40 imgNotifications: TImage;
41 lblOrderChecksDesc: TLabel;
42 lblOrderChecks: TStaticText;
43 bvlOrderChecks: TBevel;
44 imgOrderChecks: TImage;
45 lblTeamsDesc: TMemo;
46 lblTeams: TStaticText;
47 btnTeams: TButton;
48 bvlTeams: TBevel;
49 lvwNotifications: TCaptionListView;
50 lblNotificationView: TLabel;
51 btnNotificationsRemove: TButton;
52 chkNotificationsFlagged: TCheckBox;
53 lvwOrderChecks: TCaptionListView;
54 lblOrderChecksView: TLabel;
55 btnSurrogate: TButton;
56 lblNotificationsSurrogate: TStaticText;
57 lblNotificationsSurrogateText: TStaticText;
58 btnCombinations: TButton;
59 bvlOtherParameters: TBevel;
60 lblOtherParameters: TStaticText;
61 imgOtherParameters: TImage;
62 lblOtherParametersDesc: TMemo;
63 btnOtherParameters: TButton;
64 tsNotes: TTabSheet;
65 lblNotesNotesDesc: TMemo;
66 lblNotesNotes: TStaticText;
67 bvlNotesNotes: TBevel;
68 btnNotesNotes: TButton;
69 lblNotesTitles: TStaticText;
70 bvlNotesTitles: TBevel;
71 lblNotesTitlesDesc: TMemo;
72 btnNotesTitles: TButton;
73 imgNotesNotes: TImage;
74 imgNotes: TImage;
75 imgTeams: TImage;
76 tsCprsReports: TTabSheet;
77 lblReports: TStaticText;
78 bvlReports: TBevel;
79 memReports: TMemo;
80 imgReports: TImage;
81 btnReports: TButton;
82 lblReport1: TStaticText;
83 memReport1: TMemo;
84 btnReport1: TButton;
85 bvlReport1: TBevel;
86 btnDiagnoses: TButton;
87 tsGraphs: TTabSheet;
88 lblGraphSettings: TStaticText;
89 bvlGraphSettings: TBevel;
90 imgGraphSettings: TImage;
91 btnGraphSettings: TButton;
92 bvlGraphViews: TBevel;
93 lblGraphViews: TStaticText;
94 imgGraphViews: TImage;
95 btnGraphViews: TButton;
96 memGraphSettings: TMemo;
97 memGraphViews: TMemo;
98 bvlReport2: TBevel;
99 lblReport2: TStaticText;
100 memReport2: TMemo;
101 imgReport1: TImage;
102 imgReport2: TImage;
103 rdoRDV: TRadioGroup;
104 procedure FormCreate(Sender: TObject);
105 procedure FormDestroy(Sender: TObject);
106 procedure btnCoverDaysClick(Sender: TObject);
107 procedure btnCoverRemindersClick(Sender: TObject);
108 procedure btnOtherParametersClick(Sender: TObject);
109 procedure btnPatientSelectionClick(Sender: TObject);
110 procedure btnPersonalListsClick(Sender: TObject);
111 procedure btnTeamsClick(Sender: TObject);
112 procedure btnNotificationsRemoveClick(Sender: TObject);
113 procedure btnApplyClick(Sender: TObject);
114 procedure chkNotificationsFlaggedClick(Sender: TObject);
115 procedure lvwNotificationsChange(Sender: TObject; Item: TListItem;
116 Change: TItemChange);
117 procedure lvwNotificationsColumnClick(Sender: TObject;
118 Column: TListColumn);
119 procedure lvwNotificationsCompare(Sender: TObject; Item1,
120 Item2: TListItem; Data: Integer; var Compare: Integer);
121 procedure lvwNotificationsDblClick(Sender: TObject);
122 procedure btnSurrogateClick(Sender: TObject);
123 procedure btnCombinationsClick(Sender: TObject);
124 procedure btnNotesNotesClick(Sender: TObject);
125 procedure btnNotesTitlesClick(Sender: TObject);
126 procedure btnReportsClick(Sender: TObject);
127 procedure btnReport1Click(Sender: TObject);
128 procedure lvwNotificationsEnter(Sender: TObject);
129 procedure lvwNotificationsMouseDown(Sender: TObject;
130 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
131 procedure btnDiagnosesClick(Sender: TObject);
132 procedure btnGraphSettingsClick(Sender: TObject);
133 procedure btnGraphViewsClick(Sender: TObject);
134 procedure rdoRDVClick(Sender: TObject);
135 private
136 { Private declarations }
137 FdirtyNotifications: boolean; // used to determine edit changes to Notifications
138 FdirtyOrderChecks: boolean; // used to determine edit changes to Order Checks
139 FdirtyOtherStuff: boolean; // used to determine edit changes to misc settings
140 FuseCheckBoxes: boolean;
141 FsortCol: integer;
142 FsortAscending: boolean;
143 FLastClickedItem: TListItem;
144 procedure Offset(var topnum: integer; topoffset: integer; var leftnum: integer; leftoffset: integer);
145 procedure LoadNotifications;
146 procedure LoadOrderChecks;
147 procedure ApplyNotifications;
148 procedure ApplyOrderChecks;
149 procedure ApplyOtherStuff;
150 procedure CheckApply;
151 procedure LoadListView(aListView: TListView; aList: TStrings);
152 procedure ChangeOnOff(aListView: TListView; aListItem: TListItem);
153 public
154 { Public declarations }
155 end;
156
157var
158 frmOptions: TfrmOptions;
159
160procedure DialogOptions(var actiontype: Integer);
161
162implementation
163
164uses fOptionsDays, fOptionsReminders, fOptionsSurrogate,
165 fOptionsPatientSelection, fOptionsLists, fOptionsTeams, fOptionsCombinations,
166 fOptionsOther, fOptionsNotes, fOptionsTitles, fOptionsReportsCustom, fOptionsReportsDefault,
167 fGraphs, fGraphSettings, fGraphProfiles, rGraphs, uGraphs,
168 rOptions, rCore, uCore, uOptions, UBACore, fFrame;
169 //fTestDialog;
170
171{$R *.DFM}
172
173type
174 TRule = class
175 public
176 IEN: string;
177 OriginalValue: string;
178 ItemText: string;
179end;
180
181procedure DialogOptions(var actiontype: Integer);
182// create the form and make in modal, return an action
183const
184 PixelGapBetweenButtons = 5;
185var
186 frmOptions: TfrmOptions;
187begin
188 frmOptions := TfrmOptions.Create(Application);
189 try
190 with frmOptions do
191 begin
192 with pagOptions do
193 begin
194 tsCoverSheet.TabVisible := false;
195 tsNotifications.TabVisible := false;
196 tsOrderChecks.TabVisible := false;
197 tsListsTeams.TabVisible := false;
198 case actiontype of
199 1: begin
200 tsCoverSheet.TabVisible := true;
201 end;
202 2: begin
203 tsNotifications.TabVisible := true;
204 end;
205 3: begin
206 tsOrderChecks.TabVisible := true;
207 end;
208 4: begin
209 tsListsTeams.TabVisible := true;
210 end;
211 else
212 begin
213 tsCoverSheet.TabVisible := true;
214 tsNotifications.TabVisible := true;
215 tsOrderChecks.TabVisible := true;
216 tsListsTeams.TabVisible := true;
217 ActivePage := tsCoverSheet;
218 memReports.Text := 'Change the default date range and occurrence limits for all reports on ' +
219 'the CPRS Reports tab (excluding health summary reports) .';
220 memReport1.Text := 'Change the individual date range and occurrence limits for each report on ' +
221 'the CPRS Reports tab (excluding health summary reports) .';
222 btnReports.caption := 'Set All Reports...';
223 btnReport1.caption := 'Set Individual Reports...';
224 if User.IsReportsOnly then // For "Reports Only" users.
225 begin
226 tsCoverSheet.TabVisible := false;
227 tsNotifications.TabVisible := false;
228 tsOrderChecks.TabVisible := false;
229 tsListsTeams.TabVisible := false;
230 tsNotes.TabVisible := false;
231 if (not User.ToolsRptEdit) then
232 begin
233 btnOK.visible := false;
234 btnApply.visible := false;
235 btnCancel.caption := 'Close';
236 end;
237 end;
238 if (not User.ToolsRptEdit) then // For users with Reports settings edit parameter not set.
239 begin
240 memReports.Text := 'View the default date range and occurrence limits for all reports on ' +
241 'the CPRS Reports tab (excluding health summary reports) .';
242 memReport1.Text := 'View the individual date range and occurrence limits for each report on ' +
243 'the CPRS Reports tab (excluding health summary reports) .';
244 btnReports.caption := 'View All Report Settings...';
245 btnReport1.caption := 'View Individual Report Settings...';
246 end;
247 end;
248 end;
249 end;
250 actiontype := 0;
251 ResizeAnchoredFormToFont(frmOptions);
252 btnApply.Left := pagOptions.Left + pagOptions.Width - btnApply.Width;
253 btnCancel.Left := btnApply.Left - btnCancel.Width - PixelGapBetweenButtons;
254 btnOK.Left := btnCancel.Left - btnOK.Width - PixelGapBetweenButtons;
255 ShowModal;
256 actiontype := btnOK.Tag;
257 end;
258 finally
259 frmOptions.Release;
260 end;
261end;
262
263procedure TfrmOptions.FormCreate(Sender: TObject);
264// initialize form
265begin
266 LoadNotifications;
267 LoadOrderChecks;
268 FdirtyNotifications := false;
269 FdirtyOrderChecks := false;
270 FdirtyOtherStuff := false;
271 CheckApply;
272
273 if (Encounter.Provider = 0) and not IsCIDCProvider(User.DUZ) then
274 btnDiagnoses.Enabled := False;
275 if UseVistaWeb then rdoRDV.ItemIndex := 1;
276
277end;
278
279procedure TfrmOptions.FormDestroy(Sender: TObject);
280// cleanup creation of objects
281var
282 i: integer;
283begin
284 for i := 0 to lvwOrderChecks.Items.Count - 1 do
285 lvwOrderChecks.Items.Item[i].SubItems.Objects[2].free;
286 for i := 0 to lvwNotifications.Items.Count - 1 do
287 lvwNotifications.Items.Item[i].SubItems.Objects[2].free;
288end;
289
290procedure TfrmOptions.btnCoverDaysClick(Sender: TObject);
291// display Date Range Defaults on Cover Sheet
292var
293 topsize, leftsize, value: integer;
294begin
295 value := 0;
296 Offset(topsize, -60, leftsize, -60);
297 DialogOptionsDays(topsize, leftsize, Font.Size, value);
298end;
299
300procedure TfrmOptions.btnCoverRemindersClick(Sender: TObject);
301// display Clinical Reminder Options
302var
303 topsize, leftsize, value: integer;
304begin
305 value := 0;
306 Offset(topsize, -60, leftsize, -60);
307 DialogOptionsReminders(topsize, leftsize, Font.Size, value);
308end;
309
310procedure TfrmOptions.btnOtherParametersClick(Sender: TObject);
311// display Other Parameters Options
312var
313 topsize, leftsize, value: integer;
314begin
315 value := 0;
316 Offset(topsize, 40, leftsize, 40);
317 DialogOptionsOther(topsize, leftsize, Font.Size, value);
318end;
319
320procedure TfrmOptions.btnPatientSelectionClick(Sender: TObject);
321// display Patient Selection Options
322var
323 topsize, leftsize, value: integer;
324begin
325 value := 0;
326 Offset(topsize, -60, leftsize, -60);
327 DialogOptionsPatientSelection(topsize, leftsize, Font.Size, value);
328end;
329
330procedure TfrmOptions.btnPersonalListsClick(Sender: TObject);
331// display Personal Lists Options
332var
333 topsize, leftsize, value: integer;
334begin
335 value := 0;
336 Offset(topsize, -60, leftsize, -60);
337 DialogOptionsLists(topsize, leftsize, Font.Size, value);
338end;
339
340procedure TfrmOptions.btnTeamsClick(Sender: TObject);
341// display Team Options
342var
343 topsize, leftsize, value: integer;
344begin
345 value := 0;
346 Offset(topsize, -60, leftsize, -60);
347 DialogOptionsTeams(topsize, leftsize, Font.Size, value);
348end;
349
350procedure TfrmOptions.btnNotificationsRemoveClick(Sender: TObject);
351// confirm before clearing notifications
352begin
353 if InfoBox('CAUTION: This will clear all the current notifications you have pending.'
354 + #13 + 'If you say YES, these changes will take place immediately.'
355 + #13 + 'Are you sure you want to erase all of your notifications?',
356 'Warning', MB_YESNO or MB_ICONWARNING) = IDYES then
357 begin
358 rpcClearNotifications;
359 end;
360end;
361
362procedure TfrmOptions.Offset(var topnum: integer; topoffset: integer; var leftnum: integer; leftoffset: integer);
363// get positions to display dialog
364begin
365 // use these top and left values to display dialog
366 topnum := Top;
367 leftnum := Left;
368 topnum := topnum + topoffset;
369 if topnum < 0 then topnum := 0;
370 leftnum := leftnum + leftoffset;
371 if leftnum < 0 then leftnum := 0;
372end;
373
374procedure TfrmOptions.btnApplyClick(Sender: TObject);
375// save actions without exiting
376begin
377 if FdirtyNotifications then
378 ApplyNotifications;
379 if FdirtyOrderChecks then
380 ApplyOrderChecks;
381 if FdirtyOtherStuff then
382 ApplyOtherStuff;
383 CheckApply;
384 if Sender = btnOK then
385 Close;
386end;
387
388procedure TfrmOptions.LoadNotifications;
389// load Notification tab
390var
391 notifydefaults, surrogateinfo, flag, enableerase: string;
392begin
393 LoadListView(lvwNotifications, rpcGetNotifications);
394 lvwNotificationsColumnClick(lvwNotifications, lvwNotifications.Column[0]); // make sure sorted
395 notifydefaults := rpcGetNotificationDefaults;
396 flag := Piece(notifydefaults, '^', 2);
397 enableerase := Piece(notifydefaults, '^', 3);
398 chkNotificationsFlagged.Checked := flag = '1';
399 btnNotificationsRemove.Enabled := enableerase = '1';
400 surrogateinfo := rpcGetSurrogateInfo;
401 btnSurrogate.Hint := surrogateinfo;
402 LabelSurrogate(surrogateinfo, lblNotificationsSurrogateText);
403end;
404
405procedure TfrmOptions.LoadOrderChecks;
406// load Order Check tab
407begin
408 LoadListView(lvwOrderChecks, rpcGetOrderChecks);
409 lvwOrderChecks.Checkboxes := true;
410end;
411
412procedure TfrmOptions.ApplyNotifications;
413// save Notification changes
414var
415 i: integer;
416 newonoff: string;
417 aRule: TRule;
418 aList: TStringList;
419begin
420 aList := TStringList.Create;
421 for i := 0 to lvwNotifications.Items.Count - 1 do
422 begin
423 aRule := TRule(lvwNotifications.Items.Item[i].SubItems.Objects[2]);
424 if lvwNotifications.Items.Item[i].SubItems[1] <> 'Mandatory' then
425 begin
426 newonoff := Uppercase(lvwNotifications.Items.Item[i].SubItems[0]);
427 if aRule.OriginalValue <> newonoff then
428 begin
429 //***showmessage(aRule.IEN + ' ' + aRule.OriginalValue + ' ' + newonoff);
430 aList.Add(aRule.IEN + '^' + newonoff);
431 aRule.OriginalValue := lvwNotifications.Items.Item[i].SubItems[0];
432 end;
433 end;
434 end;
435 rpcSetNotifications(aList);
436 aList.free;
437 FdirtyNotifications := false;
438end;
439
440procedure TfrmOptions.ApplyOrderChecks;
441// save Order Check changes
442var
443 i: integer;
444 newonoff: string;
445 aRule: TRule;
446 aList: TStringList;
447begin
448 aList := TStringList.Create;
449 for i := 0 to lvwOrderChecks.Items.Count - 1 do
450 begin
451 aRule := TRule(lvwOrderChecks.Items.Item[i].SubItems.Objects[2]);
452 newonoff := Uppercase(lvwOrderChecks.Items.Item[i].SubItems[0]);
453 if aRule.OriginalValue <> newonoff then
454 begin
455 aList.Add(aRule.IEN + '^' + newonoff);
456 aRule.OriginalValue := lvwOrderChecks.Items.Item[i].SubItems[0];
457 end;
458 end;
459 rpcSetOrderChecks(aList);
460 aList.free;
461 FdirtyOrderChecks := false;
462end;
463
464procedure TfrmOptions.ApplyOtherStuff;
465// save other changes
466var
467 aString: string;
468begin
469 aString := '';
470 if chkNotificationsFlagged.Checked then
471 aString := aString + '^1'
472 else
473 aString := aString + '^0';
474 rpcSetOtherStuff(aString);
475 FdirtyOtherStuff := false;
476end;
477
478procedure TfrmOptions.CheckApply;
479// determine if Apply button is enabled
480begin
481 btnApply.Enabled := FdirtyOrderChecks or FdirtyNotifications or FdirtyOtherStuff;
482end;
483
484procedure TfrmOptions.chkNotificationsFlaggedClick(Sender: TObject);
485// set notification flagged status
486begin
487 FdirtyOtherStuff := true;
488 CheckApply;
489end;
490
491procedure TfrmOptions.LoadListView(aListView: TListView; aList: TStrings);
492// load a list view with: name, on/off, comment
493var
494 i: integer;
495 aListItem: TListItem;
496 aRule: TRule;
497 rulenum, ruletext, ruleonoff, rulecomment: string;
498begin
499 FuseCheckBoxes := false;
500 aListView.Items.Clear;
501 aListView.SortType := stNone; // if Sorting during load then potential error
502 with aList do
503 begin
504 for i := 0 to aList.Count - 1 do
505 begin
506 rulenum := Piece(aList[i], '^', 1);
507 ruletext := Piece(aList[i], '^', 2);
508 ruleonoff := Piece(aList[i], '^', 3);
509 rulecomment := Piece(aList[i], '^', 4);
510 aListItem := aListView.Items.Add;
511 with aListItem do
512 begin
513 Caption := ruletext;
514 SubItems.Add(ruleonoff);
515 if ruleonoff = 'On' then Checked := true;
516 SubItems.Add(rulecomment);
517 end;
518 aRule := TRule.Create;
519 with aRule do
520 begin
521 IEN := rulenum;
522 OriginalValue := ruleonoff;
523 ItemText := ruletext;
524 end;
525 aListItem.SubItems.AddObject('rule object', aRule);
526 end;
527 end;
528 aListView.SortType := stBoth;
529 FuseCheckBoxes := true;
530end;
531
532procedure TfrmOptions.lvwNotificationsChange(Sender: TObject;
533 Item: TListItem; Change: TItemChange);
534// change on/off on checkmark
535begin
536 if (Sender as TListView).ItemIndex = -1 then exit;
537 if not FuseCheckBoxes then exit;
538 if (Sender as TListView).Checkboxes = false then exit;
539 if (Item.SubItems[1] = 'Mandatory') and not Item.Checked then begin
540 Item.Checked := True;
541 exit;
542 end;
543 if Item.Checked then
544 begin
545 if Item.SubItems[0] <> 'On' then
546 ChangeOnOff(Sender as TListView, Item);
547 Item.SubItems[0] := 'On';
548 end
549 else
550 begin
551 if Item.SubItems[0] <> 'Off' then
552 ChangeOnOff(Sender as TListView, Item);
553 Item.SubItems[0] := 'Off';
554 end;
555end;
556
557procedure TfrmOptions.lvwNotificationsColumnClick(Sender: TObject;
558 Column: TListColumn);
559// toggle sort
560begin
561 if FsortCol = Column.Index then
562 FsortAscending := not FsortAscending
563 else
564 FsortAscending := true;
565 FsortCol := Column.Index;
566 (Sender as TListView).AlphaSort;
567end;
568
569procedure TfrmOptions.lvwNotificationsCompare(Sender: TObject; Item1,
570 Item2: TListItem; Data: Integer; var Compare: Integer);
571// sort columns
572begin
573 if not(Sender is TListView) then exit;
574 if FsortAscending then
575 begin
576 if FsortCol = 0 then
577 Compare := CompareStr(Item1.Caption, Item2.Caption)
578 else
579 Compare := CompareStr(Item1.SubItems[FsortCol - 1],
580 Item2.SubItems[FsortCol - 1]);
581 end
582 else
583 begin
584 if FsortCol = 0 then
585 Compare := CompareStr(Item2.Caption, Item1.Caption)
586 else
587 Compare := CompareStr(Item2.SubItems[FsortCol - 1],
588 Item1.SubItems[FsortCol - 1]);
589 end;
590end;
591
592procedure TfrmOptions.lvwNotificationsDblClick(Sender: TObject);
593// toggle check marks with double click
594var
595 aListItem: TListItem;
596begin
597 with (Sender as TListView) do
598 begin
599 if Checkboxes = false then exit;
600 if Selected = nil then exit;
601 if Selected.SubItems[1] = 'Mandatory' then exit;
602 if Selected <> FLastClickedItem then exit;
603 aListItem := Selected;
604 aListItem.Checked := not aListItem.Checked;
605 ChangeOnOff(Sender as TListView, aListItem);
606
607 if aListItem.Checked then
608 aListItem.SubItems[0] := 'On'
609 else
610 aListItem.SubItems[0] := 'Off';
611 end;
612end;
613
614procedure TfrmOptions.ChangeOnOff(aListView: TListView; aListItem: TListItem);
615// check if list items were edited
616begin
617 if aListView = lvwNotifications then FdirtyNotifications := true;
618 if aListView = lvwOrderChecks then FdirtyOrderChecks := true;
619 CheckApply;
620end;
621
622procedure TfrmOptions.btnSurrogateClick(Sender: TObject);
623// display Surrogate Options
624var
625 topsize, leftsize: integer;
626 surrogateinfo: string;
627begin
628 surrogateinfo := btnSurrogate.Hint;
629 Offset(topsize, -30, leftsize, -30);
630 DialogOptionsSurrogate(topsize, leftsize, Font.Size, surrogateinfo);
631 LabelSurrogate(surrogateinfo, lblNotificationsSurrogateText);
632 btnSurrogate.Hint := surrogateinfo;
633end;
634
635procedure TfrmOptions.btnCombinationsClick(Sender: TObject);
636// display Combination List Options
637var
638 topsize, leftsize, value: integer;
639begin
640 value := 0;
641 Offset(topsize, -60, leftsize, -60);
642 DialogOptionsCombinations(topsize, leftsize, Font.Size, value);
643end;
644
645procedure TfrmOptions.btnNotesNotesClick(Sender: TObject);
646// display Notes Options
647var
648 topsize, leftsize, value: integer;
649begin
650 value := 0;
651 Offset(topsize, -60, leftsize, -60);
652 DialogOptionsNotes(topsize, leftsize, Font.Size, value);
653end;
654
655procedure TfrmOptions.btnNotesTitlesClick(Sender: TObject);
656// display Titles Options
657var
658 topsize, leftsize, value: integer;
659begin
660 value := 0;
661 Offset(topsize, -60, leftsize, -60);
662 DialogOptionsTitles(topsize, leftsize, Font.Size, value);
663end;
664
665procedure TfrmOptions.btnReportsClick(Sender: TObject);
666var
667 topsize, leftsize, value: integer;
668begin
669 value := 0;
670 Offset(topsize, 90, leftsize, 23);
671 DialogOptionsHSDefault(topsize, leftsize, Font.Size, value);
672end;
673
674procedure TfrmOptions.btnReport1Click(Sender: TObject);
675var
676 topsize, leftsize, value: integer;
677begin
678 value := 0;
679 Offset(topsize, -18, leftsize, -15);
680 DialogOptionsHSCustom(topsize, leftsize, Font.Size, value);
681end;
682
683procedure TfrmOptions.lvwNotificationsEnter(Sender: TObject);
684begin
685 with Sender as TListView do begin
686 if (Selected = nil) and (Items.Count > 0) then
687 Selected := Items[0];
688 end;
689end;
690
691procedure TfrmOptions.lvwNotificationsMouseDown(Sender: TObject;
692 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
693begin
694 FLastClickedItem := (Sender as TListView).GetItemAt(X,Y);
695end;
696
697procedure TfrmOptions.btnDiagnosesClick(Sender: TObject);
698// display Personal Diagnoses List
699var
700 topsize, leftsize, value: integer;
701begin
702 if IsCIDCProvider(User.DUZ) then //(hds7564)
703 begin
704 value := 0;
705 Offset(topsize, -60, leftsize, -60);
706 DialogOptionsDiagnoses(topsize, leftsize, Font.Size, value);
707 end;
708end;
709
710procedure TfrmOptions.btnGraphSettingsClick(Sender: TObject);
711// display GraphSettings
712var
713 actiontype: boolean;
714 topsize, leftsize: integer;
715begin
716 actiontype := false;
717 Offset(topsize, -60, leftsize, -60);
718 DialogOptionsGraphSettings(topsize, leftsize, Font.Size, actiontype);
719end;
720
721procedure TfrmOptions.btnGraphViewsClick(Sender: TObject);
722// display Graph Views
723var
724 actiontype: boolean;
725 topsize, leftsize: integer;
726begin
727 actiontype := false;
728 Offset(topsize, -60, leftsize, -60);
729 DialogOptionsGraphProfiles(topsize, leftsize, Font.Size, actiontype);
730end;
731
732procedure TfrmOptions.rdoRDVClick(Sender: TObject);
733var
734 iIndex: integer;
735begin
736 iIndex := rdoRDV.ItemIndex;
737 with frmFrame do
738 if iIndex = 0 then
739 begin
740 ChangeVistaWebParam('0');
741 lblCIRN.Caption := ' Remote';
742 lblCIRNData.Caption := 'Data';
743 lblCIRNAvail.Caption := '';
744 lblCIRN.Width := 43;
745 lblCIRNData.Width := 43;
746 lblCIRNData.Alignment := taCenter;
747 lblCIRN.Alignment := taCenter;
748 lstCIRNLocations.Clear;
749 SetUpCIRN;
750 end
751 else
752 begin
753 ChangeVistaWebParam('1');
754 lblCIRN.Caption := 'Remote';
755 lblCIRNData.Caption := 'Data*'; //VistaWeb On
756 lblCIRN.Width := 43;
757 lblCIRNData.Width := 43;
758 lblCIRNData.Alignment := taCenter;
759 lblCIRN.Alignment := taCenter;
760 lblCIRN.Enabled := True;
761 lblCIRNData.Enabled := True;
762 pnlCIRN.TabStop := True;
763 if ColorToRGB(clWindowText) = ColorToRGB(clBlack) then
764 begin
765 lblCIRN.Font.Color := clBlue;
766 lblCIRNData.Font.Color := clBlue;
767 lblCIRNAvail.Font.Color := clBlue;
768 lstCIRNLocations.Font.Color := clBlue;
769 end
770 else
771 begin
772 lblCIRN.Font.Color := clWindowText;
773 lblCIRNData.Font.Color := clWindowText;
774 lblCIRNAvail.Font.Color := clWindowText;
775 lstCIRNLocations.Font.Color := clWindowText;
776 end;
777 end;
778
779end;
780
781end.
782
Note: See TracBrowser for help on using the repository browser.