コード例 #1
0
        private void InitializeWidgets()
        {
            this.Name  = "Launchpad.Launcher.Interface.MainWindow";
            this.Title = LocalizationCatalog.GetString("Launchpad - {0}");

            this.Icon = Pixbuf.LoadFromResource("Launchpad.Launcher.Resources.Icon.ico");

            this.WindowPosition = (WindowPosition)4;
            this.DefaultWidth   = 745;
            this.DefaultHeight  = 415;
            this.Resizable      = false;

            var w12 = (Box.BoxChild) this.BottomHorizontalBox[this.MainProgressBarAlignment];

            w12.Expand = true;

            var w17 = (Box.BoxChild) this.BottomHorizontalBox[this.MainButtonAlignment];

            w17.Expand = false;

            this.MainButton.HasDefault = true;
        }
コード例 #2
0
        private void Build()
        {
            Gui.Initialize(this);

            // Widget Launchpad.Launcher.Interface.MainWindow
            this.UIManager = new UIManager();
            ActionGroup mainActionGroup = new ActionGroup("Default");

            this.MenuAction = new Action("MenuAction", LocalizationCatalog.GetString("Menu"), null, null)
            {
                ShortLabel = LocalizationCatalog.GetString("Menu")
            };
            mainActionGroup.Add(this.MenuAction, null);

            this.RepairGameAction = new Action(
                "repairGameAction",
                LocalizationCatalog.GetString("Repair Game"),
                LocalizationCatalog.GetString("Starts a repair process for the installed game."),
                "gtk-refresh")
            {
                ShortLabel = LocalizationCatalog.GetString("Repair Game")
            };
            mainActionGroup.Add(this.RepairGameAction, null);

            this.ReinstallGameAction = new Action(
                "reinstallGameAction",
                LocalizationCatalog.GetString("Reinstall Game"),
                LocalizationCatalog.GetString("Reinstalls the installed game."),
                "gtk-refresh")
            {
                ShortLabel = LocalizationCatalog.GetString("Reinstall Game")
            };
            mainActionGroup.Add(this.ReinstallGameAction, null);

            this.UIManager.InsertActionGroup(mainActionGroup, 0);
            AddAccelGroup(this.UIManager.AccelGroup);
            this.Name  = "Launchpad.Launcher.Interface.MainWindow";
            this.Title = LocalizationCatalog.GetString("Launchpad - {0}");

            if (SystemInformation.IsRunningOnUnix())
            {
                this.Icon = Pixbuf.LoadFromResource("Launchpad.Launcher.Resources.RocketIcon.ico");
            }
            else
            {
                this.Icon = Pixbuf.LoadFromResource("Launchpad.Launcher.Resources.RocketIcon_Grey.ico");
            }

            this.WindowPosition = (WindowPosition)4;
            this.DefaultWidth   = 745;
            this.DefaultHeight  = 415;
            this.Resizable      = false;

            // Container child Launchpad.Launcher.Interface.MainWindow.Gtk.Container+ContainerChild
            this.VBox1 = new VBox
            {
                Name    = "VBox1",
                Spacing = 6
            };

            // Container child VBox1.Gtk.Box+BoxChild
            this.UIManager.AddUiFromString
            (
                "<ui>" +
                "<menubar name='MainMenuBar'>" +
                "<menu name='MenuAction' action='MenuAction'>" +
                "<menuitem name='repairGameAction' action='repairGameAction'/>" +
                "<separator/>" +
                "<menuitem name='reinstallGameAction' action='reinstallGameAction'/>" +
                "</menu>" +
                "</menubar>" +
                "</ui>"
            );
            this.MainMenuBar      = (MenuBar)this.UIManager.GetWidget("/MainMenuBar");
            this.MainMenuBar.Name = "MainMenuBar";
            this.VBox1.Add(this.MainMenuBar);

            Box.BoxChild w2 = (Box.BoxChild) this.VBox1 [this.MainMenuBar];
            w2.Position = 0;
            w2.Expand   = false;
            w2.Fill     = false;

            // Container child VBox1.Gtk.Box+BoxChild
            this.HBox2 = new HBox
            {
                Name        = "HBox2",
                Spacing     = 6,
                BorderWidth = 4
            };

            // Container child HBox2.Gtk.Box+BoxChild
            this.BrowserContainer = new VBox
            {
                Name    = "browserContainer",
                Spacing = 6
            };

            // Container child browserContainer.Gtk.Box+BoxChild
            this.Alignment2 = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                WidthRequest = 310,
                Name         = "alignment2"
            };

            // Container child alignment2.Gtk.Container+ContainerChild
            this.BrowserWindow = new ScrolledWindow
            {
                CanFocus   = true,
                Name       = "browserWindow",
                ShadowType = ShadowType.In
            };
            this.Alignment2.Add(this.BrowserWindow);
            this.BrowserContainer.Add(this.Alignment2);

            Box.BoxChild w4 = (Box.BoxChild) this.BrowserContainer [this.Alignment2];
            w4.Position = 0;
            this.HBox2.Add(this.BrowserContainer);

            Box.BoxChild w5 = (Box.BoxChild) this.HBox2 [this.BrowserContainer];
            w5.Position = 0;
            w5.Expand   = false;

            // Container child HBox2.Gtk.Box+BoxChild
            this.Alignment5 = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                Name = "alignment5"
            };

            // Container child alignment5.Gtk.Container+ContainerChild
            this.GameBanner = new Image
            {
                WidthRequest  = 450,
                HeightRequest = 300,
                Name          = "gameBanner",
                Pixbuf        = Pixbuf.LoadFromResource("Launchpad.Launcher.Resources.RocketIcon.ico")
            };
            this.Alignment5.Add(this.GameBanner);
            this.HBox2.Add(this.Alignment5);

            Box.BoxChild w7 = (Box.BoxChild) this.HBox2 [this.Alignment5];
            w7.Position = 1;
            this.VBox1.Add(this.HBox2);

            Box.BoxChild w8 = (Box.BoxChild) this.VBox1 [this.HBox2];
            w8.Position = 1;
            w8.Expand   = false;
            w8.Fill     = false;

            // Container child VBox1.Gtk.Box+BoxChild
            this.Alignment1 = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                Name        = "alignment1",
                LeftPadding = 6
            };

            // Container child alignment1.Gtk.Container+ContainerChild
            this.IndicatorLabel = new Label
            {
                Name      = "IndicatorLabel",
                Xalign    = 0F,
                LabelProp = LocalizationCatalog.GetString("Idle")
            };
            this.Alignment1.Add(this.IndicatorLabel);
            this.VBox1.Add(this.Alignment1);

            Box.BoxChild w10 = (Box.BoxChild) this.VBox1 [this.Alignment1];
            w10.Position = 2;
            w10.Expand   = false;
            w10.Fill     = false;

            // Container child VBox1.Gtk.Box+BoxChild
            this.HBox3 = new HBox
            {
                Name        = "HBox3",
                Spacing     = 6,
                BorderWidth = 4
            };

            // Container child HBox3.Gtk.Box+BoxChild
            this.Alignment4 = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                Name = "alignment4"
            };

            // Container child alignment4.Gtk.Container+ContainerChild
            this.MainProgressBar = new ProgressBar
            {
                Name = "mainProgressBar"
            };
            this.Alignment4.Add(this.MainProgressBar);
            this.HBox3.Add(this.Alignment4);

            Box.BoxChild w12 = (Box.BoxChild) this.HBox3 [this.Alignment4];
            w12.Position = 0;

            // Container child HBox3.Gtk.Box+BoxChild
            this.HBox4 = new HBox
            {
                Name    = "HBox4",
                Spacing = 6
            };

            // Container child HBox4.Gtk.Box+BoxChild
            this.Alignment3 = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                WidthRequest = 100,
                Name         = "alignment3"
            };

            // Container child alignment3.Gtk.Container+ContainerChild
            this.PrimaryButton = new Button
            {
                Sensitive    = false,
                CanDefault   = true,
                CanFocus     = true,
                Name         = "primaryButton",
                UseUnderline = true,
                Label        = LocalizationCatalog.GetString("Inactive")
            };
            this.Alignment3.Add(this.PrimaryButton);
            this.HBox4.Add(this.Alignment3);

            Box.BoxChild w14 = (Box.BoxChild) this.HBox4 [this.Alignment3];
            w14.Position = 0;
            this.HBox3.Add(this.HBox4);

            Box.BoxChild w15 = (Box.BoxChild) this.HBox3 [this.HBox4];
            w15.Position = 1;
            w15.Expand   = false;
            w15.Fill     = false;
            this.VBox1.Add(this.HBox3);

            Box.BoxChild w16 = (Box.BoxChild) this.VBox1 [this.HBox3];
            w16.Position = 3;
            w16.Expand   = true;
            w16.Fill     = false;

            Add(this.VBox1);
            if ((this.Child != null))
            {
                this.Child.ShowAll();
            }

            this.PrimaryButton.HasDefault = true;
            Show();
            this.DeleteEvent += OnDeleteEvent;
            this.RepairGameAction.Activated    += OnRepairGameActionActivated;
            this.ReinstallGameAction.Activated += OnReinstallGameActionActivated;
            this.PrimaryButton.Clicked         += OnPrimaryButtonClicked;
        }
コード例 #3
0
 protected virtual void Build()
 {
     global::Stetic.Gui.Initialize(this);
     // Widget Launchpad.Utilities.UnixUI.MainWindow
     this.UIManager = new global::Gtk.UIManager();
     global::Gtk.ActionGroup w1 = new global::Gtk.ActionGroup("Default");
     this.UIManager.InsertActionGroup(w1, 0);
     this.AddAccelGroup(this.UIManager.AccelGroup);
     this.WidthRequest   = 640;
     this.HeightRequest  = 384;
     this.Name           = "Launchpad.Utilities.UnixUI.MainWindow";
     this.Title          = LocalizationCatalog.GetString("Launchpad Utilities - Manifest");
     this.Icon           = global::Gdk.Pixbuf.LoadFromResource("Launchpad.Utilities.Resources.Icons8-Android-Industry-Engineering.ico");
     this.WindowPosition = ((global::Gtk.WindowPosition)(4));
     // Container child Launchpad.Utilities.UnixUI.MainWindow.Gtk.Container+ContainerChild
     this.vbox3         = new global::Gtk.VBox();
     this.vbox3.Name    = "vbox3";
     this.vbox3.Spacing = 6;
     // Container child vbox3.Gtk.Box+BoxChild
     this.UIManager.AddUiFromString("<ui><menubar name='menubar1'/></ui>");
     this.menubar1      = ((global::Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1")));
     this.menubar1.Name = "menubar1";
     this.vbox3.Add(this.menubar1);
     global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.menubar1]));
     w2.Position = 0;
     w2.Expand   = false;
     w2.Fill     = false;
     // Container child vbox3.Gtk.Box+BoxChild
     this.alignment14              = new global::Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
     this.alignment14.Name         = "alignment14";
     this.alignment14.LeftPadding  = ((uint)(8));
     this.alignment14.RightPadding = ((uint)(8));
     // Container child alignment14.Gtk.Container+ContainerChild
     this.fileChooser           = new global::Gtk.FileChooserWidget(((global::Gtk.FileChooserAction)(2)));
     this.fileChooser.Name      = "fileChooser";
     this.fileChooser.LocalOnly = false;
     this.alignment14.Add(this.fileChooser);
     this.vbox3.Add(this.alignment14);
     global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.alignment14]));
     w4.Position = 1;
     // Container child vbox3.Gtk.Box+BoxChild
     this.alignment12      = new global::Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
     this.alignment12.Name = "alignment12";
     // Container child alignment12.Gtk.Container+ContainerChild
     this.hseparator3      = new global::Gtk.HSeparator();
     this.hseparator3.Name = "hseparator3";
     this.alignment12.Add(this.hseparator3);
     this.vbox3.Add(this.alignment12);
     global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.alignment12]));
     w6.Position = 2;
     w6.Expand   = false;
     w6.Fill     = false;
     // Container child vbox3.Gtk.Box+BoxChild
     this.hbox4         = new global::Gtk.HBox();
     this.hbox4.Name    = "hbox4";
     this.hbox4.Spacing = 6;
     // Container child hbox4.Gtk.Box+BoxChild
     this.alignment18             = new global::Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
     this.alignment18.Name        = "alignment18";
     this.alignment18.LeftPadding = ((uint)(8));
     // Container child alignment18.Gtk.Container+ContainerChild
     this.label4           = new global::Gtk.Label();
     this.label4.Name      = "label4";
     this.label4.LabelProp = LocalizationCatalog.GetString("Progress: ");
     this.alignment18.Add(this.label4);
     this.hbox4.Add(this.alignment18);
     global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.alignment18]));
     w8.Position = 0;
     w8.Expand   = false;
     w8.Fill     = false;
     // Container child hbox4.Gtk.Box+BoxChild
     this.alignment19              = new global::Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
     this.alignment19.Name         = "alignment19";
     this.alignment19.RightPadding = ((uint)(8));
     // Container child alignment19.Gtk.Container+ContainerChild
     this.progressLabel           = new global::Gtk.Label();
     this.progressLabel.Name      = "progressLabel";
     this.progressLabel.LabelProp = LocalizationCatalog.GetString("/some/file/path : 1 out of 100");
     this.alignment19.Add(this.progressLabel);
     this.hbox4.Add(this.alignment19);
     global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.alignment19]));
     w10.Position = 1;
     w10.Expand   = false;
     w10.Fill     = false;
     this.vbox3.Add(this.hbox4);
     global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.hbox4]));
     w11.Position = 3;
     w11.Expand   = false;
     w11.Fill     = false;
     // Container child vbox3.Gtk.Box+BoxChild
     this.alignment17              = new global::Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
     this.alignment17.Name         = "alignment17";
     this.alignment17.LeftPadding  = ((uint)(8));
     this.alignment17.RightPadding = ((uint)(8));
     // Container child alignment17.Gtk.Container+ContainerChild
     this.progressbar      = new global::Gtk.ProgressBar();
     this.progressbar.Name = "progressbar";
     this.alignment17.Add(this.progressbar);
     this.vbox3.Add(this.alignment17);
     global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.alignment17]));
     w13.Position = 4;
     w13.Expand   = false;
     w13.Fill     = false;
     // Container child vbox3.Gtk.Box+BoxChild
     this.hbox3         = new global::Gtk.HBox();
     this.hbox3.Name    = "hbox3";
     this.hbox3.Spacing = 6;
     // Container child hbox3.Gtk.Box+BoxChild
     this.alignment15               = new global::Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
     this.alignment15.Name          = "alignment15";
     this.alignment15.RightPadding  = ((uint)(8));
     this.alignment15.BottomPadding = ((uint)(8));
     // Container child alignment15.Gtk.Container+ContainerChild
     this.generateGameManifestButton              = new global::Gtk.Button();
     this.generateGameManifestButton.CanFocus     = true;
     this.generateGameManifestButton.Name         = "generateGameManifestButton";
     this.generateGameManifestButton.UseUnderline = true;
     this.generateGameManifestButton.Label        = LocalizationCatalog.GetString("Generate Game Manifest");
     this.alignment15.Add(this.generateGameManifestButton);
     this.hbox3.Add(this.alignment15);
     global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.alignment15]));
     w15.PackType = ((global::Gtk.PackType)(1));
     w15.Position = 0;
     w15.Expand   = false;
     w15.Fill     = false;
     // Container child hbox3.Gtk.Box+BoxChild
     this.alignment1               = new global::Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
     this.alignment1.Name          = "alignment1";
     this.alignment1.RightPadding  = ((uint)(8));
     this.alignment1.BottomPadding = ((uint)(8));
     // Container child alignment1.Gtk.Container+ContainerChild
     this.generateLaunchpadManifestButton              = new global::Gtk.Button();
     this.generateLaunchpadManifestButton.CanFocus     = true;
     this.generateLaunchpadManifestButton.Name         = "generateLaunchpadManifestButton";
     this.generateLaunchpadManifestButton.UseUnderline = true;
     this.generateLaunchpadManifestButton.Label        = LocalizationCatalog.GetString("Generate Launchpad Manifest");
     this.alignment1.Add(this.generateLaunchpadManifestButton);
     this.hbox3.Add(this.alignment1);
     global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.alignment1]));
     w17.PackType = ((global::Gtk.PackType)(1));
     w17.Position = 1;
     w17.Expand   = false;
     w17.Fill     = false;
     this.vbox3.Add(this.hbox3);
     global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.hbox3]));
     w18.Position = 5;
     w18.Expand   = false;
     w18.Fill     = false;
     this.Add(this.vbox3);
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.DefaultWidth  = 640;
     this.DefaultHeight = 384;
     this.Show();
     this.DeleteEvent += new global::Gtk.DeleteEventHandler(this.OnDeleteEvent);
     this.generateLaunchpadManifestButton.Clicked += new global::System.EventHandler(this.OnGenerateLaunchpadManifestButtonClicked);
     this.generateGameManifestButton.Clicked      += new global::System.EventHandler(this.OnGenerateGameManifestButtonClicked);
 }
コード例 #4
0
        private void Build()
        {
            Gui.Initialize(this);
            // Widget Launchpad.Utilities.Interface.MainWindow
            UIManager = new UIManager();
            ActionGroup w1 = new ActionGroup("Default");

            UIManager.InsertActionGroup(w1, 0);
            AddAccelGroup(UIManager.AccelGroup);
            WidthRequest   = 640;
            HeightRequest  = 384;
            Name           = "Launchpad.Utilities.Interface.MainWindow";
            Title          = LocalizationCatalog.GetString("Launchpad Utilities - Manifest");
            Icon           = Pixbuf.LoadFromResource("Launchpad.Utilities.Resources.Icons8-Android-Industry-Engineering.ico");
            WindowPosition = (WindowPosition)4;
            // Container child Launchpad.Utilities.Interface.MainWindow.Gtk.Container+ContainerChild
            vbox3 = new VBox
            {
                Name    = "vbox3",
                Spacing = 6
            };
            // Container child vbox3.Gtk.Box+BoxChild
            UIManager.AddUiFromString("<ui><menubar name='menubar1'/></ui>");
            menubar1      = (MenuBar)(UIManager.GetWidget("/menubar1"));
            menubar1.Name = "menubar1";
            vbox3.Add(menubar1);
            Box.BoxChild w2 = (Box.BoxChild)vbox3 [menubar1];
            w2.Position = 0;
            w2.Expand   = false;
            w2.Fill     = false;
            // Container child vbox3.Gtk.Box+BoxChild
            alignment14 = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                Name         = "alignment14",
                LeftPadding  = 8,
                RightPadding = 8
            };
            // Container child alignment14.Gtk.Container+ContainerChild
            fileChooser = new FileChooserWidget((FileChooserAction)2)
            {
                Name      = "fileChooser",
                LocalOnly = false
            };
            alignment14.Add(fileChooser);
            vbox3.Add(alignment14);
            Box.BoxChild w4 = (Box.BoxChild)vbox3 [alignment14];
            w4.Position = 1;
            // Container child vbox3.Gtk.Box+BoxChild
            alignment12 = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                Name = "alignment12"
            };
            // Container child alignment12.Gtk.Container+ContainerChild
            hseparator3 = new HSeparator
            {
                Name = "hseparator3"
            };
            alignment12.Add(hseparator3);
            vbox3.Add(alignment12);
            Box.BoxChild w6 = (Box.BoxChild)vbox3 [alignment12];
            w6.Position = 2;
            w6.Expand   = false;
            w6.Fill     = false;
            // Container child vbox3.Gtk.Box+BoxChild
            hbox4 = new HBox
            {
                Name    = "hbox4",
                Spacing = 6
            };
            // Container child hbox4.Gtk.Box+BoxChild
            alignment18 = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                Name        = "alignment18",
                LeftPadding = 8
            };
            // Container child alignment18.Gtk.Container+ContainerChild
            label4 = new Label
            {
                Name      = "label4",
                LabelProp = LocalizationCatalog.GetString("Progress: ")
            };
            alignment18.Add(label4);
            hbox4.Add(alignment18);
            Box.BoxChild w8 = (Box.BoxChild)hbox4 [alignment18];
            w8.Position = 0;
            w8.Expand   = false;
            w8.Fill     = false;
            // Container child hbox4.Gtk.Box+BoxChild
            alignment19 = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                Name         = "alignment19",
                RightPadding = 8
            };
            // Container child alignment19.Gtk.Container+ContainerChild
            progressLabel = new Label
            {
                Name      = "progressLabel",
                LabelProp = LocalizationCatalog.GetString("/some/file/path : 1 out of 100")
            };
            alignment19.Add(progressLabel);
            hbox4.Add(alignment19);
            Box.BoxChild w10 = ((Box.BoxChild)(hbox4 [alignment19]));
            w10.Position = 1;
            w10.Expand   = false;
            w10.Fill     = false;
            vbox3.Add(hbox4);
            Box.BoxChild w11 = (Box.BoxChild)vbox3 [hbox4];
            w11.Position = 3;
            w11.Expand   = false;
            w11.Fill     = false;
            // Container child vbox3.Gtk.Box+BoxChild
            alignment17 = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                Name         = "alignment17",
                LeftPadding  = 8,
                RightPadding = 8
            };
            // Container child alignment17.Gtk.Container+ContainerChild
            progressbar = new ProgressBar
            {
                Name = "progressbar"
            };
            alignment17.Add(progressbar);
            vbox3.Add(alignment17);
            Box.BoxChild w13 = (Box.BoxChild)vbox3 [alignment17];
            w13.Position = 4;
            w13.Expand   = false;
            w13.Fill     = false;
            // Container child vbox3.Gtk.Box+BoxChild
            hbox3 = new HBox
            {
                Name    = "hbox3",
                Spacing = 6
            };
            // Container child hbox3.Gtk.Box+BoxChild
            alignment15 = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                Name          = "alignment15",
                RightPadding  = 8,
                BottomPadding = 8
            };
            // Container child alignment15.Gtk.Container+ContainerChild
            generateGameManifestButton = new Button
            {
                CanFocus     = true,
                Name         = "generateGameManifestButton",
                UseUnderline = true,
                Label        = LocalizationCatalog.GetString("Generate Game Manifest")
            };
            alignment15.Add(generateGameManifestButton);
            hbox3.Add(alignment15);
            Box.BoxChild w15 = (Box.BoxChild)hbox3 [alignment15];
            w15.PackType = (PackType)1;
            w15.Position = 0;
            w15.Expand   = false;
            w15.Fill     = false;
            // Container child hbox3.Gtk.Box+BoxChild
            alignment1 = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                Name          = "alignment1",
                RightPadding  = 8,
                BottomPadding = 8
            };
            // Container child alignment1.Gtk.Container+ContainerChild
            generateLaunchpadManifestButton = new Button
            {
                CanFocus     = true,
                Name         = "generateLaunchpadManifestButton",
                UseUnderline = true,
                Label        = LocalizationCatalog.GetString("Generate Launchpad Manifest")
            };
            alignment1.Add(generateLaunchpadManifestButton);
            hbox3.Add(alignment1);
            Box.BoxChild w17 = ((Box.BoxChild)(hbox3 [alignment1]));
            w17.PackType = ((PackType)(1));
            w17.Position = 1;
            w17.Expand   = false;
            w17.Fill     = false;
            vbox3.Add(hbox3);
            Box.BoxChild w18 = ((Box.BoxChild)(vbox3 [hbox3]));
            w18.Position = 5;
            w18.Expand   = false;
            w18.Fill     = false;
            Add(vbox3);
            if ((Child != null))
            {
                Child.ShowAll();
            }

            this.DefaultWidth  = 640;
            this.DefaultHeight = 384;

            this.Show();

            DeleteEvent += OnDeleteEvent;
            generateLaunchpadManifestButton.Clicked += OnGenerateLaunchpadManifestButtonClicked;
            generateGameManifestButton.Clicked      += OnGenerateGameManifestButtonClicked;
        }
コード例 #5
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
     this.changelogBrowser      = new System.Windows.Forms.WebBrowser();
     this.mainProgressBar       = new System.Windows.Forms.ProgressBar();
     this.MessageLabel          = new System.Windows.Forms.Label();
     this.downloadProgressLabel = new System.Windows.Forms.Label();
     this.aboutLink             = new System.Windows.Forms.LinkLabel();
     this.PrimaryButton         = new System.Windows.Forms.Button();
     this.SuspendLayout();
     //
     // changelogBrowser
     //
     this.changelogBrowser.Location          = new System.Drawing.Point(18, 18);
     this.changelogBrowser.MinimumSize       = new System.Drawing.Size(20, 20);
     this.changelogBrowser.Name              = "changelogBrowser";
     this.changelogBrowser.ScrollBarsEnabled = false;
     this.changelogBrowser.Size              = new System.Drawing.Size(390, 400);
     this.changelogBrowser.TabIndex          = 0;
     //
     // mainProgressBar
     //
     this.mainProgressBar.Location = new System.Drawing.Point(18, 460);
     this.mainProgressBar.Name     = "mainProgressBar";
     this.mainProgressBar.Size     = new System.Drawing.Size(390, 23);
     this.mainProgressBar.Style    = System.Windows.Forms.ProgressBarStyle.Continuous;
     this.mainProgressBar.TabIndex = 2;
     //
     // MessageLabel
     //
     this.MessageLabel.AutoSize  = true;
     this.MessageLabel.BackColor = System.Drawing.Color.Transparent;
     this.MessageLabel.Location  = new System.Drawing.Point(15, 444);
     this.MessageLabel.Name      = "MessageLabel";
     this.MessageLabel.Size      = new System.Drawing.Size(24, 13);
     this.MessageLabel.TabIndex  = 5;
     this.MessageLabel.Text      = LocalizationCatalog.GetString("Idle");
     //
     // downloadProgressLabel
     //
     this.downloadProgressLabel.AutoSize  = true;
     this.downloadProgressLabel.BackColor = System.Drawing.Color.Transparent;
     this.downloadProgressLabel.Location  = new System.Drawing.Point(15, 431);
     this.downloadProgressLabel.Name      = "downloadProgressLabel";
     this.downloadProgressLabel.Size      = new System.Drawing.Size(0, 13);
     this.downloadProgressLabel.TabIndex  = 7;
     //
     // aboutLink
     //
     this.aboutLink.AutoSize     = true;
     this.aboutLink.BackColor    = System.Drawing.Color.Transparent;
     this.aboutLink.Location     = new System.Drawing.Point(414, 18);
     this.aboutLink.Name         = "aboutLink";
     this.aboutLink.Size         = new System.Drawing.Size(35, 13);
     this.aboutLink.TabIndex     = 10;
     this.aboutLink.TabStop      = true;
     this.aboutLink.Text         = LocalizationCatalog.GetString("About");
     this.aboutLink.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.aboutLink_LinkClicked);
     //
     // PrimaryButton
     //
     this.PrimaryButton.Location = new System.Drawing.Point(739, 460);
     this.PrimaryButton.Name     = "PrimaryButton";
     this.PrimaryButton.Size     = new System.Drawing.Size(104, 39);
     this.PrimaryButton.TabIndex = 11;
     this.PrimaryButton.Text     = LocalizationCatalog.GetString("Inactive");
     this.PrimaryButton.UseVisualStyleBackColor = true;
     this.PrimaryButton.Click += new System.EventHandler(this.mainButton_Click);
     //
     // MainForm
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.BackColor           = System.Drawing.SystemColors.Control;
     this.BackgroundImage     = global::Launchpad.Launcher.Properties.Resources.Background_hexagon_textbox;
     this.ClientSize          = new System.Drawing.Size(855, 512);
     this.Controls.Add(this.PrimaryButton);
     this.Controls.Add(this.aboutLink);
     this.Controls.Add(this.downloadProgressLabel);
     this.Controls.Add(this.MessageLabel);
     this.Controls.Add(this.mainProgressBar);
     this.Controls.Add(this.changelogBrowser);
     this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.Name = "MainForm";
     this.Text = LocalizationCatalog.GetString("Launchpad - <GameName>");
     this.ResumeLayout(false);
     this.PerformLayout();
 }
コード例 #6
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LaunchpadAboutBox));
     this.tableLayoutPanel   = new System.Windows.Forms.TableLayoutPanel();
     this.logoPictureBox     = new System.Windows.Forms.PictureBox();
     this.labelProductName   = new System.Windows.Forms.Label();
     this.labelVersion       = new System.Windows.Forms.Label();
     this.labelCopyright     = new System.Windows.Forms.Label();
     this.labelCompanyName   = new System.Windows.Forms.Label();
     this.textBoxDescription = new System.Windows.Forms.TextBox();
     this.okButton           = new System.Windows.Forms.Button();
     this.tableLayoutPanel.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).BeginInit();
     this.SuspendLayout();
     //
     // tableLayoutPanel
     //
     this.tableLayoutPanel.ColumnCount = 2;
     this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33F));
     this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67F));
     this.tableLayoutPanel.Controls.Add(this.logoPictureBox, 0, 0);
     this.tableLayoutPanel.Controls.Add(this.labelProductName, 1, 0);
     this.tableLayoutPanel.Controls.Add(this.labelVersion, 1, 1);
     this.tableLayoutPanel.Controls.Add(this.labelCopyright, 1, 2);
     this.tableLayoutPanel.Controls.Add(this.labelCompanyName, 1, 3);
     this.tableLayoutPanel.Controls.Add(this.textBoxDescription, 1, 4);
     this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5);
     this.tableLayoutPanel.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.tableLayoutPanel.Location = new System.Drawing.Point(9, 9);
     this.tableLayoutPanel.Name     = "tableLayoutPanel";
     this.tableLayoutPanel.RowCount = 6;
     this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
     this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
     this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
     this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
     this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
     this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
     this.tableLayoutPanel.Size     = new System.Drawing.Size(417, 265);
     this.tableLayoutPanel.TabIndex = 0;
     //
     // logoPictureBox
     //
     this.logoPictureBox.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.logoPictureBox.Image    = ((System.Drawing.Image)(resources.GetObject("logoPictureBox.Image")));
     this.logoPictureBox.Location = new System.Drawing.Point(3, 3);
     this.logoPictureBox.Name     = "logoPictureBox";
     this.tableLayoutPanel.SetRowSpan(this.logoPictureBox, 6);
     this.logoPictureBox.Size     = new System.Drawing.Size(131, 259);
     this.logoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
     this.logoPictureBox.TabIndex = 12;
     this.logoPictureBox.TabStop  = false;
     //
     // labelProductName
     //
     this.labelProductName.Dock        = System.Windows.Forms.DockStyle.Fill;
     this.labelProductName.Location    = new System.Drawing.Point(143, 0);
     this.labelProductName.Margin      = new System.Windows.Forms.Padding(6, 0, 3, 0);
     this.labelProductName.MaximumSize = new System.Drawing.Size(0, 17);
     this.labelProductName.Name        = "labelProductName";
     this.labelProductName.Size        = new System.Drawing.Size(271, 17);
     this.labelProductName.TabIndex    = 19;
     this.labelProductName.Text        = LocalizationCatalog.GetString("Product Name");
     this.labelProductName.TextAlign   = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // labelVersion
     //
     this.labelVersion.Dock        = System.Windows.Forms.DockStyle.Fill;
     this.labelVersion.Location    = new System.Drawing.Point(143, 26);
     this.labelVersion.Margin      = new System.Windows.Forms.Padding(6, 0, 3, 0);
     this.labelVersion.MaximumSize = new System.Drawing.Size(0, 17);
     this.labelVersion.Name        = "labelVersion";
     this.labelVersion.Size        = new System.Drawing.Size(271, 17);
     this.labelVersion.TabIndex    = 0;
     this.labelVersion.Text        = LocalizationCatalog.GetString("Version");
     this.labelVersion.TextAlign   = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // labelCopyright
     //
     this.labelCopyright.Dock        = System.Windows.Forms.DockStyle.Fill;
     this.labelCopyright.Location    = new System.Drawing.Point(143, 52);
     this.labelCopyright.Margin      = new System.Windows.Forms.Padding(6, 0, 3, 0);
     this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 17);
     this.labelCopyright.Name        = "labelCopyright";
     this.labelCopyright.Size        = new System.Drawing.Size(271, 17);
     this.labelCopyright.TabIndex    = 21;
     this.labelCopyright.Text        = LocalizationCatalog.GetString("Copyright");
     this.labelCopyright.TextAlign   = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // labelCompanyName
     //
     this.labelCompanyName.Dock        = System.Windows.Forms.DockStyle.Fill;
     this.labelCompanyName.Location    = new System.Drawing.Point(143, 78);
     this.labelCompanyName.Margin      = new System.Windows.Forms.Padding(6, 0, 3, 0);
     this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 17);
     this.labelCompanyName.Name        = "labelCompanyName";
     this.labelCompanyName.Size        = new System.Drawing.Size(271, 17);
     this.labelCompanyName.TabIndex    = 22;
     this.labelCompanyName.Text        = LocalizationCatalog.GetString("Company Name");
     this.labelCompanyName.TextAlign   = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // textBoxDescription
     //
     this.textBoxDescription.Dock       = System.Windows.Forms.DockStyle.Fill;
     this.textBoxDescription.Location   = new System.Drawing.Point(143, 107);
     this.textBoxDescription.Margin     = new System.Windows.Forms.Padding(6, 3, 3, 3);
     this.textBoxDescription.Multiline  = true;
     this.textBoxDescription.Name       = "textBoxDescription";
     this.textBoxDescription.ReadOnly   = true;
     this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both;
     this.textBoxDescription.Size       = new System.Drawing.Size(271, 126);
     this.textBoxDescription.TabIndex   = 23;
     this.textBoxDescription.TabStop    = false;
     this.textBoxDescription.Text       = LocalizationCatalog.GetString("Description");
     //
     // okButton
     //
     this.okButton.Anchor       = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     this.okButton.Location     = new System.Drawing.Point(339, 239);
     this.okButton.Name         = "okButton";
     this.okButton.Size         = new System.Drawing.Size(75, 23);
     this.okButton.TabIndex     = 24;
     this.okButton.Text         = "&OK";
     this.okButton.Click       += new System.EventHandler(this.okButton_Click);
     //
     // LaunchpadAboutBox
     //
     this.AcceptButton        = this.okButton;
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(435, 283);
     this.Controls.Add(this.tableLayoutPanel);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
     this.MaximizeBox     = false;
     this.MinimizeBox     = false;
     this.Name            = "LaunchpadAboutBox";
     this.Padding         = new System.Windows.Forms.Padding(9);
     this.ShowIcon        = false;
     this.ShowInTaskbar   = false;
     this.StartPosition   = System.Windows.Forms.FormStartPosition.CenterParent;
     this.Text            = "AboutBox1";
     this.tableLayoutPanel.ResumeLayout(false);
     this.tableLayoutPanel.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).EndInit();
     this.ResumeLayout(false);
 }
コード例 #7
0
        private void CreateWidgets()
        {
            this.UIManager = new UIManager();

            this.MainActionGroup = new ActionGroup("Default");

            this.MenuAction = new Action("MenuAction", LocalizationCatalog.GetString("Menu"), null, null)
            {
                ShortLabel = LocalizationCatalog.GetString("Menu")
            };

            this.RepairGameAction = new Action
                                    (
                "RepairGameAction",
                LocalizationCatalog.GetString("Repair Game"),
                LocalizationCatalog.GetString("Starts a repair process for the installed game."),
                "gtk-refresh"
                                    )
            {
                ShortLabel = LocalizationCatalog.GetString("Repair Game")
            };

            this.ReinstallGameAction = new Action
                                       (
                "ReinstallGameAction",
                LocalizationCatalog.GetString("Reinstall Game"),
                LocalizationCatalog.GetString("Reinstalls the installed game."),
                "gtk-refresh"
                                       )
            {
                ShortLabel = LocalizationCatalog.GetString("Reinstall Game")
            };

            this.MainVerticalBox = new VBox
            {
                Name    = "MainVerticalBox",
                Spacing = 6
            };

            this.UIManager.AddUiFromString
            (
                "<ui>" +
                "<menubar name='MainMenuBar'>" +
                "<menu name='MenuAction' action='MenuAction'>" +
                "<menuitem name='RepairGameAction' action='RepairGameAction'/>" +
                "<separator/>" +
                "<menuitem name='ReinstallGameAction' action='ReinstallGameAction'/>" +
                "</menu>" +
                "</menubar>" +
                "</ui>"
            );
            this.MainMenuBar = (MenuBar)this.UIManager.GetWidget("/MainMenuBar");

            this.MainHorizontalBox = new HBox
            {
                Name        = "MainHorizontalBox",
                Spacing     = 6,
                BorderWidth = 4
            };

            this.BrowserVerticalBox = new VBox
            {
                Name    = "BrowserVerticalBox",
                Spacing = 6
            };

            this.BrowserAlignment = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                WidthRequest = 310,
                Name         = "BrowserAlignment"
            };

            this.BrowserWindow = new ScrolledWindow
            {
                CanFocus   = true,
                Name       = "BrowserWindow",
                ShadowType = ShadowType.In
            };

            this.BannerAlignment = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                Name = "BannerAlignment"
            };

            this.Banner = new Image
            {
                WidthRequest  = 450,
                HeightRequest = 300,
                Name          = "Banner",
            };

            this.MainButtonAlignment = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                WidthRequest = 100,
                Name         = "MainButtonAlignment"
            };

            this.MainButton = new Button
            {
                Sensitive    = false,
                CanDefault   = true,
                CanFocus     = true,
                Name         = "MainButton",
                UseUnderline = true,
                Label        = LocalizationCatalog.GetString("Inactive")
            };

            this.IndicatorLabelAlignment = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                Name        = "IndicatorLabelAlignment",
                LeftPadding = 6
            };

            this.IndicatorLabel = new Label
            {
                Name      = "IndicatorLabel",
                Xalign    = 0F,
                LabelProp = LocalizationCatalog.GetString("Idle")
            };

            this.BottomHorizontalBox = new HBox
            {
                Name        = "BottomHorizontalBox",
                Spacing     = 6,
                BorderWidth = 4
            };

            this.MainProgressBarAlignment = new Alignment(0.5F, 0.5F, 1F, 1F)
            {
                Name = "MainProgressBarAlignment"
            };

            this.MainProgressBar = new ProgressBar
            {
                Name = "MainProgressBar"
            };
        }