private void Button_Click(object sender, RoutedEventArgs e) { if (CTS != null) { CTS.Cancel(); CloseWindow.Invoke(this, new EventArgs()); } }
private void OnLogin() { Trace.WriteLine("Logging in"); // do your login stuff // If Login OK continue here NewWindow.Invoke(_container.Resolve <MainWindow>()); CloseWindow.Invoke(); }
public void ReportProgress(double value) { PB.Value = value; if (value == 100) { CloseWindow.Invoke(this, new EventArgs()); } }
private void AddRepository() { if (_repositoryList.Repositories.Any(item => item.RepositoryPath == FolderPath)) { return; } RepositoryType repositoryType = RepositoryType.Unknown; bool parseSuccess = Enum.TryParse(SelectedRepository, true, out repositoryType); if (!parseSuccess) { return; } var repository = _repositoryFactory.Create(repositoryType, FolderPath); _repositoryList.Add(repository); CloseWindow.Invoke(this, null); }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { CloseWindow.Invoke("doctor", _doctorid); _mainWindow.Show(); }
/// <summary> Инвокатор события закрытия окна </summary> private void OnCloseWindow() { CloseWindow?.Invoke(this, EventArgs.Empty); }
public void Close() { _canClose = true; CloseWindow.Invoke(); }
private void BtnClose_Click(object sender, RoutedEventArgs e) { CloseWindow?.Invoke(); }