private void BackToMain() { ConnectionManager.GetEnginePipe().sendEngineMove("CANCELRUN"); string ans = ConnectionManager.GetEnginePipe().getEngineMessage(); if (ans == "ACCEPTED") { ConnectionManager.GetEnginePipe().close(); ConnectionManager.GetUIenginePipe().close(); } else { //Pop up message and exit } MainShellView MV = _MainWindow as MainShellView; MV.LoadAgain(); this.Close(); MV.Show(); }
private void backFromLoading_Click(object sender, EventArgs e) { //this.Hide(); var DC = this.DataContext as LoadingWindowViewModel; ConnectionManager.GetEnginePipe().sendEngineMove("CANCELRUN"); string s = ConnectionManager.GetEnginePipe().getEngineMessage(); if (s == "ACCEPTED") { ConnectionManager.GetEnginePipe().close(); ConnectionManager.GetUIenginePipe().close(); } else { //TODO add popup window } MainShellView MV = _previousWindow as MainShellView; MV.LoadAgain(); this.Close(); MV.Show(); // MV.LoadAgain(); }