Exemple #1
0
        void Build()
        {
            Title  = GettextCatalog.GetString("Template Categories");
            Width  = 640;
            Height = 480;

            var mainVBox = new VBox();

            mainVBox.Margin = 15;

            Content = mainVBox;

            // TreeView
            templateCategoriesWidget = new TemplateCategoriesWidget();
            mainVBox.PackStart(templateCategoriesWidget, true, true);

            // OK and Cancel buttons.
            cancelButton          = new DialogButton(Command.Cancel);
            cancelButton.Clicked += (sender, e) => Close();

            Buttons.Add(cancelButton);

            okButton           = new DialogButton(Command.Ok);
            okButton.Sensitive = false;
            Buttons.Add(okButton);
        }
Exemple #2
0
        void Build()
        {
            var mainVBox = new VBox();

            var topLabel = new Label();

            topLabel.Text          = GettextCatalog.GetString("Category changes will take effect the next time you start {0}.", BrandingService.ApplicationName);
            topLabel.TextAlignment = Alignment.Start;
            topLabel.Margin        = 5;
            mainVBox.PackStart(topLabel);

            var mainHBox = new HBox();

            mainVBox.PackStart(mainHBox, true, true);

            templateCategoriesWidget = new TemplateCategoriesWidget();
            mainHBox.PackStart(templateCategoriesWidget, true, true);

            var buttonsVBox = new VBox();

            mainHBox.PackStart(buttonsVBox, false, false);

            addTopLevelCategoryButton       = new Button();
            addTopLevelCategoryButton.Label = GettextCatalog.GetString("Add Top Level Category");
            buttonsVBox.PackStart(addTopLevelCategoryButton, false, false);

            addCategoryButton           = new Button();
            addCategoryButton.Label     = GettextCatalog.GetString("Add Category");
            addCategoryButton.Sensitive = false;
            buttonsVBox.PackStart(addCategoryButton, false, false);

            removeCategoryButton           = new Button();
            removeCategoryButton.Label     = GettextCatalog.GetString("Remove Category");
            removeCategoryButton.Sensitive = false;
            buttonsVBox.PackStart(removeCategoryButton, false, false);

            categoryInformationVBox           = new VBox();
            categoryInformationVBox.Sensitive = false;
            mainVBox.PackStart(categoryInformationVBox, false, false);

            string title = GettextCatalog.GetString("Top Level");

            AddCategorySectionTitleLabel(categoryInformationVBox, title);

            topLevelCategoryWidget = new TemplateCategoryWidget();
            categoryInformationVBox.PackStart(topLevelCategoryWidget);

            title = GettextCatalog.GetString("Second Level");
            AddCategorySectionTitleLabel(categoryInformationVBox, title);

            secondLevelCategoryWidget = new TemplateCategoryWidget();
            categoryInformationVBox.PackStart(secondLevelCategoryWidget);

            title = GettextCatalog.GetString("Third Level");
            AddCategorySectionTitleLabel(categoryInformationVBox, title);

            thirdLevelCategoryWidget = new TemplateCategoryWidget();
            categoryInformationVBox.PackStart(thirdLevelCategoryWidget);

            Content = mainVBox;
        }