示例#1
0
        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
 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
        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);
        }