public void CreateCustomPanel() { myUserControl1 = new CustomPanel(); addTask = new AddTaskPanel(); myCustomTaskPaneCollection = Globals.Factory.CreateCustomTaskPaneCollection (null, null, "CustomTaskPanes", "CustomTaskPanes", this); myCustomTaskPane = myCustomTaskPaneCollection.Add(myUserControl1, "插件面板"); myCustomTaskPane.Visible = true; }