Changeset 541 for cprs/branches/tmg-cprs/CPRS-Chart/Options
- Timestamp:
- Aug 12, 2009, 7:14:16 PM (15 years ago)
- Location:
- cprs/branches/tmg-cprs/CPRS-Chart/Options
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/branches/tmg-cprs/CPRS-Chart/Options/fOptions.dfm
r498 r541 87 87 Height = 323 88 88 HelpContext = 9999 89 ActivePage = ts CoverSheet89 ActivePage = tsNotes 90 90 Align = alClient 91 91 TabOrder = 0 … … 1770 1770 Width = 281 1771 1771 Height = 241 1772 Enabled = False 1772 1773 Font.Charset = DEFAULT_CHARSET 1773 1774 Font.Color = clWindowText … … 1789 1790 Caption = 'Load last selected skin when starting program' 1790 1791 Checked = True 1792 Enabled = False 1791 1793 State = cbChecked 1792 1794 TabOrder = 1 … … 1798 1800 Height = 25 1799 1801 Caption = '&More skins...' 1802 Enabled = False 1800 1803 TabOrder = 2 1801 1804 OnClick = btnMoreSkinsClick … … 1807 1810 Height = 25 1808 1811 Caption = '&Disable skin' 1812 Enabled = False 1809 1813 ModalResult = 7 1810 1814 TabOrder = 3 … … 1817 1821 Height = 25 1818 1822 Caption = '&Apply skin' 1823 Enabled = False 1819 1824 TabOrder = 4 1820 1825 OnClick = btnApplySkinClick -
cprs/branches/tmg-cprs/CPRS-Chart/Options/fOptionsNotes.dfm
r453 r541 6 6 BorderStyle = bsSingle 7 7 Caption = 'Notes' 8 ClientHeight = 1509 ClientWidth = 39 98 ClientHeight = 226 9 ClientWidth = 398 10 10 Color = clBtnFace 11 11 Font.Charset = DEFAULT_CHARSET … … 17 17 OldCreateOrder = False 18 18 Position = poScreenCenter 19 OnCreate = FormCreate 19 20 OnShow = FormShow 20 21 PixelsPerInch = 96 … … 40 41 Height = 13 41 42 Caption = 'of notes (sec):' 43 end 44 object lblHTMLViewSize: TLabel 45 Left = 8 46 Top = 144 47 Width = 159 48 Height = 13 49 Caption = 'Formatted Text (HTML) View Size' 42 50 end 43 51 object txtAutoSave: TCaptionEdit … … 113 121 object pnlBottom: TPanel 114 122 Left = 0 115 Top = 1 17116 Width = 39 9123 Top = 193 124 Width = 398 117 125 Height = 33 118 126 HelpContext = 9110 … … 124 132 Left = 0 125 133 Top = 0 126 Width = 39 9134 Width = 398 127 135 Height = 2 128 136 Align = alTop … … 152 160 end 153 161 end 162 object cboHTMLViewSize: TComboBox 163 Left = 8 164 Top = 162 165 Width = 153 166 Height = 21 167 ItemHeight = 13 168 TabOrder = 6 169 Text = '<View Size>' 170 OnChange = cboHTMLViewSizeChange 171 Items.Strings = ( 172 'Smallest' 173 'Small' 174 'Medium' 175 'Large' 176 'Largest') 177 end 178 object cbDefaultHTMLMode: TCheckBox 179 Left = 8 180 Top = 120 181 Width = 225 182 Height = 17 183 Caption = 'Start notes in Formatted (HTML) Mode' 184 TabOrder = 7 185 OnClick = cbDefaultHTMLModeClick 186 end 154 187 object DKLanguageController1: TDKLanguageController 155 Left = 192156 Top = 8 0188 Left = 352 189 Top = 88 157 190 LangData = { 158 191 0F0066726D4F7074696F6E734E6F746573010200000001000000070043617074 159 696F6E02000000080048656C7046696C65010 C0000000C006C626C4175746F53192 696F6E02000000080048656C7046696C65010F0000000C006C626C4175746F53 160 193 61766531010100000003000000070043617074696F6E000B006C626C436F7369 161 194 676E6572010100000004000000070043617074696F6E000C006C626C4175746F … … 167 200 6F74746F6D0000090062766C426F74746F6D0000050062746E4F4B0101000000 168 201 09000000070043617074696F6E00090062746E43616E63656C01010000000A00 169 0000070043617074696F6E00} 202 0000070043617074696F6E000F006C626C48544D4C5669657753697A65010100 203 00000B000000070043617074696F6E000F0063626F48544D4C5669657753697A 204 6501020000000D00000005004974656D730C0000000400546578740011006362 205 44656661756C7448544D4C4D6F646501010000000E000000070043617074696F 206 6E00} 170 207 end 171 208 end -
cprs/branches/tmg-cprs/CPRS-Chart/Options/fOptionsNotes.pas
r453 r541 4 4 interface 5 5 6 { //kt 8/09 The following objects were addeded to the *FORM* of this unit 7 8 object lblHTMLViewSize: TLabel 9 Left = 8 10 Top = 144 11 Width = 159 12 Height = 13 13 Caption = 'Formatted Text (HTML) View Size' 14 end 15 object cboHTMLViewSize: TComboBox 16 Left = 8 17 Top = 162 18 Width = 153 19 Height = 21 20 ItemHeight = 13 21 TabOrder = 6 22 Text = '<View Size>' 23 OnClick = cboHTMLViewSizeClick 24 Items.Strings = ( 25 'Smallest' 26 'Small' 27 'Medium' 28 'Large' 29 'Largest') 30 end 31 object cbDefaultHTMLMode: TCheckBox 32 Left = 8 33 Top = 112 34 Width = 225 35 Height = 17 36 Caption = 'Start notes in Formatted (HTML) Mode' 37 TabOrder = 7 38 OnClick = cbDefaultHTMLModeClick 39 } 40 41 6 42 uses 7 43 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 44 IniFiles, //kt for IniFile 8 45 StdCtrls, ExtCtrls, ORCtrls, ORFn, ComCtrls, DKLang; 9 46 … … 22 59 btnCancel: TButton; 23 60 lblAutoSave2: TLabel; 24 DKLanguageController1: TDKLanguageController; 61 cboHTMLViewSize: TComboBox; //kt 8/09 62 lblHTMLViewSize: TLabel; //kt 8/09 63 cbDefaultHTMLMode: TCheckBox; //kt 8/09 64 DKLanguageController1: TDKLanguageController; //kt 25 65 procedure FormShow(Sender: TObject); 26 66 procedure btnOKClick(Sender: TObject); … … 32 72 Direction, InsertAt: Integer); 33 73 procedure cboCosignerExit(Sender: TObject); 74 procedure FormCreate(Sender: TObject); //kt 8/09 75 procedure cbDefaultHTMLModeClick(Sender: TObject); //kt 8/09 76 procedure cboHTMLViewSizeChange(Sender: TObject); //kt 8/09 34 77 private 35 78 { Private declarations } … … 40 83 var 41 84 frmOptionsNotes: TfrmOptionsNotes; 85 OptionsNotesIniFile : TIniFile; //kt 8/09 86 DefaultEditHTMLMode : boolean; //kt 8/09 87 FHTMLEditTextSize : integer; //kt 8/09 42 88 43 89 procedure DialogOptionsNotes(topvalue, leftvalue, fontsize: integer; var actiontype: Integer); 90 procedure SetDefaultEditHTMLMode(Value : boolean); //kt 8/09 91 procedure Loaded; //kt 8/09 44 92 45 93 implementation … … 48 96 49 97 uses 98 uCore, //kt 8/09 99 Registry, //kt 8/09 50 100 rOptions, uOptions, rCore, rTIU, rDCSumm; 101 102 const 103 DEFAULT_HTML_EDIT_MODE = 'Edit-in-HTML default mode'; //kt 8/09 104 DEFAULT_HTML_TEXT_SIZE = 'Edit-in-HTML default text size'; //kt 8/09 105 106 procedure SetRegHTMLViewSize(Size : integer); forward; //kt 8/09 51 107 52 108 procedure DialogOptionsNotes(topvalue, leftvalue, fontsize: integer; var actiontype: Integer); … … 102 158 chkAskSubject.Checked := rpcGetSubject; 103 159 if chkAskSubject.Checked then chkAskSubject.Tag := 1; 160 cbDefaultHTMLMode.Checked := DefaultEditHTMLMode; //kt 104 161 end; 105 162 … … 207 264 end; 208 265 266 267 procedure SetRegHTMLViewSize(Size : integer); 268 //kt added entire function 8/09 269 //NOTE: The only way to affect the view size of the HTML renderer (IE) is to 270 // change a system-wide setting in the registry. Then CPRS has to be 271 // restarted for changes to take effect. 272 var 273 FontSizeData : array[0..3] of byte; 274 ZoomReg : TRegistry; 275 begin 276 if (Size < 0) or (Size > 255) then exit; 277 ZoomReg := TRegistry.Create; 278 FontSizeData[0] := Lo(Size); FontSizeData[1] := 0; FontSizeData[2] := 0; FontSizeData[3] := 0; 279 try 280 ZoomReg.Rootkey := HKEY_CURRENT_USER; 281 if ZoomReg.OpenKey('\Software\Microsoft\Internet Explorer\International\Scripts\3', False) then begin 282 ZoomReg.WriteBinaryData('IEFontSize',FontSizeData,SizeOf(FontSizeData)); 283 end; 284 finally 285 ZoomReg.Free; 286 end; 287 end; 288 289 procedure SetDefaultEditHTMLMode(Value : boolean); 290 //kt added entire function 8/09 291 begin 292 if Value <> DefaultEditHTMLMode then begin 293 OptionsNotesIniFile.WriteBool(User.Name,DEFAULT_HTML_EDIT_MODE,Value); 294 DefaultEditHTMLMode := Value; 295 end; 296 end; 297 298 procedure TfrmOptionsNotes.cbDefaultHTMLModeClick(Sender: TObject); 299 //kt added entire function 8/09 300 begin 301 SetDefaultEditHTMLMode(cbDefaultHTMLMode.Checked); 302 end; 303 304 procedure TfrmOptionsNotes.cboHTMLViewSizeChange(Sender: TObject); 305 //kt added entire function 8/09 306 begin 307 SetRegHTMLViewSize(cboHTMLViewSize.ItemIndex); 308 OptionsNotesIniFile.WriteInteger(User.Name,DEFAULT_HTML_TEXT_SIZE,cboHTMLViewSize.ItemIndex); 309 MessageDlg('Formated text size change will take '+#10+#13+ 310 'effect next time CPRS is restarted.',mtInformation,[mbOK],0); 311 end; 312 313 procedure Loaded; 314 //kt added entire function 8/09 315 begin 316 //Code was put in global access space because object is not instantiated until 317 //after user shows options (which could be never) 318 OptionsNotesIniFile := TIniFile.Create(ChangeFileExt(Application.ExeName, '.INI')); //kt 319 DefaultEditHTMLMode := OptionsNotesIniFile.ReadBool(User.Name,DEFAULT_HTML_EDIT_MODE,false); 320 FHTMLEditTextSize := OptionsNotesIniFile.ReadInteger(User.Name,DEFAULT_HTML_TEXT_SIZE,2); 321 SetRegHTMLViewSize(FHTMLEditTextSize); 322 end; 323 324 procedure TfrmOptionsNotes.FormCreate(Sender: TObject); 325 //kt added entire function 8/09 326 //NOTE: form is not created until first time needed. 327 begin 328 //NOTE: FHTMLEditTextSize is set in Loaded function (has to be called after sign on (so User.Name is available) 329 if (FHTMLEditTextSize > -1) and (FHTMLEditTextSize < cboHTMLViewSize.Items.Count) then begin 330 cboHTMLViewSize.ItemIndex := FHTMLEditTextSize; 331 cboHTMLViewSize.Text := cboHTMLViewSize.Items[FHTMLEditTextSize]; 332 SetRegHTMLViewSize(cboHTMLViewSize.ItemIndex); 333 end; 334 end; 335 336 initialization 337 338 finalization 339 OptionsNotesIniFile.Free; //kt 8/09 340 209 341 end. -
cprs/branches/tmg-cprs/CPRS-Chart/Options/fOptionsOther.dfm
r498 r541 8 8 BorderStyle = bsDialog 9 9 Caption = 'Other Parameters' 10 ClientHeight = 4 3610 ClientHeight = 463 11 11 ClientWidth = 391 12 12 Color = clBtnFace … … 26 26 object lblMedsTab: TLabel 27 27 Left = 7 28 Top = 1 6828 Top = 184 29 29 Width = 170 30 30 Height = 13 … … 44 44 object Bevel1: TBevel 45 45 Left = 1 46 Top = 1 5046 Top = 174 47 47 Width = 392 48 48 Height = 3 … … 50 50 object lblEncAppts: TLabel 51 51 Left = 8 52 Top = 2 6952 Top = 285 53 53 Width = 207 54 54 Height = 13 … … 61 61 object Bevel2: TBevel 62 62 Left = 1 63 Top = 2 5663 Top = 272 64 64 Width = 392 65 65 Height = 2 … … 72 72 Caption = 'Select Tab Positioning' 73 73 end 74 object Label2: TLabel75 Left = 8 76 Top = 1 0474 object lblTabColors: TLabel 75 Left = 8 76 Top = 128 77 77 Width = 83 78 78 Height = 13 79 79 Caption = 'Adjust Tab Colors' 80 80 end 81 object Label3: TLabel81 object lblEditTabColor: TLabel 82 82 Left = 232 83 Top = 1 0483 Top = 128 84 84 Width = 138 85 85 Height = 13 … … 88 88 object pnlBottom: TPanel 89 89 Left = 0 90 Top = 4 0390 Top = 430 91 91 Width = 391 92 92 Height = 33 … … 129 129 object stStart: TStaticText 130 130 Left = 7 131 Top = 191131 Top = 207 132 132 Width = 55 133 133 Height = 17 … … 137 137 object stStop: TStaticText 138 138 Left = 199 139 Top = 191139 Top = 207 140 140 Width = 55 141 141 Height = 17 … … 145 145 object dtStart: TORDateBox 146 146 Left = 7 147 Top = 2 10147 Top = 226 148 148 Width = 178 149 149 Height = 21 … … 157 157 object dtStop: TORDateBox 158 158 Left = 200 159 Top = 2 09159 Top = 225 160 160 Width = 186 161 161 Height = 21 … … 216 216 object stStartEncAppts: TStaticText 217 217 Left = 9 218 Top = 296218 Top = 312 219 219 Width = 55 220 220 Height = 17 … … 224 224 object txtTodayMinus: TStaticText 225 225 Left = 38 226 Top = 3 21226 Top = 337 227 227 Width = 64 228 228 Height = 17 … … 235 235 object txtEncStart: TCaptionEdit 236 236 Left = 110 237 Top = 3 18237 Top = 334 238 238 Width = 50 239 239 Height = 21 … … 248 248 object txtDaysMinus: TStaticText 249 249 Left = 178 250 Top = 3 22250 Top = 338 251 251 Width = 26 252 252 Height = 17 … … 259 259 Tag = 30 260 260 Left = 160 261 Top = 3 18261 Top = 334 262 262 Width = 15 263 263 Height = 21 … … 271 271 object txtDaysPlus: TStaticText 272 272 Left = 180 273 Top = 3 74273 Top = 390 274 274 Width = 26 275 275 Height = 17 … … 282 282 Tag = 30 283 283 Left = 162 284 Top = 3 69284 Top = 385 285 285 Width = 15 286 286 Height = 21 … … 294 294 object txtEncStop: TCaptionEdit 295 295 Left = 112 296 Top = 3 69296 Top = 385 297 297 Width = 50 298 298 Height = 21 … … 307 307 object txtTodayPlus: TStaticText 308 308 Left = 46 309 Top = 3 72309 Top = 388 310 310 Width = 56 311 311 Height = 17 … … 318 318 object stStopEncAppts: TStaticText 319 319 Left = 10 320 Top = 3 48320 Top = 364 321 321 Width = 55 322 322 Height = 17 … … 326 326 object btnEncDefaults: TButton 327 327 Left = 248 328 Top = 287328 Top = 303 329 329 Width = 75 330 330 Height = 22 … … 358 358 object pnlShowColor: TPanel 359 359 Left = 232 360 Top = 1 20360 Top = 144 361 361 Width = 145 362 362 Height = 22 … … 367 367 object cboTabColors: TComboBox 368 368 Left = 8 369 Top = 1 20369 Top = 144 370 370 Width = 217 371 371 Height = 21 … … 378 378 ' ') 379 379 end 380 object cbEnableTabColors: TCheckBox 381 Left = 9 382 Top = 110 383 Width = 169 384 Height = 17 385 Caption = 'Enable Custom Tab Colors' 386 Checked = True 387 Enabled = False 388 State = cbChecked 389 TabOrder = 26 390 Visible = False 391 OnClick = cbEnableTabColorsClick 392 end 380 393 object DKLanguageController1: TDKLanguageController 381 394 Left = 152 … … 383 396 LangData = { 384 397 0F0066726D4F7074696F6E734F74686572010300000002000000070043617074 385 696F6E03000000080048656C7046696C6501000000040048696E74012 2000000398 696F6E03000000080048656C7046696C6501000000040048696E740123000000 386 399 0A006C626C4D656473546162010200000005000000070043617074696F6E0400 387 400 0000040048696E740006006C626C546162010100000006000000070043617074 … … 409 422 43617074696F6E001300546162506F736974696F6E436F6D626F426F78010200 410 423 00001C00000005004974656D731B0000000400546578740006004C6162656C31 411 01010000001D000000070043617074696F6E0006004C6162656C320101000000 412 1E000000070043617074696F6E000C00706E6C53686F77436F6C6F7200000B00 413 436F6C6F724469616C6F67000006004C6162656C3301010000001F0000000700 414 43617074696F6E000C0063626F546162436F6C6F72730000} 424 01010000001D000000070043617074696F6E000C006C626C546162436F6C6F72 425 7301010000001E000000070043617074696F6E000C00706E6C53686F77436F6C 426 6F7200000B00436F6C6F724469616C6F6700000F006C626C4564697454616243 427 6F6C6F7201010000001F000000070043617074696F6E000C0063626F54616243 428 6F6C6F7273000011006362456E61626C65546162436F6C6F7273010100000020 429 000000070043617074696F6E00} 415 430 end 416 431 object ColorDialog: TColorDialog -
cprs/branches/tmg-cprs/CPRS-Chart/Options/fOptionsOther.pas
r473 r541 41 41 TabPositionComboBox: TComboBox; 42 42 Label1: TLabel; 43 Label2: TLabel;43 lblTabColors: TLabel; 44 44 pnlShowColor: TPanel; 45 45 ColorDialog: TColorDialog; 46 Label3: TLabel;46 lblEditTabColor: TLabel; 47 47 cboTabColors: TComboBox; 48 cbEnableTabColors: TCheckBox; 48 49 procedure FormShow(Sender: TObject); 49 50 procedure btnOKClick(Sender: TObject); … … 60 61 procedure cboTabColorsChange(Sender: TObject); 61 62 procedure pnlShowColorClick(Sender: TObject); 63 procedure cbEnableTabColorsClick(Sender: TObject); 62 64 private 63 65 { Private declarations } … … 121 123 values, tab: string; 122 124 begin 123 cboTabColors.Items.Assign(uTabColorsList); //kt added8808 124 cboTabColors.ItemIndex := 0; //kt 125 cboTab.Items.Assign(rpcGetOtherTabs); //kt 126 cboTabColorsChange(nil); //kt 125 cboTabColors.Items.Assign(frmFrame.tabPage.Tabs); //kt 8/09 126 //cboTabColors.Items.Assign(uTabColorsList); //kt added8808 127 cboTabColors.ItemIndex := 0; //kt 128 cboTab.Items.Assign(rpcGetOtherTabs); //kt 129 cboTabColorsChange(nil); //kt 130 cbEnableTabColors.Checked := uTabColorsEnabled; //kt 8/09 127 131 //if (cboTab.Items.IndexOf('Surgery') > -1) and (not ShowSurgeryTab) then <-- original line. //kt 8/8/2007 128 132 if (cboTab.Items.IndexOf(DKLangConstW('fOptionsOther_Surgery')) > -1) and (not ShowSurgeryTab) then //kt added 8/8/2007 … … 344 348 end; 345 349 350 procedure TfrmOptionsOther.cbEnableTabColorsClick(Sender: TObject); 351 //kt added 352 begin 353 uTabColorsEnabled := cbEnableTabColors.Checked; 354 cboTabColors.Enabled := uTabColorsEnabled; 355 lblEditTabColor.Enabled := uTabColorsEnabled; 356 lblTabColors.Enabled := uTabColorsEnabled; 357 pnlShowColor.Enabled := uTabColorsEnabled; 358 end; 359 346 360 end.
Note:
See TracChangeset
for help on using the changeset viewer.