Ejemplo n.º 1
0
        public FormEditWebshell(IHost host, Shell shellArray)
        {
            InitializeComponent();

            this._host           = host;
            _shellManagerService = new ShellManagerService(_host);


            //init
            ComboBox_ScriptType_Init();

            this.button_Add.Enabled   = false;
            this.button_Alter.Enabled = true;

            this.Id = shellArray.Id;
            this.textBox_TargetID.Text     = shellArray.TargetId;
            this.comboBox_TargetLevel.Text = shellArray.TargetLevel;

            this.textBox_ShellPath.Text = shellArray.ShellUrl;
            this.textBox_ShellPass.Text = shellArray.ShellPwd;

            this.richTextBox_Setting.Text = shellArray.ShellExtraString;

            this.textBox_Remark.Text = shellArray.Remark;

            this.comboBox_ScritpType.Text   = shellArray.ShellType;
            this.comboBox_ServerCoding.Text = shellArray.ServerCoding;
            this.comboBox_WebCoding.Text    = shellArray.WebCoding;
            this.comboBox_Area.Text         = shellArray.Area;

            comboBox_IniType_Init();
        }
Ejemplo n.º 2
0
        public FormEditWebshell(IHost host)
        {
            InitializeComponent();

            this._host           = host;
            _shellManagerService = new ShellManagerService(_host);

            //init
            ComboBox_ScriptType_Init();

            this.button_Add.Enabled   = true;
            this.button_Alter.Enabled = false;

            comboBox_IniType_Init();
        }
Ejemplo n.º 3
0
        public ShellManagerControl(IHost host, Shell data)
        {
            InitializeComponent();
            this.Dock = System.Windows.Forms.DockStyle.Fill;

            //创建listview
            //CreateListView();

            this._host      = host;
            this._shellData = data;

            //注册事件
            _shellManagerService = new ShellManagerService(_host);
            _shellManagerService.GetDataTableCompletedToDo += ShellManagerServiceGetDataTableCompletedToDo;
            _shellManagerService.DeleteCompletedToDo       += ShellManagerServiceDeleteCompletedToDo;
            _shellManagerService.InsertCompletedToDo       += ShellManagerServiceInsertCompletedToDo;
            _shellManagerService.UpdateCompletedToDo       += ShellManagerServiceUpdateCompletedToDo;

            //载入shell数据
            LoadWebshellData();

            //添加插件到右键菜单
            foreach (var plugin in host.Core.GetPlugins())
            {
                //IsShowInRightContext
                if (plugin.PluginSetting.LoadPath == "webshell" && plugin.PluginSetting.IsShowInRightContext)
                {
                    string title = plugin.PluginInfo.Name;

                    //添加到Tsmi_Plugins中
                    ToolStripMenuItem pluginItem = new ToolStripMenuItem();
                    pluginItem.Name   = title;
                    pluginItem.Text   = title;
                    pluginItem.Click += pluginItem_Click;
                    pluginItem.Tag    = plugin;
                    rightMenu_Webshell.Items.Add(pluginItem);
                }
            }
        }