public void TwoDialogsOpen_CloseDialog_FirstOpenDialogActive() { var fakeDialog1 = new FakeDialog(); var fakeDialog2 = new FakeDialog(); var dialogHost = new DialogHost(); dialogHost.OpenDialog(fakeDialog1); dialogHost.OpenDialog(fakeDialog2); Assert.Equal(fakeDialog2, dialogHost.ActiveDialog); dialogHost.CloseDialog(); Assert.Equal(fakeDialog1, dialogHost.ActiveDialog); }
public void TwoDialogsOpen_CloseDialogTwice_NoActiveDialog() { var fakeDialog1 = new FakeDialog(); var fakeDialog2 = new FakeDialog(); var dialogHost = new DialogHost(); dialogHost.OpenDialog(fakeDialog1); dialogHost.OpenDialog(fakeDialog2); Assert.Equal(fakeDialog2, dialogHost.ActiveDialog); dialogHost.CloseDialog(); dialogHost.CloseDialog(); Assert.Null(dialogHost.ActiveDialog); }
public void OpenDialog_DialogActive() { var fakeDialog = new FakeDialog(); var dialogHost = new DialogHost(); dialogHost.OpenDialog(fakeDialog); Assert.Equal(fakeDialog, dialogHost.ActiveDialog); }
public void OpenDialog_ActiveDialogHostSetToThis() { var fakeDialog = new FakeDialog(); var dialogHost = new DialogHost(); dialogHost.OpenDialog(fakeDialog); Assert.Equal(dialogHost, fakeDialog.CurrentDialogHost); }
public void DialogOpen_CloseDialog_NoDialogActive() { var fakeDialog = new FakeDialog(); var dialogHost = new DialogHost(); dialogHost.OpenDialog(fakeDialog); Assert.Equal(fakeDialog, dialogHost.ActiveDialog); dialogHost.CloseDialog(); Assert.Null(dialogHost.ActiveDialog); }
/// <summary> /// Opens the dialog with a dialogIdentifier. /// </summary> /// <param name="dialogIdentifier">Dialog identifier object to be used</param> protected void Open(object dialogIdentifier) { DialogHost.OpenDialog(this, dialogIdentifier, DialogOpenedEventHandler); }
/// <summary> /// Opens the dialog. /// </summary> protected void Open() { DialogHost.OpenDialog(this, DialogOpenedEventHandler); }