public FormEditWebshell(ShellStruct shellStructArray) { InitializeComponent(); ComboBox_ScriptType_Init(); _shellManager = new ShellManager(); this.button_Add.Enabled = false; this.button_Alter.Enabled = true; this.Id = shellStructArray.Id; this.textBox_TargetID.Text = shellStructArray.TargetId; this.comboBox_TargetLevel.Text = shellStructArray.TargetLevel; this.textBox_ShellPath.Text = shellStructArray.ShellUrl; this.textBox_ShellPass.Text = shellStructArray.ShellPwd; this.richTextBox_Setting.Text = shellStructArray.ShellExtraSetting; this.textBox_Remark.Text = shellStructArray.Remark; this.comboBox_ScritpType.Text = shellStructArray.ShellType; this.comboBox_ServerCoding.Text = shellStructArray.ServerCoding; this.comboBox_WebCoding.Text = shellStructArray.WebCoding; this.comboBox_Area.Text = shellStructArray.Area; comboBox_IniType_Init(); }
public ControlShellManager(IEnumerable<IPlugin> plugins) { InitializeComponent(); this.Dock = System.Windows.Forms.DockStyle.Fill; //创建listview //CreateListView(); _shellManager = new ShellManager(); _shellManager.GetDataTableCompletedToDo += _shellManager_GetDataTableCompletedToDo; _shellManager.DeleteCompletedToDo += _shellManager_DeleteCompletedToDo; _shellManager.InsertCompletedToDo += _shellManager_InsertCompletedToDo; _shellManager.UpdateCompletedToDo += _shellManager_UpdateCompletedToDo; //载入shell数据 LoadWebshellData(); //添加插件到右键菜单 foreach (var plugin in plugins) { string title = plugin.PluginAttribute.Title; //添加到Tsmi_Plugins中 ToolStripMenuItem pluginItem = new ToolStripMenuItem(); pluginItem.Name = title; pluginItem.Text = title; pluginItem.Click += pluginItem_Click; pluginItem.Tag = plugin; rightMenu_Webshell.Items.Add(pluginItem); } }
public FormEditWebshell() { InitializeComponent(); ComboBox_ScriptType_Init(); _shellManager = new ShellManager(); this.button_Add.Enabled = true; this.button_Alter.Enabled = false; comboBox_IniType_Init(); }
private void _shellManager_UpdateCompletedToDo(object sender, ShellManager.CompletedEventArgs e) { if (e.Error != null) { MessageBox.Show(e.Error.Message); } }