/// <summary> /// Window closing event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public static void OnWindowClosing(object sender, CancelEventArgs e) { MandrillWindow win = (MandrillWindow)sender; MandrillWindowNodeModel model = win.DataContext as MandrillWindowNodeModel; model.isWindowClosed = true; }
private void CreateNewWindow() { if (mandrillNode.isWindowClosed) { var mandrillWindow = new MandrillWindow(); if (mandrillNode.MyHtml == string.Empty || mandrillNode.MyHtml == null) { mandrillNode.MyHtml = defaultHtml; } mandrillWindow.DataContext = mandrillNode; mandrillWindow.Show(); mandrillNode.isWindowClosed = false; } }
private void CreateNewWindow() { if (!_mandrillNode.IsWindowClosed) { return; } var mandrillWindow = new MandrillWindow(); if (string.IsNullOrEmpty(_mandrillNode.MyHtml)) { _mandrillNode.MyHtml = DefaultHtml; } mandrillWindow.DataContext = _mandrillNode; mandrillWindow.Show(); _mandrillNode.IsWindowClosed = false; }