本文整理汇总了C#中Eto.Forms.CheckBox类的典型用法代码示例。如果您正苦于以下问题:C# CheckBox类的具体用法?C# CheckBox怎么用?C# CheckBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CheckBox类属于Eto.Forms命名空间,在下文中一共展示了CheckBox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ConnectPathControl
Control ConnectPathControl()
{
var control = new CheckBox { Text = "Connect Paths" };
control.Bind(cb => cb.Checked, this, r => r.ConnectPath);
control.CheckedChanged += Refresh;
return control;
}
示例2: RpcServerSettingsManager
public RpcServerSettingsManager(string title, string rpcUrlHost, ushort rpcUrlPort, bool isProcessHostedLocally)
{
Text = title;
TextBoxRpcUrlHost = new TextBox { Text = rpcUrlHost };
CheckBoxIsProcessHostedLocally = new CheckBox {
Text = Desktop.Properties.Resources.OptionsNetworkIsProcessHostedLocally,
Checked = isProcessHostedLocally
};
RpcUrlPort = rpcUrlPort;
Content = new TableLayout(
new TableLayout(
new TableRow(
new Label { Text = Desktop.Properties.Resources.TextHost },
new TableCell(TextBoxRpcUrlHost, true),
new Separator(SeparatorOrientation.Vertical),
new Label { Text = Desktop.Properties.Resources.TextPort },
Utilities.CreateNumericUpDown(this, o => o.RpcUrlPort, 0, 1, ushort.MaxValue)
)
) { Spacing = Utilities.Spacing3 },
new TableRow(CheckBoxIsProcessHostedLocally)
) { Padding = new Padding(Utilities.Padding2), Spacing = Utilities.Spacing3 };
}
示例3: CreateTypeControls
Control CreateTypeControls()
{
typeRadio = new RadioButtonList
{
Items =
{
new ListItem { Text = "Form (modeless)", Key = "form" },
new ListItem { Text = "Dialog (modal)", Key = "dialog" }
},
SelectedKey = "form"
};
setOwnerCheckBox = new CheckBox { Text = "Set Owner", Checked = false };
setOwnerCheckBox.CheckedChanged += (sender, e) =>
{
if (child != null)
child.Owner = setOwnerCheckBox.Checked ?? false ? ParentWindow : null;
};
return new StackLayout
{
Orientation = Orientation.Horizontal,
Items = { typeRadio, setOwnerCheckBox }
};
}
示例4: LogEvents
void LogEvents(CheckBox control)
{
control.CheckedChanged += delegate
{
Log.Write(control, "CheckedChanged, Value: {0}", control.Checked);
};
}
示例5: TreeViewSection
public TreeViewSection()
{
var layout = new DynamicLayout();
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(RefreshButton());
layout.Add(null);
layout.EndHorizontal();
layout.EndVertical();
layout.EndHorizontal();
treeView = ImagesAndMenu();
layout.AddRow(new Label{ Text = "Simple" }, Default());
layout.BeginHorizontal();
layout.Add(new Panel());
layout.BeginVertical();
layout.AddSeparateRow(InsertButton(), AddChildButton(), RemoveButton(), ExpandButton(), CollapseButton(), null);
layout.AddSeparateRow(LabelEditCheck(), EnabledCheck(), null);
layout.EndVertical();
layout.EndHorizontal();
layout.AddRow(new Label{ Text = "With Images\n&& Context Menu" }, treeView);
layout.AddRow(new Panel(), HoverNodeLabel());
layout.Add(null, false, true);
Content = layout;
}
示例6: TreeGridViewSection
public TreeGridViewSection()
{
var layout = new DynamicLayout();
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);
Content = layout;
}
示例7: CloseFiguresControl
Control CloseFiguresControl()
{
var control = new CheckBox { Text = "Close Figures" };
control.Bind(cb => cb.Checked, this, r => r.CloseFigures);
control.CheckedChanged += Refresh;
return control;
}
示例8: Default
Control Default ()
{
var control = new CheckBox {
Text = "Default"
};
LogEvents (control);
return control;
}
示例9: LogEvents
protected virtual void LogEvents(CheckBox control)
{
control.CheckedChanged += delegate {
Log.Write (control, "CheckedChanged");
};
LogEvents ((Control)control);
}
示例10: ThreeState
Control ThreeState ()
{
var control = new CheckBox {
Text = "Three State",
ThreeState = true
};
LogEvents (control);
return control;
}
示例11: Disabled
Control Disabled ()
{
var control = new CheckBox {
Text = "Disabled",
Enabled = false
};
LogEvents (control);
return control;
}
示例12: SetInitialValue
Control SetInitialValue ()
{
var control = new CheckBox{
Text = "Set initial value",
Checked = true
};
LogEvents (control);
return control;
}
示例13: Init
void Init()
{
_checkBoxIsParamRandom = new CheckBox() { Text = AltStrRes.IsParamRandom };
var layout = new DynamicLayout { Padding = new Padding(20, 20), Spacing = new Size(10, 10) };
layout.AddRow(_checkBoxIsParamRandom);
layout.Add(null);
Content = layout;
}
示例14: ThreeStateInitialValue
Control ThreeStateInitialValue ()
{
var control = new CheckBox {
Text = "Three State with Initial Value",
ThreeState = true,
Checked = null
};
LogEvents (control);
return control;
}
示例15: Checkbox
public Control Checkbox()
{
var control = new CheckBox
{
Text = "Use Offscreen Bitmap",
Checked = UseOffScreenBitmap,
};
control.CheckedChanged += (sender, e) => UseOffScreenBitmap = control.Checked ?? false;
return control;
}