Example #1
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (CTS != null)
     {
         CTS.Cancel();
         CloseWindow.Invoke(this, new EventArgs());
     }
 }
Example #2
0
 private void OnLogin()
 {
     Trace.WriteLine("Logging in");
     // do your login stuff
     // If Login OK continue here
     NewWindow.Invoke(_container.Resolve <MainWindow>());
     CloseWindow.Invoke();
 }
Example #3
0
 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();
 }
Example #6
0
 /// <summary> Инвокатор события закрытия окна </summary>
 private void OnCloseWindow()
 {
     CloseWindow?.Invoke(this, EventArgs.Empty);
 }
 public void Close()
 {
     _canClose = true;
     CloseWindow.Invoke();
 }
Example #8
0
 private void BtnClose_Click(object sender, RoutedEventArgs e)
 {
     CloseWindow?.Invoke();
 }