public ScreenSection() { var layout = new DynamicLayout { DefaultSpacing = new Size(5, 5), Padding = new Padding(10) }; screens = Screen.Screens.ToArray(); layout.BeginCentered(); layout.Add($"Display Bounds: {displayBounds}"); layout.BeginVertical(Padding.Empty); var num = 0; foreach (var screen in screens) { layout.Add($"Screen {num++}, BitsPerPixel: {screen.BitsPerPixel}, IsPrimary: {screen.IsPrimary}"); layout.BeginVertical(new Padding(10, 0)); layout.Add($"Bounds: {screen.Bounds}"); layout.Add($"WorkingArea: {screen.WorkingArea}"); layout.Add($"DPI: {screen.DPI}, Scale: {screen.Scale}, LogicalPixelSize: {screen.LogicalPixelSize}"); layout.EndVertical(); } layout.EndVertical(); layout.Add(windowPositionLabel = new Label()); layout.EndCentered(); layout.Add(ScreenLayout()); Content = layout; }
public LineStyleEditor(RipHandler handler) { this.Title = "Custom Line Style"; this.handler = handler; //this.Resizable = true; var layout = new DynamicLayout(); layout.BeginVertical(yscale: true); layout.Add(Design()); layout.Add(Preview(), yscale: true); layout.EndVertical(); layout.BeginVertical(); layout.BeginHorizontal(); layout.Add(null, true); layout.Add(CancelButton()); layout.Add(OkButton()); layout.EndHorizontal(); layout.EndVertical(); Content = layout; }
public LineStylePad(RipHandler handler, bool allowStyles) { this.handler = handler; var layout = new DynamicLayout { Padding = Padding.Empty, Spacing = Size.Empty }; layout.BeginVertical(Padding.Empty, Size.Empty); layout.BeginHorizontal(); layout.Add(LineSize(1), true); layout.Add(LineSize(3), true); layout.EndHorizontal(); layout.EndVertical(); if (allowStyles) { layout.Add(LineStyle(BGICanvas.LineStyle.Solid)); layout.Add(LineStyle(BGICanvas.LineStyle.Dotted)); layout.Add(LineStyle(BGICanvas.LineStyle.Dashed)); layout.Add(LineStyle(BGICanvas.LineStyle.Center)); layout.Add(LineStyle(BGICanvas.LineStyle.User)); layout.BeginVertical(new Padding(0, 5, 0, 0)); layout.AddRow(null, EditLineStyle(), null); layout.EndVertical(); } Content = layout; }
public UpdateDialog(LogDataProcessor logProcessor, IReadOnlyList <LogUpdateList> updates) { Title = "Manager update - arcdps Log Manager"; ClientSize = new Size(500, -1); var layout = new DynamicLayout(); Content = layout; layout.BeginVertical(new Padding(10), new Size(10, 20)); { layout.BeginVertical(spacing: new Size(0, 0)); { // This is a very hacky solution for WrapMode.Word not working properly on the Gtk platform layout.AddRow(new Label { Text = "This new version of the log manager brings improvements for processing some of the ", Wrap = WrapMode.None }); layout.AddRow(new Label { Text = "logs. They have to be processed again to correctly update the data. Affected logs are ", Wrap = WrapMode.None }); layout.AddRow(new Label { Text = "listed below. Do you wish to do so now?", Wrap = WrapMode.None }); layout.AddRow(null); } layout.EndVertical(); layout.AddRow(ConstructGridView(updates)); } layout.EndVertical(); var later = new Button { Text = "Later" }; var yes = new Button { Text = "Yes" }; later.Click += (sender, args) => Close(); yes.Click += (sender, args) => { foreach (var update in updates) { foreach (var log in update.UpdateableLogs) { logProcessor.Schedule(log); } } Close(); }; AbortButton = later; DefaultButton = yes; PositiveButtons.Add(yes); NegativeButtons.Add(later); }
// Puts all of the stuff where it belongs. public void createUI() { layout.DefaultSpacing = new Size(5, 5); layout.Padding = new Padding(10, 10, 10, 10); layout.BeginHorizontal(); layout.BeginVertical(); layout.BeginGroup("Set Current User", new Padding(10, 10, 10, 10)); layout.BeginHorizontal(); layout.BeginVertical(padding: new Padding(0, 0, 0, 10)); layout.AddAutoSized(new Label { Text = "Search User Name" }); layout.BeginHorizontal(); layout.AddAutoSized(nameBox); layout.AddAutoSized(search); layout.EndHorizontal(); layout.EndVertical(); layout.EndHorizontal(); layout.BeginHorizontal(); layout.BeginVertical(padding: new Padding(0, 0, 0, 10)); layout.AddAutoSized(new Label { Text = "User IDs" }); layout.AddAutoSized(nameList); layout.EndVertical(); layout.EndHorizontal(); layout.EndGroup(); layout.EndVertical(); layout.EndHorizontal(); }
public PrintDialogSection() { this.DataContext = settings; var layout = new DynamicLayout(); layout.BeginVertical(); layout.BeginHorizontal(); layout.Add(null); layout.BeginVertical(Padding.Empty); layout.AddSeparateRow(null, ShowPrintDialog(), null); layout.AddSeparateRow(null, PrintFromGraphicsWithDialog(), null); layout.AddSeparateRow(null, PrintFromGraphics(), null); layout.EndBeginVertical(); layout.Add(PrintDialogOptions()); layout.Add(null); layout.EndVertical(); layout.Add(null); layout.EndHorizontal(); layout.EndVertical(); layout.AddSeparateRow(null, PageRange(), Settings(), null); layout.Add(null); Content = layout; }
Control Design() { var layout = new DynamicLayout(); layout.AddCentered(Grid(), xscale: true, yscale: false); layout.BeginVertical(Padding.Empty); layout.BeginHorizontal(); layout.Add(null, true); layout.Add(ClearAllButton()); layout.Add(InvertButton()); layout.Add(null, true); layout.EndHorizontal(); layout.EndVertical(); layout.BeginVertical(Padding.Empty); layout.BeginHorizontal(); layout.Add(MoveUpButton()); layout.Add(MoveDownButton()); layout.Add(MoveLeftButton()); layout.Add(MoveRightButton()); layout.EndHorizontal(); layout.EndVertical(); return(new GroupBox { Text = "Design", Content = layout }); }
public DrawableSection() { var layout = new DynamicLayout(); layout.BeginVertical(); layout.BeginHorizontal(); layout.Add(new Label { Text = "Default" }); layout.Add(this.Default(), xscale: true); layout.Add(new Label { Text = "With Background" }); layout.Add(this.WithBackground(), xscale: true); layout.EndHorizontal(); layout.EndVertical(); layout.BeginVertical(); // use a separate containing panel to test calculations in those cases layout.AddRow(new Label { Text = "Large Canvas" }, new Panel { Content = this.LargeCanvas() }); layout.EndVertical(); layout.Add(null); Content = layout; }
public ColourEditor(RipHandler handler) { this.handler = handler; this.Title = "Color Editor"; colors = handler.BGI.GetPalette(); var layout = new DynamicLayout(); layout.BeginVertical(); layout.BeginHorizontal(); layout.Add(Colours()); //layout.Add (null, true); layout.Add(Sliders(), true); //layout.Add (null, true); layout.Add(EGAColours()); layout.EndHorizontal(); layout.EndVertical(); layout.BeginVertical(); layout.BeginHorizontal(); layout.Add(SetDefaultButton()); layout.Add(null, true); layout.Add(CancelButton()); layout.Add(OkButton()); layout.EndHorizontal(); layout.EndVertical(); Content = layout; SetupSliders(); }
public ParametersSelectorForm() { // Dialog box initialization Title = "Select objects by parameter"; Resizable = false; Maximizable = false; Width = 350; Topmost = true; // Buttons handlers binding Select_button.Click += OnSelectButtonClick; Reset_button.Click += OnResetButtonClick; // Table layout to add all the controls DynamicLayout layout = new DynamicLayout { Spacing = new Size(15, 15), Padding = new Padding(10) }; layout.BeginVertical(); layout.AddRow(Param_name_label); layout.AddRow(Param_name_textbox); layout.EndVertical(); layout.BeginVertical(); layout.AddRow(Param_value_label); layout.AddRow(Comparison_value, Param_value_textbox); layout.EndVertical(); layout.BeginVertical(); layout.AddRow(Add_to_selection_checkbox); layout.EndVertical(); layout.AddSeparateRow(null, Select_button, null, Reset_button, null); Content = layout; }
public void ImagesLayout(ref DynamicLayout layout) { // Transverse layout.BeginVertical(2, null, true, true); layout.Add(new ImageView { Image = bmpT }, true, true); layout.EndVertical(); /// Other Views layout.BeginVertical(2, null, true); // Sagittal layout.BeginVertical(2, null, true, true); layout.Add(new ImageView { Image = bmpS }, true); layout.EndVertical(); // Coronal layout.BeginVertical(2, null, true, true); layout.Add(new ImageView { Image = bmpC }, true); layout.EndVertical(); // End Other Views layout.EndVertical(); }
public ColourEditor(CharacterHandler handler) { this.handler = handler; Title = "Palette Editor"; #if DESKTOP Resizable = true; #endif this.Palette = handler.CurrentPage.Palette.Clone(); var layout = new DynamicLayout(); layout.Add(new Label { Text = "Double click a colour to change it. Note that most formats only support up to 16 colours, except for Tundra and Ansi format", Wrap = WrapMode.Word, HorizontalAlign = HorizontalAlign.Center, VerticalAlign = VerticalAlign.Middle, Size = new Size(50, 50) }); layout.BeginVertical(xscale: true, yscale: true); layout.BeginHorizontal(); layout.Add(ColoursHolder(), true); layout.Add(ColourButtons()); layout.EndHorizontal(); layout.EndVertical(); layout.BeginVertical(); layout.AddRow(SetDefaultButton(), null, CancelButton(), OkButton()); layout.EndVertical(); Content = layout; UpdateColours(); }
public RenameDialog(string fileName) { this.DisplayMode = DialogDisplayMode.Attached; this.Title = "Rename File / Directory"; this.MinimumSize = new Size(320, 10); this.Resizable = true; this.name = Path.GetFileName(fileName); this.path = Path.GetDirectoryName(fileName); var layout = new DynamicLayout { Padding = new Padding(20, 10) }; layout.BeginVertical(Padding.Empty, Size.Empty); layout.BeginHorizontal(); layout.Add(new Label { Text = "File Name" }); layout.Add(FileNameControl(), true); layout.EndHorizontal(); layout.EndVertical(); layout.BeginVertical(Padding.Empty, Size.Empty); layout.BeginHorizontal(); layout.Add(null, true); layout.Add(CancelButton()); layout.Add(OkButton()); layout.EndHorizontal(); layout.EndVertical(); Content = layout; }
public void OtherSidebarLayout(ref DynamicLayout layout) { // Other Sidebar layout.BeginVertical(null, null, false, true); // Sagittal layout.BeginVertical(null, null, false, true); layout.Add(new Label { Text = "Slice Thickness: " + RetrieveTag <decimal>(DicomTag.PixelSpacing, 0) }); layout.Add(new Label { Text = "Slice Position: " + RetrieveTag <decimal>(DicomTag.PixelSpacing, 0) * nS }); // Buttons layout.AddRow(new Label { Text = "" }); layout.BeginHorizontal(); layout.AddAutoSized(new Button { Text = "<", Command = prevS }); layout.AddAutoSized(new Button { Text = ">", Command = nextS }); layout.EndHorizontal(); layout.AddRow(null); layout.EndVertical(); // Coronal layout.BeginVertical(null, null, false, true); layout.Add(new Label { Text = "Slice Thickness: " + RetrieveTag <decimal>(DicomTag.PixelSpacing, 0) }); layout.Add(new Label { Text = "Slice Position: " + RetrieveTag <decimal>(DicomTag.PixelSpacing, 0) * nC }); // Buttons layout.AddRow(new Label { Text = "" }); layout.BeginHorizontal(); layout.AddAutoSized(new Button { Text = "<", Command = prevC }); layout.AddAutoSized(new Button { Text = ">", Command = nextC }); layout.EndHorizontal(); layout.AddRow(null); layout.EndVertical(); // End Other Sidebar layout.EndVertical(); }
public SettingsForm() { Title = "Settings - arcdps Log Manager"; ClientSize = new Size(400, -1); MinimumSize = new Size(400, 300); var pages = new SettingsPage[] { new LogsSettingsPage(), new ApiSettingsPage(), new DpsReportUploadSettingsPage(), new UpdateSettingsPage() }; var tabs = new TabControl(); foreach (var page in pages) { tabs.Pages.Add(page); } var saveButton = new Button { Text = "Save" }; saveButton.Click += (sender, args) => { foreach (var page in pages) { page.SaveSettings(); } SettingsSaved?.Invoke(this, EventArgs.Empty); Close(); }; var layout = new DynamicLayout(); layout.BeginVertical(new Padding(10)); { layout.Add(tabs); } layout.EndVertical(); layout.Add(null); layout.BeginVertical(new Padding(10)); { layout.BeginHorizontal(); { layout.Add(null, xscale: true); layout.Add(saveButton, xscale: false); } layout.EndHorizontal(); } layout.EndVertical(); Content = layout; }
public MainForm() { Icon = Icon.FromResource("icon.ico", typeof(MainForm).Assembly); ClientSize = new Size(640, 120); Title = "Таймер .Net"; startButton.Text = "Пуск"; stopButton.Text = "Стоп"; ChangeState(); minutes.MinValue = 0; minutes.Value = 0; minutes.MaxValue = 99; seconds.MinValue = 0; seconds.MaxValue = 60; seconds.Value = 15; periodic.Text = "Повторять"; var layout = new DynamicLayout(); updateInfo.Text = "00:00"; layout.BeginVertical(); // fields section layout.AddRow(updateInfo, " ", progress); layout.EndVertical(); layout.EndVertical(); Content = new TableLayout { Padding = new Padding(10), // padding around cells Spacing = new Size(5, 5), // spacing between each cell Rows = { new TableRow(new StackLayout { Spacing = 5, Orientation = Orientation.Horizontal, Items = { new Label { Text = "Минуты:" }, minutes, new Label{ Text = "Секунды:" }, seconds, periodic, startButton, stopButton } }), layout } }; startButton.Click += StartTimer; stopButton.Click += (o, e) => { isBreak = true; Finish(); }; timer.Elapsed += Update_Elapsed; timer.Interval = 1; }
Control Metrics() { var layout = new DynamicLayout { DefaultSpacing = new Size(5, 5) }; layout.BeginHorizontal(); layout.BeginVertical(); layout.Add(null); layout.AddRow("Descent", Descender()); layout.AddRow("Ascent", Ascender()); layout.AddRow("Leading", Leading()); layout.AddRow("MeasureString", MeasureString()); layout.Add(null); layout.EndBeginVertical(); layout.Add(null); layout.AddRow("BaseLine", BaseLine()); layout.AddRow("XHeight", XHeight()); layout.AddRow("LineHeight", LineHeight()); layout.Add(null); layout.EndBeginVertical(); layout.Add(null); layout.Add(MetricsPreview()); layout.Add(null); layout.EndVertical(); layout.EndHorizontal(); return(layout); }
public FontPickerSection() { var layout = new DynamicLayout(); layout.DefaultPadding = new Padding(10); layout.DefaultSpacing = new Size(4, 4); layout.BeginVertical(); layout.BeginHorizontal(); layout.Add(new Label { Text = "Default: ", VerticalAlignment = VerticalAlignment.Center }); var fontpicker1 = new FontPicker(); LogEvents(fontpicker1); layout.Add(fontpicker1, true, false); layout.EndHorizontal(); layout.BeginHorizontal(); layout.Add(new Label { Text = "Initial Value: ", VerticalAlignment = VerticalAlignment.Center }); var fontpicker2 = new FontPicker(new Font(SystemFont.Default)); LogEvents(fontpicker2); layout.Add(fontpicker2, true, false); layout.EndHorizontal(); layout.Add(null, false, true); layout.EndVertical(); Content = layout; }
Control Default() { var control = new ListBox { Size = new Size(100, 150) }; LogEvents(control); for (int i = 0; i < 10; i++) { control.Items.Add(new ListItem { Text = "Item " + i }); } var layout = new DynamicLayout(); layout.Add(control); layout.BeginVertical(); layout.AddRow(null, AddRowsButton(control), RemoveRowsButton(control), ClearButton(control), null); layout.EndVertical(); return(layout); }
public RadioButtonSection() { var layout = new DynamicLayout { DefaultSpacing = new Size(5, 5), Padding = new Padding(10) }; layout.BeginVertical(); layout.AddRow(new Label { Text = "Default" }, Default(), null); layout.AddRow(new Label { Text = "Set Initial Value" }, SetInitialValue(), null); layout.AddRow(new Label { Text = "Disabled" }, Disabled(), null); layout.EndVertical(); layout.Add(new RadioButton { Text = "With Larger Font", Font = SystemFonts.Label(40) }); layout.Add(new RadioButton { Text = "With Smaller Font", Font = SystemFonts.Label(6) }); layout.Add(null, null, true); Content = layout; }
Control TestProperties() { var layout = new DynamicLayout { DefaultSpacing = new Size(5, 5) }; DateTimePicker min, max, current, setValue; Button setButton; layout.AddRow("Min Value", min = new DateTimePicker()); layout.AddRow("Max Value", max = new DateTimePicker()); layout.BeginHorizontal(); layout.Add("Set to value"); layout.BeginVertical(Padding.Empty); layout.BeginHorizontal(); layout.AddAutoSized(setValue = new DateTimePicker()); layout.Add(setButton = new Button { Text = "Set" }); layout.EndHorizontal(); layout.EndVertical(); layout.EndHorizontal(); layout.AddRow("Value", current = new DateTimePicker()); min.ValueChanged += (sender, e) => current.MinDate = min.Value ?? DateTime.MinValue; max.ValueChanged += (sender, e) => current.MaxDate = max.Value ?? DateTime.MaxValue; setButton.Click += (sender, e) => current.Value = setValue.Value; LogEvents(current); return(layout); }
public ScreenSection() { var layout = new DynamicLayout(); screens = Screen.Screens().ToArray(); layout.AddSeparateRow(null, new Label { Text = string.Format("Display Bounds: {0}", displayBounds) }, null); layout.BeginVertical(Padding.Empty); var num = 0; foreach (var screen in screens) { layout.AddRow(null, new Label { Text = string.Format("Screen {0}", num++) }, new Label { Text = string.Format("BitsPerPixel: {0}, IsPrimary: {1}", screen.BitsPerPixel, screen.IsPrimary) }); layout.AddRow(null, new Label { Text = "Bounds:", HorizontalAlign = HorizontalAlign.Right }, new Label { Text = screen.Bounds.ToString() }, null); layout.AddRow(null, new Label { Text = "Working Area:", HorizontalAlign = HorizontalAlign.Right }, new Label { Text = screen.WorkingArea.ToString() }, null); } layout.EndVertical(); layout.Add(ScreenLayout()); Content = layout; }
public GraphicsPathSection() { StartFigures = true; PenThickness = 1; AntiAlias = true; var layout = new DynamicLayout { DefaultSpacing = new Size(5, 5), Padding = new Padding(10) }; layout.AddSeparateRow(null, StartFiguresControl(), CloseFiguresControl(), ConnectPathControl(), AntiAliasControl(), null); if (Platform.Instance.Supports <NumericUpDown>()) { layout.AddSeparateRow(null, PenThicknessControl(), PenJoinControl(), PenCapControl(), null); } layout.AddSeparateRow(null, ShowBounds(), CurrentPoint(), null); layout.BeginVertical(); layout.AddRow(new Label { Text = "Draw Line Path" }, DrawLinePath()); layout.AddRow(new Label { Text = "Fill Line Path" }, FillLinePath()); layout.EndVertical(); layout.Add(null); Content = layout; }
public override Control GeneratePad() { var layout = new DynamicLayout { Padding = Padding.Empty, Spacing = Size.Empty }; layout.Add(TopSeparator()); layout.BeginVertical(Padding.Empty); layout.BeginHorizontal(); var b = new ImageButton { Image = ImageCache.BitmapFromResource("Pablo.Formats.Rip.Icons.Pixel-Multi.png"), Toggle = true, Pressed = enableMulti }; b.Click += delegate { enableMulti = b.Pressed; }; layout.Add(b); layout.Add(null); layout.EndHorizontal(); layout.EndVertical(); return(layout); }
public DateTimePickerSection() { var layout = new DynamicLayout(); layout.BeginVertical(); layout.AddRow(new Label { Text = "Default" }, Default(), new Label { Text = "Default with Value" }, DefaultWithValue(), null); layout.AddRow(new Label { Text = "Date" }, DateControl(), new Label { Text = "Date with Value" }, DateControlWithValue()); layout.AddRow(new Label { Text = "Time" }, TimeControl(), new Label { Text = "Time with Value" }, TimeControlWithValue()); layout.AddRow(new Label { Text = "Date/Time" }, DateTimeControl(), new Label { Text = "Date/Time with Value" }, DateTimeControlWithValue()); layout.EndVertical(); layout.AddCentered(TestProperties()); // growing space at end is blank! layout.Add(null); Content = layout; }
public static Form GetDefaultEditorForm(string title, int width, int height, DynamicLayout content) { content.CreateAndAddEmptySpace(); content.CreateAndAddEmptySpace(); content.CreateAndAddEmptySpace(); content.CreateAndAddEmptySpace(); content.CreateAndAddEmptySpace(); content.EndVertical(); content.Width = width - content.Padding.Value.Left * 2 - content.Padding.Value.Right * 2; height += 10; return(new Form() { Icon = Eto.Drawing.Icon.FromResource(imgprefix + "DWSIM_ico.ico"), Content = new Scrollable { Content = content, Border = BorderType.None, ExpandContentWidth = true, ExpandContentHeight = true }, Title = title, ClientSize = new Size(width, height) //ShowInTaskbar = false, //Maximizable = true, //Minimizable = false, //Topmost = true, //Resizable = true }); }
public TreeGridViewSection() { var layout = new DynamicLayout(this); layout.BeginHorizontal(); layout.Add(new Label { }); layout.BeginVertical(); layout.BeginHorizontal(); layout.Add(null); layout.Add(allowExpanding = new CheckBox { Text = "Allow Expanding", Checked = true }); layout.Add(allowCollapsing = new CheckBox { Text = "Allow Collapsing", Checked = true }); layout.Add(null); layout.EndHorizontal(); layout.EndVertical(); layout.EndHorizontal(); layout.AddRow(new Label { Text = "Simple" }, Default()); layout.AddRow(new Label { Text = "With Images\n&& Context Menu" }, ImagesAndMenu()); layout.AddRow(new Label { Text = "Disabled" }, Disabled()); layout.Add(null, false, true); }
Dialog CreateDialog() { var dialog = new Dialog(); var layout = new DynamicLayout(); layout.AddCentered(new Label { Text = "Content" }, yscale: true); dialog.DefaultButton = new Button { Text = "Default Button" }; dialog.AbortButton = new Button { Text = "Abort Button" }; dialog.DefaultButton.Click += delegate { MessageBox.Show("Default button clicked"); }; dialog.AbortButton.Click += delegate { MessageBox.Show("Abort button clicked"); }; layout.BeginVertical(); layout.AddRow(null, dialog.DefaultButton, dialog.AbortButton); layout.EndVertical(); dialog.Content = layout; return(dialog); }
private void InitializeComponents() { this.Title = "TextRpgCreator"; this.Menu = this.InitializeMenu(); this.Icon = new Icon("icon.ico"); var layout = new DynamicLayout { Padding = 3, DefaultSpacing = new Size(3, 3) }; this._outputPanel = new OutputPanel(); this._inputPanel = new InputPanel(); layout.BeginHorizontal(); { layout.BeginVertical(); { layout.Add(this._outputPanel); layout.Add(this._inputPanel); } layout.EndVertical(); } layout.EndHorizontal(); this.Content = layout; }
private void InitializeComponent() { Width = 370; Height = 160; layout1 = new DynamicLayout(); layout1.DefaultSpacing = new Size(4, 4); layout1.Padding = new Padding(6); layout1.BeginVertical(); label1 = new Label(); layout1.AddRow(label1); textBox1 = new TextBox(); layout1.AddRow(textBox1); label2 = new Label(); label2.TextColor = new Color(SystemColors.ControlText, 0.5f); layout1.AddRow(label2); layout1.EndVertical(); CreateContent(layout1); textBox1.TextChanged += TextBox1_TextChanged; }