Beispiel #1
0
        public HistogramViewWindow(Gdk.Pixbuf[] img, Gdk.Pixbuf[] thumbs, int[] cat)
        {
            this.img = img;
            this.cat = cat;

            Glade.XML gxml = new Glade.XML(Assembly.GetExecutingAssembly(), "HistogramView.glade", "HVWindow", null);
            gxml.BindFields(this);

            HVWindow.DeleteEvent += CloseWindow;
            CloseButton.Clicked  += CloseWindow;

            CounterText.Text      = String.Format(Catalog.GetPluralString("<i>Viewing {0} image histogram</i>", "<i>Viewing {0} image histograms</i>", img.Length), img.Length);
            CounterText.UseMarkup = true;

            ShowImage(0);

            HButtonBox hb = new HButtonBox();

            hb.Layout = ButtonBoxStyle.Start;
            for (int i = 0; i < thumbs.Length; i++)
            {
                ImageButton b = new ImageButton(new Image(thumbs[i]), i);
                b.Clicked += OnClicked;
                hb.PackEnd(b, false, false, 0);
            }

            ImageListSocket.AddWithViewport(hb);

            HVWindow.ShowAll();
        }
Beispiel #2
0
        public IPhoneDeviceConsole() : base("iPhone Device Console")
        {
            BorderWidth = 6;

            //FIXME: persist these values
            DefaultWidth  = 400;
            DefaultHeight = 400;

            var vbox = new VBox()
            {
                Spacing = 12
            };

            var bbox = new HButtonBox()
            {
                Layout = ButtonBoxStyle.End,
            };

            var closeButton     = new Button(Gtk.Stock.Close);
            var reconnectButton = new Button()
            {
                Label = "Reconnect"
            };

            log = new LogView();

            this.Add(vbox);
            vbox.PackEnd(bbox, false, false, 0);
            vbox.PackEnd(log, true, true, 0);

            bbox.PackEnd(reconnectButton);
            bbox.PackEnd(closeButton);

            closeButton.Clicked += delegate {
                Destroy();
            };
            DeleteEvent += delegate {
                Destroy();
            };
            reconnectButton.Clicked += delegate {
                Disconnect();
                Connect();
            };

            ShowAll();
            Connect();
        }
Beispiel #3
0
        private Widget CreateBottomBar()
        {
            HButtonBox buttonBox = new HButtonBox();

            buttonBox.Layout = ButtonBoxStyle.Edge;

            toggleSidebarButton          = new Button();
            toggleSidebarButton.Label    = Catalog.GetString("Close Sidebar");
            toggleSidebarButton.Relief   = ReliefStyle.None;
            toggleSidebarButton.Clicked += OnToggleSidebarButtonClicked;
            toggleSidebarButton.Show();
            buttonBox.PackStart(toggleSidebarButton, false, false, 0);

            personHScale               = new HScale(1, 3, 1);
            personHScale.DrawValue     = false;
            personHScale.ValueChanged += OnPersonHScaledValueChanged;
            personHScale.Show();
            buttonBox.PackEnd(personHScale, false, false, 0);

            buttonBox.Show();
            return(buttonBox);
        }
Beispiel #4
0
        void InitializeComponent()
        {
            var box  = new VBox();
            var bbox = new HButtonBox();

            _btnGetFromEnv            = new Button("Get from environment");
            _btnGetFromEnv.Activated += BtnGetFromEnvOnActivated;
            bbox.PackEnd(_btnGetFromEnv, false, false, 0);

            box.PackStart(bbox, false, false, 0);
            _cbUseProxy          = new CheckButton("Use proxy?");
            _cbUseProxy.Toggled += chkUseProxy_CheckedChanged;
            _cbBypassLocal       = new CheckButton("Bypass local addresses?");
            box.PackStart(_cbUseProxy, false, false, 0);
            box.PackStart(_cbBypassLocal, false, false, 0);
            Table table = new Table(2, 4, false);

            table.Attach(new Label("Host"), 0, 1, 0, 1);
            table.Attach(new Label("Port"), 1, 2, 0, 1);
            table.Attach(new Label("Username"), 2, 3, 0, 1);
            table.Attach(new Label("Password"), 3, 4, 0, 1);

            _txtProxyHost                = new Entry();
            _txtProxyPort                = new SpinButton(0, 65535, 1);
            _txtProxyUser                = new Entry();
            _txtProxyPassword            = new Entry();
            _txtProxyPassword.Visibility = false;

            table.Attach(_txtProxyHost, 0, 1, 1, 2);
            table.Attach(_txtProxyPort, 1, 2, 1, 2);
            table.Attach(_txtProxyUser, 2, 3, 1, 2);
            table.Attach(_txtProxyPassword, 3, 4, 1, 2);
            box.PackStart(table, false, false, 0);


            Child = box;
            ShowAll();
        }
Beispiel #5
0
        public ResultView(Gdk.Pixbuf[] img1, Gdk.Pixbuf[] img2, Gdk.Pixbuf[] thumbs, int[] res, int[] cat1, int[] cat2,
                          bool[] match)
        {
            this.img1  = img1;
            this.img2  = img2;
            this.res   = res;
            this.cat1  = cat1;
            this.cat2  = cat2;
            this.match = match;

            Glade.XML gxml = new Glade.XML(Assembly.GetExecutingAssembly(), "ResultView.glade", "ResultViewWindow", null);
            gxml.BindFields(this);

            ResultViewWindow.DeleteEvent += CloseWindow;
            CloseButton.Clicked          += CloseWindow;

            CounterText.Text      = String.Format(Catalog.GetPluralString("<i>Viewing results for {0} image</i>", "<i>Viewing results for {0} images</i>", img2.Length), img2.Length);
            CounterText.UseMarkup = true;

            TestIcon.FromPixbuf = new Gdk.Pixbuf(Assembly.GetEntryAssembly(), "image-test-22.png");
            BaseIcon.FromPixbuf = new Gdk.Pixbuf(Assembly.GetEntryAssembly(), "image-base-22.png");

            SetDisplay(0);

            HButtonBox hb = new HButtonBox();

            hb.Layout = ButtonBoxStyle.Start;
            for (int i = 0; i < thumbs.Length; i++)
            {
                ImageButton b = new ImageButton(new Image(thumbs[i]), i);
                b.Clicked += OnClicked;
                hb.PackEnd(b, false, false, 0);
            }

            ImageListSocket.AddWithViewport(hb);

            ResultViewWindow.ShowAll();
        }
Beispiel #6
0
        void Build()
        {
            BorderWidth   = 0;
            DefaultWidth  = 901;
            DefaultHeight = 632;

            Name           = "wizard_dialog";
            Title          = GettextCatalog.GetString("New Project");
            WindowPosition = WindowPosition.CenterOnParent;
            TransientFor   = IdeApp.Workbench.RootWindow;

            projectConfigurationWidget      = new GtkProjectConfigurationWidget();
            projectConfigurationWidget.Name = "projectConfigurationWidget";

            // Top banner of dialog.
            var topLabelEventBox = new EventBox();

            topLabelEventBox.Accessible.SetShouldIgnore(true);
            topLabelEventBox.Name          = "topLabelEventBox";
            topLabelEventBox.HeightRequest = 52;
            topLabelEventBox.ModifyBg(StateType.Normal, bannerBackgroundColor);
            topLabelEventBox.ModifyFg(StateType.Normal, whiteColor);
            topLabelEventBox.BorderWidth = 0;

            var topBannerBottomEdgeLineEventBox = new EventBox();

            topBannerBottomEdgeLineEventBox.Accessible.SetShouldIgnore(true);
            topBannerBottomEdgeLineEventBox.Name          = "topBannerBottomEdgeLineEventBox";
            topBannerBottomEdgeLineEventBox.HeightRequest = 1;
            topBannerBottomEdgeLineEventBox.ModifyBg(StateType.Normal, bannerLineColor);
            topBannerBottomEdgeLineEventBox.BorderWidth = 0;

            topBannerLabel                 = new Label();
            topBannerLabel.Name            = "topBannerLabel";
            topBannerLabel.Accessible.Name = "topBannerLabel";
            Pango.FontDescription font = topBannerLabel.Style.FontDescription.Copy();              // UNDONE: VV: Use FontService?
            font.Size   = (int)(font.Size * 2.0);
            font.Weight = Pango.Weight.Bold;
            topBannerLabel.ModifyFont(font);
            topBannerLabel.ModifyFg(StateType.Normal, whiteColor);
            var topLabelHBox = new HBox();

            topLabelHBox.Accessible.SetShouldIgnore(true);
            topLabelHBox.Name = "topLabelHBox";
            topLabelHBox.PackStart(topBannerLabel, false, false, 20);
            topLabelEventBox.Add(topLabelHBox);

            VBox.PackStart(topLabelEventBox, false, false, 0);
            VBox.PackStart(topBannerBottomEdgeLineEventBox, false, false, 0);

            // Main templates section.
            centreVBox = new VBox();
            centreVBox.Accessible.SetShouldIgnore(true);
            centreVBox.Name = "centreVBox";
            VBox.PackStart(centreVBox, true, true, 0);
            templatesHBox = new HBox();
            templatesHBox.Accessible.SetShouldIgnore(true);
            templatesHBox.Name = "templatesHBox";
            centreVBox.PackEnd(templatesHBox, true, true, 0);

            // Template categories.
            var templateCategoriesBgBox = new EventBox();

            templateCategoriesBgBox.Accessible.SetShouldIgnore(true);
            templateCategoriesBgBox.Name        = "templateCategoriesVBox";
            templateCategoriesBgBox.BorderWidth = 0;
            templateCategoriesBgBox.ModifyBg(StateType.Normal, categoriesBackgroundColor);
            templateCategoriesBgBox.WidthRequest = 220;
            var templateCategoriesScrolledWindow = new ScrolledWindow();

            templateCategoriesScrolledWindow.Name             = "templateCategoriesScrolledWindow";
            templateCategoriesScrolledWindow.HscrollbarPolicy = PolicyType.Never;

            // Template categories tree view.
            templateCategoriesTreeView                 = new TreeView();
            templateCategoriesTreeView.Name            = "templateCategoriesTreeView";
            templateCategoriesTreeView.Accessible.Name = "templateCategoriesTreeView";
            templateCategoriesTreeView.Accessible.SetTitle(GettextCatalog.GetString("Project Categories"));
            templateCategoriesTreeView.Accessible.Description = GettextCatalog.GetString("Select the project category to see all possible project templates");
            templateCategoriesTreeView.BorderWidth            = 0;
            templateCategoriesTreeView.HeadersVisible         = false;
            templateCategoriesTreeView.Model         = templateCategoriesListStore;
            templateCategoriesTreeView.SearchColumn  = -1;            // disable the interactive search
            templateCategoriesTreeView.ShowExpanders = false;

            templateCategoriesTreeView.AppendColumn(CreateTemplateCategoriesTreeViewColumn());
            templateCategoriesScrolledWindow.Add(templateCategoriesTreeView);
            templateCategoriesBgBox.Add(templateCategoriesScrolledWindow);
            templatesHBox.PackStart(templateCategoriesBgBox, false, false, 0);

            // Templates.
            var templatesBgBox = new EventBox();

            templatesBgBox.Accessible.SetShouldIgnore(true);
            templatesBgBox.ModifyBg(StateType.Normal, templateListBackgroundColor);
            templatesBgBox.Name         = "templatesVBox";
            templatesBgBox.WidthRequest = 400;
            templatesHBox.PackStart(templatesBgBox, false, false, 0);
            var templatesScrolledWindow = new ScrolledWindow();

            templatesScrolledWindow.Name             = "templatesScrolledWindow";
            templatesScrolledWindow.HscrollbarPolicy = PolicyType.Never;

            // Templates tree view.
            templatesTreeView                 = new TreeView();
            templatesTreeView.Name            = "templatesTreeView";
            templatesTreeView.Accessible.Name = "templatesTreeView";
            templatesTreeView.Accessible.SetTitle(GettextCatalog.GetString("Project Templates"));
            templatesTreeView.Accessible.Description = GettextCatalog.GetString("Select the project template");
            templatesTreeView.HeadersVisible         = false;
            templatesTreeView.Model         = templatesTreeStore;
            templatesTreeView.SearchColumn  = -1;            // disable the interactive search
            templatesTreeView.ShowExpanders = false;
            templatesTreeView.AppendColumn(CreateTemplateListTreeViewColumn());
            templatesScrolledWindow.Add(templatesTreeView);
            templatesBgBox.Add(templatesScrolledWindow);

            // Accessibilityy
            templateCategoriesTreeView.Accessible.AddLinkedUIElement(templatesTreeView.Accessible);

            // Template
            var templateEventBox = new EventBox();

            templateEventBox.Accessible.SetShouldIgnore(true);
            templateEventBox.Name = "templateEventBox";
            templateEventBox.ModifyBg(StateType.Normal, templateBackgroundColor);
            templatesHBox.PackStart(templateEventBox, true, true, 0);
            templateVBox = new VBox();
            templateVBox.Accessible.SetShouldIgnore(true);
            templateVBox.Visible     = false;
            templateVBox.BorderWidth = 20;
            templateVBox.Spacing     = 10;
            templateEventBox.Add(templateVBox);

            // Template large image.
            templateImage = new ImageView();
            templateImage.Accessible.SetShouldIgnore(true);
            templateImage.Name          = "templateImage";
            templateImage.HeightRequest = 140;
            templateImage.WidthRequest  = 240;
            templateVBox.PackStart(templateImage, false, false, 10);

            // Template description.
            templateNameLabel                        = new Label();
            templateNameLabel.Name                   = "templateNameLabel";
            templateNameLabel.Accessible.Name        = "templateNameLabel";
            templateNameLabel.Accessible.Description = GettextCatalog.GetString("The name of the selected template");
            templateNameLabel.WidthRequest           = 240;
            templateNameLabel.Wrap                   = true;
            templateNameLabel.Xalign                 = 0;
            templateNameLabel.Markup                 = MarkupTemplateName("TemplateName");
            templateVBox.PackStart(templateNameLabel, false, false, 0);
            templateDescriptionLabel                 = new Label();
            templateDescriptionLabel.Name            = "templateDescriptionLabel";
            templateDescriptionLabel.Accessible.Name = "templateDescriptionLabel";
            templateDescriptionLabel.Accessible.SetLabel(GettextCatalog.GetString("The description of the selected template"));
            templateDescriptionLabel.WidthRequest = 240;
            templateDescriptionLabel.Wrap         = true;
            templateDescriptionLabel.Xalign       = 0;
            templateVBox.PackStart(templateDescriptionLabel, false, false, 0);

            var tempLabel = new Label();

            tempLabel.Accessible.SetShouldIgnore(true);
            templateVBox.PackStart(tempLabel, true, true, 0);

            templatesTreeView.Accessible.AddLinkedUIElement(templateNameLabel.Accessible);
            templatesTreeView.Accessible.AddLinkedUIElement(templateDescriptionLabel.Accessible);

            // Template - button separator.
            var templateSectionSeparatorEventBox = new EventBox();

            templateSectionSeparatorEventBox.Accessible.SetShouldIgnore(true);
            templateSectionSeparatorEventBox.Name          = "templateSectionSeparatorEventBox";
            templateSectionSeparatorEventBox.HeightRequest = 1;
            templateSectionSeparatorEventBox.ModifyBg(StateType.Normal, templateSectionSeparatorColor);
            VBox.PackStart(templateSectionSeparatorEventBox, false, false, 0);

            // Buttons at bottom of dialog.
            var bottomHBox = new HBox();

            bottomHBox.Accessible.SetShouldIgnore(true);
            bottomHBox.Name = "bottomHBox";
            VBox.PackStart(bottomHBox, false, false, 0);

            // Cancel button - bottom left.
            var cancelButtonBox = new HButtonBox();

            cancelButtonBox.Accessible.SetShouldIgnore(true);
            cancelButtonBox.Name        = "cancelButtonBox";
            cancelButtonBox.BorderWidth = 16;
            cancelButton                        = new Button();
            cancelButton.Name                   = "cancelButton";
            cancelButton.Accessible.Name        = "cancelButton";
            cancelButton.Accessible.Description = GettextCatalog.GetString("Cancel the dialog");
            cancelButton.Label                  = GettextCatalog.GetString("Cancel");
            cancelButton.UseStock               = true;
            cancelButtonBox.PackStart(cancelButton, false, false, 0);
            bottomHBox.PackStart(cancelButtonBox, false, false, 0);

            // Previous button - bottom right.
            var previousNextButtonBox = new HButtonBox();

            previousNextButtonBox.Accessible.SetShouldIgnore(true);
            previousNextButtonBox.Name        = "previousNextButtonBox";
            previousNextButtonBox.BorderWidth = 16;
            previousNextButtonBox.Spacing     = 9;
            bottomHBox.PackStart(previousNextButtonBox);
            previousNextButtonBox.Layout = ButtonBoxStyle.End;

            previousButton                        = new Button();
            previousButton.Name                   = "previousButton";
            previousButton.Accessible.Name        = "previousButton";
            previousButton.Accessible.Description = GettextCatalog.GetString("Return to the previous page");
            previousButton.Label                  = GettextCatalog.GetString("Previous");
            previousButton.Sensitive              = false;
            previousNextButtonBox.PackEnd(previousButton);

            // Next button - bottom right.
            nextButton                        = new Button();
            nextButton.Name                   = "nextButton";
            nextButton.Accessible.Name        = "nextButton";
            nextButton.Accessible.Description = GettextCatalog.GetString("Move to the next page");
            nextButton.Label                  = GettextCatalog.GetString("Next");
            previousNextButtonBox.PackEnd(nextButton);

            // Remove default button action area.
            VBox.Remove(ActionArea);

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

            Show();

            templatesTreeView.HasFocus = true;
            Resizable = false;
        }
        void Build()
        {
            BorderWidth   = 0;
            DefaultWidth  = 990;
            DefaultHeight = 610;

            Modal          = true;
            Name           = "NewProjectDialog";
            Title          = Catalog.GetString("New Project");
            WindowPosition = WindowPosition.CenterOnParent;

            projectConfigurationWidget = new ProjectConfigurationWidget();

            // Top banner of dialog.
            var topLabelEventBox = new EventBox();

            topLabelEventBox.HeightRequest = 56;
            topLabelEventBox.ModifyBg(StateType.Normal, bannerBackgroundColor);
            topLabelEventBox.ModifyFg(StateType.Normal, whiteColor);
            topLabelEventBox.BorderWidth = 0;

            var topBannerBottomEdgeLineEventBox = new EventBox();

            topBannerBottomEdgeLineEventBox.HeightRequest = 1;
            topBannerBottomEdgeLineEventBox.ModifyBg(StateType.Normal, bannerLineColor);
            topBannerBottomEdgeLineEventBox.BorderWidth = 0;

            topBannerLabel      = new Label();
            topBannerLabel.Text = chooseTemplateBannerText;
            Pango.FontDescription font = topBannerLabel.Style.FontDescription.Copy();
            font.Size = (int)(font.Size * 1.8);
            topBannerLabel.ModifyFont(font);
            topBannerLabel.ModifyFg(StateType.Normal, whiteColor);
            var topLabelHBox = new HBox();

            topLabelHBox.PackStart(topBannerLabel, false, false, 20);
            topLabelEventBox.Add(topLabelHBox);

            VBox.PackStart(topLabelEventBox, false, false, 0);
            VBox.PackStart(topBannerBottomEdgeLineEventBox, false, false, 0);

            // Main templates section.
            centreVBox = new VBox();
            VBox.PackStart(centreVBox, true, true, 0);
            templatesHBox = new HBox();
            centreVBox.PackEnd(templatesHBox, true, true, 0);

            // Template categories.
            var templateCategoriesVBox = new VBox();

            templateCategoriesVBox.BorderWidth  = 0;
            templateCategoriesVBox.WidthRequest = 242;
            var templateCategoriesScrolledWindow = new ScrolledWindow();

            templateCategoriesScrolledWindow.HscrollbarPolicy = PolicyType.Never;

            // Template categories tree view.
            templateCategoriesTreeView                = new TreeView();
            templateCategoriesTreeView.BorderWidth    = 0;
            templateCategoriesTreeView.HeadersVisible = false;
            templateCategoriesTreeView.Model          = templateCategoriesListStore;
            templateCategoriesTreeView.ModifyBase(StateType.Normal, categoriesBackgroundColor);
            templateCategoriesTreeView.ModifyBase(StateType.Selected, selectedRowBackgroundColor);
            templateCategoriesTreeView.ModifyText(StateType.Selected, whiteColor);
            templateCategoriesTreeView.AppendColumn(CreateTemplateCategoriesTreeViewColumn());
            templateCategoriesScrolledWindow.Add(templateCategoriesTreeView);
            templateCategoriesVBox.PackStart(templateCategoriesScrolledWindow, true, true, 0);
            templatesHBox.PackStart(templateCategoriesVBox, false, false, 0);

            // Templates.
            var templatesVBox = new VBox();

            templatesVBox.WidthRequest = 242;
            templatesHBox.PackStart(templatesVBox, false, false, 0);
            var templatesScrolledWindow = new ScrolledWindow();

            templatesScrolledWindow.HscrollbarPolicy = PolicyType.Never;

            // Templates tree view.
            templatesTreeView = new TreeView();
            templatesTreeView.HeadersVisible = false;
            templatesTreeView.Model          = templatesListStore;
            templatesTreeView.ModifyBase(StateType.Normal, templateListBackgroundColor);
            templatesTreeView.ModifyBase(StateType.Selected, selectedRowBackgroundColor);
            templatesTreeView.ModifyText(StateType.Selected, whiteColor);
            templatesTreeView.AppendColumn(CreateTemplateListTreeViewColumn());
            templatesScrolledWindow.Add(templatesTreeView);
            templatesVBox.PackStart(templatesScrolledWindow, true, true, 0);

            // Template
            var templateEventBox = new EventBox();

            templateEventBox.ModifyBg(StateType.Normal, templateBackgroundColor);
            templatesHBox.PackStart(templateEventBox, true, true, 0);
            templateVBox         = new VBox();
            templateVBox.Visible = false;
            templateEventBox.Add(templateVBox);

            // Template large image.
            templateImage = new Gtk.Image();
            templateImage.HeightRequest = 300;
            templateVBox.PackStart(templateImage, false, false, 20);

            // Template description.
            var templateNameHBox = new HBox();

            templateNameLabel = new Label();
            templateNameHBox.PackStart(templateNameLabel, false, false, 40);
            var templateNamePaddingLabel = new Label();

            templateNameHBox.PackStart(templateNamePaddingLabel, true, true, 0);
            templateVBox.PackStart(templateNameHBox, false, false, 0);
            var templateDescriptionHBox = new HBox();

            templateDescriptionLabel              = new Label();
            templateDescriptionLabel.Wrap         = true;
            templateDescriptionLabel.WidthRequest = 400;
            templateDescriptionHBox.PackStart(templateDescriptionLabel, false, false, 40);
            var templateDescriptionPaddingLabel = new Label();

            templateDescriptionHBox.PackStart(templateDescriptionPaddingLabel, true, true, 0);
            templateVBox.PackStart(templateDescriptionHBox, true, true, 10);
            templateVBox.PackStart(new Label(), true, true, 0);

            // Template - button separator.
            var templateSectionSeparatorEventBox = new EventBox();

            templateSectionSeparatorEventBox.HeightRequest = 1;
            templateSectionSeparatorEventBox.ModifyBg(StateType.Normal, templateSectionSeparatorColor);
            VBox.PackStart(templateSectionSeparatorEventBox, false, false, 0);

            // Buttons at bottom of dialog.
            var bottomHBox = new HBox();

            VBox.PackStart(bottomHBox, false, false, 0);

            // Cancel button - bottom left.
            var cancelButtonBox = new HButtonBox();

            cancelButtonBox.BorderWidth = 16;
            cancelButton          = new Button();
            cancelButton.Label    = "gtk-cancel";
            cancelButton.UseStock = true;
            cancelButtonBox.PackStart(cancelButton, false, false, 0);
            bottomHBox.PackStart(cancelButtonBox, false, false, 0);

            // Previous button - bottom right.
            var previousNextButtonBox = new HButtonBox();

            previousNextButtonBox.BorderWidth = 16;
            previousNextButtonBox.Spacing     = 9;
            bottomHBox.PackStart(previousNextButtonBox);
            previousNextButtonBox.Layout = ButtonBoxStyle.End;

            previousButton           = new Button();
            previousButton.Label     = Catalog.GetString("Previous");
            previousButton.Sensitive = false;
            previousNextButtonBox.PackEnd(previousButton);

            // Next button - bottom right.
            nextButton       = new Button();
            nextButton.Label = Catalog.GetString("Next");
            previousNextButtonBox.PackEnd(nextButton);

            // Remove default button action area.
            VBox.Remove(ActionArea);

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

            Show();

            VBox.BorderWidth = 0;
        }
Beispiel #8
0
        void Build()
        {
            BorderWidth   = 0;
            WidthRequest  = GtkWorkarounds.ConvertToPixelScale(901);
            HeightRequest = GtkWorkarounds.ConvertToPixelScale(632);

            Name           = "wizard_dialog";
            Title          = GettextCatalog.GetString("New Project");
            WindowPosition = WindowPosition.CenterOnParent;
            TransientFor   = IdeApp.Workbench.RootWindow;

            projectConfigurationWidget      = new GtkProjectConfigurationWidget();
            projectConfigurationWidget.Name = "projectConfigurationWidget";

            // Top banner of dialog.
            var topLabelEventBox = new EventBox();

            topLabelEventBox.Name          = "topLabelEventBox";
            topLabelEventBox.HeightRequest = GtkWorkarounds.ConvertToPixelScale(52);
            topLabelEventBox.ModifyBg(StateType.Normal, bannerBackgroundColor);
            topLabelEventBox.ModifyFg(StateType.Normal, whiteColor);
            topLabelEventBox.BorderWidth = 0;

            var topBannerTopEdgeLineEventBox = new EventBox();

            topBannerTopEdgeLineEventBox.Name          = "topBannerTopEdgeLineEventBox";
            topBannerTopEdgeLineEventBox.HeightRequest = 1;
            topBannerTopEdgeLineEventBox.ModifyBg(StateType.Normal, bannerLineColor);
            topBannerTopEdgeLineEventBox.BorderWidth = 0;

            var topBannerBottomEdgeLineEventBox = new EventBox();

            topBannerBottomEdgeLineEventBox.Name          = "topBannerBottomEdgeLineEventBox";
            topBannerBottomEdgeLineEventBox.HeightRequest = 1;
            topBannerBottomEdgeLineEventBox.ModifyBg(StateType.Normal, bannerLineColor);
            topBannerBottomEdgeLineEventBox.BorderWidth = 0;

            topBannerLabel      = new Label();
            topBannerLabel.Name = "topBannerLabel";
            Pango.FontDescription font = topBannerLabel.Style.FontDescription.Copy();              // UNDONE: VV: Use FontService?
            font.Size = (int)(font.Size * 1.8);
            topBannerLabel.ModifyFont(font);
            topBannerLabel.ModifyFg(StateType.Normal, whiteColor);
            var topLabelHBox = new HBox();

            topLabelHBox.Name = "topLabelHBox";
            topLabelHBox.PackStart(topBannerLabel, false, false, 20);
            topLabelEventBox.Add(topLabelHBox);

            VBox.PackStart(topBannerTopEdgeLineEventBox, false, false, 0);
            VBox.PackStart(topLabelEventBox, false, false, 0);
            VBox.PackStart(topBannerBottomEdgeLineEventBox, false, false, 0);

            // Main templates section.
            centreVBox      = new VBox();
            centreVBox.Name = "centreVBox";
            VBox.PackStart(centreVBox, true, true, 0);
            templatesHBox      = new HBox();
            templatesHBox.Name = "templatesHBox";
            centreVBox.PackEnd(templatesHBox, true, true, 0);

            // Template categories.
            var templateCategoriesBgBox = new EventBox();

            templateCategoriesBgBox.Name        = "templateCategoriesVBox";
            templateCategoriesBgBox.BorderWidth = 0;
            templateCategoriesBgBox.ModifyBg(StateType.Normal, categoriesBackgroundColor);
            templateCategoriesBgBox.WidthRequest = GtkWorkarounds.ConvertToPixelScale(220);
            var templateCategoriesScrolledWindow = new ScrolledWindow();

            templateCategoriesScrolledWindow.Name             = "templateCategoriesScrolledWindow";
            templateCategoriesScrolledWindow.HscrollbarPolicy = PolicyType.Never;

            // Template categories tree view.
            templateCategoriesTreeView                = new TreeView();
            templateCategoriesTreeView.Name           = "templateCategoriesTreeView";
            templateCategoriesTreeView.BorderWidth    = 0;
            templateCategoriesTreeView.HeadersVisible = false;
            templateCategoriesTreeView.Model          = templateCategoriesListStore;
            templateCategoriesTreeView.AppendColumn(CreateTemplateCategoriesTreeViewColumn());
            templateCategoriesScrolledWindow.Add(templateCategoriesTreeView);
            templateCategoriesBgBox.Add(templateCategoriesScrolledWindow);
            templatesHBox.PackStart(templateCategoriesBgBox, false, false, 0);

            // Templates.
            var templatesBgBox = new EventBox();

            templatesBgBox.ModifyBg(StateType.Normal, templateListBackgroundColor);
            templatesBgBox.Name         = "templatesVBox";
            templatesBgBox.WidthRequest = GtkWorkarounds.ConvertToPixelScale(400);
            templatesHBox.PackStart(templatesBgBox, false, false, 0);
            var templatesScrolledWindow = new ScrolledWindow();

            templatesScrolledWindow.Name             = "templatesScrolledWindow";
            templatesScrolledWindow.HscrollbarPolicy = PolicyType.Never;

            // Templates tree view.
            templatesTreeView                = new TreeView();
            templatesTreeView.Name           = "templatesTreeView";
            templatesTreeView.HeadersVisible = false;
            templatesTreeView.Model          = templatesListStore;
            templatesTreeView.AppendColumn(CreateTemplateListTreeViewColumn());
            templatesScrolledWindow.Add(templatesTreeView);
            templatesBgBox.Add(templatesScrolledWindow);

            // Template
            var templateEventBox = new EventBox();

            templateEventBox.Name = "templateEventBox";
            templateEventBox.ModifyBg(StateType.Normal, templateBackgroundColor);
            templatesHBox.PackStart(templateEventBox, true, true, 0);
            templateVBox             = new VBox();
            templateVBox.Visible     = false;
            templateVBox.BorderWidth = 20;
            templateVBox.Spacing     = 10;
            templateEventBox.Add(templateVBox);

            // Template large image.
            templateImage               = new ImageView();
            templateImage.Name          = "templateImage";
            templateImage.HeightRequest = GtkWorkarounds.ConvertToPixelScale(140);
            templateImage.WidthRequest  = GtkWorkarounds.ConvertToPixelScale(240);
            templateVBox.PackStart(templateImage, false, false, 10);

            // Template description.
            templateNameLabel              = new Label();
            templateNameLabel.Name         = "templateNameLabel";
            templateNameLabel.WidthRequest = GtkWorkarounds.ConvertToPixelScale(240);
            templateNameLabel.Wrap         = true;
            templateNameLabel.Xalign       = 0;
            templateNameLabel.Markup       = MarkupTemplateName("TemplateName");
            templateVBox.PackStart(templateNameLabel, false, false, 0);
            templateDescriptionLabel              = new Label();
            templateDescriptionLabel.Name         = "templateDescriptionLabel";
            templateDescriptionLabel.WidthRequest = GtkWorkarounds.ConvertToPixelScale(240);
            templateDescriptionLabel.Wrap         = true;
            templateDescriptionLabel.Xalign       = 0;
            templateVBox.PackStart(templateDescriptionLabel, false, false, 0);
            templateVBox.PackStart(new Label(), true, true, 0);

            // Template - button separator.
            var templateSectionSeparatorEventBox = new EventBox();

            templateSectionSeparatorEventBox.Name          = "templateSectionSeparatorEventBox";
            templateSectionSeparatorEventBox.HeightRequest = 1;
            templateSectionSeparatorEventBox.ModifyBg(StateType.Normal, templateSectionSeparatorColor);
            VBox.PackStart(templateSectionSeparatorEventBox, false, false, 0);

            // Buttons at bottom of dialog.
            var bottomHBox = new HBox();

            bottomHBox.Name = "bottomHBox";
            VBox.PackStart(bottomHBox, false, false, 0);

            // Cancel button - bottom left.
            var cancelButtonBox = new HButtonBox();

            cancelButtonBox.Name        = "cancelButtonBox";
            cancelButtonBox.BorderWidth = 16;
            cancelButton          = new Button();
            cancelButton.Name     = "cancelButton";
            cancelButton.Label    = "gtk-cancel";
            cancelButton.UseStock = true;
            cancelButtonBox.PackStart(cancelButton, false, false, 0);
            bottomHBox.PackStart(cancelButtonBox, false, false, 0);

            // Previous button - bottom right.
            var previousNextButtonBox = new HButtonBox();

            previousNextButtonBox.Name        = "previousNextButtonBox";
            previousNextButtonBox.BorderWidth = 16;
            previousNextButtonBox.Spacing     = 9;
            bottomHBox.PackStart(previousNextButtonBox);
            previousNextButtonBox.Layout = ButtonBoxStyle.End;

            previousButton           = new Button();
            previousButton.Name      = "previousButton";
            previousButton.Label     = GettextCatalog.GetString("Previous");
            previousButton.Sensitive = false;
            previousNextButtonBox.PackEnd(previousButton);

            // Next button - bottom right.
            nextButton       = new Button();
            nextButton.Name  = "nextButton";
            nextButton.Label = GettextCatalog.GetString("Next");
            previousNextButtonBox.PackEnd(nextButton);

            // Remove default button action area.
            VBox.Remove(ActionArea);

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

            Show();

            templatesTreeView.HasFocus = true;
            Resizable = false;
        }
Beispiel #9
0
        void InitializeComponent()
        {
            DefaultSize = new Size(600, 400);

            var mainVbox = new Gtk.VBox();

            progressBar = new ProgressBar();

            //blockedProgressBar = new BlockedProgressBarWidget();
            segmentList = new SegmentList(_downloader);
            //segmentList.QueueDraw();
            lblUrl = new Label("");
            mainVbox.PackStart(lblUrl, false, false, 0);

            Table tbl = new Table(6, 2, false);

            tbl.Attach(new Label("Status"), 0, 1, 0, 1, AttachOptions.Shrink, AttachOptions.Shrink, 10, 5);
            lblStatus = new Label("");
            tbl.Attach(lblStatus, 1, 2, 0, 1);

            tbl.Attach(new Label("File Size"), 0, 1, 1, 2, AttachOptions.Shrink, AttachOptions.Shrink, 10, 5);
            lblFileSize = new Label("");
            tbl.Attach(lblFileSize, 1, 2, 1, 2);

            tbl.Attach(new Label("Transferred"), 0, 1, 2, 3, AttachOptions.Shrink, AttachOptions.Shrink, 10, 5);
            lblTransferred = new Label("");
            tbl.Attach(lblTransferred, 1, 2, 2, 3);

            tbl.Attach(new Label("Transfer Rate"), 0, 1, 3, 4, AttachOptions.Shrink, AttachOptions.Shrink, 10, 5);
            lblTransferRate = new Label("");
            tbl.Attach(lblTransferRate, 1, 2, 3, 4);

            tbl.Attach(new Label("Time Left"), 0, 1, 4, 5, AttachOptions.Shrink, AttachOptions.Shrink, 10, 5);
            lblTimeLeft = new Label("");
            tbl.Attach(lblTimeLeft, 1, 2, 4, 5);

            tbl.Attach(new Label("Resumable?"), 0, 1, 5, 6, AttachOptions.Shrink, AttachOptions.Shrink, 10, 5);
            lblResumable = new Label("");
            tbl.Attach(lblResumable, 1, 2, 5, 6);

            mainVbox.PackStart(tbl, false, false, 10);
            mainVbox.PackStart(progressBar, false, false, 10);
            // mainVbox.PackStart(blockedProgressBar,false,false,10);

            HButtonBox hb = new HButtonBox();

            Button btn = new Button("Cancel");

            btn.Clicked += StopDownload;
            hb.PackEnd(btn, true, true, 0);

            toggleStateButton          = new Button(_downloader.State == DownloaderState.Working ? "Pause" : "Resume");
            toggleStateButton.Clicked += ToggleDownloaderState;
            //toggleStateButton.Activated += ToggleDownloaderState;
            hb.PackEnd(toggleStateButton, true, true, 0);

            mainVbox.PackStart(hb);

            var scrollWindow = new ScrolledWindow();

            scrollWindow.Child = segmentList;
            mainVbox.PackStart(scrollWindow, true, true, 10);

            VBox.PackStart(mainVbox);
            ShowAll();

            // start a timer to refresh download info
            timer = new Timer {
                Interval = 500, Enabled = true
            };
            timer.Elapsed += RefreshCallback;
            //Realized += (sender, args) => SetSignals();
            Destroyed += (sender, args) =>
            {
                timer.Stop();
                //UnsetSignals();
            };
        }
Beispiel #10
0
        private void build()
        {
            this.Title = "New Battlelords Character";
            {
                // page 1 - intro
                Gtk.TextView   tv = new Gtk.TextView();
                Gtk.TextBuffer tb;
                tb = tv.Buffer;
                //tb.Text = MediaManager.GetHtml("intro.html");
                tb.Text = "Welcome to the Battlelords Character Asistant.\n" +
                          "\nThis will guide you thru the initial player character generation. " +
                          "You will be presented with some initial options that can not change " +
                          "once the character is created. " +
                          "\nStep 1" +
                          "\nStep 2" +
                          "\nStep 3" +
                          "\nStep 4" +
                          "\nConculsion";
                tv.WrapMode = WrapMode.Word;
                tv.Editable = false;

                this.AppendPage(tv);
                this.SetPageTitle(tv, "Introduction");
                this.SetPageType(tv, AssistantPageType.Intro);
                this.SetPageComplete(tv, true);
            }
            {
                // page 2 - rolling method
                string method1 = "Percentile dice are rolled and marked down in order of the given visual statistics. " +
                                 "Eight rolls are initially made. The player then makes three additional dice rolls. " +
                                 "He has the option of replacing any three previously rolled statistics with one of these number. " +
                                 "Players may not move rolls around! First roll is Strength, second roll is Manual Dexterity, etc.";
                Gtk.VBox     vb      = new Gtk.VBox();
                Gtk.HBox     hb1     = new Gtk.HBox();
                Gtk.Label    lb1     = new Gtk.Label("Rolling Method");
                string[]     entries = { "Method 1", "Method 2", "Method 3", "Fill In" };
                Gtk.ComboBox cb1     = new Gtk.ComboBox(entries);
                hb1.PackStart(lb1, true, false, 0);
                hb1.PackEnd(cb1, true, false, 0);
                cb1.Active = 0;
                Gtk.HBox        hb2 = new Gtk.HBox();
                Gtk.CheckButton b1  = new Gtk.CheckButton("Max Body Points");
                Gtk.CheckButton b2  = new Gtk.CheckButton("Max Starting Money");
                b1.Active = true;
                b2.Active = true;
                hb2.PackStart(b1, true, false, 1);
                hb2.PackEnd(b2, true, false, 1);
                Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
                Gtk.TextView       tv = new Gtk.TextView();
                tv.WrapMode = WrapMode.Word;
                tv.Editable = false;
                Gtk.TextBuffer tb = tv.Buffer;
                tb.Text = method1;
                sw.Add(tv);
                //vb.PackStart(hb1, false, false, 0);
                vb.PackStart(hb2, false, false, 0);
                //vb.PackEnd(sw, true, true, 0);

                this.AppendPage(vb);
                this.SetPageTitle(vb, "Rolling Options");
                this.SetPageType(vb, AssistantPageType.Content);
                this.SetPageComplete(vb, true);
            }
            {
                // page 3 - race
                TreeStore ts = new TreeStore(typeof(string), typeof(string));
                foreach (BattlelordsRace r in this.session.Races)
                {
                    ts.AppendValues(r.Name, r.Name);
                }
                TreeView tv = new TreeView(ts);
                tv.HeadersVisible = true;
                tv.AppendColumn("Battlelords Race", new CellRendererText(), "text", 0);

                this.AppendPage(tv);
                this.SetPageTitle(tv, "Select Race");
                this.SetPageType(tv, AssistantPageType.Content);
                this.SetPageComplete(tv, true);
            }
            {
                // page 4 - Basics page

                /*
                 * 1 char name
                 * 2 player name
                 * 3 height
                 * 4 weight
                 * 5 body pts
                 * 6 start money
                 */
                Gtk.VBox vb2 = new Gtk.VBox();

                Gtk.HBox  hb1 = new Gtk.HBox();
                Gtk.Label lb1 = new Gtk.Label("Player's Name:");
                Gtk.Entry en1 = new Gtk.Entry();
                hb1.PackStart(lb1, false, false, 0);
                hb1.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb1.PackEnd(en1, true, true, 0);

                Gtk.HBox  hb2 = new Gtk.HBox();
                Gtk.Label lb2 = new Gtk.Label("Character's Name:");
                Gtk.Entry en2 = new Gtk.Entry();
                hb2.PackStart(lb2, false, false, 0);
                hb2.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb2.PackEnd(en2, true, true, 0);

                Gtk.HBox  hb3 = new Gtk.HBox();
                Gtk.Label lb3 = new Gtk.Label("Height (ft):");
                Gtk.Entry en3 = new Gtk.Entry();
                en3.Sensitive = false;
                Gtk.Button b3 = new Gtk.Button();
                //b3.Label = "roll";
                b3.TooltipText = "Click here to roll height.";
                b3.Image       = MediaManager.GetImageFromBaseFile("dice.png");
                hb3.PackStart(lb3, false, false, 0);
                hb3.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb3.PackStart(en3, true, true, 0);
                hb3.PackEnd(b3, false, false, 0);

                Gtk.HBox  hb4 = new Gtk.HBox();
                Gtk.Label lb4 = new Gtk.Label("Weight (lbs):");
                Gtk.Entry en4 = new Gtk.Entry();
                en4.Sensitive = false;
                Gtk.Button b4 = new Gtk.Button();
                //b4.Label = "roll";
                b4.TooltipText = "Click here to roll for weight.";
                b4.Image       = MediaManager.GetImageFromBaseFile("dice.png");
                hb4.PackStart(lb4, false, false, 0);
                hb4.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb4.PackStart(en4, true, true, 0);
                hb4.PackEnd(b4, false, false, 0);

                Gtk.HBox  hb5 = new Gtk.HBox();
                Gtk.Label lb5 = new Gtk.Label("Body Points:");
                Gtk.Entry en5 = new Gtk.Entry();
                en5.Sensitive = false;
                Gtk.Button b5 = new Gtk.Button();
                b5.TooltipText = "Click here to roll for body points.";
                b5.Image       = MediaManager.GetImageFromBaseFile("dice.png");
                hb5.PackStart(lb5, false, false, 0);
                hb5.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb5.PackStart(en5, true, true, 0);
                hb5.PackEnd(b5, false, false, 0);

                Gtk.HBox  hb6 = new Gtk.HBox();
                Gtk.Label lb6 = new Gtk.Label("Starting Money:");
                Gtk.Entry en6 = new Gtk.Entry();
                en6.Sensitive = false;
                Gtk.Button b6 = new Gtk.Button();
                b6.TooltipText = "Click here to roll for starting money.";
                b6.Image       = MediaManager.GetImageFromBaseFile("dice.png");
                hb6.PackStart(lb6, false, false, 0);
                hb6.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb6.PackStart(en6, true, true, 0);
                hb6.PackEnd(b6, false, false, 0);

                vb2.PackStart(hb1, false, false, 0);
                vb2.PackStart(hb2, false, false, 0);
                vb2.PackStart(hb3, false, false, 0);
                vb2.PackStart(hb4, false, false, 0);
                vb2.PackStart(hb5, false, false, 0);
                vb2.PackStart(hb6, false, false, 0);

                this.AppendPage(vb2);
                this.SetPageTitle(vb2, "Enter Basic Information");
                this.SetPageType(vb2, AssistantPageType.Content);
                this.SetPageComplete(vb2, true);
            }
            {
                // page 5 - vitals
                VBox         vb5 = new VBox();
                Gtk.Notebook nb  = new Gtk.Notebook();
                //Battle.Gui.VitalsControl stvc = new Battle.Gui.VitalsControl(this.session);
                //stvc.Sensitive = false;
                VitalsControl m1vitals   = new VitalsControl(this.session);
                VitalsControl m2vitals   = new VitalsControl(this.session);
                VitalsControl m3vitals   = new VitalsControl(this.session);
                VitalsControl fillvitals = new VitalsControl(this.session);

                m1vitals.Enabled = false;
                m2vitals.Enabled = false;
                m3vitals.Enabled = false;

                nb.AppendPage(m1vitals, new Gtk.Label("Method 1"));
                nb.AppendPage(m2vitals, new Gtk.Label("Method 2"));
                nb.AppendPage(m3vitals, new Gtk.Label("Method 3"));
                nb.AppendPage(fillvitals, new Gtk.Label("Fill In"));

                HButtonBox bb5     = new HButtonBox();
                Button     rollBtn = new Button(Stock.Execute);
                rollBtn.Clicked += delegate(object sender, EventArgs e) {
                    Console.WriteLine("{0}", sender.GetType().ToString());
                };
                rollBtn.Label = "Roll";
                Button saveBtn = new Button(Stock.Save);
                saveBtn.Label = "Save";
                bb5.PackStart(rollBtn);
                bb5.PackEnd(saveBtn);
                nb.SwitchPage += delegate(object o, SwitchPageArgs args) {
                    if (args.PageNum == 3)
                    {
                        rollBtn.Sensitive = false;
                    }
                    else
                    {
                        rollBtn.Sensitive = true;
                    }
                };

                vb5.Add(nb);
                vb5.Add(bb5);

                this.AppendPage(vb5);
                this.SetPageTitle(vb5, "Enter Vitals");
                this.SetPageType(vb5, AssistantPageType.Content);
                this.SetPageComplete(vb5, true);
            }
            {
                // page 6 - secondaries
                Gtk.Label             not_completed_label = new Gtk.Label("not completed");
                Pango.FontDescription d = new Pango.FontDescription();
                d.Style = Pango.Style.Italic;
                not_completed_label.ModifyFont(d);

                this.AppendPage(not_completed_label);
                this.SetPageTitle(not_completed_label, "Enter Secondary Attributes");
                this.SetPageType(not_completed_label, AssistantPageType.Content);
                this.SetPageComplete(not_completed_label, true);
            }
            {
                // page 7 - fate
                Gtk.Label             not_completed_label = new Gtk.Label("not completed");
                Pango.FontDescription d = new Pango.FontDescription();
                d.Style = Pango.Style.Italic;
                not_completed_label.ModifyFont(d);

                this.AppendPage(not_completed_label);
                this.SetPageTitle(not_completed_label, "Determine Fate");
                this.SetPageType(not_completed_label, AssistantPageType.Content);
                this.SetPageComplete(not_completed_label, true);
            }
            {
                // page 8 - social
                Gtk.Label             not_completed_label = new Gtk.Label("not completed");
                Pango.FontDescription d = new Pango.FontDescription();
                d.Style = Pango.Style.Italic;
                not_completed_label.ModifyFont(d);

                this.AppendPage(not_completed_label);
                this.SetPageTitle(not_completed_label, "Social Status");
                this.SetPageType(not_completed_label, AssistantPageType.Content);
                this.SetPageComplete(not_completed_label, true);
            }
            {
                // page 9 - skills
                Gtk.Label             not_completed_label = new Gtk.Label("not completed");
                Pango.FontDescription d = new Pango.FontDescription();
                d.Style = Pango.Style.Italic;
                not_completed_label.ModifyFont(d);

                this.AppendPage(not_completed_label);
                this.SetPageTitle(not_completed_label, "Choose Initial Skills");
                this.SetPageType(not_completed_label, AssistantPageType.Content);
                this.SetPageComplete(not_completed_label, true);
            }
            {
                // page 10 - matrixes
                Gtk.Label             not_completed_label = new Gtk.Label("not completed");
                Pango.FontDescription d = new Pango.FontDescription();
                d.Style = Pango.Style.Italic;
                not_completed_label.ModifyFont(d);

                this.AppendPage(not_completed_label);
                this.SetPageTitle(not_completed_label, "Choose Initial Matrixes");
                this.SetPageType(not_completed_label, AssistantPageType.Content);
                this.SetPageComplete(not_completed_label, true);
            }
            {
                // page 11 - confirm
                TextView   tv11 = new TextView();
                TextBuffer b11  = tv11.Buffer;
                b11.Text      = "Confirm this new character.";
                tv11.Editable = false;
                this.AppendPage(tv11);
                this.SetPageTitle(tv11, "Confirm New Character");
                this.SetPageType(tv11, AssistantPageType.Confirm);
                this.SetPageComplete(tv11, true);
            }
            this.Close  += HandleHandleClose;
            this.Cancel += HandleHandleCancel;
            this.ShowAll();
        }