source: cprs/branches/tmg-cprs/CPRS-Chart/uGraphs.pas@ 1717

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

Initial upload of TMG-CPRS 1.0.26.69

File size: 24.4 KB
Line 
1//kt -- Modified with SourceScanner on 8/20/2007
2unit uGraphs;
3
4interface
5
6uses
7 SysUtils, Classes, Graphics, ORFn;
8
9type
10 TGraphSetting = class
11 public
12 ClearBackground: boolean;
13 Dates: boolean;
14 FixedDateRange: boolean;
15 FMStartDate: double;
16 FMStopDate: double;
17 Gradient: boolean;
18 HighTime: TDateTime;
19 Hints: boolean;
20 HorizontalZoom: boolean;
21 ItemsDisplayed: TStrings;
22 ItemsForDisplay: TStrings;
23 Legend: boolean;
24 Lines: boolean;
25 LowTime: TDateTime;
26 MaxGraphs: integer;
27 MaxSelect: integer;
28 MaxSelectMin: integer;
29 MaxSelectMax: integer;
30 MinGraphHeight: integer;
31 OptionSettings: string; // only used for storage
32 Points: boolean;
33 SortByType: boolean;
34 SortColumn: integer;
35 Sources: TStrings;
36 StayOnTop: boolean;
37 Values: boolean;
38 VerticalZoom: boolean;
39 View3D: boolean;
40 end;
41
42const
43 BIG_NUMBER = 9999999;
44 BIG_SPACES = ' ';
45 FM_START_DATE = 2500101;
46 FM_STOP_DATE = 3500101;
47 MAX_ITEM_DISCLAIMER = 10;
48 NUM_COLORS = 16;
49 PROB_HEIGHT = 2;
50 RX_HEIGHT_IN = 12;
51 RX_HEIGHT_NVA = 9;
52 RX_HEIGHT_OUT = 15;
53 ZOOM_PERCENT = 95;
54 GRAPH_FLOAT = 'F';
55 GRAPH_REPORT = 'R';
56
57 // settings use single character
58 SETTING_3D = 'A';
59 SETTING_CLEAR = 'B';
60 SETTING_DATES = 'C';
61 SETTING_GRADIENT = 'D';
62 SETTING_HINTS = 'E';
63 SETTING_LEGEND = 'F';
64 SETTING_LINES = 'G';
65 SETTING_SORT = 'H';
66 SETTING_TOP = 'I';
67 SETTING_VALUES = 'J';
68 SETTING_HZOOM = 'K';
69 SETTING_VZOOM = 'L';
70 SETTING_FIXED = 'M';
71
72 // keypress flags
73 KEYPRESS_ON = 'YES';
74 KEYPRESS_OFF = 'NO';
75
76 // format date/time axis
77 DFORMAT_MDY = 'm/d/yyyy';
78 DFORMAT_MYY = 'm/yy';
79 DFORMAT_YY = 'yy';
80 DWIDTH_MDY = 66;
81 DWIDTH_MYY = 30;
82 DWIDTH_YY = 18;
83
84 // text messages
85//TXT_DISCLAIMER = 'Due to number of items and size restrictions on your display, ' <-- original line. //kt 8/20/2007
86// + 'all items may not be visible.'; <-- original line. //kt 8/20/2007
87//TXT_COPY_DISCLAIMER = 'Note: Graphs display limited data, view details for more information.'; <-- original line. //kt 8/20/2007
88//TXT_REPORT_DISCLAIMER = 'Note: Listing displays limited data, view details for more information.'; <-- original line. //kt 8/20/2007
89//TXT_INFO = 'Select multiple items using Ctrl-click or Shift-click.'; <-- original line. //kt 8/20/2007
90//TXT_PRINTING = 'Graphs are being printed'; <-- original line. //kt 8/20/2007
91//TXT_WARNING = 'Warning: You are using graph settings with a Special Function.'; <-- original line. //kt 8/20/2007
92//TXT_WARNING_SAME_TIME = 'Warning: Items have multiple occurrences at the same time.'; <-- original line. //kt 8/20/2007
93//TXT_ZOOMED = 'Zoomed Date Range: '; <-- original line. //kt 8/20/2007
94
95 COLOR_INFO = clCream;
96 COLOR_PRINTING = clMoneyGreen; //$CCFFFF; $CCCCFF; $CCFFCC; $FFCCCC; $FFCCFF; $FFFFCC;
97 COLOR_WARNING = clCream; //clFuchsia;
98 COLOR_ZOOM = clCream; //clSkyBlue;
99
100 // hint messages for view definition
101//HINT_PAT_SOURCE = 'Only items where the patient has data are displayed.' <-- original line. //kt 8/20/2007
102// + #13 + 'Use this for selecting items to display on the graph.'; <-- original line. //kt 8/20/2007
103//HINT_ALL_SOURCE = 'All possible items are displayed.' <-- original line. //kt 8/20/2007
104// + #13 + 'Use this for defining items to be displayed/saved as Views.' <-- original line. //kt 8/20/2007
105// + #13 + 'Note: For easy use, select Views for graphing.'; <-- original line. //kt 8/20/2007
106//HINT_SELECTION_INFO = 'This form is primarily used for defining views.' <-- original line. //kt 8/20/2007
107// + #13 + 'Usually selection is done by selecting Views or Items to graph.' <-- original line. //kt 8/20/2007
108// + #13 + 'This form defines views.' <-- original line. //kt 8/20/2007
109// + #13 + 'The Settings form defines items that are always selectable for graphing.'; <-- original line. //kt 8/20/2007
110//HINT_SOURCE = 'These are the different types of data.' <-- original line. //kt 8/20/2007
111// + #13 + 'Types are followed by a section showing your Personal Views, then Public Views.' <-- original line. //kt 8/20/2007
112// + #13 + 'Click a type and then select individual items' <-- original line. //kt 8/20/2007
113// + #13 + 'Double-click a type to select all items of this type - <any>'; <-- original line. //kt 8/20/2007
114//HINT_SELECTION = 'Select specific items and move them to the right.' <-- original line. //kt 8/20/2007
115// + #13 + 'Use the arrow buttons or double click.' <-- original line. //kt 8/20/2007
116// + #13 + 'Selecting a type <any> will use all patients for that type.'; <-- original line. //kt 8/20/2007
117//HINT_DISPLAY = 'This is the list of items, types, and/or views that compose the View that will be graphed.' <-- original line. //kt 8/20/2007
118// + #13 + 'You can save this as a personal view by clicking the Save Personal button.'; <-- original line. //kt 8/20/2007
119//HINT_BTN_ADDALL = 'Click to add all items for display.'; <-- original line. //kt 8/20/2007
120//HINT_BTN_ADD1 = 'Click to add this item for display (or double-click item).'; <-- original line. //kt 8/20/2007
121//HINT_BTN_REMOVE1 = 'Click to remove this item from display (or double-click item).'; <-- original line. //kt 8/20/2007
122//HINT_BTN_REMOVEALL = 'Click to remove all items from display.'; <-- original line. //kt 8/20/2007
123//HINT_BTN_CLEAR = 'Click to clear the Items and Items for Graphing lists.'; <-- original line. //kt 8/20/2007
124//HINT_BTN_DELETE = 'Click to delete the selected view.'; <-- original line. //kt 8/20/2007
125//HINT_BTN_RENAME = 'Click to rename the selected view.'; <-- original line. //kt 8/20/2007
126//HINT_BTN_SAVE = 'Click to save your view.' <-- original line. //kt 8/20/2007
127// + #13 + 'You will give this view a name that can be selected from the graph.'; <-- original line. //kt 8/20/2007
128//HINT_BTN_SAVE_PUB = 'Click to save a public view (available to editors only).' <-- original line. //kt 8/20/2007
129// + #13 + 'Public views can be selected by all users.'; <-- original line. //kt 8/20/2007
130//HINT_APPLY = 'Select the section you where you want to display the graph.'; <-- original line. //kt 8/20/2007
131//HINT_BTN_CLOSE = 'Click to display items for graphing.' <-- original line. //kt 8/20/2007
132// + #13 + 'Note: If you are using this from the Options menu, ' <-- original line. //kt 8/20/2007
133// + #13 + 'items are not displayed (multiple graphs may be in use).' <-- original line. //kt 8/20/2007
134// + #13 + 'You should save any view definitions before closing this form.'; <-- original line. //kt 8/20/2007
135
136
137
138 // hint messages for settings
139//SHINT_SOURCES = 'This is a list of all the types of data that can be graphed.' <-- original line. //kt 8/20/2007
140// + #13 + 'Check the types you wish to be selectable on the graph.' <-- original line. //kt 8/20/2007
141// + #13 + 'It is best to only check the types that you frequently use.' <-- original line. //kt 8/20/2007
142// + #13 + 'If you select a view on the graph that has types defined that are not checked,' <-- original line. //kt 8/20/2007
143// + #13 + 'that type of data will become automatically checked.' <-- original line. //kt 8/20/2007
144// + #13 + 'Note: Data is only selectable if the patient has that type of data'; <-- original line. //kt 8/20/2007
145//SHINT_OPTIONS = 'Check options to change the appearance and behavior of the graph.' <-- original line. //kt 8/20/2007
146// + #13 + 'Common options are also available on the graph''s right-click menu'; <-- original line. //kt 8/20/2007
147//SHINT_MAX = 'Enter the maximum number of graphs to appear on the screen.' <-- original line. //kt 8/20/2007
148// + #13 + 'This is used when individual graphs are displayed and' <-- original line. //kt 8/20/2007
149// + #13 + 'applies to both the top and bottom sections.' <-- original line. //kt 8/20/2007
150// + #13 + 'When the number of graphs exceeds this limited, the graphs are available by scrolling.'; <-- original line. //kt 8/20/2007
151//SHINT_MIN = 'Enter the minimum height of a graph (this is in pixels).' <-- original line. //kt 8/20/2007
152// + #13 + 'This will depend on the size of your display.' <-- original line. //kt 8/20/2007
153// + #13 + 'This setting assures that at least this amount of height will appear on the graph.' <-- original line. //kt 8/20/2007
154// + #13 + 'Use in combination with Max Graphs in Display.'; <-- original line. //kt 8/20/2007
155//SHINT_MAX_ITEMS = 'Enter the maximum number of items that can be graphed at one time.' <-- original line. //kt 8/20/2007
156// + #13 + 'This setting prevents you from mistakenly selecting a large number of items.'; <-- original line. //kt 8/20/2007
157//SHINT_FUNCTIONS = 'These functions are restricted to editors for evaluation.'; <-- original line. //kt 8/20/2007
158//SHINT_BTN_SHOW = 'Click these buttons to display default settings.'; <-- original line. //kt 8/20/2007
159//SHINT_BTN_PER = 'Click to display your personal settings.'; <-- original line. //kt 8/20/2007
160//SHINT_BTN_PUB = 'Click to display the default settings.' <-- original line. //kt 8/20/2007
161// + #13 + 'These settings are used when you have not saved a personal setting.'; <-- original line. //kt 8/20/2007
162//SHINT_BTN_SAVE = 'Click these buttons to save default settings.'; <-- original line. //kt 8/20/2007
163//SHINT_BTN_PERSAVE = 'Click to save your personal defaults'; <-- original line. //kt 8/20/2007
164//SHINT_BTN_PUBSAVE = 'Click to save the public default (available to editors only).'; <-- original line. //kt 8/20/2007
165//SHINT_BTN_ALL = 'Click to check all sources.'; <-- original line. //kt 8/20/2007
166//SHINT_BTN_CLEAR = 'Click to uncheck all sources.'; <-- original line. //kt 8/20/2007
167//SHINT_BTN_CLOSE = 'Click to display these settings for graphing.' <-- original line. //kt 8/20/2007
168// + #13 + 'To cancel any unsaved changes you''ve made, click the upper-right x box.' <-- original line. //kt 8/20/2007
169// + #13 + 'Note: If you are using this from the Options menu, ' <-- original line. //kt 8/20/2007
170// + #13 + 'settings will not change your display (multiple graphs may be in use).' <-- original line. //kt 8/20/2007
171// + #13 + 'You should save any settings before closing this form.'; <-- original line. //kt 8/20/2007
172
173
174
175
176function GraphSettingsInit(settings: string): TGraphSetting;
177
178//kt Added the following function to replace constant declarations 8/20/2007
179// This allows just-in-time language translation
180Function TXT_DISCLAIMER : string; //kt 8-20-07
181Function TXT_COPY_DISCLAIMER : string; //kt 8-20-07
182Function TXT_REPORT_DISCLAIMER: string; //kt 8-20-07
183Function TXT_INFO : string; //kt 8-20-07
184Function TXT_PRINTING : string; //kt 8-20-07
185Function TXT_WARNING : string; //kt 8-20-07
186Function TXT_WARNING_SAME_TIME: string; //kt 8-20-07
187Function TXT_ZOOMED : string; //kt 8-20-07
188Function HINT_PAT_SOURCE : string; //kt 8-20-07
189Function HINT_ALL_SOURCE : string; //kt 8-20-07
190Function HINT_SELECTION_INFO : string; //kt 8-20-07
191Function HINT_SOURCE : string; //kt 8-20-07
192Function HINT_SELECTION : string; //kt 8-20-07
193Function HINT_DISPLAY : string; //kt 8-20-07
194Function HINT_BTN_ADDALL : string; //kt 8-20-07
195Function HINT_BTN_ADD1 : string; //kt 8-20-07
196Function HINT_BTN_REMOVE1 : string; //kt 8-20-07
197Function HINT_BTN_REMOVEALL : string; //kt 8-20-07
198Function HINT_BTN_CLEAR : string; //kt 8-20-07
199Function HINT_BTN_DELETE : string; //kt 8-20-07
200Function HINT_BTN_RENAME : string; //kt 8-20-07
201Function HINT_BTN_SAVE : string; //kt 8-20-07
202Function HINT_BTN_SAVE_PUB : string; //kt 8-20-07
203Function HINT_APPLY : string; //kt 8-20-07
204Function HINT_BTN_CLOSE : string; //kt 8-20-07
205Function SHINT_SOURCES : string; //kt 8-20-07
206Function SHINT_OPTIONS : string; //kt 8-20-07
207Function SHINT_MAX : string; //kt 8-20-07
208Function SHINT_MIN : string; //kt 8-20-07
209Function SHINT_MAX_ITEMS : string; //kt 8-20-07
210Function SHINT_FUNCTIONS : string; //kt 8-20-07
211Function SHINT_BTN_SHOW : string; //kt 8-20-07
212Function SHINT_BTN_PER : string; //kt 8-20-07
213Function SHINT_BTN_PUB : string; //kt 8-20-07
214Function SHINT_BTN_SAVE : string; //kt 8-20-07
215Function SHINT_BTN_PERSAVE : string; //kt 8-20-07
216Function SHINT_BTN_PUBSAVE : string; //kt 8-20-07
217Function SHINT_BTN_ALL : string; //kt 8-20-07
218Function SHINT_BTN_CLEAR : string; //kt 8-20-07
219Function SHINT_BTN_CLOSE : string; //kt 8-20-07
220
221
222implementation
223
224uses DKLang; //kt
225
226
227//kt Added the following function to replace constant declarations 8/20/2007
228Function TXT_DISCLAIMER: string; //kt 8-20-07
229begin
230 Result := DKLangConstW('uGraphs_Due_to_number_of_items_and_size_restrictions_on_your_displayx')
231 + DKLangConstW('uGraphs_all_items_may_not_be_visiblex');
232end;
233
234Function TXT_COPY_DISCLAIMER: string; //kt 8-20-07
235begin Result := DKLangConstW('uGraphs_Notex_Graphs_display_limited_datax_view_details_for_more_informationx');
236end;
237
238Function TXT_REPORT_DISCLAIMER: string; //kt 8-20-07
239begin Result := DKLangConstW('uGraphs_Notex_Listing_displays_limited_datax_view_details_for_more_informationx');
240end;
241
242Function TXT_INFO: string; //kt 8-20-07
243begin Result := DKLangConstW('uGraphs_Select_multiple_items_using_Ctrlxclick_or_Shiftxclickx');
244end;
245
246Function TXT_PRINTING: string; //kt 8-20-07
247begin Result := DKLangConstW('uGraphs_Graphs_are_being_printed');
248end;
249
250Function TXT_WARNING: string; //kt 8-20-07
251begin Result := DKLangConstW('uGraphs_Warningx_You_are_using_graph_settings_with_a_Special_Functionx');
252end;
253
254Function TXT_WARNING_SAME_TIME: string; //kt 8-20-07
255begin Result := DKLangConstW('uGraphs_Warningx_Items_have_multiple_occurrences_at_the_same_timex');
256end;
257
258Function TXT_ZOOMED: string; //kt 8-20-07
259begin Result := DKLangConstW('uGraphs_Zoomed_Date_Rangex');
260end;
261
262Function HINT_PAT_SOURCE : string; //kt 8-20-07
263begin Result := DKLangConstW('uGraphs_Only_items_where_the_patient_has_data_are_displayedx')
264 + #13 + DKLangConstW('uGraphs_Use_this_for_selecting_items_to_display_on_the_graphx');
265end;
266
267
268Function HINT_ALL_SOURCE : string; //kt 8-20-07
269begin Result := DKLangConstW('uGraphs_All_possible_items_are_displayedx')
270 + #13 + DKLangConstW('uGraphs_Use_this_for_defining_items_to_be_displayedxsaved_as_Viewsx')
271 + #13 + DKLangConstW('uGraphs_Notex_For_easy_usex_select_Views_for_graphingx');
272end;
273
274Function HINT_SELECTION_INFO: string; //kt 8-20-07
275begin Result := DKLangConstW('uGraphs_This_form_is_primarily_used_for_defining_viewsx')
276 + #13 + DKLangConstW('uGraphs_Usually_selection_is_done_by_selecting_Views_or_Items_to_graphx')
277 + #13 + DKLangConstW('uGraphs_This_form_defines_viewsx')
278 + #13 + DKLangConstW('uGraphs_The_Settings_form_defines_items_that_are_always_selectable_for_graphingx');
279end;
280
281Function HINT_SOURCE : string; //kt 8-20-07
282begin Result := DKLangConstW('uGraphs_These_are_the_different_types_of_datax')
283 + #13 + DKLangConstW('uGraphs_Types_are_followed_by_a_section_showing_your_Personal_Viewsx_then_Public_Viewsx')
284 + #13 + DKLangConstW('uGraphs_Click_a_type_and_then_select_individual_items')
285 + #13 + DKLangConstW('uGraphs_Doublexclick_a_type_to_select_all_items_of_this_type__x_xanyx');
286end;
287
288Function HINT_SELECTION : string; //kt 8-20-07
289begin Result := DKLangConstW('uGraphs_Select_specific_items_and_move_them_to_the_rightx')
290 + #13 + DKLangConstW('uGraphs_Use_the_arrow_buttons_or_double_clickx')
291 + #13 + DKLangConstW('uGraphs_Selecting_a_type_xanyx_will_use_all_patients_for_that_typex');
292end;
293
294Function HINT_DISPLAY : string; //kt 8-20-07
295begin Result := DKLangConstW('uGraphs_This_is_the_list_of_itemsx_typesx_andxor_views_that_compose_the_View_that_will_be_graphedx')
296 + #13 + DKLangConstW('uGraphs_You_can_save_this_as_a_personal_view_by_clicking_the_Save_Personal_buttonx');
297end;
298
299Function HINT_BTN_ADDALL : string; //kt 8-20-07
300begin Result := DKLangConstW('uGraphs_Click_to_add_all_items_for_displayx');
301end;
302
303Function HINT_BTN_ADD1 : string; //kt 8-20-07
304begin Result := DKLangConstW('uGraphs_Click_to_add_this_item_for_display_xor_doublexclick_itemxx');
305end;
306
307Function HINT_BTN_REMOVE1 : string; //kt 8-20-07
308begin Result := DKLangConstW('uGraphs_Click_to_remove_this_item_from_display_xor_doublexclick_itemxx');
309end;
310
311Function HINT_BTN_REMOVEALL : string; //kt 8-20-07
312begin Result := DKLangConstW('uGraphs_Click_to_remove_all_items_from_displayx');
313end;
314
315Function HINT_BTN_CLEAR : string; //kt 8-20-07
316begin Result := DKLangConstW('uGraphs_Click_to_clear_the_Items_and_Items_for_Graphing_listsx');
317end;
318
319Function HINT_BTN_DELETE : string; //kt 8-20-07
320begin Result := DKLangConstW('uGraphs_Click_to_delete_the_selected_viewx');
321end;
322
323Function HINT_BTN_RENAME : string; //kt 8-20-07
324begin Result := DKLangConstW('uGraphs_Click_to_rename_the_selected_viewx');
325end;
326
327Function HINT_BTN_SAVE : string; //kt 8-20-07
328begin Result := DKLangConstW('uGraphs_Click_to_save_your_viewx')
329 + #13 + DKLangConstW('uGraphs_You_will_give_this_view_a_name_that_can_be_selected_from_the_graphx');
330end;
331
332Function HINT_BTN_SAVE_PUB : string; //kt 8-20-07
333begin Result := DKLangConstW('uGraphs_Click_to_save_a_public_view_xavailable_to_editors_onlyxx')
334 + #13 + DKLangConstW('uGraphs_Public_views_can_be_selected_by_all_usersx');
335end;
336
337Function HINT_APPLY : string; //kt 8-20-07
338begin Result := DKLangConstW('uGraphs_Select_the_section_you_where_you_want_to_display_the_graphx');
339end;
340
341Function HINT_BTN_CLOSE : string; //kt 8-20-07
342begin Result := DKLangConstW('uGraphs_Click_to_display_items_for_graphingx')
343 + #13 + DKLangConstW('uGraphs_Notex_If_you_are_using_this_from_the_Options_menux')
344 + #13 + DKLangConstW('uGraphs_items_are_not_displayed_xmultiple_graphs_may_be_in_usexx')
345 + #13 + DKLangConstW('uGraphs_You_should_save_any_view_definitions_before_closing_this_formx');
346end;
347
348Function SHINT_SOURCES : string; //kt 8-20-07
349begin Result := DKLangConstW('uGraphs_This_is_a_list_of_all_the_types_of_data_that_can_be_graphedx')
350 + #13 + DKLangConstW('uGraphs_Check_the_types_you_wish_to_be_selectable_on_the_graphx')
351 + #13 + DKLangConstW('uGraphs_It_is_best_to_only_check_the_types_that_you_frequently_usex')
352 + #13 + DKLangConstW('uGraphs_If_you_select_a_view_on_the_graph_that_has_types_defined_that_are_not_checkedx')
353 + #13 + DKLangConstW('uGraphs_that_type_of_data_will_become_automatically_checkedx')
354 + #13 + DKLangConstW('uGraphs_Notex_Data_is_only_selectable_if_the_patient_has_that_type_of_data');
355end;
356
357Function SHINT_OPTIONS : string; //kt 8-20-07
358begin Result := DKLangConstW('uGraphs_Check_options_to_change_the_appearance_and_behavior_of_the_graphx')
359 + #13 + DKLangConstW('uGraphs_Common_options_are_also_available_on_the_graphxxs_rightxclick_menu');
360end;
361
362Function SHINT_MAX : string; //kt 8-20-07
363begin Result := DKLangConstW('uGraphs_Enter_the_maximum_number_of_graphs_to_appear_on_the_screenx')
364 + #13 + DKLangConstW('uGraphs_This_is_used_when_individual_graphs_are_displayed_and')
365 + #13 + DKLangConstW('uGraphs_applies_to_both_the_top_and_bottom_sectionsx')
366 + #13 + DKLangConstW('uGraphs_When_the_number_of_graphs_exceeds_this_limitedx_the_graphs_are_available_by_scrollingx');
367end;
368
369Function SHINT_MIN : string; //kt 8-20-07
370begin Result := DKLangConstW('uGraphs_Enter_the_minimum_height_of_a_graph_xthis_is_in_pixelsxx')
371 + #13 + DKLangConstW('uGraphs_This_will_depend_on_the_size_of_your_displayx')
372 + #13 + DKLangConstW('uGraphs_This_setting_assures_that_at_least_this_amount_of_height_will_appear_on_the_graphx')
373 + #13 + DKLangConstW('uGraphs_Use_in_combination_with_Max_Graphs_in_Displayx');
374end;
375
376Function SHINT_MAX_ITEMS : string; //kt 8-20-07
377begin Result := DKLangConstW('uGraphs_Enter_the_maximum_number_of_items_that_can_be_graphed_at_one_timex')
378 + #13 + DKLangConstW('uGraphs_This_setting_prevents_you_from_mistakenly_selecting_a_large_number_of_itemsx');
379end;
380
381Function SHINT_FUNCTIONS : string; //kt 8-20-07
382begin Result := DKLangConstW('uGraphs_These_functions_are_restricted_to_editors_for_evaluationx');
383end;
384
385Function SHINT_BTN_SHOW : string; //kt 8-20-07
386begin Result := DKLangConstW('uGraphs_Click_these_buttons_to_display_default_settingsx');
387end;
388
389Function SHINT_BTN_PER : string; //kt 8-20-07
390begin Result := DKLangConstW('uGraphs_Click_to_display_your_personal_settingsx');
391end;
392
393Function SHINT_BTN_PUB : string; //kt 8-20-07
394begin Result := DKLangConstW('uGraphs_Click_to_display_the_default_settingsx')
395 + #13 + DKLangConstW('uGraphs_These_settings_are_used_when_you_have_not_saved_a_personal_settingx');
396end;
397
398Function SHINT_BTN_SAVE : string; //kt 8-20-07
399begin Result := DKLangConstW('uGraphs_Click_these_buttons_to_save_default_settingsx');
400end;
401
402Function SHINT_BTN_PERSAVE: string; //kt 8-20-07
403begin Result := DKLangConstW('uGraphs_Click_to_save_your_personal_defaults');
404end;
405
406Function SHINT_BTN_PUBSAVE: string; //kt 8-20-07
407begin Result := DKLangConstW('uGraphs_Click_to_save_the_public_default_xavailable_to_editors_onlyxx');
408end;
409
410Function SHINT_BTN_ALL : string; //kt 8-20-07
411begin Result := DKLangConstW('uGraphs_Click_to_check_all_sourcesx');
412end;
413
414Function SHINT_BTN_CLEAR : string; //kt 8-20-07
415begin Result := DKLangConstW('uGraphs_Click_to_uncheck_all_sourcesx');
416end;
417
418Function SHINT_BTN_CLOSE : string; //kt 8-20-07
419begin Result := DKLangConstW('uGraphs_Click_to_display_these_settings_for_graphingx')
420 + #13 + DKLangConstW('uGraphs_To_cancel_any_unsaved_changes_youxxve_madex_click_the_upperxright_x_boxx')
421 + #13 + DKLangConstW('uGraphs_Notex_If_you_are_using_this_from_the_Options_menux')
422 + #13 + DKLangConstW('uGraphs_settings_will_not_change_your_display_xmultiple_graphs_may_be_in_usexx')
423 + #13 + DKLangConstW('uGraphs_You_should_save_any_settings_before_closing_this_formx');
424end;
425
426
427function GraphSettingsInit(settings: string): TGraphSetting;
428var
429 FGraphSetting: TGraphSetting;
430begin
431 FGraphSetting := TGraphSetting.Create;
432 with FGraphSetting do
433 begin
434 OptionSettings := Piece(settings, '|', 2);
435 SortColumn := strtointdef(Piece(settings, '|', 3), 0);
436 MaxGraphs := strtointdef(Piece(settings, '|', 4), 5);
437 MinGraphHeight := strtointdef(Piece(settings, '|', 5), 90);
438 MaxSelect := strtointdef(Piece(settings, '|', 7), 100);
439 MaxSelectMin := 1;
440 MaxSelectMax := strtointdef(Piece(settings, '|', 8), 1000);
441 Values := Pos(SETTING_VALUES, OptionSettings) > 0;
442 VerticalZoom := Pos(SETTING_VZOOM, OptionSettings) > 0;
443 HorizontalZoom := Pos(SETTING_HZOOM, OptionSettings) > 0;
444 View3D := Pos(SETTING_3D, OptionSettings) > 0;
445 Legend := Pos(SETTING_LEGEND, OptionSettings) > 0;
446 Dates := Pos(SETTING_DATES, OptionSettings) > 0;
447 Lines := Pos(SETTING_LINES, OptionSettings) > 0;
448 StayOnTop := Pos(SETTING_TOP, OptionSettings) > 0;
449 SortByType := Pos(SETTING_SORT, OptionSettings) > 0;
450 ClearBackground := Pos(SETTING_CLEAR, OptionSettings) > 0;
451 Gradient := Pos(SETTING_GRADIENT, OptionSettings) > 0;
452 Hints := Pos(SETTING_HINTS, OptionSettings) > 0;
453 FixedDateRange := Pos(SETTING_FIXED, OptionSettings) > 0;
454 HighTime := 0;
455 LowTime := BIG_NUMBER;
456 FMStartDate := FM_START_DATE;
457 FMStopDate := FM_STOP_DATE;
458 if SortByType then SortColumn := 1 else SortColumn := 0;
459 end;
460 Result := FGraphSetting;
461end;
462
463end.
Note: See TracBrowser for help on using the repository browser.