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


C# UI.CheckBox类代码示例

本文整理汇总了C#中MatterHackers.Agg.UI.CheckBox的典型用法代码示例。如果您正苦于以下问题:C# CheckBox类的具体用法?C# CheckBox怎么用?C# CheckBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CheckBox类属于MatterHackers.Agg.UI命名空间,在下文中一共展示了CheckBox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: trans_curve1_application

		public trans_curve1_application()
		{
			AnchorAll();

			m_poly = new PolygonEditWidget(6, 5);
			on_init();
			m_poly.Changed += NeedsRedraw;
			AddChild(m_poly);

			m_num_points = new MatterHackers.Agg.UI.Slider(5, 5, 340, 12);

			m_num_points.ValueChanged += new EventHandler(NeedsRedraw);

			AddChild(m_num_points);

			m_num_points.Text = "Number of intermediate Points = {0:F3}";
			m_num_points.SetRange(10, 400);
			m_num_points.Value = 200;

			m_close = new CheckBox(350, 5.0, "Close");
			m_close.CheckedStateChanged += NeedsRedraw;
			AddChild(m_close);

			m_preserve_x_scale = new CheckBox(460, 5, "Preserve X scale");
			m_preserve_x_scale.CheckedStateChanged += NeedsRedraw;
			AddChild(m_preserve_x_scale);

			m_fixed_len = new CheckBox(350, 25, "Fixed Length");
			m_fixed_len.CheckedStateChanged += NeedsRedraw;
			AddChild(m_fixed_len);

			m_animate = new CheckBox(460, 25, "Animate");
			m_animate.CheckedStateChanged += m_animate_CheckedStateChanged;
			AddChild(m_animate);
		}
开发者ID:glocklueng,项目名称:agg-sharp,代码行数:35,代码来源:trans_curve1.cs

示例2: blur

		public blur()
		{
			m_rbuf2 = new ImageBuffer();
			m_shape_bounds = new RectangleDouble();
			m_method = new RadioButtonGroup(new Vector2(10.0, 10.0), new Vector2(130.0, 60.0));
			m_radius = new Slider(new Vector2(130 + 10.0, 10.0 + 4.0), new Vector2(290, 8.0));
			m_shadow_ctrl = new PolygonEditWidget(4);
			m_channel_r = new CheckBox(10.0, 80.0, "Red");
			m_channel_g = new CheckBox(10.0, 95.0, "Green");
			m_channel_b = new CheckBox(10.0, 110.0, "Blue");
			m_FlattenCurves = new CheckBox(10, 315, "Convert And Flatten Curves");
			m_FlattenCurves.Checked = true;

			AddChild(m_method);
			m_method.AddRadioButton("Stack Blur");
			m_method.AddRadioButton("Recursive Blur");
			m_method.AddRadioButton("Channels");
			m_method.SelectedIndex = 1;

			AddChild(m_radius);
			m_radius.SetRange(0.0, 40.0);
			m_radius.Value = 15.0;
			m_radius.Text = "Blur Radius={0:F2}";

			AddChild(m_shadow_ctrl);

			AddChild(m_channel_r);
			AddChild(m_channel_g);
			AddChild(m_channel_b);
			AddChild(m_FlattenCurves);
			m_channel_g.Checked = true;

			m_sl = new ScanlineCachePacked8();

			StyledTypeFace typeFaceForLargeA = new StyledTypeFace(LiberationSansFont.Instance, 300, flatenCurves: false);
			m_path = typeFaceForLargeA.GetGlyphForCharacter('a');

			Affine shape_mtx = Affine.NewIdentity();
			shape_mtx *= Affine.NewTranslation(150, 100);
			m_path = new VertexSourceApplyTransform(m_path, shape_mtx);
			m_shape = new FlattenCurves(m_path);

			bounding_rect.bounding_rect_single(m_shape, 0, ref m_shape_bounds);

			m_shadow_ctrl.SetXN(0, m_shape_bounds.Left);
			m_shadow_ctrl.SetYN(0, m_shape_bounds.Bottom);
			m_shadow_ctrl.SetXN(1, m_shape_bounds.Right);
			m_shadow_ctrl.SetYN(1, m_shape_bounds.Bottom);
			m_shadow_ctrl.SetXN(2, m_shape_bounds.Right);
			m_shadow_ctrl.SetYN(2, m_shape_bounds.Top);
			m_shadow_ctrl.SetXN(3, m_shape_bounds.Left);
			m_shadow_ctrl.SetYN(3, m_shape_bounds.Top);
			m_shadow_ctrl.line_color(new RGBA_Floats(0, 0.3, 0.5, 0.3));
		}
开发者ID:glocklueng,项目名称:agg-sharp,代码行数:54,代码来源:blur.cs

示例3: CreateToggleSwitch

		public static CheckBox CreateToggleSwitch(bool initialState)
		{
			ToggleSwitchView toggleView = new ToggleSwitchView("On".Localize(), "Off".Localize(),
				60, 24,
				ActiveTheme.Instance.PrimaryBackgroundColor,
				new RGBA_Bytes(220, 220, 220),
				ActiveTheme.Instance.PrimaryAccentColor,
				ActiveTheme.Instance.PrimaryTextColor);
			CheckBox toggleBox = new CheckBox(toggleView);
			toggleBox.Checked = initialState;
			return toggleBox;
		}
开发者ID:fuding,项目名称:MatterControl,代码行数:12,代码来源:ImageButtonFactory.cs

示例4: ComponentRendering

		public ComponentRendering()
			: base(320, 320)
		{
			alphaSlider = new Slider(new Vector2(5, 30), 310, 0, 255);
			alphaSlider.ValueChanged += new EventHandler(NeedInvalidate);
			alphaSlider.Text = "Alpha={0:F0}";
			alphaSlider.Value = 255;
			alphaSlider.View.TextColor = new RGBA_Bytes(127, 127, 127);
			AddChild(alphaSlider);

			useBlackBackgroundCheckbox = new UI.CheckBox(5, 30 + 12, "Draw Black Background");
			useBlackBackgroundCheckbox.CheckedStateChanged += NeedInvalidate;
			useBlackBackgroundCheckbox.TextColor = new RGBA_Bytes(127, 127, 127);
			AddChild(useBlackBackgroundCheckbox);
		}
开发者ID:glocklueng,项目名称:agg-sharp,代码行数:15,代码来源:component_rendering.cs

示例5: AddMinimumError

		private void AddMinimumError()
		{
			GuiWidget thingToHide;
			{
				FlowLayoutWidget twoColumns = new FlowLayoutWidget();
				twoColumns.Name = "twoColumns";
				{
					FlowLayoutWidget leftColumn = new FlowLayoutWidget(FlowDirection.TopToBottom);
					leftColumn.Name = "leftColumn";
					{
						FlowLayoutWidget topLeftStuff = new FlowLayoutWidget(FlowDirection.TopToBottom);
						topLeftStuff.Name = "topLeftStuff";

						topLeftStuff.AddChild(new TextWidget("Top of Top Stuff"));
						thingToHide = new Button("thing to hide");
						topLeftStuff.AddChild(thingToHide);
						topLeftStuff.AddChild(new TextWidget("Bottom of Top Stuff"));

						leftColumn.AddChild(topLeftStuff);
						//leftColumn.DebugShowBounds = true;
					}

					twoColumns.AddChild(leftColumn);
				}

				{
					FlowLayoutWidget rightColumn = new FlowLayoutWidget(FlowDirection.TopToBottom);
					rightColumn.Name = "rightColumn";
					CheckBox hideCheckBox = new CheckBox("Hide Stuff");
					rightColumn.AddChild(hideCheckBox);
					hideCheckBox.CheckedStateChanged += (sender, e) =>
					{
						if (hideCheckBox.Checked)
						{
							thingToHide.Visible = false;
						}
						else
						{
							thingToHide.Visible = true;
						}
					};

					twoColumns.AddChild(rightColumn);
				}

				this.AddChild(twoColumns);
			}
		}
开发者ID:glocklueng,项目名称:agg-sharp,代码行数:48,代码来源:LayoutPage.cs

示例6: SliderControlsPage

        public SliderControlsPage()
            : base("Slider Widget")
        {
            horizontalSlider = new Slider(new Vector2(20, 60), 100);
            AddChild(horizontalSlider);
            horizontalSlider.Text = "{0:0.0}";

            changeSliderText = new CheckBox(10, 200, "Show Text");
            changeSliderText.Checked = true;
            AddChild(changeSliderText);
            changeSliderText.CheckedStateChanged += new CheckBox.CheckedStateChangedEventHandler(changeSliderText_CheckedStateChanged);

            verticalSlider = new Slider(new Vector2(320, 60), 100, orientation: Orientation.Vertical);
            AddChild(verticalSlider);
            verticalSlider.Text = "{0:0.0}";
        }
开发者ID:jeske,项目名称:agg-sharp,代码行数:16,代码来源:SliderControlsPage.cs

示例7: CreateToggleSwitch

		public static CheckBox CreateToggleSwitch(bool initialState)
		{
			string on = "On";
			string off = "Off";
			if (StaticData.Instance != null)
			{
				on = on.Localize();
				off = off.Localize();
			}
			ToggleSwitchView toggleView = new ToggleSwitchView(on, off,
				60, 24,
				ActiveTheme.Instance.PrimaryBackgroundColor,
				new RGBA_Bytes(220, 220, 220),
				ActiveTheme.Instance.PrimaryAccentColor,
				ActiveTheme.Instance.PrimaryTextColor);
			CheckBox toggleBox = new CheckBox(toggleView);
			toggleBox.Checked = initialState;
			return toggleBox;
		}
开发者ID:broettge,项目名称:MatterControl,代码行数:19,代码来源:ImageButtonFactory.cs

示例8: lion_outline

		public lion_outline()
		{
			widthSlider = new MatterHackers.Agg.UI.Slider(new Vector2(5, 5), 498);
			renderAsScanlineCheckBox = new MatterHackers.Agg.UI.CheckBox(160, 5, "Use Scanline Rasterizer");
			renderAsScanlineCheckBox.Checked = false;
			widthSlider.ValueChanged += new EventHandler(NeedsRedraw);
			renderAsScanlineCheckBox.CheckedStateChanged += NeedsRedraw;
			AddChild(widthSlider);
			widthSlider.OriginRelativeParent = Vector2.Zero;
			widthSlider.SetRange(0.0, 4.0);
			widthSlider.Value = 1.0;
			widthSlider.Text = "Width {0:F2}";

			AddChild(renderAsScanlineCheckBox);
			//renderAsScanlineCheckBox.Transform = Affine.NewIdentity();

			renderAccurateJoinsCheckBox = new CheckBox(200 + 10.0, 10.0 + 4.0 + 16.0, "Accurate Joins");
			AddChild(renderAccurateJoinsCheckBox);
		}
开发者ID:glocklueng,项目名称:agg-sharp,代码行数:19,代码来源:lion_outline.cs

示例9: OnDraw

		public override void OnDraw(Graphics2D graphics2D)
		{
			ImageBuffer widgetsSubImage = ImageBuffer.NewSubImageReference(graphics2D.DestImage, graphics2D.GetClippingRect());

			IImageByte backBuffer = widgetsSubImage;

			if (firstTime)
			{
				firstTime = false;
				m_SuperFast = new MatterHackers.Agg.UI.CheckBox(10, 10, "Run Super Fast");
				AddChild(m_SuperFast);
				m_Controller = new CController(backBuffer, 30, 40, .1, .7, .3, 4, 1, 2000);
			}

			graphics2D.Clear(new RGBA_Floats(1, 1, 1, 1));
			graphics2D.Rasterizer.SetVectorClipBox(0, 0, (int)Width, (int)Height);
			m_Controller.FastRender(m_SuperFast.Checked);
			m_Controller.Render(graphics2D);
			//m_SuperFast.Render(graphics2D);
			base.OnDraw(graphics2D);
		}
开发者ID:glocklueng,项目名称:agg-sharp,代码行数:21,代码来源:SmartSweepers.cs

示例10: ScaleControls

		public ScaleControls(View3DWidget view3DWidget)
			: base(FlowDirection.TopToBottom)
		{
			this.view3DWidget = view3DWidget;
			{
				expandScaleOptions = view3DWidget.ExpandMenuOptionFactory.GenerateCheckBoxButton("Scale".Localize().ToUpper(), "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
				expandScaleOptions.Margin = new BorderDouble(bottom: 2);
				this.AddChild(expandScaleOptions);

				scaleOptionContainer = new FlowLayoutWidget(FlowDirection.TopToBottom);
				scaleOptionContainer.HAnchor = HAnchor.ParentLeftRight;
				scaleOptionContainer.Visible = false;
				this.AddChild(scaleOptionContainer);

				AddScaleControls(scaleOptionContainer);
			}

			expandScaleOptions.CheckedStateChanged += expandScaleOptions_CheckedStateChanged;

			view3DWidget.SelectedTransformChanged += OnSelectedTransformChanged;
		}
开发者ID:broettge,项目名称:MatterControl,代码行数:21,代码来源:ScaleControls.cs

示例11: MirrorControls

		public MirrorControls(View3DWidget view3DWidget)
			: base(FlowDirection.TopToBottom)
		{
			this.view3DWidget = view3DWidget;

			// put in the mirror options
			{
				expandMirrorOptions = view3DWidget.ExpandMenuOptionFactory.GenerateCheckBoxButton("Mirror".Localize().ToUpper(), "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
				expandMirrorOptions.Margin = new BorderDouble(bottom: 2);
				this.AddChild(expandMirrorOptions);

				mirrorOptionContainer = new FlowLayoutWidget(FlowDirection.TopToBottom);
				mirrorOptionContainer.HAnchor = HAnchor.ParentLeftRight;
				mirrorOptionContainer.Visible = false;
				this.AddChild(mirrorOptionContainer);

				AddMirrorControls(mirrorOptionContainer);
			}

			expandMirrorOptions.CheckedStateChanged += expandMirrorOptions_CheckedStateChanged;
		}
开发者ID:broettge,项目名称:MatterControl,代码行数:21,代码来源:MirrorControls.cs

示例12: TopToBottomContainerAppliesExpectedMarginToToggleView

		public void TopToBottomContainerAppliesExpectedMarginToToggleView()
		{
			TestContext.CurrentContext.SetCompatibleWorkingDirectory();

			int marginSize = 40;
			int dimensions = 300;

			GuiWidget outerContainer = new GuiWidget(dimensions, dimensions);

			FlowLayoutWidget topToBottomContainer = new FlowLayoutWidget(FlowDirection.TopToBottom)
			{
				HAnchor = HAnchor.ParentLeftRight,
				VAnchor = VAnchor.ParentBottomTop,
			};
			outerContainer.AddChild(topToBottomContainer);

			CheckBox toggleBox = new CheckBox("test");
			toggleBox.HAnchor = HAnchor.ParentLeftRight;
			toggleBox.VAnchor = VAnchor.ParentBottomTop;
			toggleBox.Margin = new BorderDouble(marginSize);
			toggleBox.BackgroundColor = RGBA_Bytes.Red;
			toggleBox.DebugShowBounds = true;

			topToBottomContainer.AddChild(toggleBox);
			topToBottomContainer.AnchorAll();
			topToBottomContainer.PerformLayout();

			outerContainer.DoubleBuffer = true;
			outerContainer.BackBuffer.NewGraphics2D().Clear(RGBA_Bytes.White);
			outerContainer.OnDraw(outerContainer.NewGraphics2D());

			// For troubleshooting or visual validation
			OutputImages(outerContainer, outerContainer);

			var bounds = toggleBox.BoundsRelativeToParent;
			Assert.IsTrue(bounds.Left == marginSize, "Left margin is incorrect");
			Assert.IsTrue(bounds.Right == dimensions - marginSize, "Right margin is incorrect");
			Assert.IsTrue(bounds.Top == dimensions - marginSize, "Top margin is incorrect");
			Assert.IsTrue(bounds.Bottom == marginSize, "Bottom margin is incorrect");
		}
开发者ID:tellingmachine,项目名称:MatterControl,代码行数:40,代码来源:MatterControlUiFeatures.cs

示例13: rounded_rect_application

        public rounded_rect_application()
        {
            AnchorAll();
            m_idx = (-1);
            m_radius = new MatterHackers.Agg.UI.Slider(new Vector2(10, 10), new Vector2(580, 9));
            m_gamma = new MatterHackers.Agg.UI.Slider(new Vector2(10, 10 + 40), new Vector2(580, 9));
            m_offset = new MatterHackers.Agg.UI.Slider(new Vector2(10, 10 + 80), new Vector2(580, 9));
            m_white_on_black = new CheckBox(10, 10+60, "White on black");
            m_DrawAsOutlineCheckBox = new CheckBox(10 + 180, 10 + 60, "Fill Rounded Rect");

            m_radius.ValueChanged += new EventHandler(NeedsRedraw);
            m_gamma.ValueChanged += new EventHandler(NeedsRedraw);
            m_offset.ValueChanged += new EventHandler(NeedsRedraw);
            m_white_on_black.CheckedStateChanged += new CheckBox.CheckedStateChangedEventHandler(NeedsRedraw);
            m_DrawAsOutlineCheckBox.CheckedStateChanged += new CheckBox.CheckedStateChangedEventHandler(NeedsRedraw);

            m_x[0] = 100;   m_y[0] = 100;
            m_x[1] = 500;   m_y[1] = 350;
            AddChild(m_radius);
            AddChild(m_gamma);
            AddChild(m_offset);
            AddChild(m_white_on_black);
            AddChild(m_DrawAsOutlineCheckBox);
            m_gamma.Text = "gamma={0:F3}";
            m_gamma.SetRange(0.0, 3.0);
            m_gamma.Value = 1.8;

            m_radius.Text = "radius={0:F3}";
            m_radius.SetRange(0.0, 50.0);
            m_radius.Value = 25.0;

            m_offset.Text = "subpixel offset={0:F3}";
            m_offset.SetRange(-2.0, 3.0);

            m_white_on_black.TextColor = new RGBA_Bytes(127, 127, 127);
            //m_white_on_black.inactive_color(new RGBA_Bytes(127, 127, 127));

            m_DrawAsOutlineCheckBox.TextColor = new RGBA_Floats(.5, .5, .5).GetAsRGBA_Bytes();
            //m_DrawAsOutlineCheckBox.inactive_color(new RGBA_Bytes(127, 127, 127));
        }
开发者ID:jeske,项目名称:agg-sharp,代码行数:40,代码来源:rounded_rect.cs

示例14: SliceSettingsDetailControl

		public SliceSettingsDetailControl()
		{
			showHelpBox = new CheckBox(0, 0, "Show Help".Localize(), textSize: 10);
			showHelpBox.Checked = UserSettings.Instance.get(SliceSettingsShowHelpEntry) == "true";
			// add in the ability to turn on and off help text
			showHelpBox.TextColor = ActiveTheme.Instance.PrimaryTextColor;
			showHelpBox.Margin = new BorderDouble(right: 3);
			showHelpBox.VAnchor = VAnchor.ParentCenter;
			showHelpBox.Cursor = Cursors.Hand;
			showHelpBox.CheckedStateChanged += (s, e) =>
			{
				UserSettings.Instance.set(SliceSettingsShowHelpEntry, showHelpBox.Checked.ToString().ToLower());
				ShowHelpChanged?.Invoke(this, null);
			};

			this.AddChild(showHelpBox);

			settingsDetailSelector = new StyledDropDownList("Basic", maxHeight: 200);
			settingsDetailSelector.Name = "User Level Dropdown";
			settingsDetailSelector.AddItem("Basic".Localize(), "Simple");
			settingsDetailSelector.AddItem("Standard".Localize(), "Intermediate");
			settingsDetailSelector.AddItem("Advanced".Localize(), "Advanced");
			if (UserSettings.Instance.get(SliceSettingsLevelEntry) != null
				&& SliceSettingsOrganizer.Instance.UserLevels.ContainsKey(UserSettings.Instance.get(SliceSettingsLevelEntry)))
			{
				settingsDetailSelector.SelectedValue = UserSettings.Instance.get(SliceSettingsLevelEntry);
			}

			settingsDetailSelector.SelectionChanged += new EventHandler(SettingsDetail_SelectionChanged);
			settingsDetailSelector.VAnchor = VAnchor.ParentCenter;
			settingsDetailSelector.Margin = new BorderDouble(5, 3);
			settingsDetailSelector.BorderColor = new RGBA_Bytes(ActiveTheme.Instance.SecondaryTextColor, 100);

			this.AddChild(settingsDetailSelector);
			this.AddChild(GetSliceOptionsMenuDropList());
		}
开发者ID:broettge,项目名称:MatterControl,代码行数:36,代码来源:SliceSettingsDetailControl.cs

示例15: CreateRightButtonPanel

		private FlowLayoutWidget CreateRightButtonPanel(double buildHeight)
		{
			FlowLayoutWidget buttonRightPanel = new FlowLayoutWidget(FlowDirection.TopToBottom);
			buttonRightPanel.Width = 200;
			{
				BorderDouble buttonMargin = new BorderDouble(top: 3);

				expandRotateOptions = expandMenuOptionFactory.GenerateCheckBoxButton(LocalizedString.Get("Rotate"), "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
				expandRotateOptions.Margin = new BorderDouble(bottom: 2);
				buttonRightPanel.AddChild(expandRotateOptions);

				rotateOptionContainer = new FlowLayoutWidget(FlowDirection.TopToBottom);
				rotateOptionContainer.HAnchor = HAnchor.ParentLeftRight;
				rotateOptionContainer.Visible = false;
				buttonRightPanel.AddChild(rotateOptionContainer);

				expandScaleOptions = expandMenuOptionFactory.GenerateCheckBoxButton(LocalizedString.Get("Scale"), "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
				expandScaleOptions.Margin = new BorderDouble(bottom: 2);
				buttonRightPanel.AddChild(expandScaleOptions);

				scaleOptionContainer = new FlowLayoutWidget(FlowDirection.TopToBottom);
				scaleOptionContainer.HAnchor = HAnchor.ParentLeftRight;
				scaleOptionContainer.Visible = false;
				buttonRightPanel.AddChild(scaleOptionContainer);

				// put in the mirror options
				{
					expandMirrorOptions = expandMenuOptionFactory.GenerateCheckBoxButton(LocalizedString.Get("Mirror"), "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
					expandMirrorOptions.Margin = new BorderDouble(bottom: 2);
					buttonRightPanel.AddChild(expandMirrorOptions);

					mirrorOptionContainer = new FlowLayoutWidget(FlowDirection.TopToBottom);
					mirrorOptionContainer.HAnchor = HAnchor.ParentLeftRight;
					mirrorOptionContainer.Visible = false;
					buttonRightPanel.AddChild(mirrorOptionContainer);

					AddMirrorControls(mirrorOptionContainer);
				}

				// put in the material options
				int numberOfExtruders = ActiveSliceSettings.Instance.ExtruderCount;

				expandMaterialOptions = expandMenuOptionFactory.GenerateCheckBoxButton(LocalizedString.Get("Material"), "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
				expandMaterialOptions.Margin = new BorderDouble(bottom: 2);

				if (numberOfExtruders > 1)
				{
					buttonRightPanel.AddChild(expandMaterialOptions);

					materialOptionContainer = new FlowLayoutWidget(FlowDirection.TopToBottom);
					materialOptionContainer.HAnchor = HAnchor.ParentLeftRight;
					materialOptionContainer.Visible = false;

					buttonRightPanel.AddChild(materialOptionContainer);
					AddMaterialControls(materialOptionContainer);
				}

				// put in the view options
				{
					expandViewOptions = expandMenuOptionFactory.GenerateCheckBoxButton(LocalizedString.Get("Display"), "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
					expandViewOptions.Margin = new BorderDouble(bottom: 2);
					buttonRightPanel.AddChild(expandViewOptions);

					viewOptionContainer = new FlowLayoutWidget(FlowDirection.TopToBottom);
					viewOptionContainer.HAnchor = HAnchor.ParentLeftRight;
					viewOptionContainer.Padding = new BorderDouble(left: 4);
					viewOptionContainer.Visible = false;
					{
						CheckBox showBedCheckBox = new CheckBox(LocalizedString.Get("Show Print Bed"), textColor: ActiveTheme.Instance.PrimaryTextColor);
						showBedCheckBox.Checked = true;
						showBedCheckBox.CheckedStateChanged += (sender, e) =>
						{
							meshViewerWidget.RenderBed = showBedCheckBox.Checked;
						};
						viewOptionContainer.AddChild(showBedCheckBox);

						if (buildHeight > 0)
						{
							CheckBox showBuildVolumeCheckBox = new CheckBox(LocalizedString.Get("Show Print Area"), textColor: ActiveTheme.Instance.PrimaryTextColor);
							showBuildVolumeCheckBox.Checked = false;
							showBuildVolumeCheckBox.Margin = new BorderDouble(bottom: 5);
							showBuildVolumeCheckBox.CheckedStateChanged += (sender, e) =>
							{
								meshViewerWidget.RenderBuildVolume = showBuildVolumeCheckBox.Checked;
							};
							viewOptionContainer.AddChild(showBuildVolumeCheckBox);
						}

						if (ActiveTheme.Instance.IsTouchScreen)
						{
							UserSettings.Instance.set("defaultRenderSetting", RenderTypes.Shaded.ToString());
						}
						else
						{
							CreateRenderTypeRadioButtons(viewOptionContainer);
						}
					}
					buttonRightPanel.AddChild(viewOptionContainer);
				}

//.........这里部分代码省略.........
开发者ID:gobrien4418,项目名称:MatterControl,代码行数:101,代码来源:View3DWidget.cs


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