public void basic_numberbox_render() { var html = new NumberBox("foo").ToString(); html.ShouldHaveHtmlNode("foo") .ShouldBeNamed(HtmlTag.Input) .ShouldHaveAttribute(HtmlAttribute.Type).WithValue(HtmlInputType.Number); }
public void numberbox_limit_sets_limits_without_step() { var element = new NumberBox("x").Limit(0, 50).ToString() .ShouldHaveHtmlNode("x"); element.ShouldHaveAttribute(HtmlAttribute.Min).WithValue("0"); element.ShouldHaveAttribute(HtmlAttribute.Max).WithValue("50"); element.ShouldNotHaveAttribute(HtmlAttribute.Step); }
/// <summary> /// Sets the selection. /// </summary> /// <param name="entityType">Type of the entity.</param> /// <param name="controls">The controls.</param> /// <param name="selection">The selection.</param> public override void SetSelection(Type entityType, Control[] controls, string selection) { var values = selection.Split('|'); DropDownList ddlCompare = controls[0] as DropDownList; NumberBox nbValue = controls[1] as NumberBox; NumberRangeEditor numberRangeEditor = controls[2] as NumberRangeEditor; if (values.Length >= 2) { ddlCompare.SelectedValue = values[0]; nbValue.Text = values[1]; if (values.Length >= 3) { numberRangeEditor.DelimitedValues = values[2]; } } }
/// <summary> /// Sets the selection. /// </summary> /// <param name="entityType">Type of the entity.</param> /// <param name="controls">The controls.</param> /// <param name="selection">The selection.</param> public override void SetSelection(Type entityType, Control[] controls, string selection) { var values = selection.Split('|'); DropDownList ddlCompare = controls[0] as DropDownList; NumberBox nbValue = controls[1] as NumberBox; DropDownList ddlLeader = controls[2] as DropDownList; DropDownList ddlMemberStatus = controls[3] as DropDownList; if (values.Length >= 4) { ComparisonType comparisonType = (ComparisonType)(values[0].AsInteger()); ddlCompare.SelectedValue = comparisonType.ConvertToInt().ToString(); nbValue.Text = values[1]; ddlLeader.SelectedValue = values[2]; ddlMemberStatus.SelectedValue = values[3]; } }
void OnTriggerExit2D(Collider2D col) { if (col.gameObject.CompareTag("Box")) { if (boxOnTop.GetSlot() == this) { boxOnTop.SetSlot(null); } boxOnTop = null; Debug.Log("[BoxSlot] Box detached", this); foreach (var slotsObserver in observers) { slotsObserver.CalculateResult(); } } }
/// <summary> /// Creates the HTML controls required to configure this type of field /// </summary> /// <returns></returns> public override List <Control> ConfigurationControls() { List <Control> controls = new List <Control>(); var tbValues = new RockTextBox(); tbValues.TextMode = TextBoxMode.MultiLine; tbValues.Rows = 3; tbValues.AutoPostBack = true; tbValues.TextChanged += OnQualifierUpdated; tbValues.Label = "Values"; tbValues.Help = "The source of the values to display in a list. Format is either 'value1,value2,value3,...', 'value1^text1,value2^text2,value3^text3,...', or a SQL Select statement that returns result set with a 'Value' and 'Text' column <span class='tip tip-lava'></span>."; controls.Add(tbValues); // option for Displaying an enhanced 'chosen' value picker var cbEnhanced = new RockCheckBox(); cbEnhanced.AutoPostBack = true; cbEnhanced.CheckedChanged += OnQualifierUpdated; cbEnhanced.Label = "Enhance For Long Lists"; cbEnhanced.Text = "Yes"; cbEnhanced.Help = "When set, will render a searchable selection of options."; controls.Add(cbEnhanced); var tbRepeatColumns = new NumberBox(); tbRepeatColumns.Label = "Columns"; tbRepeatColumns.Help = "Select how many columns the list should use before going to the next row. If blank or 0 then 4 columns will be displayed. There is no upper limit enforced here however the block this is used in might add constraints due to available space."; tbRepeatColumns.MinimumValue = "0"; tbRepeatColumns.AutoPostBack = true; tbRepeatColumns.TextChanged += OnQualifierUpdated; controls.Add(tbRepeatColumns); var ddlRepeatDirection = new RockDropDownList(); ddlRepeatDirection.Label = "Repeat Direction"; ddlRepeatDirection.Help = "The direction that the list options will be displayed."; ddlRepeatDirection.BindToEnum <RepeatDirection>(); ddlRepeatDirection.AutoPostBack = true; ddlRepeatDirection.TextChanged += OnQualifierUpdated; controls.Add(ddlRepeatDirection); return(controls); }
private void _numberControl_OnValueChanged(NumberBox sender, NumberBoxValueChangedEventArgs args) { if (_suppressEvents) { return; } try { var currentValue = this.Value; } catch { // overflow, reset to default. this.Value = _defaultValue; return; } this.ValueChanged.RaiseEvent(this); }
/// <summary> /// Creates the child controls. /// </summary> /// <returns></returns> public override Control[] CreateChildControls(Type entityType, FilterField filterControl) { var ddlIntegerCompare = ComparisonHelper.ComparisonControl(ComparisonHelper.NumericFilterComparisonTypes); ddlIntegerCompare.Label = "Count"; ddlIntegerCompare.ID = string.Format("{0}_ddlIntegerCompare", filterControl.ID); ddlIntegerCompare.AddCssClass("js-filter-compare"); filterControl.Controls.Add(ddlIntegerCompare); var nbCapacityCount = new NumberBox(); nbCapacityCount.Label = " "; nbCapacityCount.ID = string.Format("{0}_nbCapacityCount", filterControl.ID); nbCapacityCount.AddCssClass("js-filter-control js-capacity-count"); nbCapacityCount.FieldName = "Capacity Count"; filterControl.Controls.Add(nbCapacityCount); return(new Control[] { ddlIntegerCompare, nbCapacityCount }); }
/// <summary> /// Check if the suffix is a number or not /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void textChangedEventHandler(object sender, TextChangedEventArgs args) { NumberBox.Select(NumberBox.Text.Length, 0); int c; bool isNumeric = int.TryParse(NumberBox.Text, out c); if (isNumeric) { tools.count = c; } else { SuffixContent suffixContentForm = new SuffixContent(); suffixContentForm.Topmost = true; suffixContentForm.WindowStartupLocation = WindowStartupLocation.CenterScreen; suffixContentForm.ShowDialog(); //MessageBox.Show("Number field should contain only numbers"); } }
public void DelChar() { if (NumberBox.SelectionLength == 0 && NumberBox.SelectionStart != 0) { NumberBox.SelectionStart -= 1; NumberBox.SelectionLength = 1; } var selStart = NumberBox.SelectionStart; NumberBox.Text = NumberBox.Text.Substring(0, NumberBox.SelectionStart) + NumberBox.Text.Substring(NumberBox.SelectionStart + NumberBox.SelectionLength, NumberBox.TextLength - (NumberBox.SelectionStart + NumberBox.SelectionLength)); NumberBox.Focus(); NumberBox.SelectionStart = selStart; NumberBox.SelectionLength = 0; }
/// <summary> /// Creates the HTML controls required to configure this type of field /// </summary> /// <returns></returns> public override List <Control> ConfigurationControls() { List <Control> controls = new List <Control>(); var tbMediaElementPickerLabel = new RockTextBox(); tbMediaElementPickerLabel.Label = "Media Element Picker Label"; tbMediaElementPickerLabel.Help = "The label for the media element picker"; tbMediaElementPickerLabel.Text = "Media"; tbMediaElementPickerLabel.AutoPostBack = true; tbMediaElementPickerLabel.TextChanged += OnQualifierUpdated; controls.Add(tbMediaElementPickerLabel); var nbEnhanceForLongListsThreshold = new NumberBox(); nbEnhanceForLongListsThreshold.Label = "Enhance For Long Lists Threshold"; nbEnhanceForLongListsThreshold.Help = "When the number of items exceed this value then the picker will turn on enhanced for long lists."; nbEnhanceForLongListsThreshold.Text = "20"; nbEnhanceForLongListsThreshold.MinimumValue = "0"; nbEnhanceForLongListsThreshold.AutoPostBack = true; nbEnhanceForLongListsThreshold.NumberType = System.Web.UI.WebControls.ValidationDataType.Integer; nbEnhanceForLongListsThreshold.TextChanged += OnQualifierUpdated; controls.Add(nbEnhanceForLongListsThreshold); var mpLimits = new MediaElementPicker(); mpLimits.Label = "Limit To"; mpLimits.Help = "Enforces the account or folder selections and hides them from the user."; mpLimits.ShowMediaPicker = false; controls.Add(mpLimits); var cbAllowRefresh = new RockCheckBox(); cbAllowRefresh.Label = "Allow Refresh"; cbAllowRefresh.Help = "If enabled the user will be allowed to request a refresh of the folders and media items."; cbAllowRefresh.Checked = true; cbAllowRefresh.AutoPostBack = true; cbAllowRefresh.CheckedChanged += OnQualifierUpdated; controls.Add(cbAllowRefresh); return(controls); }
private void OnLoad(object sender, RoutedEventArgs args) { PagerDisplayModeComboBox.SelectionChanged += OnDisplayModeChanged; FirstPageButtonVisibilityComboBox.SelectionChanged += OnFirstButtonVisibilityChanged; PreviousPageButtonVisibilityComboBox.SelectionChanged += OnPreviousButtonVisibilityChanged; NextPageButtonVisibilityComboBox.SelectionChanged += OnNextButtonVisibilityChanged; LastPageButtonVisibilityComboBox.SelectionChanged += OnLastButtonVisibilityChanged; var rootGrid = VisualTreeHelper.GetChild(TestPager, 0); var backButtonsPanel = VisualTreeHelper.GetChild(rootGrid, 0); firstPageButton = VisualTreeHelper.GetChild(backButtonsPanel, 0) as Button; previousPageButton = VisualTreeHelper.GetChild(backButtonsPanel, 1) as Button; var boxPanels = VisualTreeHelper.GetChild(rootGrid, 1); pagerNumberBox = VisualTreeHelper.GetChild(boxPanels, 1) as NumberBox; pagerComboBox = VisualTreeHelper.GetChild(boxPanels, 2) as ComboBox; pagerItemsRepeater = VisualTreeHelper.GetChild(rootGrid, 2) as ItemsRepeater; var forwardButtonsPanel = VisualTreeHelper.GetChild(rootGrid, 4); nextPageButton = VisualTreeHelper.GetChild(forwardButtonsPanel, 0) as Button; lastPageButton = VisualTreeHelper.GetChild(forwardButtonsPanel, 1) as Button; NumberBoxVisibilityCheckBox.IsChecked = pagerNumberBox.Visibility == Visibility.Visible; ComboBoxVisibilityCheckBox.IsChecked = pagerComboBox.Visibility == Visibility.Visible; NumberPanelVisibilityCheckBox.IsChecked = pagerItemsRepeater.Visibility == Visibility.Visible; NumberBoxIsEnabledCheckBox.IsChecked = pagerNumberBox.IsEnabled; ComboBoxIsEnabledCheckBox.IsChecked = pagerComboBox.IsEnabled; FirstPageButtonVisibilityCheckBox.IsChecked = firstPageButton?.Visibility == Visibility.Visible && firstPageButton?.Opacity != 0; PreviousPageButtonVisibilityCheckBox.IsChecked = previousPageButton?.Visibility == Visibility.Visible && previousPageButton?.Opacity != 0; NextPageButtonVisibilityCheckBox.IsChecked = nextPageButton?.Visibility == Visibility.Visible && nextPageButton?.Opacity != 0; LastPageButtonVisibilityCheckBox.IsChecked = lastPageButton?.Visibility == Visibility.Visible && lastPageButton?.Opacity != 0; FirstPageButtonIsEnabledCheckBox.IsChecked = firstPageButton?.IsEnabled; PreviousPageButtonIsEnabledCheckBox.IsChecked = previousPageButton?.IsEnabled; NextPageButtonIsEnabledCheckBox.IsChecked = nextPageButton?.IsEnabled; LastPageButtonIsEnabledCheckBox.IsChecked = lastPageButton?.IsEnabled; UpdateNumberPanelContentTextBlock(this, null); }
/// <summary> /// Creates the HTML controls required to configure this type of field /// </summary> /// <returns></returns> public override System.Collections.Generic.List <System.Web.UI.Control> ConfigurationControls() { var controls = base.ConfigurationControls(); _tbDateFormat = new RockTextBox(); controls.Add(_tbDateFormat); _tbDateFormat.Label = "Date Format"; _tbDateFormat.Help = "The format string to use for date (default is system short date)."; _cbDisplayDiff = new RockCheckBox(); controls.Add(_cbDisplayDiff); _cbDisplayDiff.Label = "Display as Elapsed Time"; _cbDisplayDiff.Text = "Yes"; _cbDisplayDiff.Help = "Display value as an elapsed time."; _ddlDatePickerMode = new RockDropDownList(); controls.Add(_ddlDatePickerMode); _ddlDatePickerMode.Items.Clear(); _ddlDatePickerMode.Items.Add(new ListItem("Date Picker", DatePickerControlType.DatePicker.ConvertToString())); _ddlDatePickerMode.Items.Add(new ListItem("Date Parts Picker", DatePickerControlType.DatePartsPicker.ConvertToString())); _ddlDatePickerMode.Label = "Control Type"; _ddlDatePickerMode.Help = "Select 'Date Picker' to use a DatePicker, or 'Date Parts Picker' to select Month, Day and Year individually"; _ddlDatePickerMode.AutoPostBack = true; _ddlDatePickerMode.SelectedIndexChanged += OnQualifierUpdated; _cbDisplayCurrent = new RockCheckBox(); controls.Add(_cbDisplayCurrent); _cbDisplayCurrent.AutoPostBack = true; _cbDisplayCurrent.CheckedChanged += OnQualifierUpdated; _cbDisplayCurrent.Label = "Display Current Option"; _cbDisplayCurrent.Text = "Yes"; _cbDisplayCurrent.Help = "Include option to specify value as the current date."; _nbFutureYearCount = new NumberBox(); controls.Add(_nbFutureYearCount); _nbFutureYearCount.Label = "Future Years"; _nbFutureYearCount.Text = ""; _nbFutureYearCount.Help = "The number of years in the future in include the year picker. Set to 0 to limit to current year. Leaving it blank will default to 50."; return(controls); }
private void NumberBox_Loaded(object sender, Windows.UI.Xaml.RoutedEventArgs e) { NumberBox numberBox = sender as NumberBox; // define rounding IncrementNumberRounder numberRounder = new IncrementNumberRounder { Increment = 1 }; // define formatting DecimalFormatter formatter = new DecimalFormatter { IntegerDigits = 1, FractionDigits = 0, IsGrouped = false, NumberRounder = numberRounder }; numberBox.NumberFormatter = formatter; }
/// <summary> /// Creates the child controls. /// </summary> /// <returns></returns> public override Control[] CreateChildControls(Type entityType, FilterField filterControl) { LocationPicker locationPicker = new LocationPicker(); locationPicker.ID = filterControl.ID + "_0"; locationPicker.Label = "Location"; filterControl.Controls.Add(locationPicker); NumberBox numberBox = new NumberBox(); numberBox.ID = filterControl.ID + "_1"; numberBox.NumberType = ValidationDataType.Double; numberBox.Label = "Miles"; numberBox.AddCssClass("number-box-miles"); filterControl.Controls.Add(numberBox); return(new Control[2] { locationPicker, numberBox }); }
/// <summary> /// Handles the SelectedIndexChanged event of the ddlOffsetType control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> protected void ddlOffsetType_SelectedIndexChanged(object sender, EventArgs e) { var ddlOffsetType = sender as RockDropDownList; if (ddlOffsetType != null) { var repeaterItem = ddlOffsetType.BindingContainer as System.Web.UI.WebControls.RepeaterItem; if (repeaterItem != null) { NumberBox nbRelativeOffset = repeaterItem.FindControl("nbRelativeOffset") as NumberBox; if (ddlOffsetType.SelectedValue.AsInteger() == 1) { nbRelativeOffset.PrependText = "<i class='fa fa-minus'></i>"; } else { nbRelativeOffset.PrependText = "<i class='fa fa-plus'></i>"; } } } }
/// <summary> /// Gets the configuration value. /// </summary> /// <param name="controls">The controls.</param> /// <returns></returns> public override Dictionary <string, ConfigurationValue> ConfigurationValues(List <Control> controls) { Dictionary <string, ConfigurationValue> configurationValues = new Dictionary <string, ConfigurationValue>(); configurationValues.Add(IS_PASSWORD_KEY, new ConfigurationValue("Password Field", "When set, edit field will be masked.", "")); configurationValues.Add(MAX_CHARACTERS, new ConfigurationValue("Max Characters", "The maximum number of characters to allow. Leave this field empty to allow for an unlimited amount of text.", "")); configurationValues.Add(SHOW_COUNT_DOWN, new ConfigurationValue("Show Character Limit Countdown", "When set, displays a countdown showing how many characters remain (for the Max Characters setting).", "")); if (controls != null) { if (controls.Count > 0) { CheckBox cbIsPasswordField = controls[0] as CheckBox; if (cbIsPasswordField != null) { configurationValues[IS_PASSWORD_KEY].Value = cbIsPasswordField.Checked.ToString(); } } if (controls.Count > 1) { NumberBox nbMaxCharacters = controls[1] as NumberBox; if (nbMaxCharacters != null) { configurationValues[MAX_CHARACTERS].Value = nbMaxCharacters.Text; } } if (controls.Count > 2) { CheckBox cbShowCountDown = controls[2] as CheckBox; if (cbShowCountDown != null) { configurationValues[SHOW_COUNT_DOWN].Value = cbShowCountDown.Checked.ToString(); } } } return(configurationValues); }
/// <summary> /// Creates the child controls. /// </summary> /// <param name="parentControl"></param> /// <returns></returns> public override System.Web.UI.Control[] CreateChildControls(System.Web.UI.Control parentControl) { NumberBox widthBox = new NumberBox(); widthBox.NumberType = ValidationDataType.Integer; widthBox.MaxLength = 3; widthBox.MinimumValue = "0"; widthBox.Label = "Image Width"; widthBox.ID = parentControl.ID + "_widthBox"; parentControl.Controls.Add(widthBox); NumberBox heightBox = new NumberBox(); heightBox.NumberType = ValidationDataType.Integer; heightBox.MaxLength = 3; heightBox.MinimumValue = "0"; heightBox.Label = "Image Height"; heightBox.ID = parentControl.ID + "_heightBox"; parentControl.Controls.Add(heightBox); return(new System.Web.UI.Control[] { widthBox, heightBox }); }
/// <summary> /// Creates the child controls. /// </summary> /// <returns></returns> public override Control[] CreateChildControls(Type entityType, FilterField filterControl) { var controls = new List <Control>(); var ddlIntegerCompare = ComparisonHelper.ComparisonControl(ComparisonHelper.NumericFilterComparisonTypes); ddlIntegerCompare.ID = string.Format("{0}_{1}", filterControl.ID, controls.Count()); ddlIntegerCompare.AddCssClass("js-filter-compare"); filterControl.Controls.Add(ddlIntegerCompare); controls.Add(ddlIntegerCompare); var numberBox = new NumberBox(); numberBox.ID = string.Format("{0}_{1}", filterControl.ID, controls.Count()); numberBox.AddCssClass("js-filter-control"); filterControl.Controls.Add(numberBox); controls.Add(numberBox); numberBox.FieldName = "Age"; return(controls.ToArray()); }
private void NumberBox_Loaded(object sender, RoutedEventArgs e) { NumberBox numberBox = sender as NumberBox; // define rounding IncrementNumberRounder numberRounder = new IncrementNumberRounder { Increment = 0.01 }; // define formatting DecimalFormatter formatter = new DecimalFormatter { IntegerDigits = 1, FractionDigits = 2, IsGrouped = false, IsDecimalPointAlwaysDisplayed = true, NumberRounder = numberRounder }; numberBox.NumberFormatter = formatter; }
/// <summary> /// Creates the HTML controls required to configure this type of field /// </summary> /// <returns></returns> public override List <Control> ConfigurationControls() { List <Control> controls = new List <Control>(); var li = new ListItems(); li.Label = "Values"; li.Help = "The list of the values to display."; li.ValueChanged += OnQualifierUpdated; controls.Add(li); var tbRepeatColumns = new NumberBox(); tbRepeatColumns.Label = "Columns"; tbRepeatColumns.Help = "Select how many columns the list should use before going to the next row. If blank or 0 then 4 columns will be displayed. There is no upper limit enforced here however the block this is used in might add contraints due to available space."; tbRepeatColumns.MinimumValue = "0"; tbRepeatColumns.AutoPostBack = true; tbRepeatColumns.TextChanged += OnQualifierUpdated; controls.Add(tbRepeatColumns); return(controls); }
void Init() { int n = 0; for (int y = 3; y >= 0; y--) { for (int x = 0; x < 4; x++) { Vector3 fk = new Vector3(x, y, 0); NumberBox box = Instantiate(boxPrefab, fk + new Vector3(500, 500, 500), Quaternion.identity); //NumberBox box = Instantiate(boxPrefab,tPoZX , Quaternion.identity); box.Init(x, y, n + 1, sprites[n], ClickToSwap); boxes[x, y] = box; n++; //transform.position = new Vector3(Random.Range(-1f, 7f), Random.Range(3.3f, -4f)); //tPoZX = new Vector2(Random.Range(-1f, 7f), Random.Range(3.3f, -4f)); // Instantiate(boxPrefab, boxPrefab.position + (Vector3.up * 1.63f), boxPrefab.rotation * Quaternion.AngleAxis(30.0f, Vector3.up)); // Instantiate(boxPrefab, new Vector2(x, y), Quaternion.identity); } } }
private void DeleteButton_Click(object sender, RoutedEventArgs e) { var selectedIndex = List.SelectedIndex; if (groups.groupList[selectedIndex].head != null) { var rez = groups.groupList[selectedIndex].head; rez.isHead = "-"; rez.groupHeading = "-"; } for (int i = 0; i < students.studentlist.Count(); i++) { if (students.studentlist[i].group == groups.groupList[selectedIndex]) { students.studentlist[i].group = null; students.studentlist[i].group_number = "-"; } if (students.studentlist[i].oldGroup == groups.groupList[selectedIndex]) { students.studentlist[i].oldGroup = null; students.studentlist[i].old_group_number = "-"; } } groups.groupList.Remove(groups.groupList[selectedIndex]); List.Items.Refresh(); NumberBox.Clear(); HeadCombo.SelectedIndex = -1; subject.teachers.Clear(); SubjectGrid.ItemsSource = subject.teachers; SubjectGrid.Items.Refresh(); CheckExisting.IsChecked = false; ChangeButton.IsEnabled = false; DeleteButton.IsEnabled = false; }
// Use this for initialization public PasswordGui(string Password) { backgroundBox = new GameObject("CodeLock"); NumberLockRenderer = backgroundBox.AddComponent<SpriteRenderer>(); NumberLockRenderer.sprite = Resources.Load<Sprite>("Sprites/Pass_Background"); NumberLockRenderer.sortingOrder = -1; backgroundBox.transform.localScale = new Vector3(1,1,1); width = NumberLockRenderer.sprite.bounds.size.x; height = NumberLockRenderer.sprite.bounds.size.y; worldScreenHeight = Camera.main.orthographicSize * 1.0f; worldScreenWidth = Camera.main.orthographicSize * 1.0f / Screen.height * Screen.width; backgroundBox.transform.localScale = new Vector3(worldScreenWidth / width, worldScreenHeight / height / 2, 1); for (int i = 0; i < Password.Length; i++) { string number = Password[i].ToString(); numberBox = new NumberBox(number, i, backgroundBox); } }
/// <summary> /// Renders the controls. /// </summary> /// <param name="entityType">Type of the entity.</param> /// <param name="filterControl">The filter control.</param> /// <param name="writer">The writer.</param> /// <param name="controls">The controls.</param> public override void RenderControls(Type entityType, FilterField filterControl, HtmlTextWriter writer, Control[] controls) { DropDownList ddlCompare = controls[0] as DropDownList; NumberBox nbValue = controls[1] as NumberBox; NumberRangeEditor numberRangeEditor = controls[2] as NumberRangeEditor; writer.AddAttribute("class", "row form-row field-criteria"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.AddAttribute("class", "col-md-4"); writer.RenderBeginTag(HtmlTextWriterTag.Div); ddlCompare.RenderControl(writer); writer.RenderEndTag(); writer.AddAttribute("class", "col-md-8"); writer.RenderBeginTag(HtmlTextWriterTag.Div); nbValue.RenderControl(writer); numberRangeEditor.RenderControl(writer); writer.RenderEndTag(); writer.RenderEndTag(); // row }
/// <summary> /// Creates the HTML controls required to configure this type of field /// </summary> /// <returns></returns> public override List <Control> ConfigurationControls() { List <Control> controls = new List <Control>(); var nbMin = new NumberBox(); controls.Add(nbMin); nbMin.NumberType = System.Web.UI.WebControls.ValidationDataType.Integer; nbMin.AutoPostBack = true; nbMin.TextChanged += OnQualifierUpdated; nbMin.Label = "Min Value"; nbMin.Help = "The minimum value allowed for the slider range"; var nbMax = new NumberBox(); controls.Add(nbMax); nbMax.NumberType = System.Web.UI.WebControls.ValidationDataType.Integer; nbMax.AutoPostBack = true; nbMax.TextChanged += OnQualifierUpdated; nbMax.Label = "Max Value"; nbMax.Help = "The maximum value allowed for the slider range"; return(controls); }
/// <summary> /// Renders the controls. /// </summary> /// <param name="entityType">Type of the entity.</param> /// <param name="filterControl">The filter control.</param> /// <param name="writer">The writer.</param> /// <param name="controls">The controls.</param> public override void RenderControls(Type entityType, FilterField filterControl, HtmlTextWriter writer, Control[] controls) { DropDownList ddlCompare = controls[0] as DropDownList; NumberBox nbValue = controls[1] as NumberBox; DropDownList ddlLeader = controls[2] as DropDownList; DropDownList ddlMemberStatus = controls[3] as DropDownList; // Member Status ddlMemberStatus.RenderControl(writer); // Is Leader ddlLeader.RenderControl(writer); // Comparison Row writer.AddAttribute("class", "row field-criteria"); writer.RenderBeginTag(HtmlTextWriterTag.Div); // Comparison Type writer.AddAttribute("class", "col-md-4"); writer.RenderBeginTag(HtmlTextWriterTag.Div); ddlCompare.RenderControl(writer); writer.RenderEndTag(); ComparisonType comparisonType = (ComparisonType)(ddlCompare.SelectedValue.AsInteger()); nbValue.Style[HtmlTextWriterStyle.Display] = (comparisonType == ComparisonType.IsBlank || comparisonType == ComparisonType.IsNotBlank) ? "none" : string.Empty; // Comparison Value writer.AddAttribute("class", "col-md-8"); writer.RenderBeginTag(HtmlTextWriterTag.Div); nbValue.RenderControl(writer); writer.RenderEndTag(); writer.RenderEndTag(); // row RegisterFilterCompareChangeScript(filterControl); }
public void Shuffle(System.Random random, NumberBox[,] array) { int lengthRow = array.GetLength(1); for (int i = array.Length - 1; i > 0; i--) { int x0 = i % lengthRow; int y0 = i / lengthRow; int j = random.Next(i + 1); int x1 = j % lengthRow; int y1 = j / lengthRow; NumberBox temp = array[x0, y0]; array[x0, y0] = array[x1, y1]; array[x1, y1] = temp; temp.UpdatePos(x1, y1); temp.transform.position = GetIconCenterByCell(new CCell(x1, y1)); array[x0, y0].UpdatePos(x0, y0); array[x0, y0].transform.position = GetIconCenterByCell(new CCell(x0, y0)); } }
/// <summary> /// Creates the child controls. /// </summary> /// <returns></returns> public override Control[] CreateChildControls(Type entityType, FilterField filterControl) { var tbCommunicationId = new NumberBox(); tbCommunicationId.Label = "Communication Id"; tbCommunicationId.ID = filterControl.GetChildControlInstanceName(_CtlCommunicationId); tbCommunicationId.CssClass = "js-communicationId"; tbCommunicationId.Required = true; tbCommunicationId.NumberType = ValidationDataType.Integer; filterControl.Controls.Add(tbCommunicationId); // Define Control: Communication Status DropDown List var ddlCommunicationStatus = new RockDropDownList(); ddlCommunicationStatus.ID = filterControl.GetChildControlInstanceName(_CtlCommunicationStatus); ddlCommunicationStatus.Label = "Communication Status"; ddlCommunicationStatus.Help = "Specifies the type of Communication Status that the recipient must have to be included in the result."; ddlCommunicationStatus.Required = true; ddlCommunicationStatus.AddCssClass("js-filter-status"); ddlCommunicationStatus.BindToEnum <CommunicationStatusType>(); filterControl.Controls.Add(ddlCommunicationStatus); return(new Control[] { tbCommunicationId, ddlCommunicationStatus }); }
private void Reset1Box() { if (Number1Box.Text != "") { int num = int.Parse(Number1Box.Text); if (App.PhoneDict.ContainsKey(Number1Box.Text)) { App.yale.Boxes.Box[num - 1].state = "on"; App.yale.Boxes.Box[num - 1].pin = ""; App.yale.Boxes.Box[num - 1].timeOn = DateTimeOffset.MinValue; App.yale.Boxes.Box[num - 1].owner.name = ""; App.yale.Boxes.Box[num - 1].owner.phone = ""; App.yale.Boxes.Box[num - 1].owner.icon = "ms-appx:///Assets/Images/Flat-Icons/default-account.png"; App.SetJsonFile(); this.Frame.GoBack(); } } else { NumberBox.Focus(FocusState.Keyboard); } }
/// <summary> /// Creates the HTML controls required to configure this type of field /// </summary> /// <returns></returns> public override List <Control> ConfigurationControls() { List <Control> controls = new List <Control>(); var tbValues = new RockTextBox(); tbValues.TextMode = TextBoxMode.MultiLine; tbValues.Rows = 3; tbValues.AutoPostBack = true; tbValues.TextChanged += OnQualifierUpdated; tbValues.Label = "Values"; tbValues.Help = "The source of the values to display in a list. Format is either 'value1,value2,value3,...', 'value1^text1,value2^text2,value3^text3,...', or a SQL Select statement that returns result set with a 'Value' and 'Text' column <span class='tip tip-lava'></span>."; controls.Add(tbValues); var ddlFieldType = new RockDropDownList(); ddlFieldType.Items.Add(new ListItem("Drop Down List", "ddl")); ddlFieldType.Items.Add(new ListItem("Drop Down List (Enhanced for Long Lists)", "ddl_enhanced")); ddlFieldType.Items.Add(new ListItem("Radio Buttons", "rb")); ddlFieldType.AutoPostBack = true; ddlFieldType.SelectedIndexChanged += OnQualifierUpdated; ddlFieldType.Label = "Control Type"; ddlFieldType.Help = "The type of control to use for selecting a single value from the list."; controls.Add(ddlFieldType); var tbRepeatColumns = new NumberBox(); tbRepeatColumns.Label = "Columns"; tbRepeatColumns.Help = "Select how many columns the list should use before going to the next row. If blank or 0 then 4 columns will be displayed. There is no enforced upper limit however the block this control is used in might add contraints due to available space."; tbRepeatColumns.MinimumValue = "0"; tbRepeatColumns.AutoPostBack = true; tbRepeatColumns.TextChanged += OnQualifierUpdated; controls.Add(tbRepeatColumns); return(controls); }
/// <summary> /// Creates the HTML controls required to configure this type of field /// </summary> /// <returns></returns> public override List <Control> ConfigurationControls() { var controls = base.ConfigurationControls(); // Add checkbox for deciding if the textbox is used for storing a password var cbIsPasswordField = new RockCheckBox(); controls.Add(cbIsPasswordField); cbIsPasswordField.AutoPostBack = true; cbIsPasswordField.CheckedChanged += OnQualifierUpdated; cbIsPasswordField.Label = "Password Field"; cbIsPasswordField.Text = "Yes"; cbIsPasswordField.Help = "When set, edit field will be masked."; // Add number box for selecting the maximum number of characters var nbMaxCharacters = new NumberBox(); controls.Add(nbMaxCharacters); nbMaxCharacters.AutoPostBack = true; nbMaxCharacters.TextChanged += OnQualifierUpdated; nbMaxCharacters.NumberType = ValidationDataType.Integer; nbMaxCharacters.Label = "Max Characters"; nbMaxCharacters.Help = "The maximum number of characters to allow. Leave this field empty to allow for an unlimited amount of text."; // Add checkbox indicating whether to show the count down. var cbShowCountDown = new RockCheckBox(); controls.Add(cbShowCountDown); cbShowCountDown.AutoPostBack = true; cbShowCountDown.CheckedChanged += OnQualifierUpdated; cbShowCountDown.Label = "Show Character Limit Countdown"; cbShowCountDown.Text = "Yes"; cbShowCountDown.Help = "When set, displays a countdown showing how many characters remain (for the Max Characters setting)."; return(controls); }
/// <summary> /// Creates the HTML controls required to configure this type of field /// </summary> /// <returns></returns> public override List <Control> ConfigurationControls() { var controls = base.ConfigurationControls(); var tbCustomValues = new RockTextBox(); controls.Add(tbCustomValues); tbCustomValues.TextMode = TextBoxMode.MultiLine; tbCustomValues.Rows = 3; tbCustomValues.AutoPostBack = true; tbCustomValues.TextChanged += OnQualifierUpdated; tbCustomValues.Label = "Limit Attributes by Field Type"; tbCustomValues.Help = "Optional list of field type classes for limiting selection to attributes using those field types (e.g. 'Rock.Field.Types.PersonFieldType|Rock.Field.Types.GroupFieldType')."; var nbRows = new NumberBox(); controls.Add(nbRows); nbRows.AutoPostBack = true; nbRows.TextChanged += OnQualifierUpdated; nbRows.Label = "Textbox Rows"; nbRows.Help = "The number of rows to use for textbox."; return(controls); }
/// <summary> /// The template gets added to the control. /// </summary> public override void OnApplyTemplate() { base.OnApplyTemplate(); _hourBox = CatchBox("PART_HourBox"); _minuteBox = CatchBox("PART_MinuteBox"); _secondBox = CatchBox("PART_SecondBox"); CatchButton("PART_UpButton", new RoutedEventHandler(Up_Click)); CatchButton("PART_DownButton", new RoutedEventHandler(Down_Click)); TakeTime(); }
private void MoveCarretLeft(NumberBox numberBox) { if (numberBox.SelectionStart == 0) MoveCarret(numberBox, FocusNavigationDirection.Left); }
private void NumberBox_GotFocus(object sender, RoutedEventArgs e) { _focusedBox = (NumberBox)sender; }
private void MoveCarretRight(NumberBox numberBox) { if (numberBox.Text.Length == numberBox.SelectionStart) MoveCarret(numberBox, FocusNavigationDirection.Right); }
private void MoveCarret(NumberBox numberBox, FocusNavigationDirection direction) { if (numberBox.SelectionLength == 0) numberBox.MoveFocus(new TraversalRequest(direction)); }
private void ChangeValue(NumberBox box, int step) { int value = box.GetInteger() + step; if (value >= 60) value -= 60; else if (value <= -1) value += 60; box.Text = value.ToString(); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormILFMatrixCalculator)); this.trackBarZRoll = new System.Windows.Forms.TrackBar(); this.trackBarYYaw = new System.Windows.Forms.TrackBar(); this.trackBarXPitch = new System.Windows.Forms.TrackBar(); this.panelRenderSurface = new System.Windows.Forms.Panel(); this.buttonReset = new System.Windows.Forms.Button(); this.labelRoll = new System.Windows.Forms.Label(); this.labelYaw = new System.Windows.Forms.Label(); this.labelPitch = new System.Windows.Forms.Label(); this.radioButtonFront = new System.Windows.Forms.RadioButton(); this.radioButtonBack = new System.Windows.Forms.RadioButton(); this.radioButtonTop = new System.Windows.Forms.RadioButton(); this.radioButtonBottom = new System.Windows.Forms.RadioButton(); this.radioButtonRight = new System.Windows.Forms.RadioButton(); this.radioButtonLeft = new System.Windows.Forms.RadioButton(); this.labelMatrix = new System.Windows.Forms.Label(); this.dataGridViewMatrix = new System.Windows.Forms.DataGridView(); this.Columnx1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Columnx2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Columnx3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.buttonCancel = new System.Windows.Forms.Button(); this.buttonOK = new System.Windows.Forms.Button(); this.buttonZReset = new System.Windows.Forms.Button(); this.buttonYReset = new System.Windows.Forms.Button(); this.buttonXReset = new System.Windows.Forms.Button(); this.buttonZMinus = new TRE_Explorer.RepeatButton(); this.buttonZPlus = new TRE_Explorer.RepeatButton(); this.buttonYMinus = new TRE_Explorer.RepeatButton(); this.buttonYPlus = new TRE_Explorer.RepeatButton(); this.buttonXMinus = new TRE_Explorer.RepeatButton(); this.buttonXPlus = new TRE_Explorer.RepeatButton(); this.numberBoxXPitch = new TRE_Explorer.NumberBox(); this.numberBoxYYaw = new TRE_Explorer.NumberBox(); this.numberBoxZRoll = new TRE_Explorer.NumberBox(); ((System.ComponentModel.ISupportInitialize)(this.trackBarZRoll)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.trackBarYYaw)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.trackBarXPitch)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewMatrix)).BeginInit(); this.SuspendLayout(); // // trackBarZRoll // this.trackBarZRoll.Location = new System.Drawing.Point(444, 153); this.trackBarZRoll.Maximum = 180; this.trackBarZRoll.Minimum = -180; this.trackBarZRoll.Name = "trackBarZRoll"; this.trackBarZRoll.Size = new System.Drawing.Size(174, 45); this.trackBarZRoll.TabIndex = 9; this.trackBarZRoll.TickFrequency = 45; this.trackBarZRoll.TickStyle = System.Windows.Forms.TickStyle.Both; this.trackBarZRoll.Scroll += new System.EventHandler(this.trackBar_Scroll); // // trackBarYYaw // this.trackBarYYaw.Location = new System.Drawing.Point(444, 89); this.trackBarYYaw.Maximum = 180; this.trackBarYYaw.Minimum = -180; this.trackBarYYaw.Name = "trackBarYYaw"; this.trackBarYYaw.Size = new System.Drawing.Size(174, 45); this.trackBarYYaw.TabIndex = 6; this.trackBarYYaw.TickFrequency = 45; this.trackBarYYaw.TickStyle = System.Windows.Forms.TickStyle.Both; this.trackBarYYaw.Scroll += new System.EventHandler(this.trackBar_Scroll); // // trackBarXPitch // this.trackBarXPitch.Location = new System.Drawing.Point(444, 25); this.trackBarXPitch.Maximum = 180; this.trackBarXPitch.Minimum = -180; this.trackBarXPitch.Name = "trackBarXPitch"; this.trackBarXPitch.Size = new System.Drawing.Size(174, 45); this.trackBarXPitch.TabIndex = 3; this.trackBarXPitch.TickFrequency = 45; this.trackBarXPitch.TickStyle = System.Windows.Forms.TickStyle.Both; this.trackBarXPitch.Scroll += new System.EventHandler(this.trackBar_Scroll); // // panelRenderSurface // this.panelRenderSurface.Location = new System.Drawing.Point(12, 12); this.panelRenderSurface.Name = "panelRenderSurface"; this.panelRenderSurface.Size = new System.Drawing.Size(400, 300); this.panelRenderSurface.TabIndex = 24; // // buttonReset // this.buttonReset.Location = new System.Drawing.Point(444, 204); this.buttonReset.Name = "buttonReset"; this.buttonReset.Size = new System.Drawing.Size(174, 23); this.buttonReset.TabIndex = 15; this.buttonReset.Text = "Reset All"; this.buttonReset.UseVisualStyleBackColor = true; this.buttonReset.Click += new System.EventHandler(this.buttonReset_Click); // // labelRoll // this.labelRoll.Location = new System.Drawing.Point(444, 137); this.labelRoll.Name = "labelRoll"; this.labelRoll.Size = new System.Drawing.Size(87, 13); this.labelRoll.TabIndex = 27; this.labelRoll.Text = "Roll"; this.labelRoll.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // labelYaw // this.labelYaw.Location = new System.Drawing.Point(444, 73); this.labelYaw.Name = "labelYaw"; this.labelYaw.Size = new System.Drawing.Size(87, 13); this.labelYaw.TabIndex = 26; this.labelYaw.Text = "Yaw"; this.labelYaw.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // labelPitch // this.labelPitch.Location = new System.Drawing.Point(444, 9); this.labelPitch.Name = "labelPitch"; this.labelPitch.Size = new System.Drawing.Size(87, 13); this.labelPitch.TabIndex = 25; this.labelPitch.Text = "Pitch"; this.labelPitch.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // radioButtonFront // this.radioButtonFront.AutoSize = true; this.radioButtonFront.Checked = true; this.radioButtonFront.Cursor = System.Windows.Forms.Cursors.Default; this.radioButtonFront.Location = new System.Drawing.Point(12, 318); this.radioButtonFront.Name = "radioButtonFront"; this.radioButtonFront.Size = new System.Drawing.Size(49, 17); this.radioButtonFront.TabIndex = 16; this.radioButtonFront.TabStop = true; this.radioButtonFront.Text = "Front"; this.radioButtonFront.UseVisualStyleBackColor = true; this.radioButtonFront.CheckedChanged += new System.EventHandler(this.radioButtonFront_CheckedChanged); // // radioButtonBack // this.radioButtonBack.AutoSize = true; this.radioButtonBack.Location = new System.Drawing.Point(82, 318); this.radioButtonBack.Name = "radioButtonBack"; this.radioButtonBack.Size = new System.Drawing.Size(50, 17); this.radioButtonBack.TabIndex = 17; this.radioButtonBack.Text = "Back"; this.radioButtonBack.UseVisualStyleBackColor = true; this.radioButtonBack.CheckedChanged += new System.EventHandler(this.radioButtonBack_CheckedChanged); // // radioButtonTop // this.radioButtonTop.AutoSize = true; this.radioButtonTop.Location = new System.Drawing.Point(153, 318); this.radioButtonTop.Name = "radioButtonTop"; this.radioButtonTop.Size = new System.Drawing.Size(44, 17); this.radioButtonTop.TabIndex = 18; this.radioButtonTop.Text = "Top"; this.radioButtonTop.UseVisualStyleBackColor = true; this.radioButtonTop.CheckedChanged += new System.EventHandler(this.radioButtonTop_CheckedChanged); // // radioButtonBottom // this.radioButtonBottom.AutoSize = true; this.radioButtonBottom.Location = new System.Drawing.Point(218, 318); this.radioButtonBottom.Name = "radioButtonBottom"; this.radioButtonBottom.Size = new System.Drawing.Size(58, 17); this.radioButtonBottom.TabIndex = 19; this.radioButtonBottom.Text = "Bottom"; this.radioButtonBottom.UseVisualStyleBackColor = true; this.radioButtonBottom.CheckedChanged += new System.EventHandler(this.radioButtonBottom_CheckedChanged); // // radioButtonRight // this.radioButtonRight.AutoSize = true; this.radioButtonRight.Location = new System.Drawing.Point(297, 318); this.radioButtonRight.Name = "radioButtonRight"; this.radioButtonRight.Size = new System.Drawing.Size(50, 17); this.radioButtonRight.TabIndex = 20; this.radioButtonRight.Text = "Right"; this.radioButtonRight.UseVisualStyleBackColor = true; this.radioButtonRight.CheckedChanged += new System.EventHandler(this.radioButtonRight_CheckedChanged); // // radioButtonLeft // this.radioButtonLeft.AutoSize = true; this.radioButtonLeft.Location = new System.Drawing.Point(368, 318); this.radioButtonLeft.Name = "radioButtonLeft"; this.radioButtonLeft.Size = new System.Drawing.Size(43, 17); this.radioButtonLeft.TabIndex = 21; this.radioButtonLeft.Text = "Left"; this.radioButtonLeft.UseVisualStyleBackColor = true; this.radioButtonLeft.CheckedChanged += new System.EventHandler(this.radioButtonLeft_CheckedChanged); // // labelMatrix // this.labelMatrix.Location = new System.Drawing.Point(418, 230); this.labelMatrix.Name = "labelMatrix"; this.labelMatrix.Size = new System.Drawing.Size(226, 13); this.labelMatrix.TabIndex = 28; this.labelMatrix.Text = "Rotation Matrix"; this.labelMatrix.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // dataGridViewMatrix // this.dataGridViewMatrix.AllowUserToAddRows = false; this.dataGridViewMatrix.AllowUserToDeleteRows = false; this.dataGridViewMatrix.AllowUserToResizeColumns = false; this.dataGridViewMatrix.AllowUserToResizeRows = false; this.dataGridViewMatrix.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridViewMatrix.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells; this.dataGridViewMatrix.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridViewMatrix.ColumnHeadersVisible = false; this.dataGridViewMatrix.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.Columnx1, this.Columnx2, this.Columnx3}); this.dataGridViewMatrix.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; this.dataGridViewMatrix.Location = new System.Drawing.Point(418, 246); this.dataGridViewMatrix.Name = "dataGridViewMatrix"; this.dataGridViewMatrix.ReadOnly = true; this.dataGridViewMatrix.RowHeadersVisible = false; this.dataGridViewMatrix.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders; dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Window; dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.WindowText; this.dataGridViewMatrix.RowsDefaultCellStyle = dataGridViewCellStyle1; this.dataGridViewMatrix.RowTemplate.DefaultCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; this.dataGridViewMatrix.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.dataGridViewMatrix.RowTemplate.DefaultCellStyle.Format = "F3"; this.dataGridViewMatrix.RowTemplate.DefaultCellStyle.NullValue = "0"; this.dataGridViewMatrix.Size = new System.Drawing.Size(226, 63); this.dataGridViewMatrix.TabIndex = 29; this.dataGridViewMatrix.TabStop = false; // // Columnx1 // this.Columnx1.HeaderText = "x1"; this.Columnx1.Name = "Columnx1"; this.Columnx1.ReadOnly = true; // // Columnx2 // this.Columnx2.HeaderText = "x2"; this.Columnx2.Name = "Columnx2"; this.Columnx2.ReadOnly = true; // // Columnx3 // this.Columnx3.HeaderText = "x3"; this.Columnx3.Name = "Columnx3"; this.Columnx3.ReadOnly = true; // // buttonCancel // this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.buttonCancel.Location = new System.Drawing.Point(569, 315); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(75, 23); this.buttonCancel.TabIndex = 22; this.buttonCancel.Text = "Cancel"; this.buttonCancel.UseVisualStyleBackColor = true; // // buttonOK // this.buttonOK.Location = new System.Drawing.Point(488, 315); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(75, 23); this.buttonOK.TabIndex = 23; this.buttonOK.Text = "OK"; this.buttonOK.UseVisualStyleBackColor = true; this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); // // buttonZReset // this.buttonZReset.Font = new System.Drawing.Font("Webdings", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(2))); this.buttonZReset.Location = new System.Drawing.Point(418, 165); this.buttonZReset.Name = "buttonZReset"; this.buttonZReset.Size = new System.Drawing.Size(20, 20); this.buttonZReset.TabIndex = 14; this.buttonZReset.Text = "q"; this.buttonZReset.UseVisualStyleBackColor = true; this.buttonZReset.Click += new System.EventHandler(this.buttonZReset_Click); // // buttonYReset // this.buttonYReset.Font = new System.Drawing.Font("Webdings", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(2))); this.buttonYReset.Location = new System.Drawing.Point(418, 101); this.buttonYReset.Name = "buttonYReset"; this.buttonYReset.Size = new System.Drawing.Size(20, 20); this.buttonYReset.TabIndex = 13; this.buttonYReset.Text = "q"; this.buttonYReset.UseVisualStyleBackColor = true; this.buttonYReset.Click += new System.EventHandler(this.buttonYReset_Click); // // buttonXReset // this.buttonXReset.Font = new System.Drawing.Font("Webdings", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(2))); this.buttonXReset.Location = new System.Drawing.Point(418, 37); this.buttonXReset.Name = "buttonXReset"; this.buttonXReset.Size = new System.Drawing.Size(20, 20); this.buttonXReset.TabIndex = 12; this.buttonXReset.Text = "q"; this.buttonXReset.UseVisualStyleBackColor = true; this.buttonXReset.Click += new System.EventHandler(this.buttonXReset_Click); // // buttonZMinus // this.buttonZMinus.ButtonDelay = 500; this.buttonZMinus.ButtonSpeed = 34; this.buttonZMinus.Location = new System.Drawing.Point(624, 178); this.buttonZMinus.Name = "buttonZMinus"; this.buttonZMinus.Size = new System.Drawing.Size(20, 20); this.buttonZMinus.TabIndex = 11; this.buttonZMinus.Text = "▼"; this.buttonZMinus.UseVisualStyleBackColor = true; this.buttonZMinus.Click += new System.EventHandler(this.buttonZMinus_Click); // // buttonZPlus // this.buttonZPlus.ButtonDelay = 500; this.buttonZPlus.ButtonSpeed = 34; this.buttonZPlus.Location = new System.Drawing.Point(624, 153); this.buttonZPlus.Name = "buttonZPlus"; this.buttonZPlus.Size = new System.Drawing.Size(20, 20); this.buttonZPlus.TabIndex = 10; this.buttonZPlus.Text = "▲"; this.buttonZPlus.UseVisualStyleBackColor = true; this.buttonZPlus.Click += new System.EventHandler(this.buttonZPlus_Click); // // buttonYMinus // this.buttonYMinus.ButtonDelay = 500; this.buttonYMinus.ButtonSpeed = 34; this.buttonYMinus.Location = new System.Drawing.Point(624, 114); this.buttonYMinus.Name = "buttonYMinus"; this.buttonYMinus.Size = new System.Drawing.Size(20, 20); this.buttonYMinus.TabIndex = 8; this.buttonYMinus.Text = "▼"; this.buttonYMinus.UseVisualStyleBackColor = true; this.buttonYMinus.Click += new System.EventHandler(this.buttonYMinus_Click); // // buttonYPlus // this.buttonYPlus.ButtonDelay = 500; this.buttonYPlus.ButtonSpeed = 34; this.buttonYPlus.Location = new System.Drawing.Point(624, 89); this.buttonYPlus.Name = "buttonYPlus"; this.buttonYPlus.Size = new System.Drawing.Size(20, 20); this.buttonYPlus.TabIndex = 7; this.buttonYPlus.Text = "▲"; this.buttonYPlus.UseVisualStyleBackColor = true; this.buttonYPlus.Click += new System.EventHandler(this.buttonYPlus_Click); // // buttonXMinus // this.buttonXMinus.ButtonDelay = 500; this.buttonXMinus.ButtonSpeed = 34; this.buttonXMinus.Location = new System.Drawing.Point(624, 50); this.buttonXMinus.Name = "buttonXMinus"; this.buttonXMinus.Size = new System.Drawing.Size(20, 20); this.buttonXMinus.TabIndex = 5; this.buttonXMinus.Text = "▼"; this.buttonXMinus.UseVisualStyleBackColor = true; this.buttonXMinus.Click += new System.EventHandler(this.buttonXMinus_Click); // // buttonXPlus // this.buttonXPlus.ButtonDelay = 500; this.buttonXPlus.ButtonSpeed = 34; this.buttonXPlus.Location = new System.Drawing.Point(624, 25); this.buttonXPlus.Name = "buttonXPlus"; this.buttonXPlus.Size = new System.Drawing.Size(20, 20); this.buttonXPlus.TabIndex = 4; this.buttonXPlus.Text = "▲"; this.buttonXPlus.UseVisualStyleBackColor = true; this.buttonXPlus.Click += new System.EventHandler(this.buttonXPlus_Click); // // numberBoxXPitch // this.numberBoxXPitch.Location = new System.Drawing.Point(531, 5); this.numberBoxXPitch.MaxLength = 4; this.numberBoxXPitch.Name = "numberBoxXPitch"; this.numberBoxXPitch.Size = new System.Drawing.Size(87, 20); this.numberBoxXPitch.TabIndex = 0; this.numberBoxXPitch.Text = "0"; this.numberBoxXPitch.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.numberBoxXPitch.Value = 0; this.numberBoxXPitch.TextChanged += new System.EventHandler(this.numberBoxXPitch_TextChanged); // // numberBoxYYaw // this.numberBoxYYaw.Location = new System.Drawing.Point(531, 69); this.numberBoxYYaw.MaxLength = 4; this.numberBoxYYaw.Name = "numberBoxYYaw"; this.numberBoxYYaw.Size = new System.Drawing.Size(87, 20); this.numberBoxYYaw.TabIndex = 1; this.numberBoxYYaw.Text = "0"; this.numberBoxYYaw.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.numberBoxYYaw.Value = 0; this.numberBoxYYaw.TextChanged += new System.EventHandler(this.numberBoxYYaw_TextChanged); // // numberBoxZRoll // this.numberBoxZRoll.Location = new System.Drawing.Point(531, 133); this.numberBoxZRoll.MaxLength = 4; this.numberBoxZRoll.Name = "numberBoxZRoll"; this.numberBoxZRoll.Size = new System.Drawing.Size(87, 20); this.numberBoxZRoll.TabIndex = 2; this.numberBoxZRoll.Text = "0"; this.numberBoxZRoll.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.numberBoxZRoll.Value = 0; this.numberBoxZRoll.TextChanged += new System.EventHandler(this.numberBoxZRoll_TextChanged); // // FormILFMatrixCalculator // this.AcceptButton = this.buttonOK; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoSize = true; this.CancelButton = this.buttonCancel; this.ClientSize = new System.Drawing.Size(656, 350); this.ControlBox = false; this.Controls.Add(this.numberBoxZRoll); this.Controls.Add(this.numberBoxYYaw); this.Controls.Add(this.numberBoxXPitch); this.Controls.Add(this.buttonXReset); this.Controls.Add(this.buttonYReset); this.Controls.Add(this.buttonZReset); this.Controls.Add(this.buttonOK); this.Controls.Add(this.buttonCancel); this.Controls.Add(this.labelMatrix); this.Controls.Add(this.dataGridViewMatrix); this.Controls.Add(this.radioButtonLeft); this.Controls.Add(this.radioButtonRight); this.Controls.Add(this.radioButtonBottom); this.Controls.Add(this.radioButtonTop); this.Controls.Add(this.radioButtonBack); this.Controls.Add(this.radioButtonFront); this.Controls.Add(this.buttonZMinus); this.Controls.Add(this.buttonZPlus); this.Controls.Add(this.buttonYMinus); this.Controls.Add(this.buttonYPlus); this.Controls.Add(this.buttonXMinus); this.Controls.Add(this.buttonXPlus); this.Controls.Add(this.labelPitch); this.Controls.Add(this.labelYaw); this.Controls.Add(this.labelRoll); this.Controls.Add(this.buttonReset); this.Controls.Add(this.trackBarZRoll); this.Controls.Add(this.trackBarYYaw); this.Controls.Add(this.trackBarXPitch); this.Controls.Add(this.panelRenderSurface); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "FormILFMatrixCalculator"; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; this.Text = "TRE Explorer"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormILFMatrixCalculator_FormClosing); ((System.ComponentModel.ISupportInitialize)(this.trackBarZRoll)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.trackBarYYaw)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.trackBarXPitch)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewMatrix)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); }
public void numberbox_list_renders_list() { var html = new NumberBox("foo").List("list1").ToString(); html.ShouldHaveHtmlNode("foo") .ShouldHaveAttribute(HtmlAttribute.List).WithValue("list1"); }