| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- unit OptionFormController;
- interface
- uses
- InterfaceAppCentre, Classes, SysUtils, Graphics, ceflib, StrUtils, RealICQButton;
- type
- TOptionFormController = class
- private
- FAppCentre: IAppCentre;
- FAppCentreConfig: IAppCentreConfig;
- constructor Create;
- public
- class function GetController: TOptionFormController;
- procedure ChangeStyle();
- procedure ChangeUIColor(AColor: TColor);
- end;
- implementation
- uses
- MainFrm, AppCentreImport, Dialogs, Controls, LoggerImport, OptionsFrm, ComCtrls;
- var
- controller: TOptionFormController;
- { TOptionFormController }
- procedure TOptionFormController.ChangeStyle;
- var
- I: Integer;
- Item: TListItem;
- begin
- if (FAppCentreConfig = nil) or (not FAppCentreConfig.GetEnable) then
- Exit;
- for I := 0 to OptionsForm.LVOptions.Items.Count - 1 do
- begin
- Item := OptionsForm.LVOptions.Items[I];
- if (Item.Caption = 'ϵͳµÇ½ÉèÖÃ') then
- begin
- OptionsForm.LVOptions.Items.Delete(i);
- Exit;
- end;
- end;
- // if OptionsForm = nil then
- // Exit;
- // OptionsForm.LVOptions.Items.
-
- end;
- procedure TOptionFormController.ChangeUIColor(AColor: TColor);
- begin
- end;
- constructor TOptionFormController.Create;
- begin
- FAppCentreConfig := GetAppCentreConfig;
- inherited Create;
- end;
- class function TOptionFormController.GetController: TOptionFormController;
- begin
- if controller = nil then
- controller := TOptionFormController.Create;
- Result := controller;
- end;
- initialization
- finalization
- if controller <> nil then
- FreeAndNil(controller);
- end.
|