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