private void NewMenuItem_Click(object sender, RoutedEventArgs e) { NewEntryBox newWindow = new NewEntryBox(this.cMgr); newWindow.OnDatasourceUpdate += new EventHandler <StatusEventArg>(this.UpdateDatasourceFromChild); newWindow.Show(); }
private void EditMenuItem_Click(object sender, RoutedEventArgs e) { MenuItem item = sender as MenuItem; string param = item.CommandParameter.ToString(); CredItem cItem = cMgr.CredItems.Where(i => i.Name == param).FirstOrDefault(); NewEntryBox eWindow = new NewEntryBox(this.cMgr, cItem); eWindow.OnDatasourceUpdate += new EventHandler <StatusEventArg>(this.UpdateDatasourceFromChild); eWindow.Show(); }
private void NewMenuItem_Click(object sender, RoutedEventArgs e) { if (cMgr.IsAuthenticated) { NewEntryBox newEntry = new NewEntryBox(this.cMgr); newEntry.OnDatasourceUpdate += new EventHandler <StatusEventArg>(this.OnDatasourceUpdating); newEntry.Show(); } else { MessageBox.Show("ERROR: Please log in first", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } }