Exemple #1
0
        private void UpdateDataGUIThread(object data)
        {
            var dataRcv = (CAuthResponse)data;

            //_authWin.AuthForm.LabelStatus.Content = dataRcv.ErrorMessage;
            if (dataRcv.IsSuccess)
            {
                _authWin.AuthForm.LabelStatus.Foreground = Brushes.LimeGreen;
                _authWin.AuthForm.LabelStatus.FontWeight = FontWeights.DemiBold;
                _authWin.AuthForm.LabelStatus.Content    = "Подключено";

                _authWin.AuthForm.ButtonConnect.IsEnabled = false;
                _authorised = true;
                _authWin.Close();
            }
            else
            {
                _authWin.AuthForm.LabelStatus.Content = dataRcv.ErrorMessage;

                _authWin.AuthForm.LabelStatus.Foreground  = Brushes.Red;
                _authWin.AuthForm.LabelStatus.FontWeight  = FontWeights.Normal;
                _authWin.AuthForm.ButtonConnect.IsEnabled = true;
            }
        }
Exemple #2
0
 private void Close_Window(object sender, RoutedEventArgs e)
 {
     mainwin.Effect = null;
     AuthWindow.Close();
 }