public void Init() { mainWindow = new Canvas4All(); mainWindow.Show(); Button btn = new Button(); btn.Content = "畅想器"; btn.PreviewMouseLeftButtonDown += btn_MouseLeftButtonDown; btn.Loaded += btn_Loaded; //btn.MouseLeftButtonDown += btn_MouseLeftButtonDown; API.AddUserWindowChild("通信类", btn); }
void btn_PreviewMouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { Canvas4All mainWindow = new Canvas4All(); mainWindow.Show(); var func = runhandle; if (func != null) { func(this, new PluginRunEvent.PluginRunEventArgs(this)); } }
public void RunPlugin() { mainWindow.Show(); }