Procedure

TfrmGraphSettings.SetSettings

Module

fGraphSettings

Last Modified

7/15/2014 3:26:36 PM

Visibility

Public

Owner

TfrmGraphSettings

Declaration

procedure SetSettings(aGraphSetting: TGraphSetting);

Called-By Hierarchy


          TfrmGraphSettings.SetSettings
                  DialogGraphSettings┘ 
         DialogOptionsGraphSettings┤   
TfrmOptions.btnGraphSettingsClick┘ │   
  TfrmGraphs.btnChangeSettingsClick┘   
   TfrmReports.btnChangeViewClick┘     

Called-By

Name Declaration Comments
DialogGraphSettings procedure DialogGraphSettings(fontsize: integer; var okbutton: boolean; aGraphSetting: TGraphSetting; DisplaySource: TStrings; var conv: integer; var aSettings: string); -


Source

309   procedure TfrmGraphSettings.SetSettings(aGraphSetting: TGraphSetting);
310   var
311     i : integer;
312     value: string;
313   begin
314     with aGraphSetting do
315     begin
316       OptionSettings := '';
317       if Values then OptionSettings := OptionSettings + SETTING_VALUES;
318       if VerticalZoom then OptionSettings := OptionSettings + SETTING_VZOOM;
319       if HorizontalZoom then OptionSettings := OptionSettings + SETTING_HZOOM;
320       if View3D then OptionSettings := OptionSettings + SETTING_3D;
321       if Legend then OptionSettings := OptionSettings + SETTING_LEGEND;
322       if Lines then OptionSettings := OptionSettings + SETTING_LINES;
323       if Dates then OptionSettings := OptionSettings + SETTING_DATES;
324       if SortByType then OptionSettings := OptionSettings + SETTING_SORT;
325       if ClearBackground then OptionSettings := OptionSettings + SETTING_CLEAR;
326       if Gradient then OptionSettings := OptionSettings + SETTING_GRADIENT;
327       if Hints then OptionSettings := OptionSettings + SETTING_HINTS;
328       if StayOnTop then OptionSettings := OptionSettings + SETTING_TOP;
329       if FixedDateRange then OptionSettings := OptionSettings + SETTING_FIXED;
330       spnMaxGraphs.Position := MaxGraphs;
331       spnMinGraphHeight.Position := MinGraphHeight;
332       MaxSelect := Min(MaxSelectMax, MaxSelect);
333       if MaxSelect < MaxSelectMin then
334         MaxSelect := MaxSelectMin;
335       spnMaxSelect.Position := MaxSelect;
336       spnMaxSelect.Min := MaxSelectMin;
337       spnMaxSelect.Max := MaxSelectMax;
338       cboDateRangeOutpatient.SelectByID(DateRangeOutpatient);
339       cboDateRangeInpatient.SelectByID(DateRangeInpatient);
340       if SortByType then SortColumn := 1 else SortColumn := 0;
341       lstOptions.Tag := SortColumn;
342       if (SortColumn > 0) then
343         if Pos(SETTING_SORT, OptionSettings) = 0 then
344           OptionSettings := OptionSettings + SETTING_SORT;
345       Turbo := false;                               // *v29*turbo is turned off (all users turbo false)
346       if Turbo then
347         OptionSettings := OptionSettings + SETTING_TURBO;
348       if MergeLabs then
349         OptionSettings := OptionSettings + SETTING_MERGELABS;
350       lstOptions.Items.Add('Merge Labs^O');
351       chklstOptions.Items.Add('Merge Labs');
352       {if GraphPublicEditor or GraphTurboOn then     // *v29*take Turbo off settings
353       begin
354         lstOptions.Items.Add('Turbo^N');
355         chklstOptions.Items.Add('Turbo');
356       end;}
357       for i := 0 to lstOptions.Items.Count - 1 do
358       begin
359         value := Piece(lstOptions.Items[i], '^', 2);
360         chklstOptions.Checked[i] := Pos(value, OptionSettings) > 0;
361       end;
362     end;
363   end;