当前位置: 首页>>代码示例>>C#>>正文


C# DynamicLayout.AddAutoSized方法代码示例

本文整理汇总了C#中Eto.Forms.DynamicLayout.AddAutoSized方法的典型用法代码示例。如果您正苦于以下问题:C# DynamicLayout.AddAutoSized方法的具体用法?C# DynamicLayout.AddAutoSized怎么用?C# DynamicLayout.AddAutoSized使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Eto.Forms.DynamicLayout的用法示例。


在下文中一共展示了DynamicLayout.AddAutoSized方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Init

        void Init()
        {
	        _tbxShellData = new TextArea {Size = new Size(-1, 200)};
            _tbxMsg = new TextBox();
	        _btnShowMsgInStatus = new Button {Text = "Show Msg In Status", Width = 150};
            _btnShowMsgInStatus.Click+=btn_showMsgInStatus_Click;
			_btnShowMessageBox = new Button { Text = "Show Msg In Message", Width = 150 };
            _btnShowMessageBox.Click+=btn_showMessageBox_Click;
			_btnCreateNewTabPage = new Button { Text = "Create New TabPage", Width = 150 };
            _btnCreateNewTabPage.Click+=btn_createNewTabPage_Click;

			// Test
	        var btnTest = new Button {Text = "Test", Width = 150};
			btnTest.Click += btnTest_Click;

	        var layout = new DynamicLayout {Padding = new Padding(10, 10), Size = new Size(10, 10)};
            layout.AddRow(new Label() { Text = "ShellData"});
			layout.AddRow(_tbxShellData);
			layout.AddSeparateRow(new Label() { Text = "Msg", VerticalAlign = VerticalAlign.Middle }, _tbxMsg, null);
	        layout.AddAutoSized(_btnShowMsgInStatus);
	        layout.AddAutoSized(_btnShowMessageBox);
	        layout.AddAutoSized(_btnCreateNewTabPage);
			layout.AddAutoSized(btnTest);
			layout.Add(null);

            this.Content = layout;
        }
开发者ID:kevins1022,项目名称:Altman,代码行数:27,代码来源:DoNetPluginTest.cs

示例2: LinkButtonSection

		public LinkButtonSection()
		{
			var layout = new DynamicLayout();

			layout.AddAutoSized(NormalButton(), centered: true);
			layout.AddAutoSized(LongerButton(), centered: true);
			layout.AddAutoSized(ColourButton(), centered: true);
			layout.AddAutoSized(DisabledButton(), centered: true);
			layout.AddAutoSized(DisabledButtonWithColor(), centered: true);
			layout.Add(StretchedButton());
			layout.Add(null);

			Content = layout;
		}
开发者ID:gene-l-thomas,项目名称:Eto,代码行数:14,代码来源:LinkButtonSection.cs

示例3: LinkButtonSection

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

			layout.AddAutoSized(NormalButton(), centered: true);
			layout.AddAutoSized(LongerButton(), centered: true);
			layout.AddAutoSized(ColourButton(), centered: true);
			layout.AddAutoSized(DisabledButton(), centered: true);
			layout.AddAutoSized(DisabledButtonWithColor(), centered: true);
			layout.Add(StretchedButton());
			layout.Add(null);

			Content = layout;
		}
开发者ID:mhusen,项目名称:Eto,代码行数:14,代码来源:LinkButtonSection.cs

示例4: TestProperties

		Control TestProperties()
		{
			var layout = new DynamicLayout();
			DateTimePicker min, max, current, setValue;
			Button setButton;

			layout.AddRow(new Label { Text = "Min Value" }, min = new DateTimePicker());
			layout.AddRow(new Label { Text = "Max Value" }, max = new DateTimePicker());
			layout.BeginHorizontal();
			layout.Add(new Label { Text = "Set to value" });
			layout.BeginVertical();
			layout.BeginHorizontal();
			layout.AddAutoSized(setValue = new DateTimePicker());
			layout.Add(setButton = new Button { Text = "Set" });
			layout.EndHorizontal();
			layout.EndVertical();
			layout.EndHorizontal();
			layout.AddRow(new Label { Text = "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;
		}
开发者ID:alexandrebaker,项目名称:Eto,代码行数:26,代码来源:DateTimePickerSection.cs

示例5: TestProperties

		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;
		}
开发者ID:mhusen,项目名称:Eto,代码行数:26,代码来源:DateTimePickerSection.cs

示例6: ButtonSection

		public ButtonSection()
		{
			var layout = new DynamicLayout();

			layout.AddAutoSized(NormalButton(), centered: true);
			layout.AddAutoSized(LongerButton(), centered: true);
			layout.AddAutoSized(DefaultSizeButton(), centered: true);
			layout.AddAutoSized(ColourButton(), centered: true);
			layout.AddAutoSized(DisabledButton(), centered: true);
			layout.Add(StretchedButton());
			layout.AddSeparateRow(null, new Label { Text = "Image Position:", VerticalAlign = VerticalAlign.Middle }, ImagePositionControl(), null);
			layout.AddSeparateRow(null, TableLayout.AutoSized(ImageButton(smallImage)), TableLayout.AutoSized(ImageTextButton(smallImage)), null);
			layout.AddSeparateRow(null, TableLayout.AutoSized(ImageButton(largeImage)), TableLayout.AutoSized(ImageTextButton(largeImage)), null);

			layout.Add(null);

			Content = layout;
		}
开发者ID:JohnACarruthers,项目名称:Eto,代码行数:18,代码来源:ButtonSection.cs

示例7: ButtonSection

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

			layout.AddAutoSized(NormalButton(), centered: true);
			layout.AddAutoSized(LongerButton(), centered: true);
			layout.AddAutoSized(DefaultSizeButton(), centered: true);
			layout.AddAutoSized(ColourButton(), centered: true);
			layout.AddAutoSized(DisabledButton(), centered: true);
			layout.Add(StretchedButton());
			layout.AddSeparateRow(null, new Label { Text = "Image Position:", VerticalAlignment = VerticalAlignment.Center }, ImagePositionControl(), ClearMinimumSizeControl(), null);
			layout.AddSeparateRow(null, TableLayout.AutoSized(ImageButton(smallImage)), TableLayout.AutoSized(ImageTextButton(smallImage)), null);
			layout.AddSeparateRow(null, TableLayout.AutoSized(ImageButton(largeImage)), TableLayout.AutoSized(ImageTextButton(largeImage)), null);

			layout.Add(null);

			Content = layout;
		}
开发者ID:mhusen,项目名称:Eto,代码行数:18,代码来源:ButtonSection.cs

示例8: CreateViews

		Control CreateViews(Image image)
		{
			var layout = new DynamicLayout();
			layout.BeginHorizontal();
			layout.Add("ImageView");
			layout.AddAutoSized(new ImageView { Image = image });
			layout.AddAutoSized(new ImageView { Image = image, Size = new Size(64, 64) });
			layout.AddAutoSized(new ImageView { Image = image, Size = new Size(32, 32) });
			layout.EndBeginHorizontal();
			layout.Add("Drawable");
			layout.AddAutoSized(new DrawableImageView { Image = image });
			layout.AddAutoSized(new DrawableImageView { Image = image, MinimumSize = new Size(64, 64), ScaleImage = true });
			layout.AddAutoSized(new DrawableImageView { Image = image, MinimumSize = new Size(32, 32), ScaleImage = true });
			layout.EndBeginHorizontal();
			layout.Add("Button");
			layout.AddAutoSized(new Button { Image = image, Text = "Auto Size" });
			layout.AddAutoSized(new Button { Image = image, Text = "64px Height", Height = 64 });
			layout.AddAutoSized(new Button { Image = image, Text = "32px Height", Height = 32 });
			layout.EndBeginHorizontal();
			layout.EndHorizontal();
			return layout;
		}
开发者ID:picoe,项目名称:Eto,代码行数:22,代码来源:IconFrameSection.cs

示例9: InitUi

		void InitUi()
		{
			// input
            _textBoxName = new TextBox { PlaceholderText = "*Name", Width = 200};
		    _comboBoxLevel = new ComboBox {Width = 100};
		    _dropDownScritpType = new DropDown {Width = 120};
		    _textBoxShellPath = new TextBox {PlaceholderText = "*Shell Url", Width = 300};
			_textBoxShellPass = new TextBox { PlaceholderText = "*Pass" };
			_textBoxRemark = new TextBox { PlaceholderText = "Remark" };

			// _buttonAdd
			_buttonAdd = new Button { Text = StrRes.GetString("StrAdd", "Add") };
			_buttonAdd.Click += buttonAdd_Click;

			// _buttonAlter
			_buttonAlter = new Button { Text = StrRes.GetString("StrAlter", "Alter") };
			_buttonAlter.Click += _buttonAlter_Click;

			// _buttonAdvanced
			_buttonAdvanced = new Button { Text = StrRes.GetString("StrAdvanced","Advanced") };
			_buttonAdvanced.Click += _buttonAdvanced_Click;

			var codeList = new List<IListItem>
			{
				new ListItem {Text = "UTF-8"},
				new ListItem {Text = "GB2312"}
			};
			_dropDownServerCoding = new DropDown();
			_dropDownServerCoding.Items.AddRange(codeList);
			_dropDownServerCoding.SelectedIndex = 0;
			_dropDownWebCoding = new DropDown();
			_dropDownWebCoding.Items.AddRange(codeList);
			_dropDownWebCoding.SelectedIndex = 0;

			// _buttonDefault
			_buttonDefault = new Button { Text = "Default" };
			_buttonDefault.Click += _buttonDefault_Click;

			// _richTextBoxSetting
			_richTextBoxSetting = new TextArea {Wrap = false};

			// _panelAdvanced
			_panelAdvanced = new DynamicLayout { Padding = new Padding(5, 5), Spacing = new Size(5, 5) };
			_panelAdvanced.BeginVertical();
			_panelAdvanced.BeginHorizontal();
			_panelAdvanced.AddAutoSized(new Label
			{
				Text = StrRes.GetString("StrServerCoding", "ServerCoding"),
				VerticalAlign = VerticalAlign.Middle
			}, centered: true);
			_panelAdvanced.AddAutoSized(_dropDownServerCoding, centered: true);
			_panelAdvanced.AddAutoSized(new Label
			{
				Text = StrRes.GetString("StrWebCoding", "WebCoding"),
				VerticalAlign = VerticalAlign.Middle
			}, centered: true);
			_panelAdvanced.AddAutoSized(_dropDownWebCoding, centered: true);
			_panelAdvanced.Add(null);
			_panelAdvanced.AddAutoSized(_buttonDefault, centered: true);
			_panelAdvanced.EndHorizontal();
			_panelAdvanced.EndVertical();
			//_panelAdvanced.AddSeparateRow(new Label { Text = StrRes.GetString("StrServerCoding", "ServerCoding"), VerticalAlign = VerticalAlign.Middle }, _dropDownServerCoding);
			//_panelAdvanced.AddSeparateRow(new Label { Text = StrRes.GetString("StrWebCoding", "WebCoding"), VerticalAlign = VerticalAlign.Middle }, _dropDownWebCoding);
			_panelAdvanced.AddSeparateRow(_richTextBoxSetting);

			var panel1 = new DynamicLayout { Padding = new Padding(5, 5), Spacing = new Size(5, 5) };
			//line 1
			panel1.BeginVertical();
			panel1.BeginHorizontal();
			panel1.Add(_textBoxName, xscale: true);
			panel1.Add(_comboBoxLevel);
			panel1.Add(_dropDownScritpType);
			panel1.EndHorizontal();
			panel1.EndVertical();
			//line 2
			panel1.BeginVertical();
			panel1.BeginHorizontal();
			panel1.Add(_textBoxShellPath, true);
			panel1.Add(_textBoxShellPass);
			panel1.EndHorizontal();
			panel1.EndVertical();
			//line 3
			panel1.AddRow(_textBoxRemark);
			//line 4
			panel1.BeginVertical();
			panel1.BeginHorizontal();
			panel1.Add(_buttonAdvanced);
			panel1.Add(null, true);
			panel1.Add(_buttonAdd);
			panel1.Add(_buttonAlter);
			panel1.EndHorizontal();
			panel1.EndVertical();
			//line 5
			panel1.Add(_panelAdvanced, false, true);
			_panelAdvanced.Visible = false;

			//_p12 = new Splitter
			//{
			//	Panel1 = panel1,
			//	Panel2 = _panelAdvanced,
//.........这里部分代码省略.........
开发者ID:kevins1022,项目名称:Altman,代码行数:101,代码来源:FormEditWebshell.UI.cs


注:本文中的Eto.Forms.DynamicLayout.AddAutoSized方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。