private void img_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { this.Visibility = Visibility.Collapsed; cc = new Canvas4All(); if (cc.ShowDialog() != null) { this.Visibility = Visibility.Visible; } }
private void Button_Click(object sender, RoutedEventArgs e) { this.Visibility = Visibility.Collapsed; cc = new Canvas4All(); if (cc.ShowDialog() != null) { this.Visibility = Visibility.Visible; } }
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)); } }