void btnAddImportFolder_Click(object sender, RoutedEventArgs e) { try { ImportFolderForm frm = new ImportFolderForm(); frm.Owner = GetTopParent(); frm.Init(new SVR_ImportFolder()); bool?result = frm.ShowDialog(); ServerInfo.Instance.RefreshImportFolders(); } catch (Exception ex) { Utils.ShowErrorMessage(ex); } }
void lbImportFolders_MouseDoubleClick(object sender, MouseButtonEventArgs e) { object obj = lbImportFolders.SelectedItem; if (obj == null) { return; } SVR_ImportFolder ns = (SVR_ImportFolder)obj; ImportFolderForm frm = new ImportFolderForm(); frm.Owner = GetTopParent(); frm.Init(ns); bool?result = frm.ShowDialog(); }