Control Header() { var control = new GroupBox { Text = "Some Header" }; control.Content = new LabelSection(); return control; }
Control Header () { var control = new GroupBox{ Text = "Some Header" }; control.AddDockedControl (new LabelSection ()); return control; }
Control Default() { var control = new GroupBox(); control.Content = new CheckBoxSection { Border = BorderType.None }; return control; }
Control Default () { var control = new GroupBox (); control.AddDockedControl (new CheckBoxSection ()); return control; }
void Init() { // radioButton_noProxy _radioButtonNoProxy = new RadioButton() { Text = AltStrRes.NotUseProxy }; _radioButtonNoProxy.CheckedChanged += delegate { if (_radioButtonNoProxy.Checked) { _groupBoxSetting.Enabled = false; } }; // radioButton_ieProxy _radioButtonIeProxy = new RadioButton(_radioButtonNoProxy) { Text = AltStrRes.UseSystemProxySetting }; _radioButtonIeProxy.CheckedChanged += delegate { if (_radioButtonIeProxy.Checked) { _groupBoxSetting.Enabled = false; } }; // radioButton_customProxy _radioButtonCustomProxy = new RadioButton(_radioButtonNoProxy) { Text = AltStrRes.UseCustomProxySetting }; _radioButtonCustomProxy.CheckedChanged += delegate { if (_radioButtonCustomProxy.Checked) { _groupBoxSetting.Enabled = true; } }; // textBox _textBoxProxyAddr = new TextBox(); _textBoxProxyPort = new TextBox(); _textBoxProxyUser = new TextBox(); _textBoxProxyPasswd = new TextBox(); _textBoxProxyDomain = new TextBox(); var proxysetting = new DynamicLayout { Padding = new Padding(20, 10), Spacing = new Size(5, 5) }; proxysetting.AddRow(new Label { Text = "Server: ", VerticalAlign = VerticalAlign.Middle}, TableLayout.AutoSized(_textBoxProxyAddr)); proxysetting.AddRow(new Label { Text = "Port: ", VerticalAlign = VerticalAlign.Middle }, TableLayout.AutoSized(_textBoxProxyPort)); proxysetting.AddRow(new Label { Text = "User: "******"Passwd: ", VerticalAlign = VerticalAlign.Middle }, TableLayout.AutoSized(_textBoxProxyPasswd)); proxysetting.AddRow(new Label { Text = "Domain: ", VerticalAlign = VerticalAlign.Middle }, TableLayout.AutoSized(_textBoxProxyDomain)); _groupBoxSetting = new GroupBox {Text = AltStrRes.Setting, Content = proxysetting}; var layout = new DynamicLayout { Padding = new Padding(20, 20), Spacing = new Size(10, 10) }; layout.AddRow(_radioButtonNoProxy); layout.AddRow(_radioButtonIeProxy); layout.AddRow(_radioButtonCustomProxy); layout.AddRow(_groupBoxSetting); layout.AddRow(null); this.Content = layout; }
public GroupBuilder(FormBuilder form, string text) { this._form = form; _group = new GroupBox(); _group.Text = text; _layout = new DynamicLayout(); _group.Content = _layout; _layout.DefaultSpacing = new Eto.Drawing.Size(12, 12); _layout.BeginVertical(); }
void Init() { // _textBoxFindText var labelFindText = new Label { Text = StrRes.GetString("StrFindContent", "FindContent") }; _textBoxFindText = new TextBox(); // _buttonFindNext _buttonFindNext = new Button { Text = StrRes.GetString("StrFindNext", "FindNext") }; _buttonFindNext.Click += _buttonFindNext_Click; // _buttonCancel _buttonCancel = new Button { Text = StrRes.GetString("StrCancel","Cancel") }; _buttonCancel.Click += _buttonCancel_Click; // _checkBoxCaseSensitive _checkBoxCaseSensitive = new CheckBox { Text = StrRes.GetString("StrCaseSensitive", "Case Sensitive") }; // _radio _radioButtonUp = new RadioButton { Text = StrRes.GetString("StrUp", "Up") }; _radioButtonDown = new RadioButton(_radioButtonUp) { Text = StrRes.GetString("StrDown", "Down") }; _radioButtonDown.Checked = true; var groupLayout = new DynamicLayout {Padding = new Padding(5, 5), Spacing = new Size(5, 5)}; groupLayout.AddRow(_radioButtonUp, _radioButtonDown); var group = new GroupBox { Text = StrRes.GetString("StrDirection", "Direction") }; group.Content = groupLayout; var layout = new DynamicLayout { Padding = new Padding(5, 5), Spacing = new Size(5, 5) }; layout.BeginHorizontal(); // left start ---> layout.BeginVertical(xscale: true); layout.BeginHorizontal(); layout.Add(labelFindText); layout.Add(_textBoxFindText); layout.EndHorizontal(); layout.Add(null); layout.BeginHorizontal(); layout.Add(_checkBoxCaseSensitive); layout.Add(group); layout.EndHorizontal(); layout.EndVertical(); // <--- left end // right start ---> layout.BeginVertical(xscale: false, yscale: false); layout.Add(_buttonFindNext); layout.Add(null); layout.Add(_buttonCancel); layout.EndVertical(); // <--- right end layout.EndHorizontal(); Content = layout; Title = StrRes.GetString("StrFind", "Find"); Minimizable = false; Maximizable = false; Topmost = true; ClientSize = new Size(350, 90); Resizable = false; }
Control GroupBoxControl() { var control = new GroupBox { Text = "Some Group Box" }; control.Content = new Label{ Text = "Content" }; LogEvents(control); return control; }
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; }
private void CreateInputSection() { var inGrp = new GroupBox { Text = "Input" }; var layout = new DynamicLayout(inGrp); layout.BeginVertical(); _tabGroup = new TabControl(); var fileTab = CreateFromFileTab(); var deviceTab = CreateFromDeviceTab(); _tabGroup.TabPages.Add(fileTab); _tabGroup.TabPages.Add(deviceTab); layout.AddRow(_tabGroup); var parseButton = new Button { Text = "Parse" }; parseButton.Click += parseButton_Click; layout.BeginHorizontal(); layout.AddCentered(parseButton); layout.EndHorizontal(); layout.EndVertical(); _inputSection = inGrp; }
public Input(string caption, string text) { /* dialog attributes */ this.Text = caption; this.ClientSize = new Size(400, 120); this.Resizable = false; /* dialog controls */ var groupBox = new GroupBox(); groupBox.Text = text; var textBox = new TextBox(); textBox.Size = new Size(200, 20); var buttonOk = new Button(); buttonOk.Text = "Ok"; buttonOk.Size = new Size(90, 26); buttonOk.Click += delegate { this.DialogResult = DialogResult.Ok; this.Close(); }; var buttonCancel = new Button(); buttonCancel.Text = "Cancel"; buttonCancel.Size = new Size(90, 26); buttonCancel.Click += delegate { this.DialogResult = DialogResult.Cancel; this.Close(); }; /* dialog layout */ var layoutName = new DynamicLayout(groupBox); layoutName.BeginVertical(); layoutName.Add(textBox); layoutName.EndVertical(); var layout = new DynamicLayout(this); layout.BeginVertical(new Padding(10, 5), new Size(10, 10)); layout.Add(groupBox); layout.BeginVertical(Padding.Empty, Size.Empty); layout.BeginHorizontal(); layout.Add(null, true); layout.Add(buttonCancel); layout.Add(buttonOk); layout.Add(null, true); layout.EndHorizontal(); layout.EndVertical(); layout.EndVertical(); /* dialog accessors */ this.DefaultButton = buttonOk; this.AbortButton = buttonCancel; this.textBox = textBox; }
public Preferences() { /* dialog attributes */ this.Text = "Preferences"; this.ClientSize = new Size(400, 120); this.Resizable = false; /* dialog controls */ var groupBoxFolder = new GroupBox(); groupBoxFolder.Text = "Notes folder"; var textBoxFolder = new TextBox(); textBoxFolder.Text = Notedown.Preferences.Folder; var buttonOk = new Button(); buttonOk.Text = "Ok"; buttonOk.Size = new Size(90, 26); buttonOk.Click += delegate { this.DialogResult = DialogResult.Ok; this.Close(); }; var buttonCancel = new Button(); buttonCancel.Text = "Cancel"; buttonCancel.Size = new Size(90, 26); buttonCancel.Click += delegate { this.DialogResult = DialogResult.Cancel; this.Close(); }; /* dialog layout */ var layoutFolder = new DynamicLayout(groupBoxFolder); layoutFolder.BeginVertical(); layoutFolder.Add(textBoxFolder); layoutFolder.EndVertical(); var layout = new DynamicLayout(this); layout.BeginVertical(new Padding(10, 5), new Size(10, 10)); layout.Add(groupBoxFolder); layout.BeginVertical(Padding.Empty, Size.Empty); layout.BeginHorizontal(); layout.Add(null, true); layout.Add(buttonCancel); layout.Add(buttonOk); layout.Add(null, true); layout.EndHorizontal(); layout.EndVertical(); layout.EndVertical(); /* dialog accessors */ TextBoxFolder = textBoxFolder; }