protected override void OnClick() { base.OnClick(); switch (_group) { case "Google": GoogleSignIn gSignIn = new GoogleSignIn(true); gSignIn.Owner = Window.GetWindow(this); gSignIn.Email = _email; gSignIn.EmailReadOnly = true; gSignIn.ShowDialog(); break; default: break; } //AccountEdit edit = new AccountEdit(title.Text, detail.Text); //edit.Owner = Window.GetWindow(this); //if (edit.ShowDialog() == true) //{ // if (edit.Deleted) // { // (Parent as Panel).Children.Remove(this); // SyncDatabase.Delete(detail.Text); // } //} }
private void AddGoogleService() { GoogleSignIn gSignIn = new GoogleSignIn(); gSignIn.Owner = Window.GetWindow(this); if (gSignIn.ShowDialog() == true) { AccountDisplay display = new AccountDisplay(new BitmapImage(new Uri("pack://application:,,,/Daytimer.Images;component/Images/google.png", UriKind.Absolute)), "Google", gSignIn.Email); servicesPanel.Children.Add(display); if (SyncDatabase.GetSyncObject(gSignIn.Email) == null) { SyncDatabase.Add(new SyncObject(gSignIn.Email, DateTime.Now, SyncType.EntireAccount)); } } }