Ejemplo n.º 1
0
        public FillStyleEditor(RipHandler handler)
        {
            this.Title   = "Custom Fill Style";
            this.handler = handler;
            //this.Resizable = true;

            var layout = new DynamicLayout();

            layout.BeginVertical(yscale: true);
            layout.BeginHorizontal();
            layout.Add(Design());

            layout.Add(Preview());

            layout.EndHorizontal();
            layout.EndVertical();

            layout.BeginVertical();
            layout.BeginHorizontal();

            layout.Add(null, true);
            layout.Add(CancelButton());
            layout.Add(OkButton());

            layout.EndHorizontal();
            layout.EndVertical();

            Content = layout;
        }
Ejemplo n.º 2
0
        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
            });
        }
Ejemplo n.º 3
0
        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();
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        // 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();
        }
Ejemplo n.º 6
0
        Control Settings()
        {
            var layout = new DynamicLayout();

            layout.AddRow(new Label {
                Text = "Orientation"
            }, TableLayout.AutoSized(PageOrientation()));

            layout.BeginHorizontal();
            layout.Add(new Label {
                Text = "Copies"
            });
            layout.AddSeparateRow(Padding.Empty).Add(TableLayout.AutoSized(Copies()), TableLayout.AutoSized(Collate()));
            layout.EndHorizontal();

            layout.BeginHorizontal();
            layout.Add(new Label {
                Text = "Maximum Pages"
            });
            layout.AddSeparateRow(Padding.Empty).Add(MaximumStart(), new Label {
                Text = "to"
            }, MaximumEnd());
            layout.EndHorizontal();

            layout.AddRow(null, Reverse());

            return(new GroupBox {
                Text = "Settings", Content = layout
            });
        }
Ejemplo n.º 7
0
        private void CreateOutputSection()
        {
            var outGrp = new GroupBox {
                Text = "Output"
            };

            var layout = new DynamicLayout(outGrp);

            layout.BeginVertical();

            var sourceLabel = new Label {
                Text = "Source: ", Size = new Size(50, 20)
            };

            _pathLabel = new Label();

            layout.BeginHorizontal();
            layout.AddRow(sourceLabel, _pathLabel);
            layout.EndHorizontal();

            _treeView = new TreeView();
            _treeView.MouseDoubleClick += _treeView_MouseDoubleClick;

            layout.BeginHorizontal();
            layout.AddRow(_treeView);
            layout.EndHorizontal();

            layout.EndVertical();

            _outputSection = outGrp;
        }
Ejemplo n.º 8
0
        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;
        }
Ejemplo n.º 9
0
        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);
        }
Ejemplo n.º 10
0
        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;
        }
Ejemplo n.º 11
0
        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();
        }
Ejemplo n.º 12
0
        public ToolboxPad(RipHandler handler)
        {
            this.Handler = handler;

            this.Handler.ToolChanged += new EventHandler <EventArgs> (HandleToolChanged).MakeWeak(e => this.Handler.ToolChanged -= HandleToolChanged);

            var layout = new DynamicLayout {
                Padding = Padding.Empty
            };

            layout.DefaultPadding = Padding.Empty;
            layout.DefaultSpacing = new Size(5, 5);


            layout.BeginVertical(spacing: Size.Empty);
            layout.BeginHorizontal();
            layout.Add(null, true);
            var tools = Handler.Tools.ToList();

            for (int i = 0; i < tools.Count; i++)
            {
                var tool   = tools [i];
                var button = new ImageButton {
                    Image      = tool.Image,
                    Persistent = true,
#if DESKTOP
                    ToolTip = tool.Description,
#endif
                    Tag     = tool,
                    Size    = new Size(20, 18),
                    Pressed = handler.SelectedTool == tool
                };
                tool.Tag      = button;
                button.Click += delegate {
                    Handler.SelectedTool = tool;
                };
                layout.Add(button);
                if ((i % 2) == 1)
                {
                    layout.Add(null, true);
                    layout.EndHorizontal();
                    layout.BeginHorizontal();
                    layout.Add(null, true);
                }
            }
            layout.EndHorizontal();
            layout.EndVertical();

            layout.Add(toolPad = new Panel());

            layout.Add(null);

            Content = layout;
        }
Ejemplo n.º 13
0
        protected override void OnPreLoad(EventArgs e)
        {
            var layout = new DynamicLayout {
                DefaultSpacing = new Size(5, 5), Padding = new Padding(10)
            };

            var options = CreateOptions();

            if (options != null)
            {
                layout.Add(options);
            }

            layout.BeginVertical();
            layout.AddRow(null, LabelControl(), ButtonControl(), LinkButtonControl(), new Panel(), null);
            layout.AddRow(null, TextBoxControl(), PasswordBoxControl());

            layout.BeginHorizontal();
            layout.Add(null);
            layout.Add(TextAreaControl());
            if (Platform.Supports <ListBox>())
            {
                layout.Add(ListBoxControl());
            }
            layout.EndHorizontal();

            layout.AddRow(null, CheckBoxControl(), RadioButtonControl());
            layout.AddRow(null, DateTimeControl(), DropDownControl(), ComboBoxControl());
            layout.AddRow(null, NumericStepperControl(), TextStepperControl());

            layout.BeginHorizontal();
            layout.Add(null);
            layout.Add(ColorPickerControl());
            layout.Add(SliderControl());
            layout.EndHorizontal();

            layout.BeginHorizontal();
            layout.Add(null);
            layout.Add(DrawableControl());
            layout.Add(ImageViewControl());
            if (Platform.Supports <GroupBox>())
            {
                layout.Add(GroupBoxControl());
            }
            layout.Add(TableLayoutControl());
            layout.EndHorizontal();
            layout.EndVertical();
            layout.Add(null);

            Content = layout;

            base.OnPreLoad(e);
        }
Ejemplo n.º 14
0
        public MessageBoxSection()
        {
            MessageBoxText    = "Some message";
            MessageBoxCaption = "Some caption";
            AttachToParent    = true;

            var layout = new DynamicLayout {
                DefaultSpacing = new Size(5, 5), Padding = new Padding(10)
            };

            layout.AddSeparateRow(null, new Label {
                Text = "Caption"
            }, CaptionBox(), null);
            layout.AddSeparateRow(null, new Label {
                Text = "Text"
            }, TitleBox(), null);

            layout.BeginVertical();

            layout.BeginHorizontal();
            layout.Add(null);
            layout.Add(new Label {
                Text = "Type", VerticalAlignment = VerticalAlignment.Center, TextAlignment = TextAlignment.Right
            });
            layout.Add(MessageBoxTypeCombo());
            layout.Add(AttachToParentCheckBox());
            layout.Add(null);
            layout.EndHorizontal();

            layout.EndBeginVertical();
            layout.BeginHorizontal();
            layout.Add(null);
            layout.Add(new Label {
                Text = "Buttons", VerticalAlignment = VerticalAlignment.Center, TextAlignment = TextAlignment.Right
            });
            layout.Add(MessageBoxButtonsCombo());
            layout.Add(new Label {
                Text = "Default Button", VerticalAlignment = VerticalAlignment.Center, TextAlignment = TextAlignment.Right
            });
            layout.Add(MessageBoxDefaultButtonCombo());
            layout.Add(null);
            layout.EndHorizontal();

            layout.EndVertical();

            layout.AddSeparateRow(null, ShowDialogButton(), null);
            layout.Add(null);

            Content = layout;
        }
Ejemplo n.º 15
0
        public TaskbarSection()
        {
            var layout = new DynamicLayout();

            layout.DefaultSpacing = new Size(15, 6);
            layout.DefaultPadding = new Padding(10);
            layout.BeginVertical();

            layout.BeginHorizontal();
            layout.Add(null, false, false);
            layout.Add(null, true, true);
            layout.EndHorizontal();

            layout.BeginHorizontal();
            layout.Add(new Label {
                Text = "State:", VerticalAlignment = VerticalAlignment.Center
            }, false, false);
            dropTaskbarState = new EnumDropDown <TaskbarProgressState>();
            dropTaskbarState.SelectedValue = TaskbarProgressState.Progress;
            layout.Add(dropTaskbarState, true, false);
            layout.EndHorizontal();

            layout.BeginHorizontal();
            layout.Add(new Label {
                Text = "Value:", VerticalAlignment = VerticalAlignment.Center
            }, false, false);
            numericStepper          = new NumericStepper();
            numericStepper.MinValue = 0;
            numericStepper.MaxValue = 100;
            numericStepper.Value    = 50;
            layout.Add(numericStepper, true, false);
            layout.EndHorizontal();

            layout.BeginHorizontal();
            layout.Add(null, false, false);
            buttonSetTaskbar      = new Button();
            buttonSetTaskbar.Text = "Set Taskbar";
            layout.Add(buttonSetTaskbar, true, false);
            layout.EndHorizontal();

            layout.BeginHorizontal();
            layout.Add(null, false, false);
            layout.Add(null, true, true);
            layout.EndHorizontal();

            Content = layout;

            buttonSetTaskbar.Click += ButtonShowNot_Click;
        }
Ejemplo n.º 16
0
        public FilePickerSection()
        {
            var layout = new DynamicLayout();

            layout.DefaultPadding = new Padding(10);
            layout.DefaultSpacing = new Size(4, 4);
            layout.BeginVertical();

            layout.BeginHorizontal();
            layout.Add(new Label {
                Text = "Open File: ", VerticalAlignment = VerticalAlignment.Center
            });
            var filepicker1 = new FilePicker {
                FileAction = FileAction.OpenFile
            };

            LogEvents(filepicker1);
            layout.Add(filepicker1, true, false);
            layout.EndHorizontal();

            layout.BeginHorizontal();
            layout.Add(new Label {
                Text = "Save File: ", VerticalAlignment = VerticalAlignment.Center
            });
            var filepicker2 = new FilePicker {
                FileAction = FileAction.SaveFile
            };

            LogEvents(filepicker2);
            layout.Add(filepicker2, true, false);
            layout.EndHorizontal();

            layout.BeginHorizontal();
            layout.Add(new Label {
                Text = "Select Folder: ", VerticalAlignment = VerticalAlignment.Center
            });
            var filepicker3 = new FilePicker {
                FileAction = FileAction.SelectFolder
            };

            LogEvents(filepicker3);
            layout.Add(filepicker3, true, false);
            layout.EndHorizontal();

            layout.Add(null, false, true);

            layout.EndVertical();
            Content = layout;
        }
Ejemplo n.º 17
0
        public MessageBoxSection()
        {
            MessageBoxText    = "Some message";
            MessageBoxCaption = "Some caption";
            AttachToParent    = true;

            var layout = new DynamicLayout();

            layout.AddSeparateRow(null, new Label {
                Text = "Caption"
            }, CaptionBox(), null);
            layout.AddSeparateRow(null, new Label {
                Text = "Text"
            }, TitleBox(), null);

            layout.BeginVertical(Padding.Empty);

            layout.BeginHorizontal();
            layout.Add(null);
            layout.Add(new Label {
                Text = "Type", VerticalAlign = VerticalAlign.Middle, HorizontalAlign = HorizontalAlign.Right
            });
            layout.Add(MessageBoxTypeCombo());
            layout.Add(AttachToParentCheckBox());
            layout.Add(null);
            layout.EndHorizontal();

            layout.EndBeginVertical();
            layout.BeginHorizontal();
            layout.Add(null);
            layout.Add(new Label {
                Text = "Buttons", VerticalAlign = VerticalAlign.Middle, HorizontalAlign = HorizontalAlign.Right
            });
            layout.Add(MessageBoxButtonsCombo());
            layout.Add(new Label {
                Text = "Default Button", VerticalAlign = VerticalAlign.Middle, HorizontalAlign = HorizontalAlign.Right
            });
            layout.Add(MessageBoxDefaultButtonCombo());
            layout.Add(null);
            layout.EndHorizontal();

            layout.EndVertical();

            layout.AddSeparateRow(null, ShowDialogButton(), null);
            layout.Add(null);

            Content = layout;
        }
Ejemplo n.º 18
0
        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;
        }
Ejemplo n.º 19
0
        private TabPage CreateFromFileTab()
        {
            var fileTab = new TabPage {
                Text = FromFileTabName
            };
            var fileLayout = new DynamicLayout(fileTab);

            var browseLabel = new Label {
                Text = "Select Clippings File: ", Size = new Size(150, 20)
            };

            _fileSelectTextBox = new TextBox {
                Size = new Size(480, 20)
            };

            var browseButton = new Button {
                Text = "Browse"
            };

            browseButton.Click += browseButton_Click;

            fileLayout.BeginVertical();
            fileLayout.BeginHorizontal();
            fileLayout.AddRow(browseLabel, _fileSelectTextBox, browseButton);
            fileLayout.EndHorizontal();
            fileLayout.EndVertical();

            return(fileTab);
        }
Ejemplo n.º 20
0
        Control CreateDrawCharacter()
        {
            var layout = new DynamicLayout {
                Padding = Padding.Empty
            };

            layout.BeginHorizontal();

            characterPanel = layout;

            layout.Add(new Label {
                Text = "C&haracter:"
            });

            charTextBox          = new FontTextBox(Handler, new Size(1, 1));
            charTextBox.ReadOnly = false;
            charTextBox.SetAttribute(this.Attribute);

            layout.Add(charTextBox);
            layout.Add(null);

            layout.EndHorizontal();


            return(layout);
        }
Ejemplo n.º 21
0
        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;
        }
Ejemplo n.º 22
0
        public TabControlHandler()
        {
            tabs = new Tabs
            {
                SelectionChanged = tab =>
                {
                    Panel tabContentPanel = null;
                    if (tab != null)
                    {
                        var tabHandler = tab.Tag as TabPageHandler;
                        if (tabHandler != null)
                        {
                            tabContentPanel = tabHandler.Control;
                        }
                    }
                    ContentPanel.Content = tabContentPanel;
                    Widget.OnSelectedIndexChanged(EventArgs.Empty);
                },
            };

            ContentPanel = new Panel {
                BackgroundColor = Colors.White
            };
            var layout = new DynamicLayout {
                Padding = Padding.Empty, Spacing = Size.Empty
            };

            layout.BeginHorizontal();
            layout.Add(tabs);
            layout.Add(ContentPanel, xscale: true);
            layout.EndHorizontal();
            Control = layout;
        }
Ejemplo n.º 23
0
        Control PageRange()
        {
            var layout = new DynamicLayout {
                DefaultSpacing = new Size(5, 5), Padding = new Padding(10)
            };

            layout.AddRow(new Label {
                Text = "Print Selection"
            }, TableLayout.AutoSized(PrintSelection()));

            layout.BeginHorizontal();
            layout.Add(new Label {
                Text = "Selected Start"
            });
            layout.AddSeparateRow().Add(SelectedStart(), new Label {
                Text = "to"
            }, SelectedEnd());
            layout.EndHorizontal();

            layout.Add(null);

            return(new GroupBox {
                Text = "Page Range", Content = layout
            });
        }
Ejemplo n.º 24
0
        public override Control GeneratePad()
        {
            var layout = new DynamicLayout {
                Padding = Padding.Empty, Spacing = Size.Empty
            };

            layout.BeginHorizontal();

            var b = new ImageButton {
                Image = ImageCache.BitmapFromResource("Pablo.Formats.Rip.Icons.Copy-Clear.png"),
#if DESKTOP
                ToolTip = "Clear copied region",
#endif
                Toggle  = true,
                Pressed = enableClear
            };

            b.Click += delegate {
                enableClear = b.Pressed;
            };

            layout.Add(b);
            layout.Add(null);
            layout.EndHorizontal();

            return(layout);
        }
Ejemplo n.º 25
0
        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;
        }
Ejemplo n.º 26
0
        private Control BuildBuffLayout()
        {
            var buffIdTextBox = new NumericMaskedTextBox <uint> {
                Value = 0
            };

            buffIdTextBox.ValueBinding.Bind(() => BuffId, x => BuffId = x);

            var buffIdCheckbox = new CheckBox {
                Checked = false
            };

            buffIdCheckbox.CheckedBinding.Bind(() => BuffIdEnabled, x => BuffIdEnabled = x ?? false);

            var filterLayout = new DynamicLayout();

            filterLayout.BeginHorizontal();
            {
                filterLayout.BeginGroup("Buff");
                {
                    filterLayout.AddRow("Buff ID", buffIdTextBox, buffIdCheckbox, null);
                }
                filterLayout.EndGroup();
                filterLayout.AddRow(null);
            }
            filterLayout.EndHorizontal();
            return(filterLayout);
        }
Ejemplo n.º 27
0
        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;
        }
Ejemplo n.º 28
0
        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);
        }
Ejemplo n.º 29
0
        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);
        }
Ejemplo n.º 30
0
        private void CreateLayout()
        {
            var layout = new DynamicLayout();

            layout.Add(new Label {
                Text = "Please select the type of file to create"
            });

            layout.Add(FileTypeListBox(), true, true);

            layout.BeginVertical(Padding.Empty);
            layout.BeginHorizontal();

            layout.Add(null, true);

            Button cancelButton = new Button();

            cancelButton.Text   = "C&ancel";
            cancelButton.Click += cancelButton_Click;
            this.AbortButton    = cancelButton;
            layout.Add(cancelButton);

            this.DefaultButton = okButton = new Button();
            okButton.Text      = "O&k";
            okButton.Click    += okButton_Click;
            layout.Add(okButton);


            layout.EndHorizontal();
            layout.EndVertical();

            Content = layout;

            PopulateList();
        }