Ignore:
Timestamp:
Sep 11, 2008, 7:23:35 PM (16 years ago)
Author:
Kevin Toppenberg
Message:

Adding skin support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/branches/tmg-cprs/CPRS-Chart/fFrame.pas

    r487 r489  
    373373    EnduringPtSelSplitterPos: integer;
    374374    SkinAtStartup : boolean; //kt 9/8/08
     375    SkinChanged : boolean;  //kt 9/8/08
    375376    CurrentSkinFile : string; //kt 9/8/08
    376     {$IFDEF USE_SKINS}
    377     SkinManager : TipSkinManager;
    378     {$ENDIF}
    379377    procedure ActivateCurrentSkin; //kt 9/8/08
    380378    procedure InactivateSkin; //kt 9/8/08
     
    415413  uToolsMaxed, uToolsWarned: boolean;
    416414  boolTMGPatchInstalled: boolean;     //elh   6/20/08
     415  {$IFDEF USE_SKINS}
     416  SkinManager : TipSkinManager;
     417  {$ENDIF}
    417418
    418419const
     
    572573  AnAddr: Pointer;
    573574  ErrMsg: string;
     575  temp : integer;
    574576begin
    575577  Application.NormalizeTopMosts;
     
    600602    FCreateProgress := FCP_FORMS;
    601603    Close;
     604  end
     605  else if E.Message = 'Cannot focus a disabled or invisible window' then begin
     606    i := 1; // do nothing
    602607  end
    603608  else Application.ShowException(E);
     
    827832  SkinManager := TipSkinManager.Create(self);
    828833  {$ENDIF}
     834  SkinChanged := false;
    829835  SkinAtStartup := CPRSChartINI.ReadBool('Skin','Load At Startup',false);
    830836  CurrentSkinFile := CPRSChartINI.ReadString('Skin','Default Skin','TMG_Extra\Skins\ICQ_Longhorn_v.1.2.ipz');
     
    10051011begin
    10061012  {$IFDEF USE_SKINS}
     1013  if SkinChanged = true then begin
     1014    MessageDlg('For now, skins may be changed only ONCE'+#10+#13+
     1015               'before restarting CPRS.  Thank you.',mtInformation,[mbOK],0);
     1016    exit;           
     1017  end;
     1018  SkinChanged := true;
    10071019  SkinManager.SkinFile := ExtractFilePath (Application.ExeName) + CurrentSkinFile;
    10081020  if FileExists(SkinManager.SkinFile)=false then begin
     
    12201232  uTabColorsList.Free;
    12211233  CPRSChartINI.WriteInteger('TAB_POSITION','Tab Location',integer(tabPage.TabPosition));
     1234  CPRSChartINI.WriteBool('Skin','Load At Startup',SkinAtStartup);  //kt 9/11/08
    12221235  //kt --- end mod ---
    12231236
     
    50685081  end;
    50695082
    5070 
    5071 
    5072 
    5073 initialization
     5083  initialization
    50745084
    50755085finalization
Note: See TracChangeset for help on using the changeset viewer.