Ejemplo n.º 1
0
        private void AboutWindow_Load(object sender, EventArgs e)
        {
            _ = ButtonClose.Focus();

            _ = HideCaret(RichTextBoxCredits.Handle);
            _ = HideCaret(RichTextBoxThanks.Handle);
            _ = HideCaret(RichTextBoxLicence.Handle);
        }
Ejemplo n.º 2
0
 private void ShowUserInfo_Shown(object sender, EventArgs e)
 {
     DescriptionBrowser.DocumentText = descriptionTxt;
     DescriptionBrowser.Visible      = true;
     if (_info.RecentPost != null)
     {
         RecentPostBrowser.DocumentText = recentPostTxt;
         RecentPostBrowser.Visible      = true;
     }
     else
     {
         LabelRecentPost.Text = Properties.Resources.ShowUserInfo2;
     }
     ButtonClose.Focus();
 }
Ejemplo n.º 3
0
 private void ShowUserInfo_Shown(object sender, EventArgs e)
 {
     ButtonClose.Focus();
 }
Ejemplo n.º 4
0
 private void AboutWindow_Load(object sender, EventArgs e)
 {
     ButtonClose.Focus();
 }
Ejemplo n.º 5
0
        internal async void OnEnded()
        {
            ended = true;
            timer1000.Stop();
            timer200.Stop();

            if (ownerClosing)
            {
                return;
            }

            TaskbarHelper.Remove(ProgressBarTotal);

            if (closing)
            {
                return;
            }

            if (client.IsChild)
            {
                await client.DisconnectAsync(false, false);
            }

            if (client.TransferEvent.Items.Length == 0)
            {
                if (client.TransferEvent.IsUpload)
                {
                    AppMessage.Add("Nothing to upload.", MessageType.Warning);
                }
                else
                {
                    AppMessage.Add("Nothing to download.", MessageType.Warning);
                }
                this.Close();
                return;
            }

            ButtonCancel.IsEnabled  = false;
            ButtonCancel.Visibility = Visibility.Collapsed;
            ButtonSkip.Visibility   = Visibility.Hidden;
            ButtonPause.Visibility  = Visibility.Hidden;

            if (client.TransferEvent.HasErrors)
            {
                MiniProgressBar.SetStateColor(ProgressBarExtension.ProgressState.Error);
            }
            else
            {
                MiniProgressBar.SetStateColor(ProgressBarExtension.ProgressState.Indeterminate);
            }

            switch (fishedAction)
            {
            case FishedAction.CloseWindow:
                if (!this.IsActive && !ClientHelper.Owner.IsActive)
                {
                    ClientHelper.Owner.FlashWindow(3);
                }
                this.Close();
                return;

            case FishedAction.CloseApp:
                AutoShutdownWindow.Initialize(this, false);
                this.Close();
                return;

            case FishedAction.Shutdown:
                AutoShutdownWindow.Initialize(this, true);
                this.Close();
                return;
            }

            updateCurrentItem();
            UpdateProgress();
            updateTotalFF();

            LabelCurrentRemainsX.Visibility = Visibility.Collapsed;
            LabelTotalRemainsX.Visibility   = Visibility.Collapsed;
            LabelETA.Visibility             = Visibility.Collapsed;

            if (client.TransferEvent.IsUpload)
            {
                this.Title = client.TransferEvent.HasErrors ? AppLanguage.Get("LangTitleUploadFinishedErrors") : AppLanguage.Get("LangTitleUploadDone");
            }
            else
            {
                this.Title = client.TransferEvent.HasErrors ? AppLanguage.Get("LangTitleDownloadFinishedErrors") : AppLanguage.Get("LangTitleDownloadDone");
                ButtonOpenTarget.Visibility = Visibility.Visible;
            }

            ButtonClose.Visibility = Visibility.Visible;
            ButtonClose.IsDefault  = true;
            ButtonClose.IsCancel   = true;
            ButtonClose.Focus();
        }