public Customize_ScoringRules_Layout(UserPreferences_Database userPreferencesDatabase, LayoutStack layoutStack) { this.userPreferencesDatabase = userPreferencesDatabase; this.layoutStack = layoutStack; this.viewLayout = new View_ScoringRules_Layout(userPreferencesDatabase); this.newRule_layout = new New_ScoringRule_Layout(userPreferencesDatabase); BoundProperty_List rowHeights = new BoundProperty_List(2); rowHeights.BindIndices(0, 1); rowHeights.SetPropertyScale(0, 7); rowHeights.SetPropertyScale(1, 1); GridLayout grid = GridLayout.New(rowHeights, new BoundProperty_List(1), LayoutScore.Zero); grid.AddLayout(this.viewLayout); Button newRuleButton = new Button(); newRuleButton.Clicked += NewRuleButton_Clicked; grid.AddLayout(new ButtonLayout(newRuleButton, "New Rule")); this.SubLayout = ScrollLayout.New(grid); }
public ExportPreferences_Layout(UserPreferences_Database database, LayoutStack layoutStack) { this.database = database; this.layoutStack = layoutStack; Button exportButton = new Button(); exportButton.Clicked += ExportButton_Clicked; this.SubLayout = new ButtonLayout(exportButton, "Export"); }
public New_ScoringRule_Layout(UserPreferences_Database userPreferencesDatabase) { this.userPreferencesDatabase = userPreferencesDatabase; this.progressContainer = new ContainerLayout(); LayoutChoice_Set controlsContainer = this.makeControls(); this.SubLayout = new Vertical_GridLayout_Builder().AddLayout(this.progressContainer).AddLayout(controlsContainer).Build(); this.Clear(); }
public CustomizePreferences_Layout(UserPreferences_Database userPreferencesDatabase, LayoutStack layoutStack) { ImportPreferences_Layout importLayout = new ImportPreferences_Layout(); importLayout.RequestImport += ImportLayout_RequestImport; this.SubLayout = new MenuLayoutBuilder(layoutStack) .AddLayout("Add/Edit Rules", new Customize_ScoringRules_Layout(userPreferencesDatabase, layoutStack)) .AddLayout("Add/Edit Feeds", new Customize_FeedUrls_Layout(userPreferencesDatabase)) .AddLayout("Import Preferences", importLayout) .AddLayout("Export Preferences", new ExportPreferences_Layout(userPreferencesDatabase, layoutStack)) .Build(); }
public Customize_FeedUrls_Layout(UserPreferences_Database userPreferencesDatabase) { // save some properties this.userPreferencesDatabase = userPreferencesDatabase; // setup display Vertical_GridLayout_Builder newFeedBuilder = new Vertical_GridLayout_Builder(); TextblockLayout newFeedHelp = new TextblockLayout("Add new feed:"); newFeedHelp.setBackgroundColor(Color.Black); newFeedHelp.setTextColor(Color.White); newFeedBuilder.AddLayout(newFeedHelp); this.newFeedBox = new Editor(); newFeedBuilder.AddLayout(new TextboxLayout(this.newFeedBox)); Button newFeedButton = new Button(); newFeedButton.Clicked += NewFeedButton_Clicked; newFeedBuilder.AddLayout(new ButtonLayout(newFeedButton, "Add")); this.newFeedsLayout = newFeedBuilder.Build(); this.updateLayout(); }
public View_ScoringRules_Layout(UserPreferences_Database userPreferencesDatabase) { this.userPreferencesDatabase = userPreferencesDatabase; this.UpdateLayout(); }