private void btnDelete_Click(object sender, RoutedEventArgs e) { GetNeedControl(sender); if (mw.hintModelDictionary.ContainsKey(2)) { if (mw.hintModelDictionary[2].IsHint == false) { DeleteFile(sender, e); return; } } HintDialog hintDialog = new HintDialog("删除文件", "您确定要删除文件?", delegate(System.Object _o, RoutedEventArgs _e) { DeleteFile(_o, _e); mw.RemoveDialog(); }, delegate(System.Object _o, RoutedEventArgs _e) { mw.RemoveDialog(); }, delegate(System.Object _o, RoutedEventArgs _e) { mw.NotHint(2); }); mw.ShowMakerDialog(hintDialog); }
private void btnOk_Click(object sender, RoutedEventArgs e) { if (lbMain.SelectedIndex == -1) { return; } FileInfo fileInfo = new FileInfo(fileName); if (lbMain.SelectedItem.ToString().Equals("Main")) { if (finishEvent == null) { suc.NewFromImport(fileInfo.Name, ""); } else { finishEvent(fileInfo.Name, ""); } } else { if (finishEvent == null) { suc.NewFromImport(fileInfo.Name, lbMain.SelectedItem.ToString()); } else { finishEvent(fileInfo.Name, lbMain.SelectedItem.ToString()); } } mw.RemoveDialog(); }
private void btnOk_Click(object sender, RoutedEventArgs e) { if (tbName.Text.Equals(String.Empty) || tbDll.Text.Equals(String.Empty)) { return; } if (!File.Exists(fatherPath + tbDll.Text)) { return; } shortcut.text = tbName.Text; shortcut.dll = tbDll.Text; myBlogDialog.UpdateData(); mw.RemoveDialog(); }
private void btnOk_Click(object sender, RoutedEventArgs e) { if (mw != null) { mw.RemoveDialog(); } if (mw2 != null) { mw2.RemoveDialog(); } }
private void ChangeLanguage(object sender, RoutedEventArgs e) { if (mw.hintModelDictionary.ContainsKey(0)) { if (mw.hintModelDictionary[0].IsHint == false) { ChangeLanguage(); return; } } HintDialog hintDialog = new HintDialog("更改语言", "您是否要更改语言?", delegate(System.Object _o, RoutedEventArgs _e) { ChangeLanguage(); foo(); // .net 4.5 async void foo() { await Task.Delay(50); //mw.projectUserControl.SetSpFilePosition(mw.projectUserControl.filePosition); } mw.RemoveDialog(); }, delegate(System.Object _o, RoutedEventArgs _e) { mw.RemoveDialog(); }, delegate(System.Object _o, RoutedEventArgs _e) { mw.NotHint(0); } ); mw.ShowMakerDialog(hintDialog); }
private void btnReplace_Click(object sender, RoutedEventArgs e) { //覆盖View和DLL文件 FileInfo fileInfo = new FileInfo(setupFilePath); File.Copy(fileInfo.Directory + @"\" + thirdPartySetupModel.View + ".xml", AppDomain.CurrentDomain.BaseDirectory + @"Operation\View\" + thirdPartySetupModel.View + ".xml", true); File.Copy(fileInfo.Directory + @"\" + thirdPartySetupModel.Dll + ".dll", AppDomain.CurrentDomain.BaseDirectory + @"Operation\Dll\" + thirdPartySetupModel.Dll + ".dll", true); //安装插件 mw.projectUserControl.suc.SetupEditPlugIn(thirdPartySetupModel); mw.RemoveDialog(); mw.RemoveDialog(); }
private void Image_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { mw.RemoveDialog(); }
private void btnCancel_Click(object sender, RoutedEventArgs e) { window.RemoveDialog(); }
private void RemoveDialog(object sender, RoutedEventArgs e) { mw.RemoveDialog(); }
private void Border_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { mw.RemoveDialog(); }