/// <summary> /// /// </summary> /// <returns></returns> protected override NWidget CreateExampleControls() { NStackPanel stack = new NStackPanel(); NUniSizeBoxGroup group = new NUniSizeBoxGroup(stack); NButton changeDataButton = new NButton("Change Data"); changeDataButton.Click += OnChangeDataButtonClick; stack.Add(changeDataButton); NButton saveStateToFileButton = new NButton("Save State To File..."); saveStateToFileButton.Click += OnSaveStateToFileButtonClick; stack.Add(saveStateToFileButton); NButton loadStateFromFileButton = new NButton("Load State From File..."); loadStateFromFileButton.Click += OnLoadStateFromFileButtonClick; stack.Add(loadStateFromFileButton); NButton saveStateToStreamButton = new NButton("Save State To Stream"); saveStateToStreamButton.Click += OnSaveStateToStreamButtonClick; stack.Add(saveStateToStreamButton); NButton loadStateFromStreamButton = new NButton("Load State from Stream"); loadStateFromStreamButton.Click += OnLoadStateFromStreamButtonClick; stack.Add(loadStateFromStreamButton); return(group); }
protected override NWidget CreateExampleContent() { // create the root tab NStackPanel stack = new NStackPanel(); stack.FillMode = ENStackFillMode.Last; stack.FitMode = ENStackFitMode.Last; // create the HScrollBar m_HScrollBar = new NHScrollBar(); m_HScrollBar.VerticalPlacement = ENVerticalPlacement.Top; m_HScrollBar.StartScrolling += new Function <NEventArgs>(OnScrollBarStartScrolling); m_HScrollBar.ValueChanged += new Function <NValueChangeEventArgs>(OnScrollBarValueChanged); m_HScrollBar.EndScrolling += new Function <NEventArgs>(OnScrollBarEndScrolling); stack.Add(new NGroupBox("Horizontal", m_HScrollBar)); // create the VScrollBar m_VScrollBar = new NVScrollBar(); m_VScrollBar.HorizontalPlacement = ENHorizontalPlacement.Left; m_VScrollBar.StartScrolling += new Function <NEventArgs>(OnScrollBarStartScrolling); m_VScrollBar.ValueChanged += new Function <NValueChangeEventArgs>(OnScrollBarValueChanged); m_VScrollBar.EndScrolling += new Function <NEventArgs>(OnScrollBarEndScrolling); stack.Add(new NGroupBox("Vertical", m_VScrollBar)); return(stack); }
/// <summary> /// /// </summary> /// <returns></returns> protected override NWidget CreateExampleControls() { NStackPanel stack = new NStackPanel(); NUniSizeBoxGroup boxGroup = new NUniSizeBoxGroup(stack); stack.Add(new NLabel("Vertical Axis")); NComboBox verticalAxisAlignmentComboBox = new NComboBox(); verticalAxisAlignmentComboBox.FillFromEnum <ENAxisCrossAlignment>(); verticalAxisAlignmentComboBox.SelectedIndexChanged += new Function <NValueChangeEventArgs>(OnVerticalAxisAlignmentComboBoxSelectedIndexChanged); stack.Add(NPairBox.Create("Alignment:", verticalAxisAlignmentComboBox)); verticalAxisAlignmentComboBox.SelectedIndex = (int)ENAxisCrossAlignment.Center; NNumericUpDown verticalAxisOffsetUpDown = new NNumericUpDown(); verticalAxisOffsetUpDown.ValueChanged += new Function <NValueChangeEventArgs>(OnVerticalAxisOffsetUpDownValueChanged); stack.Add(NPairBox.Create("Offset:", verticalAxisOffsetUpDown)); stack.Add(new NLabel("Horizontal Axis")); NComboBox horizontalAxisAlignmentComboBox = new NComboBox(); horizontalAxisAlignmentComboBox.FillFromEnum <ENAxisCrossAlignment>(); horizontalAxisAlignmentComboBox.SelectedIndexChanged += new Function <NValueChangeEventArgs>(OnHorizontalAxisAlignmentComboBoxSelectedIndexChanged); stack.Add(NPairBox.Create("Alignment:", horizontalAxisAlignmentComboBox)); horizontalAxisAlignmentComboBox.SelectedIndex = (int)ENAxisCrossAlignment.Center; NNumericUpDown horizontalAxisOffsetUpDown = new NNumericUpDown(); horizontalAxisOffsetUpDown.ValueChanged += new Function <NValueChangeEventArgs>(OnHorizontalAxisOffsetUpDownValueChanged); stack.Add(NPairBox.Create("Offset:", horizontalAxisOffsetUpDown)); return(boxGroup); }
protected override NWidget CreateExampleContent() { NStackPanel stack = new NStackPanel(); m_HSlider = new NRangeSlider(); m_HSlider.BeginValue = 20; m_HSlider.EndValue = 40; m_HSlider.HorizontalPlacement = ENHorizontalPlacement.Left; m_HSlider.PreferredWidth = 300; m_HSlider.BeginValueChanged += new Function <NValueChangeEventArgs>(OnSliderValueChanged); m_HSlider.EndValueChanged += new Function <NValueChangeEventArgs>(OnSliderValueChanged); stack.Add(new NGroupBox("Horizontal", m_HSlider)); m_VSlider = new NRangeSlider(); m_VSlider.BeginValue = 20; m_VSlider.EndValue = 40; m_VSlider.Orientation = ENHVOrientation.Vertical; m_VSlider.PreferredHeight = 300; m_VSlider.HorizontalPlacement = ENHorizontalPlacement.Left; m_VSlider.BeginValueChanged += new Function <NValueChangeEventArgs>(OnSliderValueChanged); m_VSlider.EndValueChanged += new Function <NValueChangeEventArgs>(OnSliderValueChanged); stack.Add(new NGroupBox("Vertical", m_VSlider)); return(stack); }
protected override NWidget CreateExampleControls() { NStackPanel stack = new NStackPanel(); stack.FillMode = ENStackFillMode.Last; stack.FitMode = ENStackFitMode.Last; // properties NList <NPropertyEditor> editors = NDesigner.GetDesigner(m_CheckBox).CreatePropertyEditors( m_CheckBox, NCheckBox.EnabledProperty, NCheckBox.CheckedProperty, NCheckBox.IndeterminateProperty, NCheckBox.SymbolContentRelationProperty); NStackPanel propertiesStack = new NStackPanel(); for (int i = 0; i < editors.Count; i++) { propertiesStack.Add(editors[i]); } stack.Add(new NGroupBox("Properties", new NUniSizeBoxGroup(propertiesStack))); // events log m_EventsLog = new NExampleEventsLog(); stack.Add(m_EventsLog); return(stack); }
protected override NWidget CreateExampleControls() { NStackPanel stack = new NStackPanel(); stack.FillMode = ENStackFillMode.Last; stack.FitMode = ENStackFitMode.Last; // add come property editors NList <NPropertyEditor> editors = NDesigner.GetDesigner(m_NamedColorPicker).CreatePropertyEditors( m_NamedColorPicker, NNamedColorPicker.EnabledProperty, NNamedColorPicker.HorizontalPlacementProperty, NNamedColorPicker.VerticalPlacementProperty ); for (int i = 0; i < editors.Count; i++) { stack.Add(editors[i]); } // create the events log m_EventsLog = new NExampleEventsLog(); stack.Add(m_EventsLog); return(new NUniSizeBoxGroup(stack)); }
/// <summary> /// /// </summary> /// <returns></returns> protected override NWidget CreateExampleControls() { NStackPanel stack = new NStackPanel(); NUniSizeBoxGroup boxGroup = new NUniSizeBoxGroup(stack); NComboBox orientationComboBox = new NComboBox(); orientationComboBox.FillFromEnum <ENCartesianChartOrientation>(); orientationComboBox.SelectedIndex = (int)m_Chart.Orientation; orientationComboBox.SelectedIndexChanged += new Function <NValueChangeEventArgs>(OnOrientationComboBoxSelectedIndexChanged); stack.Add(NPairBox.Create("Orientation:", orientationComboBox)); m_AngleModeComboBox = new NComboBox(); m_AngleModeComboBox.FillFromEnum <ENScaleLabelAngleMode>(); m_AngleModeComboBox.SelectedIndex = (int)ENScaleLabelAngleMode.Scale; m_AngleModeComboBox.SelectedIndexChanged += new Function <NValueChangeEventArgs>(OnAxisLabelChanged); stack.Add(NPairBox.Create("Angle Mode:", m_AngleModeComboBox)); m_CustomAngleNumericUpDown = new NNumericUpDown(); m_CustomAngleNumericUpDown.Minimum = 0; m_CustomAngleNumericUpDown.Maximum = 360; m_CustomAngleNumericUpDown.Value = 0; m_CustomAngleNumericUpDown.ValueChanged += new Function <NValueChangeEventArgs>(OnAxisLabelChanged); stack.Add(NPairBox.Create("Custom Angle:", m_CustomAngleNumericUpDown)); m_AllowLabelsToFlipCheckBox = new NCheckBox("Allow Label To Flip"); m_AllowLabelsToFlipCheckBox.Checked = false; m_AllowLabelsToFlipCheckBox.CheckedChanged += new Function <NValueChangeEventArgs>(OnAxisLabelChanged); stack.Add(m_AllowLabelsToFlipCheckBox); return(boxGroup); }
protected override NWidget CreateExampleControls() { NStackPanel stack = new NStackPanel(); return(stack); }
/// <summary> /// /// </summary> /// <returns></returns> protected override NWidget CreateExampleControls() { NStackPanel stack = new NStackPanel(); NUniSizeBoxGroup group = new NUniSizeBoxGroup(stack); NNumericUpDown beginAngleUpDown = new NNumericUpDown(); beginAngleUpDown.ValueChanged += OnBeginAngleUpDownValueChanged; beginAngleUpDown.Value = 90; stack.Add(NPairBox.Create("Begin Angle:", beginAngleUpDown)); NComboBox titleAngleModeComboBox = new NComboBox(); titleAngleModeComboBox.FillFromEnum <ENScaleLabelAngleMode>(); titleAngleModeComboBox.SelectedIndexChanged += OnTitleAngleModeComboBoxSelectedIndexChanged; titleAngleModeComboBox.SelectedIndex = (int)ENScaleLabelAngleMode.Scale; stack.Add(NPairBox.Create("Title Angle Mode:", titleAngleModeComboBox)); NNumericUpDown titleAngleUpDown = new NNumericUpDown(); titleAngleUpDown.ValueChanged += OnTitleAngleUpDownValueChanged; titleAngleUpDown.Value = 0; stack.Add(NPairBox.Create("Title Angle:", titleAngleUpDown)); return(group); }
protected override NWidget CreateExampleControls() { NList <NPropertyEditor> editors = NDesigner.GetDesigner(m_Tab).CreatePropertyEditors( m_Tab, NTab.EnabledProperty, NTab.SizeToSelectedPageProperty, NTab.HeadersPositionProperty, NTab.HeadersModeProperty, NTab.HeadersAlignmentProperty, NTab.HeadersSpacingProperty, NTab.HorizontalPlacementProperty, NTab.VerticalPlacementProperty); NStackPanel stack = new NStackPanel(); stack.FillMode = ENStackFillMode.Last; stack.FitMode = ENStackFitMode.Last; for (int i = 0; i < editors.Count; i++) { stack.Add(editors[i]); } // create the events list box m_EventsLog = new NExampleEventsLog(); stack.Add(m_EventsLog); return(new NUniSizeBoxGroup(stack)); }
/// <summary> /// /// </summary> /// <returns></returns> protected override NWidget CreateExampleControls() { NStackPanel stack = new NStackPanel(); NStackPanel propertyStack = new NStackPanel(); stack.Add(new NUniSizeBoxGroup(propertyStack)); m_BlueSectionBeginUpDown = CreateUpDown(0.0); propertyStack.Add(new NPairBox("Begin:", m_BlueSectionBeginUpDown, true)); m_BlueSectionEndUpDown = CreateUpDown(20.0); propertyStack.Add(new NPairBox("End:", m_BlueSectionEndUpDown, true)); m_RedSectionBeginUpDown = CreateUpDown(80.0); propertyStack.Add(new NPairBox("Begin:", m_RedSectionBeginUpDown, true)); m_RedSectionEndUpDown = CreateUpDown(100.0); propertyStack.Add(new NPairBox("End:", m_RedSectionEndUpDown, true)); m_StopStartTimerButton = new NButton("Stop Timer"); propertyStack.Add(m_StopStartTimerButton); return(stack); }
/// <summary> /// /// </summary> /// <returns></returns> protected override NWidget CreateExampleContent() { NStackPanel stack = new NStackPanel(); NStackPanel controlStack = new NStackPanel(); controlStack.Direction = ENHVDirection.LeftToRight; stack.Add(controlStack); m_LinearGauge = new NLinearGauge(); m_LinearGauge.Orientation = ENLinearGaugeOrientation.Vertical; m_LinearGauge.PreferredSize = defaultLinearVerticalGaugeSize; m_LinearGauge.BackgroundFill = new NStockGradientFill(NColor.DarkGray, NColor.Black); m_LinearGauge.CapEffect = new NGelCapEffect(); m_LinearGauge.Border = base.CreateBorder(); m_LinearGauge.Padding = new NMargins(20); m_LinearGauge.BorderThickness = new NMargins(6); controlStack.Add(m_LinearGauge); NMarkerValueIndicator markerIndicator = new NMarkerValueIndicator(); m_LinearGauge.Indicators.Add(markerIndicator); InitSections(m_LinearGauge); // create the radial gauge m_RadialGauge = new NRadialGauge(); m_RadialGauge.PreferredSize = defaultRadialGaugeSize; NEdgeDialRim dialRim = new NEdgeDialRim(); dialRim.OuterBevelWidth = 2.0; dialRim.InnerBevelWidth = 2.0; dialRim.MiddleBevelWidth = 2.0; m_RadialGauge.Dial = new NDial(ENDialShape.CutCircle, dialRim); m_RadialGauge.Dial.BackgroundFill = new NStockGradientFill(NColor.DarkGray, NColor.Black); m_RadialGauge.InnerRadius = 15; NGlassCapEffect glassCapEffect = new NGlassCapEffect(); glassCapEffect.LightDirection = new NAngle(130, NUnit.Degree); glassCapEffect.EdgeOffset = 0; glassCapEffect.EdgeDepth = 0.30; m_RadialGauge.CapEffect = glassCapEffect; controlStack.Add(m_RadialGauge); NNeedleValueIndicator needleIndicator = new NNeedleValueIndicator(); m_RadialGauge.Indicators.Add(needleIndicator); m_RadialGauge.SweepAngle = new NAngle(180, NUnit.Degree); InitSections(m_RadialGauge); m_DataFeedTimer = new NTimer(); m_DataFeedTimer.Tick += new Function(OnDataFeedTimerTick); m_DataFeedTimer.Start(); return(stack); }
/// <summary> /// /// </summary> /// <returns></returns> protected override NWidget CreateExampleControls() { NStackPanel stack = new NStackPanel(); NUniSizeBoxGroup boxGroup = new NUniSizeBoxGroup(stack); NCheckBox enableInitialPositioningCheckBox = new NCheckBox("Enable Initial Positioning"); enableInitialPositioningCheckBox.CheckedChanged += new Function <NValueChangeEventArgs>(OnEnableInitialPositioningCheckBoxCheckedChanged); stack.Add(enableInitialPositioningCheckBox); NCheckBox enableLabelAdjustmentCheckBox = new NCheckBox("Enable Label Adjustment"); enableLabelAdjustmentCheckBox.CheckedChanged += new Function <NValueChangeEventArgs>(OnEnableLabelAdjustmentCheckBoxCheckedChanged); stack.Add(enableLabelAdjustmentCheckBox); NButton generateDataButton = new NButton("Generate Data"); generateDataButton.Click += new Function <NEventArgs>(OnGenerateDataButtonClick); stack.Add(generateDataButton); enableInitialPositioningCheckBox.Checked = true; enableLabelAdjustmentCheckBox.Checked = true; return(boxGroup); }
/// <summary> /// /// </summary> /// <returns></returns> protected override NWidget CreateExampleControls() { NStackPanel stack = new NStackPanel(); NUniSizeBoxGroup boxGroup = new NUniSizeBoxGroup(stack); stack.Add(new NLabel("Vertical Axis")); NCheckBox verticalAxisUsePositionCheckBox = new NCheckBox("Use Position"); verticalAxisUsePositionCheckBox.CheckedChanged += new Function <NValueChangeEventArgs>(OnVerticalAxisUsePositionCheckBoxCheckedChanged); stack.Add(verticalAxisUsePositionCheckBox); m_VerticalAxisPositionValueUpDown = new NNumericUpDown(); m_VerticalAxisPositionValueUpDown.ValueChanged += new Function <NValueChangeEventArgs>(OnVerticalAxisPositionValueUpDownValueChanged); stack.Add(NPairBox.Create("Position Value:", m_VerticalAxisPositionValueUpDown)); stack.Add(new NLabel("Horizontal Axis")); NCheckBox horizontalAxisUsePositionCheckBox = new NCheckBox("Use Position"); horizontalAxisUsePositionCheckBox.CheckedChanged += new Function <NValueChangeEventArgs>(OnHorizontalAxisUsePositionCheckBoxCheckedChanged); stack.Add(horizontalAxisUsePositionCheckBox); m_HorizontalAxisPositionValueUpDown = new NNumericUpDown(); m_HorizontalAxisPositionValueUpDown.ValueChanged += new Function <NValueChangeEventArgs>(OnHorizontalAxisPositionValueUpDownValueChanged); stack.Add(NPairBox.Create("Position Value:", m_HorizontalAxisPositionValueUpDown)); verticalAxisUsePositionCheckBox.Checked = true; horizontalAxisUsePositionCheckBox.Checked = true; return(boxGroup); }
/// <summary> /// /// </summary> /// <returns></returns> protected override NWidget CreateExampleControls() { NStackPanel stack = new NStackPanel(); NUniSizeBoxGroup boxGroup = new NUniSizeBoxGroup(stack); m_ShowFirstYSectionCheckBox = new NCheckBox("Show Y Section [20, 40]"); stack.Add(m_ShowFirstYSectionCheckBox); m_ShowFirstYSectionCheckBox.Checked = true; m_ShowSecondYSectionCheckBox = new NCheckBox("Show Y Section [70, 90]"); stack.Add(m_ShowSecondYSectionCheckBox); m_ShowSecondYSectionCheckBox.Checked = true; m_ShowFirstXSectionCheckBox = new NCheckBox("Show X Section [2, 8]"); stack.Add(m_ShowFirstXSectionCheckBox); m_ShowFirstXSectionCheckBox.Checked = true; m_ShowSecondXSectionCheckBox = new NCheckBox("Show X Section [14, 18]"); stack.Add(m_ShowSecondXSectionCheckBox); m_ShowSecondXSectionCheckBox.Checked = true; m_ShowFirstYSectionCheckBox.CheckedChanged += new Function <NValueChangeEventArgs>(OnUpdateSections); m_ShowSecondYSectionCheckBox.CheckedChanged += new Function <NValueChangeEventArgs>(OnUpdateSections); m_ShowFirstXSectionCheckBox.CheckedChanged += new Function <NValueChangeEventArgs>(OnUpdateSections); m_ShowSecondXSectionCheckBox.CheckedChanged += new Function <NValueChangeEventArgs>(OnUpdateSections); OnUpdateSections(null); return(boxGroup); }
protected override NWidget CreateExampleControls() { NList <NPropertyEditor> editors = NDesigner.GetDesigner(m_ColorPicker).CreatePropertyEditors( m_ColorPicker, NHsbWheelColorPicker.UpdateWhileDraggingProperty, NHsbWheelColorPicker.SelectedColorProperty, NHsbWheelColorPicker.HueSelectorSectorAngleProperty, NHsbWheelColorPicker.HueSelectorExtendPercentProperty, NHsbWheelColorPicker.HueWheelWidthPercentProperty, NHsbWheelColorPicker.SBSelectorRadiusPercentProperty, NHsbWheelColorPicker.SBTriangleMarginsPercentProperty ); NStackPanel stack = new NStackPanel(); stack.FillMode = ENStackFillMode.Last; stack.FitMode = ENStackFitMode.Last; for (int i = 0; i < editors.Count; i++) { stack.Add(editors[i]); } m_EventsLog = new NExampleEventsLog(); stack.Add(m_EventsLog); return(new NUniSizeBoxGroup(stack)); }
protected override NWidget CreateExampleControls() { NStackPanel stack = new NStackPanel(); m_FindTextBox = new NTextBox(); m_FindTextBox.Text = "quick"; stack.Add(new NPairBox(new NLabel("Find:"), m_FindTextBox, ENPairBoxRelation.Box1AboveBox2)); m_ReplaceTextBox = new NTextBox(); m_ReplaceTextBox.Text = "slow"; stack.Add(new NPairBox(new NLabel("Replace:"), m_ReplaceTextBox, ENPairBoxRelation.Box1AboveBox2)); NButton findAllButton = new NButton("Find All"); findAllButton.Click += new Function <NEventArgs>(OnFindAllButtonClick); stack.Add(findAllButton); NButton replaceAllButton = new NButton("Replace All"); replaceAllButton.Click += new Function <NEventArgs>(OnReplaceAllButtonClick); stack.Add(replaceAllButton); NButton clearHighlightButton = new NButton("Clear Highlight"); clearHighlightButton.Click += new Function <NEventArgs>(OnClearHighlightButtonClick); stack.Add(clearHighlightButton); return(stack); }
private NStackPanel CreateDropDownEdits() { NStackPanel stack = new NStackPanel(); stack.VerticalSpacing = 10; NComboBox comboBox = new NComboBox(); comboBox.Items.Add(new NComboBoxItem("Item 1")); comboBox.Items.Add(new NComboBoxItem("Item 2")); comboBox.Items.Add(new NComboBoxItem("Item 3")); comboBox.Items.Add(new NComboBoxItem("Item 4")); comboBox.SelectedIndex = 0; stack.Add(comboBox); NColorBox colorBox = new NColorBox(); stack.Add(colorBox); NDateTimeBox dateTimeBox = new NDateTimeBox(); stack.Add(dateTimeBox); NFillSplitButton splitButton = new NFillSplitButton(); stack.Add(splitButton); return(stack); }
protected override NWidget CreateExampleControls() { NStackPanel stack = new NStackPanel(); stack.FitMode = ENStackFitMode.Last; stack.FillMode = ENStackFillMode.Last; // capture touch check m_CaptureTouchCheck = new NCheckBox("Capture Touch"); stack.Add(m_CaptureTouchCheck); // handle touch events check m_HandleTouchEventsCheck = new NCheckBox("Handle Touch Events"); stack.Add(m_HandleTouchEventsCheck); // track move events m_LogMoveEventsCheck = new NCheckBox("Track Move Events"); stack.Add(m_LogMoveEventsCheck); // Create clear canvas button NButton clearCanvasButton = new NButton("Clear Canvas"); clearCanvasButton.Click += clearCanvas_Click; stack.Add(clearCanvasButton); // Create the events log m_EventsLog = new NExampleEventsLog(); stack.Add(m_EventsLog); return(stack); }
protected override NWidget CreateExampleContent() { // Create a stack for the scroll bars NStackPanel stack = new NStackPanel(); stack.FillMode = ENStackFillMode.Last; stack.FitMode = ENStackFitMode.Last; // Create the HScrollBar m_HScrollBar = new NHRangeScrollBar(); m_HScrollBar.BeginValue = 20; m_HScrollBar.EndValue = 40; m_HScrollBar.VerticalPlacement = ENVerticalPlacement.Top; m_HScrollBar.BeginValueChanged += OnScrollBarValueChanged; m_HScrollBar.EndValueChanged += OnScrollBarValueChanged; stack.Add(new NGroupBox("Horizontal", m_HScrollBar)); // Create the VScrollBar m_VScrollBar = new NVRangeScrollBar(); m_VScrollBar.BeginValue = 20; m_VScrollBar.EndValue = 40; m_VScrollBar.HorizontalPlacement = ENHorizontalPlacement.Left; m_VScrollBar.BeginValueChanged += OnScrollBarValueChanged; m_VScrollBar.EndValueChanged += OnScrollBarValueChanged; stack.Add(new NGroupBox("Vertical", m_VScrollBar)); return(stack); }
protected override NWidget CreateExampleContent() { m_TextChecked = new bool[] { true, true, false }; m_ImageAndTextChecked = new bool[] { true, false, true }; NStackPanel leftStack = new NStackPanel(); leftStack.Add(CreateWidget("Text Only", CreateTextContextMenu)); leftStack.Add(CreateWidget("Image and Text", CreateImageAndTextContextMenu)); leftStack.Add(CreateWidget("Checkable Text Only", CreateCheckableTextContextMenu)); leftStack.Add(CreateWidget("Checkable Image And Text", CreateCheckableImageAndTextContextMenu)); NStackPanel rightStack = new NStackPanel(); rightStack.Add(CreateWidget("Text Only", CreateTextContextMenu)); rightStack.Add(CreateWidget("Image and Text", CreateImageAndTextContextMenu)); rightStack.Add(CreateWidget("Checkable Text Only", CreateCheckableTextContextMenu)); rightStack.Add(CreateWidget("Checkable Image And Text", CreateCheckableImageAndTextContextMenu)); NStackPanel stack = new NStackPanel(); stack.Direction = ENHVDirection.LeftToRight; stack.HorizontalPlacement = ENHorizontalPlacement.Left; stack.VerticalPlacement = ENVerticalPlacement.Top; stack.HorizontalSpacing = 10; stack.Add(new NGroupBox("Left Button Context Menu", leftStack)); stack.Add(new NGroupBox("Right Button Context Menu", rightStack)); return(stack); }
protected override NWidget CreateExampleControls() { NStackPanel stack = new NStackPanel(); // Create radio buttons for the different data groupings stack.Add(new NRadioButton("Optimal")); stack.Add(new NRadioButton("Equal Interval")); stack.Add(new NRadioButton("Equal Distribution")); // Create a radio button group to hold the radio buttons NRadioButtonGroup group = new NRadioButtonGroup(stack); group.SelectedIndex = 0; group.SelectedIndexChanged += OnDataGroupingSelectedIndexChanged; // Create the data grouping group box NGroupBox dataGroupingGroupBox = new NGroupBox("Data Grouping", group); // Add the data grouping group box to the parent stack NStackPanel parentStack = (NStackPanel)base.CreateExampleControls(); parentStack.Add(dataGroupingGroupBox); return(parentStack); }
protected override NWidget CreateExampleControls() { NStackPanel stack = new NStackPanel(); stack.FillMode = ENStackFillMode.Last; stack.FitMode = ENStackFitMode.Last; NStackPanel propertiesStack = new NStackPanel(); NList <NPropertyEditor> editors = NDesigner.GetDesigner(m_ComboBox).CreatePropertyEditors( m_ComboBox, NComboBox.EnabledProperty, NComboBox.HorizontalPlacementProperty, NComboBox.VerticalPlacementProperty, NComboBox.DropDownButtonPositionProperty, NComboBox.SelectedIndexProperty, NComboBox.DropDownStyleProperty, NComboBox.WheelNavigationModeProperty ); for (int i = 0; i < editors.Count; i++) { propertiesStack.Add(editors[i]); } stack.Add(new NGroupBox("Properties", new NUniSizeBoxGroup(propertiesStack))); // create the events list box m_EventsLog = new NExampleEventsLog(); stack.Add(m_EventsLog); return(stack); }
/// <summary> /// /// </summary> /// <returns></returns> protected override NWidget CreateExampleControls() { NStackPanel stack = new NStackPanel(); NUniSizeBoxGroup boxGroup = new NUniSizeBoxGroup(stack); NComboBox firstBarLabelFormatComboBox = CreateLabelFormatComboBox(); firstBarLabelFormatComboBox.SelectedIndexChanged += new Function <NValueChangeEventArgs>(OnFirstBarLabelFormatComboBoxSelectedIndexChanged); stack.Add(NPairBox.Create("First Bar Label Format: ", firstBarLabelFormatComboBox)); NComboBox secondBarLabelFormatComboBox = CreateLabelFormatComboBox(); secondBarLabelFormatComboBox.SelectedIndexChanged += new Function <NValueChangeEventArgs>(OnSecondBarLabelFormatComboBoxSelectedIndexChanged); stack.Add(NPairBox.Create("Second Bar Label Format: ", secondBarLabelFormatComboBox)); NComboBox thirdBarLabelFormatComboBox = CreateLabelFormatComboBox(); thirdBarLabelFormatComboBox.SelectedIndexChanged += new Function <NValueChangeEventArgs>(OnThirdBarLabelFormatComboBoxSelectedIndexChanged); stack.Add(NPairBox.Create("Third Bar Label Format: ", thirdBarLabelFormatComboBox)); NButton positiveDataButton = new NButton("Positive Values"); positiveDataButton.Click += new Function <NEventArgs>(OnPositiveDataButtonClick); stack.Add(positiveDataButton); NButton positiveAndNegativeDataButton = new NButton("Positive and Negative Values"); positiveAndNegativeDataButton.Click += new Function <NEventArgs>(OnPositiveAndNegativeDataButtonClick); stack.Add(positiveAndNegativeDataButton); return(boxGroup); }
private NWidget CreatePredefinedRequestsWidget() { NGroupBox groupBox = new NGroupBox("Predefined Requests"); NStackPanel stack = new NStackPanel(); groupBox.Content = stack; stack.Direction = ENHVDirection.LeftToRight; // get Google logo NButton getGoogleLogoButton = new NButton("Get Google LOGO"); getGoogleLogoButton.Click += new Function <NEventArgs>(GetGoogleLogoClick); stack.Add(getGoogleLogoButton); // get Google thml NButton getGoogleHtmlButton = new NButton("Get Google HTML"); getGoogleHtmlButton.Click += new Function <NEventArgs>(GetGoogleHtmlClick); stack.Add(getGoogleHtmlButton); // get wikipedia logo NButton getWikipediaLogoButton = new NButton("Get Wikipedia LOGO"); getWikipediaLogoButton.Click += new Function <NEventArgs>(OnGetWikipediaLogoClick); stack.Add(getWikipediaLogoButton); // get wikipedia home page HTML NButton getWikipediaHtmlButton = new NButton("Get Wikipedia HTML"); getWikipediaHtmlButton.Click += new Function <NEventArgs>(OnGetWikipediaHtmlClick); stack.Add(getWikipediaHtmlButton); return(groupBox); }
/// <summary> /// /// </summary> /// <returns></returns> protected override NWidget CreateExampleControls() { NStackPanel stack = new NStackPanel(); NUniSizeBoxGroup boxGroup = new NUniSizeBoxGroup(stack); NComboBox stackModeComboBox = new NComboBox(); stackModeComboBox.Items.Add(new NComboBoxItem("Stacked")); stackModeComboBox.Items.Add(new NComboBoxItem("Stacked Percent")); stackModeComboBox.SelectedIndex = 0; stackModeComboBox.SelectedIndexChanged += new Function <NValueChangeEventArgs>(OnStackModeComboBoxSelectedIndexChanged); stack.Add(NPairBox.Create("Stack Mode: ", stackModeComboBox)); NCheckBox showDataLabelsCheckBox = new NCheckBox("Show Data Labels"); showDataLabelsCheckBox.CheckedChanged += new Function <NValueChangeEventArgs>(OnShowDataLabelsCheckedChanged); stack.Add(showDataLabelsCheckBox); m_Area1LabelFormatCombox = CreateLabelsCombo(); m_Area1LabelFormatCombox.SelectedIndexChanged += new Function <NValueChangeEventArgs>(OnArea1LabelFormatComboxSelectedIndexChanged); stack.Add(NPairBox.Create("Area 1 Label Format: ", m_Area1LabelFormatCombox)); m_Area2LabelFormatCombox = CreateLabelsCombo(); m_Area2LabelFormatCombox.SelectedIndexChanged += new Function <NValueChangeEventArgs>(OnArea2LabelFormatComboxSelectedIndexChanged); stack.Add(NPairBox.Create("Area 2 Label Format: ", m_Area2LabelFormatCombox)); m_Area3LabelFormatCombox = CreateLabelsCombo(); m_Area3LabelFormatCombox.SelectedIndexChanged += new Function <NValueChangeEventArgs>(OnArea3LabelFormatComboxSelectedIndexChanged); stack.Add(NPairBox.Create("Area 3 Label Format: ", m_Area3LabelFormatCombox)); showDataLabelsCheckBox.Checked = true; return(boxGroup); }
protected override NWidget CreateExampleContent() { NStackPanel stack = new NStackPanel(); // Create the example's content NButton openYAutoSizeWindowButton = new NButton("Open Y auto sizable Window..."); openYAutoSizeWindowButton.HorizontalPlacement = ENHorizontalPlacement.Left; openYAutoSizeWindowButton.VerticalPlacement = ENVerticalPlacement.Top; openYAutoSizeWindowButton.Click += new Function <NEventArgs>(OnOpenYAutoSizeWindowButtonClick); stack.Add(openYAutoSizeWindowButton); NButton openXAutoSizeWindowButton = new NButton("Open X auto sizable Window..."); openXAutoSizeWindowButton.HorizontalPlacement = ENHorizontalPlacement.Left; openXAutoSizeWindowButton.VerticalPlacement = ENVerticalPlacement.Top; openXAutoSizeWindowButton.Click += new Function <NEventArgs>(OnOpenXAutoSizeWindowButtonClick); stack.Add(openXAutoSizeWindowButton); NButton openAutoSizeWindowButton = new NButton("Open X and Y auto sizable and auto centered Window..."); openAutoSizeWindowButton.HorizontalPlacement = ENHorizontalPlacement.Left; openAutoSizeWindowButton.VerticalPlacement = ENVerticalPlacement.Top; openAutoSizeWindowButton.Click += new Function <NEventArgs>(OnOpenAutoSizeWindowButtonClick); stack.Add(openAutoSizeWindowButton); return(stack); }
protected override NWidget CreateExampleContent() { NStackPanel stack = new NStackPanel(); stack.HorizontalPlacement = Layout.ENHorizontalPlacement.Left; stack.VerticalPlacement = Layout.ENVerticalPlacement.Top; stack.MinWidth = 400; m_NameTextBox = new NTextBox(); m_AddressTextBox = new NTextBox(); m_MarriedCheckBox = new NCheckBox(); m_GenderComboBox = new NComboBox(); m_GenderComboBox.Items.Add(new NComboBoxItem("Male")); m_GenderComboBox.Items.Add(new NComboBoxItem("Female")); m_GenderComboBox.SelectedIndex = 0; m_OtherTextBox = new NTextBox(); stack.Add(new NPairBox(new NLabel("Name (string):"), m_NameTextBox, true)); stack.Add(new NPairBox(new NLabel("Address (string):"), m_AddressTextBox, true)); stack.Add(new NPairBox(new NLabel("Married (boolean):"), m_MarriedCheckBox, true)); stack.Add(new NPairBox(new NLabel("Gender (singleton):"), m_GenderComboBox, true)); stack.Add(new NPairBox(new NLabel("Other (string, non serialized):"), m_OtherTextBox, true)); return(new NUniSizeBoxGroup(stack)); }
protected override NWidget CreateExampleControls() { NStackPanel stack = new NStackPanel(); // Transform Properties { NList <NPropertyEditor> editors = NDesigner.GetDesigner(m_TransformContent).CreatePropertyEditors( m_TransformContent, NTransformContent.ScaleXProperty, NTransformContent.ScaleYProperty, NTransformContent.AngleProperty, NTransformContent.StretchAtRightAnglesProperty, NTransformContent.HorizontalPlacementProperty, NTransformContent.VerticalPlacementProperty ); NStackPanel propertiesStack = new NStackPanel(); for (int i = 0; i < editors.Count; i++) { propertiesStack.Add(editors[i]); } stack.Add(new NGroupBox("Transform Content Properties", propertiesStack)); } return(stack); }
private NStackPanel CreateStackPanel() { NStackPanel stack = new NStackPanel(); stack.HorizontalPlacement = ENHorizontalPlacement.Left; return(stack); }
private void InitializeComponent() { /* * Window setup * */ this.Text = "Dagobar"; this.Size = new System.Drawing.Size(16 * windowCoeff, 9 * windowCoeff); this.MinimumSize = new System.Drawing.Size(this.Width / 2, this.Height / 2); #region "Controls Setup & Layout Setup" textBoxSend = new NTextBox(); textBoxSend.Font = new Nevron.Nov.Graphics.NFont("Lucidia Console", 12); textBoxSend.VerticalPlacement = Nevron.Nov.Layout.ENVerticalPlacement.Center; textBoxSend.Margins = new Nevron.Nov.Graphics.NMargins(1, 3, 0, 3); textBoxSend.KeyUp += textBoxSend_KeyUp; buttonSend = new NButton("Envoyer"); buttonSend.PreferredWidth = 100; buttonSend.Content.HorizontalPlacement = Nevron.Nov.Layout.ENHorizontalPlacement.Center; buttonSend.Margins = new Nevron.Nov.Graphics.NMargins(3.0); buttonSend.Click += buttonSend_Click; panelSend = new NStackPanel(); panelSend.Direction = Nevron.Nov.Layout.ENHVDirection.LeftToRight; panelSend.FillMode = Nevron.Nov.Layout.ENStackFillMode.First; panelSend.Add(textBoxSend); panelSend.Add(buttonSend); listBoxChat = new NListBox(); listBoxChat.Margins = new Nevron.Nov.Graphics.NMargins(1.0); panelChat = new NStackPanel(); panelChat.Direction = Nevron.Nov.Layout.ENHVDirection.TopToBottom; panelChat.FillMode = Nevron.Nov.Layout.ENStackFillMode.First; panelChat.Add(listBoxChat); panelChat.Add(panelSend); labelChannel = new NLabel("/--/"); labelChannel.HorizontalPlacement = Nevron.Nov.Layout.ENHorizontalPlacement.Center; labelChannel.Font = new Nevron.Nov.Graphics.NFont("Lucidia Console", 14); listBoxUsers = new NListBox(); listBoxUsers.Margins = new Nevron.Nov.Graphics.NMargins(1.0); panelUsers = new NStackPanel(); panelUsers.Direction = Nevron.Nov.Layout.ENHVDirection.TopToBottom; panelUsers.FillMode = Nevron.Nov.Layout.ENStackFillMode.Last; panelUsers.Add(labelChannel); panelUsers.Add(listBoxUsers); panelUsers.PreferredWidth = 150; panelTabChat = new NStackPanel(); panelTabChat.FillMode = Nevron.Nov.Layout.ENStackFillMode.First; panelTabChat.Direction = Nevron.Nov.Layout.ENHVDirection.LeftToRight; panelTabChat.Add(panelChat); panelTabChat.Add(panelUsers); panelMain = new NStackPanel(); panelMain.Direction = Nevron.Nov.Layout.ENHVDirection.LeftToRight; panelMain.FillMode = Nevron.Nov.Layout.ENStackFillMode.Last; panelMain.Add(panelTabChat); panelRibbonInformations = new NStackPanel(); panelRibbonInformations.FillMode = Nevron.Nov.Layout.ENStackFillMode.Equal; labelRibbonChannel = new NLabel("Chaîne : /--/"); labelRibbonChannel.HorizontalPlacement = Nevron.Nov.Layout.ENHorizontalPlacement.Center; labelRibbonViewers = new NLabel("Nombre de spectateurs : /--/"); labelRibbonViewers.HorizontalPlacement = Nevron.Nov.Layout.ENHorizontalPlacement.Center; labelRibbonVersion = new NLabel("Version : " + Properties.Settings.Default.Version); labelRibbonVersion.HorizontalPlacement = Nevron.Nov.Layout.ENHorizontalPlacement.Center; panelRibbonInformations.Add(labelRibbonChannel); panelRibbonInformations.Add(labelRibbonViewers); panelRibbonInformations.Add(labelRibbonVersion); ribbonGroupInformations = new NRibbonGroup("Informations"); ribbonGroupInformations.Header.DialogLauncherButton.Visibility = ENVisibility.Hidden; ribbonGroupInformations.PreferredHeight = 64; ribbonGroupInformations.Items.Add(panelRibbonInformations); listBoxPlugins = new NListBox(); listBoxPlugins.VScrollMode = ENScrollMode.Always; listBoxPlugins.PreferredHeight = 64; listBoxPlugins.PreferredWidth = 256; ribbonGroupPlugins = new NRibbonGroup("Plugins"); ribbonGroupPlugins.Header.DialogLauncherButton.Visibility = ENVisibility.Hidden; ribbonGroupPlugins.Items.Add(listBoxPlugins); ribbonButtonConfiguration = new NRibbonButton("Configuration", NImage.FromFile(Application.StartupPath + @"\Resources\settings.png"), NImage.FromFile(Application.StartupPath + @"\Resources\settings.png")); ribbonButtonConfiguration.PreferredWidth = 86; ribbonButtonConfiguration.Click += ribbonButtonConfiguration_Click; ribbonButtonChannel = new NRibbonButton("Changer de chaîne", NImage.FromFile(Application.StartupPath + @"\Resources\move_shit_around.png"), NImage.FromFile(Application.StartupPath + @"\Resources\move_shit_around.png")); ribbonButtonChannel.PreferredWidth = 86; ribbonButtonChannel.Click += ribbonButtonChannel_Click; ribbonButtonQuit = new NRibbonButton("Quitter", NImage.FromFile(Application.StartupPath + @"\Resources\quit.png"), NImage.FromFile(Application.StartupPath + @"\Resources\quit.png")); ribbonButtonQuit.PreferredWidth = 86; ribbonButtonQuit.Click += ribbonButtonQuit_Click; ribbonGroupActions = new NRibbonGroup("Actions"); ribbonGroupActions.Header.DialogLauncherButton.Visibility = ENVisibility.Hidden; ribbonGroupActions.Items.Add(ribbonButtonConfiguration); ribbonGroupActions.Items.Add(ribbonButtonChannel); ribbonGroupActions.Items.Add(ribbonButtonQuit); ribbonTagPageMain = new NRibbonTabPage("Dagobar"); ribbonTagPageMain.Groups.Add(ribbonGroupInformations); ribbonTagPageMain.Groups.Add(ribbonGroupPlugins); ribbonTagPageMain.Groups.Add(ribbonGroupActions); ribbon = new NRibbon(); ribbon.Tab.TabPages.Add(ribbonTagPageMain); panelRibbon = new NStackPanel(); panelRibbon.FillMode = Nevron.Nov.Layout.ENStackFillMode.Last; panelRibbon.Add(ribbon); panelRibbon.Add(panelMain); #endregion // Create main control controlMain = new NNovWidgetHost<NStackPanel>(panelRibbon); controlMain.Dock = DockStyle.Fill; }