示例#1
0
 public void OnDownloadProgress(int val, AppStatus status)
 {
     if (status.downloadingUnity)
     {
         unityProgressBarFore.Size = new Size(val * 2, unityProgressBarFore.Size.Height);
     }
     if (status.downloadingFlash)
     {
         flashProgressBarFore.Size = new Size(val * 2, 40);
     }
 }
示例#2
0
        public void SetAppStatus(AppStatus status)
        {
            int    num     = isArgsNull ? 630 : 490;
            int    num2    = isArgsNull ? 600 : 460;
            Bitmap bitmap  = isArgsNull ? HabboLauncher.Properties.Resources.bg_box_630b : HabboLauncher.Properties.Resources.bg_box_launcher_window_490;
            Bitmap bitmap2 = isArgsNull ? HabboLauncher.Properties.Resources.bg_box_600 : HabboLauncher.Properties.Resources.bg_box_launcher_window;

            if (status.downloadingFlash || status.downloadingUnity)
            {
                ModernButton.Anchor      = AnchorStyles.Top;
                ClassicButton.Anchor     = AnchorStyles.Top;
                chooseAppLabel.Anchor    = AnchorStyles.Top;
                flashDownloadIcon.Anchor = AnchorStyles.Top;
                unityDownloadIcon.Anchor = AnchorStyles.Top;
            }
            flashDownloadIcon.Visible    = !status.isFlashReady;
            flashProgressBarBG.Visible   = !status.isFlashReady;
            flashProgressBarFore.Visible = !status.isFlashReady;
            flashProgressBarBG.Visible   = status.downloadingFlash;
            flashProgressBarFore.Visible = status.downloadingFlash;
            ClassicButton.Text           = (status.downloadingFlash ? "Updating..." : "Classic");
            flashProgressBarFore.BringToFront();
            unityDownloadIcon.Visible    = !status.isUnityReady;
            unityProgressBarBG.Visible   = !status.isUnityReady;
            unityProgressBarFore.Visible = !status.isUnityReady;
            unityProgressBarFore.BringToFront();
            unityProgressBarBG.Visible   = status.downloadingUnity;
            unityProgressBarFore.Visible = status.downloadingUnity;
            ModernButton.Text            = (status.downloadingUnity ? "Updating..." : "Modern");
            base.Size       = new Size(600, (status.downloadingFlash || status.downloadingUnity) ? num : num2);
            BackgroundImage = ((status.downloadingFlash || status.downloadingUnity) ? bitmap : bitmap2);
            if (!status.downloadingFlash && !status.downloadingUnity)
            {
                ModernButton.Anchor      = AnchorStyles.Bottom;
                ClassicButton.Anchor     = AnchorStyles.Bottom;
                chooseAppLabel.Anchor    = AnchorStyles.Bottom;
                flashDownloadIcon.Anchor = AnchorStyles.Bottom;
                unityDownloadIcon.Anchor = AnchorStyles.Bottom;
            }
        }