コード例 #1
0
ファイル: SysBloc.cs プロジェクト: cafenombre/RainAutomat
        public SysBloc(SysActions action)
        {
            switch (action)
            {
            case SysActions.SHUT:
                this.sysActionString = "%systemroot%/system32/shutdown.exe -s -t 00";
                this.imglink         = "Images/shut.png";
                this.name            = "SHUT";
                break;

            case SysActions.BIN:
                this.sysActionString = "[shell:::{645FF040-5081-101B-9F08-00AA002F954E}]#UnloadSkin#";
                this.imglink         = "Images/bin.png";
                this.name            = "BIN";
                break;

            case SysActions.THIS_PC:
                this.sysActionString = "[shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}]#UnloadSkin#";
                this.imglink         = "Images/this_pc.png";
                this.name            = "THIS_PC";
                break;

            case SysActions.TASK:
                this.sysActionString = "[taskmgr.exe]#UnloadSkin#";
                this.imglink         = "Images/task.png";
                this.name            = "TASK";
                break;

            default:
                throw new Exception("Cannot use this sysaction type here, use another contruction Sysbloc(action = OTHER, actionString, imgLink, name); ");
            }

            this.width  = defaultSysIconWidth;
            this.height = defaultSysIconHeight;
        }
コード例 #2
0
ファイル: SysBloc.cs プロジェクト: cafenombre/RainAutomat
 public SysBloc(SysActions action, string actionString, string imgLink, string name)
 {
     if (action == SysActions.OTHER)
     {
         this.sysActionString = actionString;
         this.imglink         = imglink;
         this.width           = defaultSysIconWidth;
         this.height          = defaultSysIconHeight;
         this.name            = name;
     }
     else
     {
         throw new Exception("For a predefined Action use the other constructor SysBloc(action)");
     }
 }
コード例 #3
0
ファイル: SysLog.cs プロジェクト: jim-deng-git/Ask
        public static void SaveLog(SysActions _Actions, SysMgrNo?_MgrNo, string _ReMark, long?_SiteID = null, long?_MenuID = null, long?_SourceID = null)
        {
            SysLogModels data = new SysLogModels();

            data.Actions = (byte)_Actions;
            if (_MgrNo != null)
            {
                data.MgrNo = (byte)_MgrNo;
            }

            data.ReMark   = _ReMark;
            data.SiteID   = _SiteID;
            data.MenuID   = _MenuID;
            data.SourceID = _SourceID;
            SysLogDAO.SaveInfo(data);
        }