private void image_SZ1_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { Image vImage = (Image)sender; DianYuanMingXi vDianYuanMingXi = new DianYuanMingXi(); vDianYuanMingXi.Owner = Application.Current.MainWindow; vDianYuanMingXi.LuHao = ((int[])vImage.Tag)[1]; if (((int[])vImage.Tag)[0] == 1) { vDianYuanMingXi.DianYuanID = App.PowerID1; } else if (((int[])vImage.Tag)[0] == 2) { vDianYuanMingXi.DianYuanID = App.PowerID2; } vDianYuanMingXi.ShowDialog(); }
private void groupBox_1_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { GroupBox vGroupBox = (GroupBox)sender; DianYuanMingXi vDianYuanMingXi = new DianYuanMingXi(); vDianYuanMingXi.Owner = Application.Current.MainWindow; vDianYuanMingXi.LuHao = ((int[])vGroupBox.Tag)[1]; if (((int[])vGroupBox.Tag)[0] == 1) { vDianYuanMingXi.DianYuanID = App.PowerID1; } else if (((int[])vGroupBox.Tag)[0] == 2) { vDianYuanMingXi.DianYuanID = App.PowerID2; } vDianYuanMingXi.ShowDialog(); //Xceed.Wpf.Toolkit.Xceed.Wpf.Toolkit.MessageBox.Show("OK"); }