예제 #1
0
        //this is a popup so it behaves like other splashes on Windows, i.e. doesn't show up as a second window in the taskbar.
        public SplashScreenForm() : base(Gtk.WindowType.Popup)
        {
            AppPaintable         = true;
            this.Decorated       = false;
            this.WindowPosition  = WindowPosition.Center;
            this.TypeHint        = Gdk.WindowTypeHint.Splashscreen;
            this.showVersionInfo = BrandingService.GetBool("SplashScreen", "ShowVersionInfo") ?? true;
            try {
                using (var stream = BrandingService.GetStream("SplashScreen.png", true))
                    bitmap = new Gdk.Pixbuf(stream);
            } catch (Exception e) {
                LoggingService.LogError("Can't load splash screen pixbuf 'SplashScreen.png'.", e);
            }
            progress               = new ProgressBar();
            progress.Fraction      = 0.00;
            progress.HeightRequest = 6;

            vbox             = new VBox();
            vbox.BorderWidth = 12;
            label            = new Gtk.Label();
            label.UseMarkup  = true;
            label.Xalign     = 0;
            vbox.PackEnd(progress, false, true, 0);
            vbox.PackEnd(label, false, true, 3);
            this.Add(vbox);
            if (bitmap != null)
            {
                this.Resize(bitmap.Width, bitmap.Height);
            }
        }
예제 #2
0
 //this is a popup so it behaves like other splashes on Windows, i.e. doesn't show up as a second window in the taskbar.
 public SplashScreenForm() : base(WindowType.Popup)
 {
     AppPaintable         = true;
     this.Decorated       = false;
     this.WindowPosition  = WindowPosition.Center;
     this.TypeHint        = Gdk.WindowTypeHint.Splashscreen;
     this.showVersionInfo = BrandingService.GetBool("SplashScreen", "ShowVersionInfo") ?? true;
     using (var stream = BrandingService.GetStream("SplashScreen.png", true))
         bitmap = new Gdk.Pixbuf(stream);
     this.Resize(bitmap.Width, bitmap.Height);
 }
예제 #3
0
        //this is a popup so it behaves like other splashes on Windows, i.e. doesn't show up as a second window in the taskbar.
        public SplashScreenForm() : base(WindowType.Popup)
        {
            AppPaintable         = true;
            this.Decorated       = false;
            this.WindowPosition  = WindowPosition.Center;
            this.TypeHint        = Gdk.WindowTypeHint.Splashscreen;
            this.showVersionInfo = BrandingService.GetBool("SplashScreen", "ShowVersionInfo") ?? true;

            var file = BrandingService.GetFile("SplashScreen.png");

            if (file != null)
            {
                bitmap = Xwt.Drawing.Image.FromFile(file);
            }
            else
            {
                bitmap = Xwt.Drawing.Image.FromResource("SplashScreen.png");
            }

            this.Resize((int)bitmap.Width, (int)bitmap.Height);
            MessageService.PopupDialog += HandlePopupDialog;
        }