unit U_main;
//Download by http://www.okbase.net
interface

uses
  Windows, Messages, SysUtils, Classes, Graphics,
  Controls, Forms, Dialogs, StdCtrls, frxBarcode, frxClass, frxDBSet,
  ImgList, RzCommon, frxDesgn, RzBHints, RzTray, Menus, ExtCtrls, StdActns,
  ActnList, RzStatus, RzPanel, RzButton, mxOutlookBarPro, RzSplit, jpeg,
  RzBckgnd;
type
  Tfrm_main=class(TForm)
    MainMenu1: TMainMenu;
    N5: TMenuItem;
    N7: TMenuItem;
    N8: TMenuItem;
    N10: TMenuItem;
    N14: TMenuItem;
    N3: TMenuItem;
    N19: TMenuItem;
    N20: TMenuItem;
    N27: TMenuItem;
    N28: TMenuItem;
    N13: TMenuItem;
    N36: TMenuItem;
    N37: TMenuItem;
    N1: TMenuItem;
    sysact: TActionList;
    bmyg: TAction;
    jldw: TAction;
    mmsz: TAction;
    ljsz: TAction;
    qxsz: TAction;
    sysinit: TAction;
    relogin: TAction;
    sysclose: TAction;
    about: TAction;
    syslog: TAction;
    N2: TMenuItem;
    N6: TMenuItem;
    N12: TMenuItem;
    zclr: TAction;
    zclb: TAction;
    f1: TMenuItem;
    N15: TMenuItem;
    zgzw: TAction;
    zgzw1: TMenuItem;
    toolbaract: TActionList;
    calc: TAction;
    help: TAction;
    exit: TAction;
    N11: TMenuItem;
    N16: TMenuItem;
    zcly: TAction;
    zczt: TAction;
    bfhf: TAction;
    reg:TAction;
    as1: TMenuItem;
    yzbm: TAction;
    wnl: TAction;
    a2: TMenuItem;
    zcrep: TAction;
    disp_tips: TAction;
    xlsimport: TAction;
    zczj: TAction;
    N18: TMenuItem;
    bz: TAction;
    N21: TMenuItem;
    zcgys: TAction;
    N22: TMenuItem;
    zdzdy: TAction;
    N23: TMenuItem;
    N24: TMenuItem;
    N26: TMenuItem;
    jsfs: TAction;
    N4: TMenuItem;
    zctj: TAction;
    N17: TMenuItem;
    chat: TAction;
    Timer1: TTimer;
    zcpd: TAction;
    N9: TMenuItem;
    traymenu: TpopupMenu;
    N29: TMenuItem;
    N31: TMenuItem;
    SaveDialog1: TSaveDialog;
    RzSizePanel1: TRzSizePanel;
    RzToolbar1: TRzToolbar;
    BtnInternet: TRzToolButton;
    BtnInformation: TRzToolButton;
    BtnFinish: TRzToolButton;
    BtnInsertImage: TRzToolButton;
    BtnExit: TRzToolButton;
    stb: TRzStatusBar;
    Sys_FrameController: TRzFrameController;
    RzStatusPane1: TRzStatusPane;
    tray: TRzTrayIcon;
    RzBalloonHints1: TRzBalloonHints;
    frxDesigner1: TfrxDesigner;
    RzMenuController1: TRzMenuController;
    mainfrxRep: TfrxReport;
    RzClockStatus1: TRzClockStatus;
    loginuser: TRzGlyphStatus;
    RzToolButton1: TRzToolButton;
    RzToolButton2: TRzToolButton;
    lgimagelist: TImageList;
    olb: TMxOutLookBarPro;
    main_frxDB: TfrxDBDataSet;
    frxBarCodeObject1: TFrxBarCodeObject;
    rzbkgpic: TRzBackGround;
    shgl: TAction;
    shgl1: TMenuItem;
    WindowCascade1: TWindowCascade;
    WindowTileHorizontal1: TWindowTileHorizontal;
    WindowTileVertical1: TWindowTileVertical;
    RzToolButton3: TRzToolButton;
    winact: TAction;
    WindowMinimizeAll1: TWindowMinimizeAll;
    WindowArrange1: TWindowArrange;
    dqtx: TAction;
    N25: TMenuItem;
    cfdd: TAction;
    N30: TMenuItem;
    RzResourceStatus1: TRzResourceStatus;
    PopupMenu1: TPopupMenu;
    VistaXPVISTAXPB21: TMenuItem;
    VistaXPVISTAXPS21: TMenuItem;
    WatercolorBLUE1: TMenuItem;
    procedure FormCreate(Sender : TObject);
    procedure FormClose(Sender : TObject);
    procedure bmygExecute(Sender : TObject);
    procedure reloginExecute(Sender : TObject);
    procedure qxszExecute(Sender : TObject);
    procedure gzdjExecute(Sender : TObject);
    procedure mmszExecute(Sender : TObject);
    procedure ljszExecute(Sender : TObject);
    procedure sysinitExecute(Sender : TObject);
    procedure aboutExecute(Sender : TObject);
    procedure syslogExecute(Sender : TObject);
    procedure zclrExecute(Sender : TObject);
    procedure zgzwExecute(Sender : TObject);
    procedure zclbExecute(Sender : TObject);
    procedure calcExecute(Sender : TObject);
    procedure helpExecute(Sender : TObject);
    procedure exitExecute(Sender : TObject);
    procedure zclyExecute(Sender : TObject);
    procedure zcztExecute(Sender : TObject);
    procedure bfhfExecute(Sender : TObject);
    procedure regExecute(Sender : TObject);
    procedure yzbmExecute(Sender : TObject);
    procedure wnlExecute(Sender : TObject);
    procedure zcrepExecute(Sender : TObject);
    procedure disp_tipsExecute(Sender : TObject);
    procedure xlsimportExecute(Sender : TObject);
    procedure zczjExecute(Sender : TObject);
    procedure zcgysExecute(Sender : TObject);
    procedure zdzdyExecute(Sender : TObject);
    procedure FormShow(Sender : TObject);
    procedure jsfsExecute(Sender : TObject);
    procedure zctjExecute(Sender : TObject);
    procedure chatExecute(Sender : TObject);
    procedure zcpdExecute(Sender : TObject);
    procedure N29Click(Sender : TObject);
    procedure trayMinimizeApp(Sender : TObject);
    procedure FormPaint(Sender : TObject);
    procedure zcsgExecute(Sender : TObject);
    procedure shglExecute(Sender : TObject);
    procedure winactExecute(Sender : TObject);
    procedure dqtxExecute(Sender : TObject);
    procedure cfddExecute(Sender : TObject);
    procedure mainfrxRepPrintReport(Sender : TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
    procedure jldwExecute(Sender: TObject);
    procedure VistaXPVISTAXPB21Click(Sender: TObject);
    procedure VistaXPVISTAXPS21Click(Sender: TObject);
    procedure WatercolorBLUE1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end ;

var
  frm_main: Tfrm_main;

implementation

uses DataModuleU, U_zcmain, U_jczlmodal, PasswordFrm, AboutUnit, U_yzbm;

{$R *.DFM}

procedure Tfrm_main.FormCreate(Sender : TObject);
begin
///
end;

procedure Tfrm_main.FormClose(Sender : TObject);
begin
  //
end;

procedure Tfrm_main.bmygExecute(Sender : TObject);
begin
  frm_jczlmodal := Tfrm_jczlmodal.Create(Self);
  try
    frm_jczlmodal.Caption := '基础资料——' + (Sender as TAction).Caption;
    frm_jczlmodal.jczlType := (Sender as TAction).Tag;
    frm_jczlmodal.ShowModal;
  finally
    FreeAndNil(frm_jczlmodal);
  end; 
end;

procedure Tfrm_main.reloginExecute(Sender : TObject);
begin
///
end;

procedure Tfrm_main.qxszExecute(Sender : TObject);
begin
///
end;

procedure Tfrm_main.gzdjExecute(Sender : TObject);
begin
///
end;

procedure Tfrm_main.mmszExecute(Sender : TObject);
begin
  CpassFrm := TCpassFrm.Create(Self);
  try
    CpassFrm.ShowModal;
  finally
    FreeAndNil(CpassFrm);
  end;  
end;

procedure Tfrm_main.ljszExecute(Sender : TObject);
begin
///
end;

procedure Tfrm_main.sysinitExecute(Sender : TObject);
begin
///
end;

procedure Tfrm_main.aboutExecute(Sender : TObject);
begin
  AboutFrm := TAboutFrm.Create(Self);
  try
    AboutFrm.ShowModal;
  finally
    FreeAndNil(AboutFrm);
  end;
end;

procedure Tfrm_main.syslogExecute(Sender : TObject);
begin
///
end;

procedure Tfrm_main.zclrExecute(Sender : TObject);
begin
  if not Assigned(frm_zcmain) then
  frm_zcmain := Tfrm_zcmain.Create(Self);
  frm_zcmain.Show;
end;

procedure Tfrm_main.zgzwExecute(Sender : TObject);
begin
  frm_jczlmodal := Tfrm_jczlmodal.Create(Self);
  try
    frm_jczlmodal.Caption := '基础资料——' + (Sender as TAction).Caption;
    frm_jczlmodal.jczlType := (Sender as TAction).Tag;
    frm_jczlmodal.ShowModal;
  finally
    FreeAndNil(frm_jczlmodal);
  end;
end;

procedure Tfrm_main.zclbExecute(Sender : TObject);
begin
  frm_jczlmodal := Tfrm_jczlmodal.Create(Self);
  try
    frm_jczlmodal.Caption := '基础资料——' + (Sender as TAction).Caption;
    frm_jczlmodal.jczlType := (Sender as TAction).Tag;
  finally
    FreeAndNil(frm_jczlmodal);
  end; 
end;

procedure Tfrm_main.calcExecute(Sender : TObject);
begin
  WinExec(PAnsiChar('calc'),SW_NORMAL);
end;

procedure Tfrm_main.helpExecute(Sender : TObject);
begin
///
end;

procedure Tfrm_main.exitExecute(Sender : TObject);
begin
  close;  
end;

procedure Tfrm_main.zclyExecute(Sender : TObject);
begin
  frm_jczlmodal := Tfrm_jczlmodal.Create(Self);
  try
    frm_jczlmodal.Caption := '基础资料——' + (Sender as TAction).Caption;
    frm_jczlmodal.jczlType := (Sender as TAction).Tag;
    frm_jczlmodal.ShowModal;
  finally
    FreeAndNil(frm_jczlmodal);
  end; 
end;

procedure Tfrm_main.zcztExecute(Sender : TObject);
begin
  frm_jczlmodal := Tfrm_jczlmodal.Create(Self);
  try
    frm_jczlmodal.Caption := '基础资料——' + (Sender as TAction).Caption;
    frm_jczlmodal.jczlType := (Sender as TAction).Tag;
    frm_jczlmodal.ShowModal;
  finally
    FreeAndNil(frm_jczlmodal);
  end; 
end;

procedure Tfrm_main.bfhfExecute(Sender : TObject);
begin
///
end;

procedure Tfrm_main.regExecute(Sender : TObject);
begin
///
end;

procedure Tfrm_main.yzbmExecute(Sender : TObject);
begin
  frm_yzbm := Tfrm_yzbm.Create(Self);
  try
    frm_yzbm.ShowModal;
  finally
    FreeAndNil(frm_yzbm);
  end;
end;

procedure Tfrm_main.wnlExecute(Sender : TObject);
var
  m_path :string;
begin
  m_path := DmFrm.GetPath + 'Calendar.exe';
  WinExec(PAnsiChar(m_path),SW_NORMAL);
end;

procedure Tfrm_main.zcrepExecute(Sender : TObject);
begin
///
end;

procedure Tfrm_main.disp_tipsExecute(Sender : TObject);
begin
  WinExec(PAnsiChar('notepad'),SW_NORMAL);
end;

procedure Tfrm_main.xlsimportExecute(Sender : TObject);
begin
///
end;

procedure Tfrm_main.zczjExecute(Sender : TObject);
begin
///
end;

procedure Tfrm_main.zcgysExecute(Sender : TObject);
begin
  frm_jczlmodal := Tfrm_jczlmodal.Create(Self);
  try
    frm_jczlmodal.Caption := '基础资料——' + (Sender as TAction).Caption;
    frm_jczlmodal.jczlType := (Sender as TAction).Tag;
    frm_jczlmodal.ShowModal;
  finally
    FreeAndNil(frm_jczlmodal);
  end;
end;

procedure Tfrm_main.zdzdyExecute(Sender : TObject);
begin
///
end;

procedure Tfrm_main.FormShow(Sender : TObject);
begin
  loginuser.Caption := DmFrm.LogUser;
  if not DmFrm.b_HighLimit then
  Begin
    zgzw.Visible := False;
    bmyg.Visible := False;
    N6.Visible := False;
    zctj.Visible := False;
    zcpd.Visible := False;
    zczj.Visible := False;
    shgl.Visible := False;
    N15.Visible := False;
    xlsimport.Visible := False;
    zcrep.Visible := False;
    dqtx.Visible := False;
    qxsz.Visible := False;
    sysinit.Visible := False;
    bfhf.Visible := False;
    syslog.Visible := False;
    N27.Visible := False;
  end;
  if zclr.Visible then
  zclrExecute(zclr);
end;

procedure Tfrm_main.jsfsExecute(Sender : TObject);
begin
  frm_jczlmodal := Tfrm_jczlmodal.Create(Self);
  try
    frm_jczlmodal.Caption := '基础资料——' + (Sender as TAction).Caption;
    frm_jczlmodal.jczlType := (Sender as TAction).Tag;
    frm_jczlmodal.ShowModal;
  finally
    FreeAndNil(frm_jczlmodal);
  end; 
end;

procedure Tfrm_main.zctjExecute(Sender : TObject);
begin
///
end;

procedure Tfrm_main.chatExecute(Sender : TObject);
begin
  PopupMenu1.Popup(Mouse.CursorPos.X,Mouse.CursorPos.Y);
end;

procedure Tfrm_main.zcpdExecute(Sender : TObject);
begin
///
end;

procedure Tfrm_main.N29Click(Sender : TObject);
begin
///
end;

procedure Tfrm_main.trayMinimizeApp(Sender : TObject);
var
  m_hint :string;
begin
  m_hint := '系统最小化至托盘区,程序在后台运行……'#13
    + '双击图标还原系统窗口,右键点击显示菜单……';
  tray.ShowBalloonHint(Application.Title,m_hint);
end;

procedure Tfrm_main.FormPaint(Sender : TObject);
begin
///
end;

procedure Tfrm_main.zcsgExecute(Sender : TObject);
begin
///
end;

procedure Tfrm_main.shglExecute(Sender : TObject);
begin
///
end;

procedure Tfrm_main.winactExecute(Sender : TObject);
begin
///
end;

procedure Tfrm_main.dqtxExecute(Sender : TObject);
begin
///
end;

procedure Tfrm_main.cfddExecute(Sender : TObject);
begin
  frm_jczlmodal := Tfrm_jczlmodal.Create(Self);
  try
    frm_jczlmodal.Caption := '基础资料——' + (Sender as TAction).Caption;
    frm_jczlmodal.jczlType := (Sender as TAction).Tag;
    frm_jczlmodal.ShowModal;
  finally

    FreeAndNil(frm_jczlmodal);
  end; 
end;

procedure Tfrm_main.mainfrxRepPrintReport(Sender : TObject);
begin
///
end;

procedure Tfrm_main.Timer1Timer(Sender: TObject);
begin
///
end;

procedure Tfrm_main.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
  if MessageBox(Handle, '您确实要退出系统吗?', '提示', MB_YESNO + MB_ICONINFORMATION) = IDYES then
  begin
    CanClose := True;
  end
  else
  begin
    CanClose := False;
  end;
end;

procedure Tfrm_main.jldwExecute(Sender: TObject);
begin
  frm_jczlmodal := Tfrm_jczlmodal.Create(Self);
  try
    frm_jczlmodal.Caption := '基础资料——' + (Sender as TAction).Caption;
    frm_jczlmodal.jczlType := (Sender as TAction).Tag;
    frm_jczlmodal.ShowModal;
  finally
    FreeAndNil(frm_jczlmodal);
  end;  
end;

procedure Tfrm_main.VistaXPVISTAXPB21Click(Sender: TObject);
begin
  DmFrm.SkinData1.LoadFromCollection(DmFrm.SkinStore1,(Sender as TMenuItem).Tag);
end;

procedure Tfrm_main.VistaXPVISTAXPS21Click(Sender: TObject);
begin
  DmFrm.SkinData1.LoadFromCollection(DmFrm.SkinStore1,(Sender as TMenuItem).Tag);
end;

procedure Tfrm_main.WatercolorBLUE1Click(Sender: TObject);
begin
  DmFrm.SkinData1.LoadFromCollection(DmFrm.SkinStore1,(Sender as TMenuItem).Tag);
end;

end.