public DateEntryView(string title, LayoutStack layoutStack, bool placeTitleAbove = true) { this.layoutStack = layoutStack; this.chooseDate_button = new Button(); this.chooseDate_button.Clicked += ChooseDate_button_Clicked; this.title = title; LayoutChoice_Set titleLayout = new TextblockLayout(title).AlignHorizontally(TextAlignment.Center).AlignVertically(TextAlignment.Center); LayoutChoice_Set contentLayout = ButtonLayout.WithoutBevel(this.chooseDate_button); if (placeTitleAbove) { this.SubLayout = new Vertical_GridLayout_Builder().Uniform() .AddLayout(titleLayout) .AddLayout(contentLayout) .Build(); } else { this.SubLayout = new Horizontal_GridLayout_Builder().Uniform() .AddLayout(titleLayout) .AddLayout(contentLayout) .Build(); } // Use a dateFormat of "yyyy-MM-ddTHH:mm:ss"; this.dateFormat.Add(new DateCharacter('y', true)); this.dateFormat.Add(new DateCharacter('y', true)); this.dateFormat.Add(new DateCharacter('y', true)); this.dateFormat.Add(new DateCharacter('y', true)); this.dateFormat.Add(new DateCharacter('-', false)); this.dateFormat.Add(new DateCharacter('M', true)); this.dateFormat.Add(new DateCharacter('M', true)); this.dateFormat.Add(new DateCharacter('-', false)); this.dateFormat.Add(new DateCharacter('d', true)); this.dateFormat.Add(new DateCharacter('d', true)); this.dateFormat.Add(new DateCharacter('T', false)); this.dateFormat.Add(new DateCharacter('H', true)); this.dateFormat.Add(new DateCharacter('H', true)); this.dateFormat.Add(new DateCharacter(':', false)); this.dateFormat.Add(new DateCharacter('m', true)); this.dateFormat.Add(new DateCharacter('m', true)); this.dateFormat.Add(new DateCharacter(':', false)); this.dateFormat.Add(new DateCharacter('s', true)); this.dateFormat.Add(new DateCharacter('s', true)); this.implView = new FullscreenDateEntryView(title, this.dateFormat, layoutStack); }
public HelpDurationInput_Layout(LayoutStack layoutStack) { this.layoutStack = layoutStack; Button button = new Button(); button.Clicked += Button_Clicked; this.button = button; ButtonLayout buttonLayout = ButtonLayout.WithoutBevel(button); this.SubLayout = buttonLayout; this.detailsLayout = new HelpDurationInput_DetailsLayout(); this.updateButtonText(); }