public FormMain() { InitializeComponent(); //CheckForIllegalCrossThreadCalls = false; //----导入插件---- _pluginsImport = new PluginsImport(); _hostService = new HostService(this); Compose(); //----导入插件结束---- //----数据初始化---- InitUi.InitCustomShellType(); InitUi.InitGlobalSetting(); //----数据初始化结束---- //----UI处理---- //tabControl事件绑定 tabControl1.DoubleClick += tabControl1_DoubleClick; //设置版本号 toolStripStatusLabel_productVersion.Text = string.Format("Version:{0}@KeePwn",Application.ProductVersion); //tabControl初始化 TabCore.Init(this, this.tabControl1); //treenode TreeNode treeNodeRoot1; treeNodeRoot1 = InitUi.GetCustomShellTypeTree(); treeNodeRoot1.Name = "ShellType"; treeNodeRoot1.Text = "ShellType"; this.treeView_func.Nodes.AddRange(new TreeNode[] { treeNodeRoot1 }); //plugins LoadPluginsInUi(_pluginsImport.Plugins); //----UI处理结束---- //显示免责声明 InitUi.InitWelcome(); //auto load plugins AutoLoadPlugins(_pluginsImport.Plugins); }
public FormMain() { InitializeComponent(); //线程安全开关,关闭这个就能跨线程访问控件 //CheckForIllegalCrossThreadCalls = false; _pluginsImport = new PluginsImport(); //导入插件 Compose(); //tab事件绑定 tabControl1.DoubleClick += tabControl1_DoubleClick; //设置版本号标签靠右 toolStripStatusLabel_productVersion.Alignment = ToolStripItemAlignment.Right; toolStripStatusLabel_productVersion.Text = string.Format("Version:{0}@KeePwn", Application.ProductVersion); TabCore.Init(this, this.tabControl1); //TabCore.Init(this, this.customTabControl1); TabCore.CreateTabPage_ShellManager(_pluginsImport.Plugins); InitTreeView(); InitUI.InitCustomShellType(); InitUI.InitGlobalSetting(); TreeNode treeNodeRoot1 = new TreeNode("Plugins"); this.treeView_func.Nodes.AddRange(new TreeNode[] { treeNodeRoot1 }); foreach (var plugin in _pluginsImport.Plugins) { //添加tabpage到TabCore中 string title = plugin.PluginAttribute.Title; //TabCore.CreateNewTabPage(name, ucplugin.Content); //添加到Plugins节点中 TreeNode treeNode1 = new TreeNode(title); treeNodeRoot1.Nodes.Add(treeNode1); //添加到Tsmi_Plugins中 ToolStripMenuItem item = new ToolStripMenuItem(); item.Name = title; item.Text = title; item.Checked = true; item.Tag = plugin; item.CheckOnClick = true; item.CheckedChanged += item_CheckedChanged; Tsmi_Plugins.DropDownItems.Add(item); //绑定插件的事件 plugin.HostService.ShowMsgInStatusBar = Host_ShowMsgInStatusBar; plugin.HostService.ShowMsgInAppDialog = Host_ShowMsgInAppDialog; plugin.HostService.CreateNewTabPage = Host_CreateNewTabPage; plugin.HostService.SubmitCommand = SubmitCommand; //ucplugin.Func.OnSubmit += Func_OnSubmit; } //test TreeNode treeNodeRoot2; treeNodeRoot2 = InitUI.GetCustomShellTypeTree(); treeNodeRoot2.Name = "ShellType"; treeNodeRoot2.Text = "ShellType"; this.treeView_func.Nodes.AddRange(new TreeNode[] { treeNodeRoot2 }); }
public FormMain() { InitializeComponent(); //线程安全开关,关闭这个就能跨线程访问控件 //CheckForIllegalCrossThreadCalls = false; _pluginsImport = new PluginsImport(); //导入插件 Compose(); //tab事件绑定 tabControl1.DoubleClick += tabControl1_DoubleClick; //设置版本号标签靠右 toolStripStatusLabel_productVersion.Alignment = ToolStripItemAlignment.Right; toolStripStatusLabel_productVersion.Text = string.Format("Version:{0}@KeePwn",Application.ProductVersion); TabCore.Init(this, this.tabControl1); //TabCore.Init(this, this.customTabControl1); TabCore.CreateTabPage_ShellManager(_pluginsImport.Plugins); InitTreeView(); InitUi.InitCustomShellType(); InitUi.InitGlobalSetting(); TreeNode treeNodeRoot1 = new TreeNode("Plugins"); this.treeView_func.Nodes.AddRange(new TreeNode[] { treeNodeRoot1 }); foreach (var plugin in _pluginsImport.Plugins) { //添加tabpage到TabCore中 string title = plugin.PluginAttribute.Title; //TabCore.CreateNewTabPage(name, ucplugin.Content); //添加到Plugins节点中 TreeNode treeNode1 = new TreeNode(title); treeNodeRoot1.Nodes.Add(treeNode1); //添加到Tsmi_Plugins中 ToolStripMenuItem item = new ToolStripMenuItem(); item.Name = title; item.Text = title; item.Checked = true; item.Tag = plugin; item.CheckOnClick = true; item.CheckedChanged += item_CheckedChanged; Tsmi_Plugins.DropDownItems.Add(item); //绑定插件的事件 plugin.HostService.ShowMsgInStatusBar = Host_ShowMsgInStatusBar; plugin.HostService.ShowMsgInAppDialog = Host_ShowMsgInAppDialog; plugin.HostService.CreateNewTabPage = Host_CreateNewTabPage; plugin.HostService.SubmitCommand = SubmitCommand; //ucplugin.Func.OnSubmit += Func_OnSubmit; } //test TreeNode treeNodeRoot2; treeNodeRoot2 = InitUi.GetCustomShellTypeTree(); treeNodeRoot2.Name = "ShellType"; treeNodeRoot2.Text = "ShellType"; this.treeView_func.Nodes.AddRange(new TreeNode[] { treeNodeRoot2 }); //显示免责声明 InitUi.InitWelcome(); }