Ignore:
Timestamp:
Mar 31, 2010, 5:06:56 PM (15 years ago)
Author:
Kevin Toppenberg
Message:

Added functions to Templates, and Images tab

Location:
cprs/branches/tmg-cprs/CPRS-Chart/Options
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cprs/branches/tmg-cprs/CPRS-Chart/Options/fOptions.dfm

    r541 r729  
    11object frmOptions: TfrmOptions
    2   Left = 334
    3   Top = 229
     2  Left = 321
     3  Top = 155
    44  Width = 435
    55  Height = 397
     
    8787      Height = 323
    8888      HelpContext = 9999
    89       ActivePage = tsNotes
     89      ActivePage = tsAppearance
    9090      Align = alClient
    9191      TabOrder = 0
     
    17931793          State = cbChecked
    17941794          TabOrder = 1
     1795          OnClick = cbSkinAtStartupClick
    17951796        end
    17961797        object btnMoreSkins: TButton
  • cprs/branches/tmg-cprs/CPRS-Chart/Options/fOptions.pas

    r490 r729  
    172172    procedure FormShow(Sender: TObject);
    173173    procedure lbSkinsKeyPress(Sender: TObject; var Key: Char);
    174     procedure btnDisableSkinClick(Sender: TObject);  //kt added 6/29/07
     174    procedure btnDisableSkinClick(Sender: TObject);
     175    procedure cbSkinAtStartupClick(Sender: TObject);  //kt added 6/29/07
    175176  private
    176177    { Private declarations }
     
    209210       rOptions, rCore, uCore, uOptions, UBACore, fFrame,
    210211       //fTestDialog;
    211 
    212212    //kt mod 6/29/07 -----
    213213    ShellAPI, //kt 9/8/08
     214    uTMGOptions, //kt 2/10/10
    214215    ORNet, //allows access to RPCBrokerV
    215216    TntForms, TntSystem, TntSysUtils;
     
    340341
    341342    //kt begin modification 6/29/07 ---------------
    342 
    343343    // Fill cbLanguage with available languages
    344344    // Note: LangManager was populated at form creation of fFrame
     
    347347    cbLanguage.ItemIndex := LangManager.LanguageIndex;
    348348    //kt end modification 6/29/07 ---------------
    349 
    350349    cbSkinAtStartup.Checked := frmFrame.SkinAtStartup; //kt 9/8/08
    351 
    352350  end;
    353351
     
    867865  procedure TfrmOptions.cbLanguageChange(Sender: TObject);  //kt added 6/29/07
    868866  var iIndex: Integer;
    869   CPRSChartINI: TINIFile;
    870867  begin
    871868    iIndex := cbLanguage.ItemIndex;
     
    881878    frmFrame.RenameTabs;  //Resets names of tabs to correct translation  //kt
    882879    frmFrame.mnuFileRefreshClick(self); //elh 6/23/08
    883     CPRSChartINI := TINIFile.Create(ExtractFilePath(ParamStr(0)) + 'CPRSChart.ini');  // Write to INI  elh  6/23/08
    884     CPRSChartINI.WriteInteger('Options','Language',LangManager.LanguageID);
    885     CPRSChartINI.Free;
     880    uTMGOptions.WriteInteger('Language',LangManager.LanguageID);
    886881  end;
    887882
     
    945940  end;
    946941
     942  procedure TfrmOptions.cbSkinAtStartupClick(Sender: TObject);
     943  begin
     944    frmFrame.SkinAtStartup := cbSkinAtStartup.Checked;
     945    uTMGOptions.WriteBool('Load Skin At Startup',frmFrame.SkinAtStartup);  //kt 9/11/08
     946  end;
     947
    947948end.
    948949
  • cprs/branches/tmg-cprs/CPRS-Chart/Options/fOptionsOther.dfm

    r667 r729  
    11object frmOptionsOther: TfrmOptionsOther
    2   Left = 517
     2  Left = 522
    33  Top = 143
    44  Hint = 'Use system default settings'
     
    99  Caption = 'Other Parameters'
    1010  ClientHeight = 463
    11   ClientWidth = 391
     11  ClientWidth = 386
    1212  Color = clBtnFace
    1313  Font.Charset = DEFAULT_CHARSET
     
    8989    Left = 0
    9090    Top = 430
    91     Width = 391
     91    Width = 386
    9292    Height = 33
    9393    HelpContext = 9110
     
    9999      Left = 0
    100100      Top = 0
    101       Width = 391
     101      Width = 386
    102102      Height = 2
    103103      Align = alTop
  • cprs/branches/tmg-cprs/CPRS-Chart/Options/fOptionsOther.pas

    r667 r729  
    7070  public
    7171    { Public declarations }
     72    procedure SaveTabColors(ColorsList : TStringList); //kt
    7273  end;
    7374
     
    8081
    8182procedure DialogOptionsOther(topvalue, leftvalue, fontsize: integer; var actiontype: Integer);
    82 procedure SetTabPosition(Position : TTabPosition);
     83procedure SetTabPosition(Position : TTabPosition); //kt
    8384
    8485implementation
     
    8788
    8889uses
    89   rOptions, uOptions, rCore, rSurgery, uConst, fMeds, fFrame;
     90  rOptions, uOptions, rCore, rSurgery, uConst, fMeds, fFrame,
     91  uTMGOptions //kt
     92  ;
    9093
    9194procedure DialogOptionsOther(topvalue, leftvalue, fontsize: integer; var actiontype: Integer);
     
    124127begin
    125128  cboTabColors.Items.Assign(frmFrame.tabPage.Tabs);  //kt 8/09
    126   //cboTabColors.Items.Assign(uTabColorsList);       //kt added8808
     129  //cboTabColors.Items.Assign(TabColorsList);       //kt added8808
    127130  cboTabColors.ItemIndex := 0;                       //kt
    128131  cboTab.Items.Assign(rpcGetOtherTabs);              //kt
    129132  cboTabColorsChange(nil);                           //kt
    130   cbEnableTabColors.Checked := uTabColorsEnabled;    //kt 8/09
     133  cbEnableTabColors.Checked := TabColorsEnabled;    //kt 8/09
    131134//if (cboTab.Items.IndexOf('Surgery') > -1) and (not ShowSurgeryTab) then  <-- original line.  //kt 8/8/2007
    132135  if (cboTab.Items.IndexOf(DKLangConstW('fOptionsOther_Surgery')) > -1) and (not ShowSurgeryTab) then //kt added 8/8/2007
     
    199202procedure TfrmOptionsOther.FormCreate(Sender: TObject);
    200203begin
    201   cbEnableTabColors.checked := uTabColorsEnabled;
     204  cbEnableTabColors.checked := TabColorsEnabled;
    202205  FStartDT  := 0;
    203206  FStopDT   := 0;
     
    313316
    314317procedure SetTabPosition(Position : TTabPosition);
     318//NOTE: Don't make this a member function of TFrmOptionsOther, becuase frmFrame needs
     319//      to be able to call it, even if the OtionsOther form is not instantiated.
    315320//kt added 8/8/08
    316321begin
     
    322327    tpRight : frmFrame.tabPage.Align := alRight;
    323328  end; {case}
     329  uTMGOptions.WriteInteger('Tab Location',integer(frmFrame.tabPage.TabPosition));
     330end;
     331
     332procedure TfrmOptionsOther.SaveTabColors(ColorsList : TStringList);
     333//kt added 8/8/08  Entire function
     334var i : integer;
     335begin
     336  for i := 0 to ColorsList.Count-1 do begin
     337    uTMGOptions.WriteInteger('Tab '+IntToStr(i)+' Color',longword(ColorsList.Objects[i]));
     338  end;
     339  uTMGOptions.WriteBool('TAB_COLORS ENABLE',TabColorsEnabled); //kt 8/09
    324340end;
    325341
     
    345361    if selIndex < 0 then exit;
    346362    cboTabColors.Items.Objects[selIndex] := pointer(ColorDialog.Color);
    347     uTabColorsList.Objects[selIndex] := pointer(ColorDialog.Color);
     363    TabColorsList.Objects[selIndex] := pointer(ColorDialog.Color);
     364    uTMGOptions.WriteInteger('Tab '+IntToStr(selIndex)+' Color',longword(TabColorsList.Objects[selIndex]));
    348365  end;
    349366end;
     
    352369//kt added
    353370begin
    354   uTabColorsEnabled := cbEnableTabColors.Checked;          //elh 01/12/10
     371  TabColorsEnabled := cbEnableTabColors.Checked;          //elh 01/12/10
    355372  frmFrame.tabPage.OwnerDraw := cbEnableTabColors.Checked; //elh 01/12/10
    356   //cboTabColors.Enabled    := uTabColorsEnabled;
    357   //lblEditTabColor.Enabled := uTabColorsEnabled;
    358   //lblTabColors.Enabled    := uTabColorsEnabled;
    359   //pnlShowColor.Enabled    := uTabColorsEnabled;
     373  cboTabColors.Enabled    := TabColorsEnabled;
     374  lblEditTabColor.Enabled := TabColorsEnabled;
     375  lblTabColors.Enabled    := TabColorsEnabled;
     376  pnlShowColor.Enabled    := TabColorsEnabled;
     377  uTMGOptions.WriteBool('TAB_COLORS ENABLE',TabColorsEnabled); //kt 3/8/10
    360378end;
    361379
Note: See TracChangeset for help on using the changeset viewer.