示例#1
0
 public override void ClearMessage()
 {
     Fan.Plugin.Application.IAppFormRef pAppFormRef = _AppHk as Fan.Plugin.Application.IAppFormRef;
     if (pAppFormRef != null)
     {
         pAppFormRef.OperatorTips = string.Empty;
     }
 }
示例#2
0
 public override void OnCreate(Fan.Plugin.Application.IApplicationRef hook)
 {
     if (hook == null)
     {
         return;
     }
     m_Hook = hook as Fan.Plugin.Application.IAppPrivilegesRef;
     _hook  = hook as Fan.Plugin.Application.IAppFormRef;
 }
示例#3
0
        public override void OnCreate(Fan.Plugin.Application.IApplicationRef hook)
        {
            _hook = hook as Fan.Plugin.Application.IAppFormRef;

            if (_hook == null) return;

            //设一下静态变量
            Fan.Common.Authorize.AuthorizeClass.GetConnectInfo(ModData.v_ConfigPath, out SdeConfig.Server, out SdeConfig.Instance, out SdeConfig.Database, out SdeConfig.User, out SdeConfig.Password, out SdeConfig.Version, out SdeConfig.dbType);
            SdeConfig.Server = _hook.TempWksInfo.Server;
            SdeConfig.Instance = _hook.TempWksInfo.Service;
            SdeConfig.Database = _hook.TempWksInfo.DataBase;
            SdeConfig.User = _hook.TempWksInfo.User;
            SdeConfig.Password = _hook.TempWksInfo.PassWord;
            SdeConfig.Version = _hook.TempWksInfo.Version;
            SdeConfig.dbType = _hook.TempWksInfo.DBType;

            //权限控制
            ModData.v_AppPrivileges = new Fan.Plugin.Application.AppPrivileges(_hook.MainForm, _hook.ControlContainer, _hook.ListUserPrivilegeID, _hook.SystemXml, _hook.DataTreeXml, _hook.DatabaseInfoXml, _hook.ColParseFan.Plugin, _hook.ImageResPath, _hook.ConnUser);
            //ModData.v_AppPrivileges = new Fan.Plugin.Application.AppPrivileges(_hook.MainForm, _hook.ControlContainer, _hook.SystemXml, _hook.DataTreeXml, _hook.DatabaseInfoXml, _hook.ColParseFan.Plugin, _hook.ImageResPath, _hook.ConnUser);
            ModData.v_AppPrivileges.TempWksInfo = _hook.TempWksInfo;
            ModData.v_AppPrivileges.CurWksInfo = _hook.CurWksInfo;

            //加载受控制的权限项
            InitMainMenu();

            //配置管理 权限管理界面
            //_ControlSetting = new  SettingControl(this.Name, this.Caption);
            _ControlSetting = new UCRole(this.Name, this.Caption);
            _ControlSetting.Dock = DockStyle.Fill;

            _hook.MainForm.Controls.Add(_ControlSetting);
            _hook.MainForm.Controls.Add(ModData.v_AppPrivileges.StatusBar); ;
            //deleted by chulili 20110722 改为启动于数据源界面
            //_hook.MainForm.Controls.SetChildIndex(_ControlSetting,0);
            //end deleted by chulili
            ModData.v_AppPrivileges.UserInfo = "当前登陆: " + _hook.ConnUser.TrueName;
            _hook.MainForm.FormClosing += new System.Windows.Forms.FormClosingEventHandler(MainForm_FormClosing);
        }