/// <summary> /// Default constructor builds a ComboBox inline editor template. /// </summary> public CultureInfoEditor() { // not using databinding here because Silverlight does not support // the WPF CultureConverter that is used by Blend. FrameworkElementFactory comboBox = new FrameworkElementFactory(typeof(ComboBox)); comboBox.AddHandler( ComboBox.LoadedEvent, new RoutedEventHandler( (sender, e) => { _owner = (ComboBox)sender; _owner.SelectionChanged += EditorSelectionChanged; INotifyPropertyChanged data = _owner.DataContext as INotifyPropertyChanged; if (data != null) { data.PropertyChanged += DatacontextPropertyChanged; } _owner.DataContextChanged += CultureDatacontextChanged; })); comboBox.SetValue(ComboBox.IsEditableProperty, false); comboBox.SetValue(ComboBox.DisplayMemberPathProperty, "DisplayName"); comboBox.SetValue(ComboBox.ItemsSourceProperty, CultureInfo.GetCultures(CultureTypes.SpecificCultures)); DataTemplate dt = new DataTemplate(); dt.VisualTree = comboBox; InlineEditorTemplate = dt; }
public MainForm () { // // _comboBox // _comboBox = new ComboBox (); _comboBox.DisplayMember = "displaymember"; _comboBox.Location = new Point (8, 8); _comboBox.Size = new Size (150, 20); _comboBox.ValueMember = "valuemember"; Controls.Add (_comboBox); // // _selectedValueText // _selectedValueText = new TextBox (); _selectedValueText.Location = new Point (8, 40); _selectedValueText.Size = new Size (150, 20); _selectedValueText.Text = ""; Controls.Add (_selectedValueText); // // MainForm // ClientSize = new Size (170, 75); Location = new Point (400, 100); StartPosition = FormStartPosition.Manual; Text = "bug #81611"; Load += new EventHandler (MainForm_Load); }
protected void Page_Load(object sender, EventArgs e) { ComboBox1 = new ComboBox(); ComboBox1.ID = "ComboBox1"; ComboBox1.Width = Unit.Pixel(250); ComboBox1.Height = Unit.Pixel(200); ComboBox1.DataTextField = "CountryName"; ComboBox1.DataValueField = "CountryID"; ComboBox1.AutoClose = false; ComboBox1.AllowCustomText = true; ComboBox1.AutoValidate = true; ComboBox1.AllowEdit = false; ComboBox1.OpenOnFocus = true; ComboBox1.EmptyText = "Select countries ..."; ComboBox1.EnableVirtualScrolling = true; ComboBox1.EnableLoadOnDemand = true; ComboBox1.LoadingItems += ComboBox1_LoadingItems; ComboBox1.ClientSideEvents.OnItemClick = "ComboBox1_ItemClick"; ComboBox1.SelectionMode = ListSelectionMode.Multiple; ComboBox1.ItemTemplate = new ItemTemplate(); ComboBox1.FooterTemplate = new FooterTemplate(); ComboBox1Container.Controls.Add(ComboBox1); }
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e) { // DateTime dt=Calendar1.SelectedDate; // Response.Write(dt.ToString()); //if (e.Day.Date == dt) //{ //ComboBox a1 = new ComboBox(); //a1.ID = 'a' + i.ToString(); //a1.AutoCompleteMode = ComboBoxAutoCompleteMode.Suggest; //a1.DropDownStyle = ComboBoxStyle.DropDownList; //i++; // e.Cell.Controls.Add(tb); // } //Response.Write(e.Day.Date.ToString()); DateTime dt = Calendar1.SelectedDate; if (e.Day.Date == dt) { ArrayList al=new ArrayList(); al.Add(1); al.Add(2); al.Add(3); ComboBox cb = new ComboBox(); cb.DataSource = al; cb.ID = "a"; cb.AutoCompleteMode = ComboBoxAutoCompleteMode.Suggest; cb.DropDownStyle = ComboBoxStyle.DropDownList; e.Cell.Controls.Add(cb); } }
protected void Page_Load(object sender, EventArgs e) { ComboBox1 = new ComboBox(); ComboBox1.ID = "ComboBox1"; ComboBox1.Width = Unit.Pixel(250); ComboBox1.EmptyText = "Select a customer ..."; ComboBox1.DataSourceID = "sds1"; ComboBox1.DataTextField = "CompanyName"; ComboBox1.DataValueField = "CustomerID"; ComboBox1.FolderStyle = "styles/black_glass"; ComboBoxContainer1.Controls.Add(ComboBox1); ComboBox2 = new ComboBox(); ComboBox2.ID = "ComboBox2"; ComboBox2.Width = Unit.Pixel(250); ComboBox2.EmptyText = "Select a customer ..."; ComboBox2.DataSourceID = "sds1"; ComboBox2.DataTextField = "CompanyName"; ComboBox2.DataValueField = "CustomerID"; ComboBox2.FolderStyle = "_"; ComboBoxContainer2.Controls.Add(ComboBox2); ComboBox3 = new ComboBox(); ComboBox3.ID = "ComboBox3"; ComboBox3.Width = Unit.Pixel(250); ComboBox3.EmptyText = "Select a customer ..."; ComboBox3.DataSourceID = "sds1"; ComboBox3.DataTextField = "CompanyName"; ComboBox3.DataValueField = "CustomerID"; ComboBox3.FolderStyle = "_"; ComboBoxContainer3.Controls.Add(ComboBox3); }
private void layout(ref Grid grid) { grid.Children.Clear(); spins = 0; List<int> values = Enumerable.Range(0, 36).ToList(); StackPanel panel = new StackPanel(); pocket = new Grid() { Height = 220, Width = 220, HorizontalAlignment = HorizontalAlignment.Center }; ComboBox combobox = new ComboBox() { Margin = new Thickness(10), HorizontalAlignment = HorizontalAlignment.Center }; combobox.ItemsSource = values; combobox.SelectedIndex = 0; combobox.SelectionChanged += (object sender, SelectionChangedEventArgs e) => { pickValue = (int)((ComboBox)combobox).SelectedValue; }; panel.Children.Add(pocket); panel.Children.Add(combobox); grid.Children.Add(panel); }
public kitChat(string name) : base(name) { enabled = true; base.BackColor = Color.Transparent; lblChat = new Label("lblChat"); //lblChat.Location = new Point(0, 0); //lblChat.Size = new Size(200, this.Height - 20); lblChat.AutoScroll = IO.Options.AutoScroll; lblChat.Font = FontManager.LoadFont("PMU", 16); lblChannel = new Label("lblChannel"); lblChannel.Font = FontManager.LoadFont("tahoma", 15); lblChannel.Text = "Channel:"; lblChannel.ForeColor = Color.WhiteSmoke; channelSelector = new ComboBox("channelSelector"); txtCommands = new TextBox("txtCommands"); Skins.SkinManager.LoadTextBoxGui(txtCommands); //txtCommands.Location = new Point(0, lblChat.Y + lblChat.Height); //txtCommands.Size = new Size(this.Width, 20); txtCommands.Font = FontManager.LoadFont("PMU", 16); txtCommands.KeyUp += new EventHandler<SdlDotNet.Input.KeyboardEventArgs>(txtCommands_KeyUp); //txtCommands. = FontManager.LoadFont("tahoma", 12); this.AddWidget(lblChat); this.AddWidget(txtCommands); this.AddWidget(lblChannel); this.AddWidget(channelSelector); }
public async void Add(object sender, DatePicker startDate, TimePicker startTime, TextBox subject, TextBox location, TextBox details, ComboBox duration, CheckBox allDay) { FrameworkElement element = (FrameworkElement)sender; GeneralTransform transform = element.TransformToVisual(null); Point point = transform.TransformPoint(new Point()); Rect rect = new Rect(point, new Size(element.ActualWidth, element.ActualHeight)); DateTimeOffset date = startDate.Date; TimeSpan time = startTime.Time; int minutes = int.Parse((string)((ComboBoxItem)duration.SelectedItem).Tag); Appointment appointment = new Appointment() { StartTime = new DateTimeOffset(date.Year, date.Month, date.Day, time.Hours, time.Minutes, 0, TimeZoneInfo.Local.GetUtcOffset(DateTime.Now)), Subject = subject.Text, Location = location.Text, Details = details.Text, Duration = TimeSpan.FromMinutes(minutes), AllDay = (bool)allDay.IsChecked }; string id = await AppointmentManager.ShowAddAppointmentAsync(appointment, rect, Placement.Default); if (string.IsNullOrEmpty(id)) { Show("Appointment not Added", "Appointment App"); } else { Show(string.Format("Appointment {0} Added", id), "Appointment App"); } }
/// <summary> /// The only creator ;) /// </summary> /// <param name="colName">The name of the column</param> /// <param name="dataSource">The datasource that contains the lookup table</param> /// <param name="displayMember">The member of the lookuptable to display</param> /// <param name="valueMember">The member of the lookuptable with the value</param> /// <param name="dataGrid">The datagrid parent of this column</param> public DataGridComboBoxColumn(string colName, DataTable dataSource, string displayMember, string valueMember, DataGrid dataGrid) { _comboBox = new ComboBox(); _comboBox.Visible = false; _comboBox.DataSource = dataSource; _dataTable = dataSource; _comboBox.DisplayMember = displayMember; _displayMember = displayMember; _valueMember = valueMember; _comboBox.ValueMember = valueMember; _comboBox.DropDownStyle = ComboBoxStyle.DropDownList; Graphics _graphicsContext = dataGrid.CreateGraphics(); float _widest = 0; SizeF _stringSize = new SizeF(0, 0); foreach (DataRow dr in dataSource.Rows) { _stringSize = _graphicsContext.MeasureString(dr[displayMember].ToString(), dataGrid.Font); if (_stringSize.Width > _widest) { _widest = _stringSize.Width; } } _comboBox.DropDownWidth = (int)Math.Ceiling(_widest); this.Width = _comboBox.DropDownWidth + 25; // Add the space for the dropdown arrow this.MappingName = colName; this.HeaderText = colName; dataGrid.Controls.Add(_comboBox); }
/// <summary> /// Constructor /// </summary> /// <param name="label"></param> /// <param name="property"></param> public ComboBoxEditorBase(PropertyLabel label, PropertyItem property) : base(property) { currentValue = property.Value; property.PropertyChanged += property_PropertyChanged; property.ValueError += property_ValueError; cbo = new ComboBox { Visibility = Visibility.Collapsed, Margin = new Thickness(0), VerticalAlignment = VerticalAlignment.Center, HorizontalAlignment = HorizontalAlignment.Stretch }; cbo.DropDownOpened += cbo_DropDownOpened; cbo.LostFocus += cbo_LostFocus; this.InitializeCombo(); pnl = new StackPanel(); pnl.Children.Add(cbo); this.ShowTextBox(); this.Content = pnl; }
// Constructor. It builds our application. It also calls its parent constructor through the base() keyword. public GUI_Proof() : base("Example GTK# App"){ // Sets a default size for our window. this.SetDefaultSize(700, 500); // Centers the window on the screen. this.SetPosition(WindowPosition.Center); // Sets an icon from the current directory //SetIconFromFile("web.png"); // WIDGETS------------------------------------------ // Containers Fixed fix = new Fixed(); // Labels result.Text = "Pick a datatype"; // ComboBox ComboBox cb = new ComboBox(dataTypes); // WIDGET's SETTINGS-------------------------------- fix.Put(cb, 50, 30); fix.Put(result, 200, 30); // ADDS--------------------------------------------- fix.Add(cb); fix.Add(result); this.Add(fix); // EVENT's ATTACH /* We plug a delegate to the DeleteEvent. This event is triggered, * when we click on the close button in the titlebar. Or press Alt+F4. * Our delegate quits the application for good. */ //DeleteEvent += delegate { Application.Quit(); }; /* This is another way, how we can plug an event handler to an event. * It is just a bit more verbose. */ this.DeleteEvent += new DeleteEventHandler(OnDelete); cb.Changed += OnChanged; // Now we show the window. The window is not visible, until we call the Show() method. //Show(); // This will work for all widgets and panels in the application this.ShowAll(); }
/// <summary> /// Adds the list of themes to the specified combobox reference. /// </summary> /// <param name="comboBox"></param> public static void AddThemeListTo(ref ComboBox comboBox) { foreach (var theme in ThemeList) { comboBox.AddItem(theme.ToString(), ((int)theme).ToString()); } }
public Form1() { this.Width = 335; this.Height = 380; this.Text = "ConvertDB"; txtFileName = new TextBox { Location = new Point(10, 10), Size = new Size(270, 30), Text = "Please Input a target file name", }; btnMDBFile = new Button { Location = new Point(280, 10), Size = new Size(30, 20), Text = "...", }; clTables = new CheckedListBox { Location = new Point(10, 30), Size = new Size(300, 200), Text = "...", }; btnDBList = new Button { Location = new Point(10, 230), Size = new Size(30, 20), Text = "ls", }; txtPostgreSQL = new TextBox { Location = new Point(40, 230), Size = new Size(270, 30), Text = "Server=192.168.33.20;Port=5432;User Id=postgres;Password=vagrant;database=template1;", }; cboDatabaseList = new ComboBox { Location = new Point(10, 250), Size = new Size(300, 30), Text = "", }; btnConvert = new Button { Location = new Point(10, 270), Size = new Size(300, 50), Text = "execute", }; this.Controls.Add(txtFileName); this.Controls.Add(btnMDBFile); this.Controls.Add(clTables); this.Controls.Add(txtPostgreSQL); this.Controls.Add(btnDBList); this.Controls.Add(cboDatabaseList); this.Controls.Add(btnConvert); this.Load += new EventHandler(Form1_Load); btnMDBFile.Click += new EventHandler(btnMDBFile_Click); btnDBList.Click += new EventHandler(btnDBList_Click); btnConvert.Click += new EventHandler(btnConvert_Click); }
protected void Page_Load(object sender, EventArgs e) { ComboBox1 = new ComboBox(); ComboBox1.ID = "ComboBox1"; ComboBox1.Width = Unit.Pixel(200); ComboBox1.DataSourceID = "sds1"; ComboBox1.DataTextField = "CompanyName"; ComboBox1.DataValueField = "CustomerID"; ComboBox1Container.Controls.Add(ComboBox1); ComboBox2 = new ComboBox(); ComboBox2.ID = "ComboBox2"; ComboBox2.Width = Unit.Pixel(200); ComboBox2.DataSourceID = "sds1"; ComboBox2.DataTextField = "CompanyName"; ComboBox2.DataValueField = "CustomerID"; ComboBox2.CssSettings.ItemsContainer = "ob_iCboIC center"; ComboBox2Container.Controls.Add(ComboBox2); ComboBox3 = new ComboBox(); ComboBox3.ID = "ComboBox3"; ComboBox3.Width = Unit.Pixel(200); ComboBox3.DataSourceID = "sds1"; ComboBox3.DataTextField = "CompanyName"; ComboBox3.DataValueField = "CustomerID"; ComboBox3.CssSettings.ItemsContainer = "ob_iCboIC right"; ComboBox3Container.Controls.Add(ComboBox3); }
protected void Page_Load(object sender, EventArgs e) { ComboBox1 = new ComboBox(); ComboBox1.ID = "ComboBox1"; ComboBoxItem item1 = new ComboBoxItem(); item1.Text = "Item 1"; item1.Value = "1"; ComboBox1.Items.Add(item1); ComboBoxItem item2 = new ComboBoxItem(); item2.Text = "Item 2"; item2.Value = "2"; ComboBox1.Items.Add(item2); ComboBoxItem item3 = new ComboBoxItem(); item3.Text = "Item 3"; item3.Value = "3"; ComboBox1.Items.Add(item3); ComboBoxItem item4 = new ComboBoxItem(); item4.Text = "Item 4"; item4.Value = "4"; ComboBox1.Items.Add(item4); ComboBoxItem item5 = new ComboBoxItem(); item5.Text = "Item 5"; item5.Value = "5"; ComboBox1.Items.Add(item5); ComboBox1Container.Controls.Add(ComboBox1); }
public DataGridLengthEditorGrid() { this.ColumnDefinitions.Add(new ColumnDefinition()); ColumnDefinition columnDefinition = new ColumnDefinition(); columnDefinition.Width = GridLength.Auto; this.ColumnDefinitions.Add(columnDefinition); _textBox = new TextBox(); Binding binding = new Binding("Text"); binding.Mode = BindingMode.TwoWay; _textBox.SetBinding(TextBox.TextProperty, binding); _textBox.KeyDown += new KeyEventHandler(TextBox_KeyDown); _textBox.DataContext = this; this.Children.Add(_textBox); _comboBox = new ComboBox(); _comboBox.SetValue(Grid.ColumnProperty, 1); // Unfortunately, there's no built in way to tell the ComboBox to be as wide as the widest item _comboBox.MinWidth = 95; _comboBox.SelectionChanged += new SelectionChangedEventHandler(ComboBox_SelectionChanged); DataGridLengthUnitType[] items = { DataGridLengthUnitType.Auto, DataGridLengthUnitType.Pixel, DataGridLengthUnitType.SizeToCells, DataGridLengthUnitType.SizeToHeader }; _comboBox.ItemsSource = items; this.Children.Add(_comboBox); }
public MainForm () { // // _comboBox // _comboBox = new ComboBox (); _comboBox.Enabled = false; _comboBox.Location = new Point (8, 8); _comboBox.Width = 200; Controls.Add (_comboBox); // // _selectButton // _selectButton = new Button (); _selectButton.Location = new Point (230, 8); _selectButton.Size = new Size (60, 20); _selectButton.Text = "Select"; _selectButton.Click += new EventHandler (SelectButton_Click); Controls.Add (_selectButton); // // MainForm // ClientSize = new Size (300, 50); Location = new Point (250, 100); StartPosition = FormStartPosition.Manual; Text = "bug #371751"; Load += new EventHandler (MainForm_Load); }
public ActionResult AddColumn() { Store store = this.GetCmp<Store>("Store1"); Ext.Net.GridPanel grid = this.GetCmp<Ext.Net.GridPanel>("GridPanel1"); ModelField field = new ModelField("pctChange", ModelFieldType.Float); store.AddField(field, 3); store.LoadData(Companies.GetAllCompanies()); Column col = new Column(); col.ID = "pctChangeColumn"; col.Text = "Change %"; col.Width = 75; col.Sortable = true; col.DataIndex = "pctChange"; col.Renderer.Fn = "pctChange"; ComboBox cb = new ComboBox() { ID = "ComboBox1" }; cb.Items.Add(new Ext.Net.ListItem("1", "1")); cb.Items.Add(new Ext.Net.ListItem("2", "2")); cb.Items.Add(new Ext.Net.ListItem("3", "3")); col.Editor.Add(cb); grid.AddColumn(col); return this.Direct(); }
public override Widget Create(object caller) { HBox box = new HBox(); PropertiesView propview = (PropertiesView)caller; // Add the names of the sectors to a list List<String> sectorNames = new List<String>(propview.application.CurrentLevel.Sectors.Count); foreach(Sector sector in propview.application.CurrentLevel.Sectors) { sectorNames.Add(sector.Name); } // Populate a combo box with the sector names comboBox = new ComboBox(sectorNames.ToArray()); // Get the index of the current value from the original list // due to limitations in ComboBox string val = (string)field.GetValue(Object); if (val != null) comboBox.Active = sectorNames.IndexOf(val); comboBox.Changed += OnComboBoxChanged; box.PackStart(comboBox, true, true, 0); box.Name = field.Name; CreateToolTip(caller, comboBox); return box; }
void Start() { // Set up our fullscreen toggle button if (GameObject.Find("FullscreenToggle") != null) { fullscreen = GameObject.Find("FullscreenToggle").GetComponent<Toggle>(); if (Screen.fullScreen) fullscreen.isOn = true; else fullscreen.isOn = false; } // Set up our resolution dropdown box if (GameObject.Find("ResolutionList") != null) { resolutions = GameObject.Find("ResolutionList").GetComponent<ComboBox>(); ComboBoxItem[] items = new ComboBoxItem[Screen.resolutions.Length]; int counter = 0; Resolution[] res = Screen.resolutions; foreach (Resolution r in res) { items[counter] = new ComboBoxItem(r); counter++; } resolutions.Items = items; resolutions.ItemsToDisplay = 5; Resolution tmpRes = Screen.currentResolution; foreach (Resolution r in Screen.resolutions) { if (Screen.width == r.width && Screen.height == r.height) { tmpRes = r; break; } } resolutions.SelectedIndex = System.Array.IndexOf(Screen.resolutions, tmpRes); } }
private void Start() { //This is the list that we want to show up in our combobox options comboBoxList = new GUIContent[12]; comboBoxList[0] = new GUIContent("First Level Test 1"); comboBoxList[1] = new GUIContent("First Level Test 2"); comboBoxList[2] = new GUIContent("First Level Test 3"); comboBoxList[3] = new GUIContent("Second Level Test 1"); comboBoxList[4] = new GUIContent("Second Level Test 2"); comboBoxList[5] = new GUIContent("Second Level Test 3"); comboBoxList[6] = new GUIContent("Third Level Test 1"); comboBoxList[7] = new GUIContent("Third Level Test 2"); comboBoxList[8] = new GUIContent("Third Level Test 3"); comboBoxList[9] = new GUIContent("Fourth Level Test 1"); comboBoxList[10] = new GUIContent("Fourth Level Test 2"); comboBoxList[11] = new GUIContent("Fourth Level Test 3"); listStyle.normal.textColor = Color.white; listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2); listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4; comboBoxControl = new ComboBox(new Rect(Screen.width/2 -130, Screen.height/2 - 25, 150, 20), comboBoxList[0], comboBoxList, "button", "box", listStyle); }
public void main_form_loaded() { TabControl TabCtrl = (TabControl)GetControl("tabZoneProperties"); tabWeather = new TabPage("Weather"); tabWeather.UseVisualStyleBackColor = true; TabCtrl.TabPages.Add(tabWeather); MainForm.Controls.Remove(TabCtrl); lblRain = new Label(); lblRain.Text = "Rain Type"; string[] types = {"RAIN_NONE", "RAIN_OUTSIDE", "RAIN_OUTSIDE_DESERT", "RAIN_BUILDING", "RAIN_BUILDING_TOP", "RAIN_BUILDING_BOTTOM", "RAIN_CAVE", "RAIN_MINE", "RAIN_COAST", "RAIN_SEA" }; cmbRain = new ComboBox(); cmbRain.DropDownStyle = ComboBoxStyle.DropDownList; cmbRain.DropDownWidth = 200; cmbRain.Items.AddRange(types); cmbRain.SelectedIndex = -1; tabWeather.Controls.Add(cmbRain); tabWeather.Controls.Add(lblRain); lblRain.Location = new System.Drawing.Point(7, 10); cmbRain.Location = new System.Drawing.Point(65, 7); Load(); }
protected void Page_Load(object sender, EventArgs e) { ComboBox1 = new ComboBox(); ComboBox1.ID = "Master"; ComboBox1.Width = Unit.Pixel(200); ComboBox1.Height = Unit.Pixel(150); ComboBox1.AutoClose = false; ComboBox1.EmptyText = "Select a country ..."; ComboBox1.DataSourceID = "sds1"; ComboBox1.DataTextField = "ContinentName"; ComboBox1.DataValueField = "ContinentID"; ComboBox1.HeaderTemplate = new HeaderTemplate("CONTINENTS"); ComboBox2 = new ComboBox(); ComboBox2.ID = "Detail"; ComboBox2.Width = Unit.Pixel(200); ComboBox2.Height = Unit.Pixel(150); ComboBox2.EnableLoadOnDemand = true; ComboBox2.EmptyText = "Select a country ..."; ComboBox2.DataSourceID = "sds2"; ComboBox2.DataTextField = "CountryName"; ComboBox2.DataValueField = "CountryID"; ComboBox2.HeaderTemplate = new HeaderTemplate("COUNTRIES"); ComboBox2.LoadingItems += Detail_LoadingItems; ComboBox1.Details.Add(ComboBox2); ComboBox1Container.Controls.Add(ComboBox1); }
public override Widget Create(object caller) { HBox box = new HBox(); PropertiesView propview = (PropertiesView)caller; // Add the names of the sectors to a list sectorNames = new List<String>(propview.application.CurrentLevel.Sectors.Count); foreach(Sector sector in propview.application.CurrentLevel.Sectors) { sectorNames.Add(sector.Name); } // Populate a combo box with the sector names comboBox = new ComboBox(sectorNames.ToArray()); OnFieldChanged(Field); //same code for initialization comboBox.Changed += OnComboBoxChanged; box.PackStart(comboBox, true, true, 0); box.Name = Field.Name; CreateToolTip(caller, comboBox); return box; }
public static void AddButton(ComboBox box, string text) { //Debug.Log("Adding button..."); GameObject panel = box.transform.FindChild("Panel").gameObject; List<GameObject> children = new List<GameObject>(box.transform.FindChild("Panel").childCount); for (int i = 0; i < box.transform.FindChild("Panel").childCount; i++) children.Add(panel.transform.GetChild(i).gameObject); if (children.Exists(child => child.transform.FindChild("Text").GetComponent<Text>().text == text)) return; GameObject newButton = GameObject.Instantiate(box.transform.FindChild("ComboButton").gameObject) as GameObject; GameObject parent = box.transform.parent.gameObject; float canvasScaleFactor = box.RootCanvas.GetComponent<Canvas>().scaleFactor; newButton.transform.SetParent(box.gameObject.transform.FindChild("Panel")); newButton.GetComponent<Button>().onClick.RemoveAllListeners(); newButton.GetComponent<Button>().onClick.AddListener(() => box.comboButtonPressed(newButton)); newButton.transform.FindChild("Text").GetComponent<Text>().text = text; RectTransform buttonTransform = newButton.GetComponent<RectTransform>(); RectTransform panelTransform = box.gameObject.transform.FindChild("Panel").gameObject.GetComponent<RectTransform>(); Rect buttonRect = buttonTransform.rect; Rect panelRect = panelTransform.rect; //float distance = box.ButtonDistance / canvasScaleFactor; //Debug.Log(distance); float offset = buttonRect.height * (box.buttons.Count); //+ distance; Vector2 panelPos = panelTransform.anchoredPosition; //Debug.Log(panelPos); Vector2 buttonPos = new Vector2(panelTransform.anchoredPosition.x, panelTransform.anchoredPosition.y - offset); //Debug.Log (buttonPos); buttonTransform.anchoredPosition = buttonPos; float newHeigth = buttonRect.height * (box.buttons.Count + 1.0f);// + distance; panelTransform.sizeDelta = new Vector2(panelRect.width, newHeigth); newButton.transform.localScale = newButton.transform.localScale * canvasScaleFactor; box.buttons.Add(newButton); if (box.buttons.Count == 1) box.transform.FindChild("ComboButton").FindChild("Text").gameObject.GetComponent<Text>().text = text; }
void OnListItemUnselected(ComboBox.ComboItem unselectedItem) { if (selectedHost == (HostData)unselectedItem.value) { selectedHost = null; } }
public TitleWidget() : base() { label0 = new Label (""); this.PackStart (label0, true, true, 0); labelTable = new Label (); this.PackStart (labelTable, false, true, 0); label1 = new Label (Mono.Posix.Catalog.GetString ("by")); this.PackStart (label1, false, true, 0); comboOrderBy = ComboBox.NewText (); comboOrderBy.Changed += OnComboChanged; this.PackStart (comboOrderBy, false, true, 0); label2 = new Label (","); this.PackStart (label2, false, true, 0); buttonSorting = new Button (); buttonSorting.Relief = ReliefStyle.None; buttonSorting.CanFocus = false; buttonSorting.Clicked += OnButtonSortingClicked; this.PackStart (buttonSorting, false, true, 0); this.Spacing = 5; }
public MainForm () { // // _groupBox1 // _groupBox1 = new GroupBox (); _groupBox1.Location = new Point (8, 8); _groupBox1.Size = new Size (140, 90); _groupBox1.Text = "1"; Controls.Add (_groupBox1); // // _comboBox1 // _comboBox1 = new ComboBox (); _comboBox1.DisplayMember = "displaymember"; _comboBox1.Location = new Point (8, 20); _comboBox1.ValueMember = "valuemember"; _groupBox1.Controls.Add (_comboBox1); // // _selectedValueText1 // _selectedValueText1 = new TextBox (); _selectedValueText1.Location = new Point (8, 55); _selectedValueText1.Size = new Size (120, 20); _selectedValueText1.Text = ""; _groupBox1.Controls.Add (_selectedValueText1); // // _groupBox2 // _groupBox2 = new GroupBox (); _groupBox2.Location = new Point (150, 8); _groupBox2.Size = new Size (140, 90); _groupBox2.Text = "2"; Controls.Add (_groupBox2); // // _comboBox2 // _comboBox2 = new ComboBox (); _comboBox2.DisplayMember = "displaymember"; _comboBox2.Location = new Point (8, 20); _comboBox2.ValueMember = "valuemember"; _groupBox2.Controls.Add (_comboBox2); // // _selectedValueText2 // _selectedValueText2 = new TextBox (); _selectedValueText2.Location = new Point (8, 55); _selectedValueText2.Size = new Size (120, 20); _selectedValueText2.Text = ""; _groupBox2.Controls.Add (_selectedValueText2); // // MainForm // ClientSize = new Size (300, 110); Location = new Point (250, 100); StartPosition = FormStartPosition.Manual; Text = "bug #81610"; Load += new EventHandler (MainForm_Load); }
void Update () { if(_prevWidth != Screen.width || _prevHeight != Screen.height) { //screen resize _prevWidth = Screen.width; _prevHeight = Screen.height; comboBoxControl = new ComboBox(new Rect(Screen.width - 100, Screen.height - 250, 100, 50), comboBoxList[0], comboBoxList, "button", "box", listStyle); } }
public viewItem() { Text = "View item"; ShowInTaskbar = false; Size = new Size(450, 450); StartPosition = FormStartPosition.CenterParent; //itemType combobox itemType = new ComboBox(); itemType.Parent = this; itemType.DropDownStyle = ComboBoxStyle.DropDownList; itemType.Width = 140; itemType.Location = new Point(this.Width - itemType.Width - 15, 10); itemType.Anchor = AnchorStyles.Top | AnchorStyles.Right; itemType.Items.Add("_virtual.dat"); itemType.Items.Add("Compressed or extra data"); itemType.Items.Add("dll"); itemType.Items.Add("Text"); itemType.Items.Add("Image"); itemType.Items.Add("Hex"); itemType.SelectedIndexChanged += new EventHandler(itemType_SelectedIndexChanged); //filesize label fileSize = new Label(); fileSize.Parent = this; fileSize.AutoSize = true; fileSize.Location = new Point(10, 10); //picturebox pictureBox = new PictureBox(); pictureBox.Parent = this; pictureBox.BorderStyle = BorderStyle.FixedSingle; pictureBox.Location = new Point(10, 40); pictureBox.Size = new Size(this.Width - 30, this.Height - 80); pictureBox.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right; pictureBox.Visible = false; //textbox textBox = new TextBox(); textBox.Parent = this; textBox.Multiline = true; textBox.ScrollBars = ScrollBars.Both; textBox.Location = pictureBox.Location; textBox.Size = pictureBox.Size; textBox.Anchor = pictureBox.Anchor; textBox.Visible = false; //listbox listBox = new ListBox(); listBox.Parent = this; listBox.Location = pictureBox.Location; listBox.Size = pictureBox.Size; listBox.Anchor = pictureBox.Anchor; listBox.Visible = false; this.Load += new System.EventHandler(viewItem_Load); }
/// <summary> /// 读取前一次的状态 /// </summary> private void InitControls() { if (dirConstitute != null) { List <string> Keys = dirConstitute.Keys.ToList(); List <int> Values = dirConstitute.Values.ToList(); for (int i = 0; i < dirConstitute.Count; i++) { int num = i + 1; string comboName = "cbFolder" + num; foreach (Control control in (tabPage1.Controls.Find(comboName, false))) { ComboBox combo = control as ComboBox; combo.SelectedItem = Keys[i]; if (Values[i] != 0) { foreach (Control chk in (tabPage1.Controls.Find(dir_check[control].Name, false))) { CheckBox checkBox = chk as CheckBox; checkBox.Checked = true; foreach (Control text in (tabPage1.Controls.Find(checkBox.Name + "_Num", false))) { TextBox textBox = text as TextBox; textBox.Text = Values[i].ToString(); } } } } } } if (AJ_JN != null) { List <string> AJ = AJ_JN.Keys.ToList(); for (int i = 0; i < AJ_JN.Count; i++) { int num = i + 1; string comboName = "cbAJ" + num; foreach (Control control in (AJColumns.Controls.Find(comboName, false))) { ComboBox combo = control as ComboBox; combo.SelectedItem = AJ[i]; } } List <string> JN = AJ_JN.Values.ToList(); for (int i = 0; i < AJ_JN.Count; i++) { int num = i + 1; string comboName = "cbJN" + num; foreach (Control control in (JNColumns.Controls.Find(comboName, false))) { ComboBox combo = control as ComboBox; combo.SelectedItem = JN[i]; } } } if (renameFolder != false) { foreach (Control control in (tabPage1.Controls.Find("folderRename", false))) { CheckBox checkBox = control as CheckBox; checkBox.Checked = true; } } if (AJPageCount != null) { cbAJPageCount.SelectedItem = AJPageCount; } if (JNPageCount != null) { cbJNPageCount.SelectedItem = JNPageCount; } if (JNCount != null) { cbJNPageCount.SelectedItem = JNPageCount; } }
private void InitializeComponent() { this.components = new Container(); ComponentResourceManager manager = new ComponentResourceManager(typeof(RuleSetDialog)); this.nameColumnHeader = new ColumnHeader(); this.rulesListView = new ListView(); this.priorityColumnHeader = new ColumnHeader(); this.reevaluationCountColumnHeader = new ColumnHeader(); this.activeColumnHeader = new ColumnHeader(); this.rulePreviewColumnHeader = new ColumnHeader(); this.rulesGroupBox = new GroupBox(); this.panel1 = new Panel(); this.chainingLabel = new Label(); this.chainingBehaviourComboBox = new ComboBox(); this.rulesToolStrip = new ToolStrip(); this.imageList = new ImageList(this.components); this.newRuleToolStripButton = new ToolStripButton(); this.toolStripSeparator1 = new ToolStripSeparator(); this.deleteToolStripButton = new ToolStripButton(); this.buttonOK = new Button(); this.ruleGroupBox = new GroupBox(); this.reevaluationComboBox = new ComboBox(); this.elseTextBox = new IntellisenseTextBox(); this.elseLabel = new Label(); this.thenTextBox = new IntellisenseTextBox(); this.thenLabel = new Label(); this.conditionTextBox = new IntellisenseTextBox(); this.conditionLabel = new Label(); this.nameTextBox = new TextBox(); this.nameLabel = new Label(); this.activeCheckBox = new CheckBox(); this.reevaluationLabel = new Label(); this.priorityTextBox = new TextBox(); this.priorityLabel = new Label(); this.buttonCancel = new Button(); this.headerTextLabel = new Label(); this.pictureBoxHeader = new PictureBox(); this.okCancelTableLayoutPanel = new TableLayoutPanel(); this.conditionErrorProvider = new ErrorProvider(this.components); this.thenErrorProvider = new ErrorProvider(this.components); this.elseErrorProvider = new ErrorProvider(this.components); this.rulesGroupBox.SuspendLayout(); this.panel1.SuspendLayout(); this.rulesToolStrip.SuspendLayout(); this.ruleGroupBox.SuspendLayout(); ((ISupportInitialize)this.pictureBoxHeader).BeginInit(); this.okCancelTableLayoutPanel.SuspendLayout(); ((ISupportInitialize)this.conditionErrorProvider).BeginInit(); ((ISupportInitialize)this.thenErrorProvider).BeginInit(); ((ISupportInitialize)this.elseErrorProvider).BeginInit(); base.SuspendLayout(); this.nameColumnHeader.Name = "nameColumnHeader"; manager.ApplyResources(this.nameColumnHeader, "nameColumnHeader"); this.rulesListView.Columns.AddRange(new ColumnHeader[] { this.nameColumnHeader, this.priorityColumnHeader, this.reevaluationCountColumnHeader, this.activeColumnHeader, this.rulePreviewColumnHeader }); manager.ApplyResources(this.rulesListView, "rulesListView"); this.rulesListView.FullRowSelect = true; this.rulesListView.HideSelection = false; this.rulesListView.MultiSelect = false; this.rulesListView.Name = "rulesListView"; this.rulesListView.UseCompatibleStateImageBehavior = false; this.rulesListView.View = View.Details; this.rulesListView.SelectedIndexChanged += new EventHandler(this.rulesListView_SelectedIndexChanged); this.rulesListView.ColumnClick += new ColumnClickEventHandler(this.rulesListView_ColumnClick); manager.ApplyResources(this.priorityColumnHeader, "priorityColumnHeader"); manager.ApplyResources(this.reevaluationCountColumnHeader, "reevaluationCountColumnHeader"); manager.ApplyResources(this.activeColumnHeader, "activeColumnHeader"); manager.ApplyResources(this.rulePreviewColumnHeader, "rulePreviewColumnHeader"); this.rulesGroupBox.Controls.Add(this.panel1); manager.ApplyResources(this.rulesGroupBox, "rulesGroupBox"); this.rulesGroupBox.Name = "rulesGroupBox"; this.rulesGroupBox.TabStop = false; this.panel1.Controls.Add(this.chainingLabel); this.panel1.Controls.Add(this.chainingBehaviourComboBox); this.panel1.Controls.Add(this.rulesToolStrip); this.panel1.Controls.Add(this.rulesListView); manager.ApplyResources(this.panel1, "panel1"); this.panel1.Name = "panel1"; manager.ApplyResources(this.chainingLabel, "chainingLabel"); this.chainingLabel.Name = "chainingLabel"; this.chainingBehaviourComboBox.DropDownStyle = ComboBoxStyle.DropDownList; this.chainingBehaviourComboBox.FormattingEnabled = true; manager.ApplyResources(this.chainingBehaviourComboBox, "chainingBehaviourComboBox"); this.chainingBehaviourComboBox.Name = "chainingBehaviourComboBox"; this.chainingBehaviourComboBox.SelectedIndexChanged += new EventHandler(this.chainingBehaviourComboBox_SelectedIndexChanged); this.rulesToolStrip.BackColor = SystemColors.Control; this.rulesToolStrip.GripStyle = ToolStripGripStyle.Hidden; this.rulesToolStrip.ImageList = this.imageList; this.rulesToolStrip.Items.AddRange(new ToolStripItem[] { this.newRuleToolStripButton, this.toolStripSeparator1, this.deleteToolStripButton }); manager.ApplyResources(this.rulesToolStrip, "rulesToolStrip"); this.rulesToolStrip.Name = "rulesToolStrip"; this.rulesToolStrip.RenderMode = ToolStripRenderMode.System; this.rulesToolStrip.TabStop = true; this.imageList.ImageStream = (ImageListStreamer)manager.GetObject("imageList.ImageStream"); this.imageList.TransparentColor = Color.Transparent; this.imageList.Images.SetKeyName(0, "NewRule.bmp"); this.imageList.Images.SetKeyName(1, "RenameRule.bmp"); this.imageList.Images.SetKeyName(2, "Delete.bmp"); manager.ApplyResources(this.newRuleToolStripButton, "newRuleToolStripButton"); this.newRuleToolStripButton.Name = "newRuleToolStripButton"; this.newRuleToolStripButton.Click += new EventHandler(this.newRuleToolStripButton_Click); this.toolStripSeparator1.Name = "toolStripSeparator1"; manager.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1"); manager.ApplyResources(this.deleteToolStripButton, "deleteToolStripButton"); this.deleteToolStripButton.Name = "deleteToolStripButton"; this.deleteToolStripButton.Click += new EventHandler(this.deleteToolStripButton_Click); manager.ApplyResources(this.buttonOK, "buttonOK"); this.buttonOK.DialogResult = DialogResult.OK; this.buttonOK.Name = "buttonOK"; this.ruleGroupBox.Controls.Add(this.reevaluationComboBox); this.ruleGroupBox.Controls.Add(this.elseTextBox); this.ruleGroupBox.Controls.Add(this.elseLabel); this.ruleGroupBox.Controls.Add(this.thenTextBox); this.ruleGroupBox.Controls.Add(this.thenLabel); this.ruleGroupBox.Controls.Add(this.conditionTextBox); this.ruleGroupBox.Controls.Add(this.conditionLabel); this.ruleGroupBox.Controls.Add(this.nameTextBox); this.ruleGroupBox.Controls.Add(this.nameLabel); this.ruleGroupBox.Controls.Add(this.activeCheckBox); this.ruleGroupBox.Controls.Add(this.reevaluationLabel); this.ruleGroupBox.Controls.Add(this.priorityTextBox); this.ruleGroupBox.Controls.Add(this.priorityLabel); manager.ApplyResources(this.ruleGroupBox, "ruleGroupBox"); this.ruleGroupBox.Name = "ruleGroupBox"; this.ruleGroupBox.TabStop = false; this.reevaluationComboBox.DropDownStyle = ComboBoxStyle.DropDownList; this.reevaluationComboBox.FormattingEnabled = true; manager.ApplyResources(this.reevaluationComboBox, "reevaluationComboBox"); this.reevaluationComboBox.Name = "reevaluationComboBox"; this.reevaluationComboBox.SelectedIndexChanged += new EventHandler(this.reevaluationComboBox_SelectedIndexChanged); this.elseTextBox.AcceptsReturn = true; manager.ApplyResources(this.elseTextBox, "elseTextBox"); this.elseTextBox.Name = "elseTextBox"; this.elseTextBox.Validating += new CancelEventHandler(this.elseTextBox_Validating); manager.ApplyResources(this.elseLabel, "elseLabel"); this.elseLabel.Name = "elseLabel"; this.thenTextBox.AcceptsReturn = true; manager.ApplyResources(this.thenTextBox, "thenTextBox"); this.thenTextBox.Name = "thenTextBox"; this.thenTextBox.Validating += new CancelEventHandler(this.thenTextBox_Validating); manager.ApplyResources(this.thenLabel, "thenLabel"); this.thenLabel.Name = "thenLabel"; this.conditionTextBox.AcceptsReturn = true; manager.ApplyResources(this.conditionTextBox, "conditionTextBox"); this.conditionTextBox.Name = "conditionTextBox"; this.conditionTextBox.Validating += new CancelEventHandler(this.conditionTextBox_Validating); manager.ApplyResources(this.conditionLabel, "conditionLabel"); this.conditionLabel.Name = "conditionLabel"; manager.ApplyResources(this.nameTextBox, "nameTextBox"); this.nameTextBox.Name = "nameTextBox"; this.nameTextBox.Validating += new CancelEventHandler(this.nameTextBox_Validating); manager.ApplyResources(this.nameLabel, "nameLabel"); this.nameLabel.Name = "nameLabel"; manager.ApplyResources(this.activeCheckBox, "activeCheckBox"); this.activeCheckBox.Name = "activeCheckBox"; this.activeCheckBox.CheckedChanged += new EventHandler(this.activeCheckBox_CheckedChanged); manager.ApplyResources(this.reevaluationLabel, "reevaluationLabel"); this.reevaluationLabel.Name = "reevaluationLabel"; manager.ApplyResources(this.priorityTextBox, "priorityTextBox"); this.priorityTextBox.Name = "priorityTextBox"; this.priorityTextBox.Validating += new CancelEventHandler(this.priorityTextBox_Validating); manager.ApplyResources(this.priorityLabel, "priorityLabel"); this.priorityLabel.Name = "priorityLabel"; manager.ApplyResources(this.buttonCancel, "buttonCancel"); this.buttonCancel.CausesValidation = false; this.buttonCancel.DialogResult = DialogResult.Cancel; this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Click += new EventHandler(this.buttonCancel_Click); manager.ApplyResources(this.headerTextLabel, "headerTextLabel"); this.headerTextLabel.Name = "headerTextLabel"; manager.ApplyResources(this.pictureBoxHeader, "pictureBoxHeader"); this.pictureBoxHeader.Name = "pictureBoxHeader"; this.pictureBoxHeader.TabStop = false; manager.ApplyResources(this.okCancelTableLayoutPanel, "okCancelTableLayoutPanel"); this.okCancelTableLayoutPanel.CausesValidation = false; this.okCancelTableLayoutPanel.Controls.Add(this.buttonOK, 0, 0); this.okCancelTableLayoutPanel.Controls.Add(this.buttonCancel, 1, 0); this.okCancelTableLayoutPanel.Name = "okCancelTableLayoutPanel"; this.conditionErrorProvider.BlinkStyle = ErrorBlinkStyle.NeverBlink; this.conditionErrorProvider.ContainerControl = this; this.thenErrorProvider.BlinkStyle = ErrorBlinkStyle.NeverBlink; this.thenErrorProvider.ContainerControl = this; this.elseErrorProvider.BlinkStyle = ErrorBlinkStyle.NeverBlink; this.elseErrorProvider.ContainerControl = this; base.AcceptButton = this.buttonOK; manager.ApplyResources(this, "$this"); base.AutoScaleMode = AutoScaleMode.Font; base.CancelButton = this.buttonCancel; base.Controls.Add(this.ruleGroupBox); base.Controls.Add(this.headerTextLabel); base.Controls.Add(this.pictureBoxHeader); base.Controls.Add(this.okCancelTableLayoutPanel); base.Controls.Add(this.rulesGroupBox); base.FormBorderStyle = FormBorderStyle.FixedDialog; base.HelpButton = true; base.MaximizeBox = false; base.MinimizeBox = false; base.Name = "RuleSetDialog"; base.ShowInTaskbar = false; base.SizeGripStyle = SizeGripStyle.Hide; this.rulesGroupBox.ResumeLayout(false); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); this.rulesToolStrip.ResumeLayout(false); this.rulesToolStrip.PerformLayout(); this.ruleGroupBox.ResumeLayout(false); this.ruleGroupBox.PerformLayout(); ((ISupportInitialize)this.pictureBoxHeader).EndInit(); this.okCancelTableLayoutPanel.ResumeLayout(false); this.okCancelTableLayoutPanel.PerformLayout(); ((ISupportInitialize)this.conditionErrorProvider).EndInit(); ((ISupportInitialize)this.thenErrorProvider).EndInit(); ((ISupportInitialize)this.elseErrorProvider).EndInit(); base.ResumeLayout(false); base.PerformLayout(); }
protected override void ExecuteTestRun(WindowsFramework framework) { ComboBoxUnderTest = MainWindow.Get <ComboBox>("EditableComboBox"); RunTest(SetValueInEditableComboBox); RunTest(SelectItemInEditableComboBox); }
public void combox_Leave(object sender, EventArgs e) { ComboBox combox = sender as ComboBox; //做完处理,须撤销动态事件 combox.SelectedIndexChanged -= new EventHandler(ComboBox_SelectedIndexChanged); }
private void cbDebugInterface_SelectedIndexChanged(object sender, EventArgs e) { SettingsChangedHandler(sender, e); pnlDebuggerSettings.Controls.Clear(); _DebuggerComboBoxes.Clear(); var iface = cbDebugInterface.SelectedItem as DebugInterface; if (iface != null) { int Y = 0; pnlDebuggerSettings.Visible = true; pnlCustom.Visible = false; if (iface.Parameters != null) { foreach (var pe in iface.Parameters) { var p = pe as PropertyEntry.Enumerated; if (p == null) { continue; } var lbl = new Label { Text = p.Name + ":", Left = label1.Left, Top = label1.Top + Y, Parent = pnlDebuggerSettings }; var cb = new ComboBox { Left = cbDebugInterface.Left, Top = Y + txtXtOcd.Top, Parent = pnlDebuggerSettings, Width = cbDebugInterface.Width, Anchor = txtXtOcd.Anchor, DropDownStyle = p.AllowFreeEntry ? ComboBoxStyle.DropDown : ComboBoxStyle.DropDownList }; cb.TextUpdate += SettingsChangedHandler; cb.SelectedIndexChanged += SettingsChangedHandler; if (p.SuggestionList != null) { foreach (var se in p.SuggestionList) { cb.Items.Add(se); } } if (p.DefaultEntryIndex != -1 && p.DefaultEntryIndex < cb.Items.Count) { cb.SelectedIndex = p.DefaultEntryIndex; } _DebuggerComboBoxes[p.UniqueID] = cb; Y += (label2.Top - label1.Top); } } pnlDebuggerSettings.Height = Y + txtXtOcd.Top; LoadInterfaceSettings(); } else { pnlDebuggerSettings.Visible = false; pnlCustom.Visible = true; } }
public string GetHeatingCoolingEffectiveYearValue_N(int position) { ComboBox OneHeatingCoolingEffectiveYearAdd = GetOneHeatingCoolingEffectiveYearComboBox(position); return(OneHeatingCoolingEffectiveYearAdd.GetValue()); }
public string GetHeatingCoolingCalendarNameValue_N(int position) { ComboBox OneHeatingCoolingCalendarNameAdd = GetOneHeatingCoolingCalendarNameComboBox(position); return(OneHeatingCoolingCalendarNameAdd.GetValue()); }
public bool IsHCCalendarNameInvalid_N(int position) { ComboBox OneHeatingCoolingCalendarNameAdd = GetOneHeatingCoolingCalendarNameComboBox(position); return(OneHeatingCoolingCalendarNameAdd.IsComboBoxValueInvalid()); }
public bool IsHCCalendarNameInvalidMsgCorrect_N(string msg, int position) { ComboBox OneHeatingCoolingCalendarNameAdd = GetOneHeatingCoolingCalendarNameComboBox(position); return(OneHeatingCoolingCalendarNameAdd.GetInvalidTips().Contains(msg)); }
public void SelectHeatingCoolingCalendarName_N(string calendarName, int position) { ComboBox OneHeatingCoolingCalendarNameAdd = GetOneHeatingCoolingCalendarNameComboBox(position); OneHeatingCoolingCalendarNameAdd.SelectItem(calendarName); }
public bool IsHCEffectiveYearInvalid_N(int position) { ComboBox OneHeatingCoolingEffectiveYearAdd = GetOneHeatingCoolingEffectiveYearComboBox(position); return(OneHeatingCoolingEffectiveYearAdd.IsComboBoxValueInvalid()); }
public bool IsWorktimeCalendarNameInvalidMsgCorrect_N(string msg, int position) { ComboBox OneWorktimeCalendarName = GetOneWorktimeCalendarNameComboBox(position); return(OneWorktimeCalendarName.GetInvalidTips().Contains(msg)); }
public string GetWorkdayCalendarNameValue_N(int position) { ComboBox OneWorkdayCalendarNameAdd = GetOneWorkdayCalendarNameComboBox(position); return(OneWorkdayCalendarNameAdd.GetValue()); }
public void SelectDayNightEffectiveYear_N(string year, int position) { ComboBox OneDayNightEffectiveYearAdd = GetOneDayNightEffectiveYearComboBox(position); OneDayNightEffectiveYearAdd.SelectItem(year); }
private void InitializeCharQuantificationControls() { // NOTE: // All values are displayed in a single DropDown for now (single selection only) // Will need to account for cardinality and have complex logic to show/hide/enable various controls depending on the cardinality values var selectionItems = new List <ComparableListItem>(); ComparableListItem selectedItem = null; ComparableListItem defaultItem = null; if (CharacteristicQuantification.NonQuantifiables != null && CharacteristicQuantification.NonQuantifiables.Count > 0) { // Hide blank list box item //selectionItems.Add(new CodeSequenceListItem(null)); foreach (var nonQuantifiable in CharacteristicQuantification.NonQuantifiables) { var listItem = new CodeSequenceListItem( new StandardCodedTerm( nonQuantifiable.DefaultAnswer, nonQuantifiable.NextId, nonQuantifiable.NoMoreQuestions, nonQuantifiable.CodeValue, nonQuantifiable.CodeMeaning, nonQuantifiable.CodingSchemeDesignator, nonQuantifiable.CodingSchemeVersion)); selectionItems.Add(listItem); if (CharacteristicQuantification.SelectedNonQuantifiable != null && listItem.Value.Equals(CharacteristicQuantification.SelectedNonQuantifiable)) { selectedItem = listItem; } else if (nonQuantifiable.DefaultAnswer) { defaultItem = listItem; } } } switch (CharacteristicQuantificationType) { case CharacteristicQuantificationTypes.Numerical: { var numericalQuantification = CharacteristicQuantification as AimTemplateTreeNumericalQuantification; foreach (var numerical in numericalQuantification.Numericals) { var listItem = new NumericalListItem(numerical); selectionItems.Add(listItem); if (numericalQuantification.SelectedNumerical != null && numericalQuantification.SelectedNumerical.Value.Equals(numerical)) { selectedItem = listItem; } else if (numerical.DefaultAnswer) { defaultItem = listItem; } } } break; case CharacteristicQuantificationTypes.Quantile: { var quantileQuantification = CharacteristicQuantification as AimTemplateTreeQuantileQuantification; for (int i = 0; i < quantileQuantification.Quantile.Bins; i++) { var listItem = new QuantileListItem(i); selectionItems.Add(listItem); if (quantileQuantification.SelectedBin != null && quantileQuantification.SelectedBin == i) { selectedItem = listItem; } else if (quantileQuantification.Quantile.DefaultBin != null && quantileQuantification.Quantile.DefaultBin.Value == i) { defaultItem = listItem; } } } break; case CharacteristicQuantificationTypes.Scale: { var scale = CharacteristicQuantification as AimTemplateTreeScaleQuantification; foreach (var scaleLevel in scale.Scale.ScaleLevels) { var listItem = new ScaleListItem(scaleLevel); selectionItems.Add(listItem); if (scale.SelectedScaleLevel != null && scale.SelectedScaleLevel.Equals(scaleLevel)) { selectedItem = listItem; } else if (scaleLevel.DefaultAnswer) { defaultItem = listItem; } } } break; case CharacteristicQuantificationTypes.Interval: { var intervalQuantification = CharacteristicQuantification as AimTemplateTreeIntervalQuantification; foreach (var interval in intervalQuantification.Intervals) { var listItem = new IntervalListItem(interval); selectionItems.Add(listItem); if (intervalQuantification.SelectedInterval != null && intervalQuantification.SelectedInterval.Equals(interval)) { selectedItem = listItem; } else if (interval.DefaultAnswer) { defaultItem = listItem; } } } break; case CharacteristicQuantificationTypes.NonQuantifiable: break; // all done } // FIXME // A single DropDown for now for all items // var ddlQuantificationItems = new ComboBox(); foreach (object item in selectionItems) { ddlQuantificationItems.Items.Add(item); } if (selectedItem != null) { ddlQuantificationItems.SelectedItem = selectedItem; } ddlQuantificationItems.SelectionChanged += QuantificationItemsSelectionChanged; if (selectedItem == null && ddlQuantificationItems.Items.Count == 1) { defaultItem = (ComparableListItem)ddlQuantificationItems.Items[0]; defaultItem.Default = true; } // Add control _stackPanel.Children.Add(ddlQuantificationItems); _quantificationControl = ddlQuantificationItems; }
public bool IsDayNightEffectiveYearInvalid_N(int position) { ComboBox OneDayNightEffectiveYearAdd = GetOneDayNightEffectiveYearComboBox(position); return(OneDayNightEffectiveYearAdd.IsComboBoxValueInvalid()); }
private void SaveProductButton_Click(object sender, RoutedEventArgs e) { string articul = ArticulTextBox.Text; string title = TitelTextBox.Text; string quantity = QuantityTextBox.Text; string price = PriceTextBox.Text; bool isAdding = true; bool isTitleNotUnique = false; List <ProductsSubgropModel> _products = _controller.GetProductsSubgroupModels(); foreach (UIElement item in AddProductGrid.Children) { if (item is TextBox) { TextBox textBox = (TextBox)item; textBox.Background = Brushes.Transparent; } } foreach (var product in _products) { isTitleNotUnique = product.ProductTitle.Contains(title); if (isTitleNotUnique) { break; } } if (!(ValidationData.IsValidStringLenght(articul, 255))) { ArticulTextBox.ToolTip = "Превышено количество символов"; ArticulTextBox.Background = Brushes.Tomato; isAdding = false; } if (!(ValidationData.IsValidStringLenght(title, 255)) || !(ValidationData.IsStringNotNull(title)) || (isTitleNotUnique)) { TitelTextBox.ToolTip = "Превышено количество символов или название продукта уже существует"; TitelTextBox.Background = Brushes.Tomato; isAdding = false; } if (!(ValidationData.IsNumber(quantity)) || !(ValidationData.IsStringNotNull(quantity))) { QuantityTextBox.ToolTip = "Введите цифры в формате ХХХ или ХХХ,ХХ"; QuantityTextBox.Background = Brushes.Tomato; isAdding = false; } if (!(ValidationData.IsNumber(price)) || !(ValidationData.IsStringNotNull(price))) { PriceTextBox.ToolTip = "Введите цифры в формате ХХХ или ХХХ,ХХ"; PriceTextBox.Background = Brushes.Tomato; isAdding = false; } if (!(ValidationData.IsStringNotNull(SubgroupComboBox.Text.Trim()))) { SubgroupComboBox.ToolTip = "Необходимо выбрать один из вариантов в списке"; SubgroupComboBox.Background = Brushes.Tomato; isAdding = false; } if (!(ValidationData.IsStringNotNull(GroupComboBox.Text.Trim()))) { GroupComboBox.ToolTip = "Необходимо выбрать один из вариантов в списке"; GroupComboBox.Background = Brushes.Tomato; isAdding = false; } if (!(ValidationData.IsStringNotNull(MeasureUnitComboBox.Text.Trim()))) { MeasureUnitComboBox.ToolTip = "Необходимо выбрать один из вариантов в списке"; MeasureUnitComboBox.Background = Brushes.Tomato; isAdding = false; } if (isAdding) { MeasureUnitInfoModel measureUnitModel = measureUnitInfoModels[MeasureUnitComboBox.SelectedIndex]; SubgroupInfoModel subgroupModel = subgroupInfoModels[SubgroupComboBox.SelectedIndex]; AddingProductModel addingProductModel = new AddingProductModel() { Articul = articul, Title = title, Quantity = Convert.ToDouble(quantity), Price = Convert.ToDouble(price), MeasureId = measureUnitModel.Id, SubgroupId = subgroupModel.Id }; _controller.AddProduct(addingProductModel); foreach (UIElement element in AddProductGrid.Children) { if (element is TextBox) { TextBox textBox = (TextBox)element; textBox.Background = Brushes.Transparent; textBox.Clear(); } if (element is ComboBox) { ComboBox comboBox = (ComboBox)element; comboBox.Text = string.Empty; } } MessageBox.Show("Товар успешно добавлен"); } }
public bool IsDayNightEffectiveYearInvalidMsgCorrect_N(string msg, int position) { ComboBox OneDayNightEffectiveYearAdd = GetOneDayNightEffectiveYearComboBox(position); return(OneDayNightEffectiveYearAdd.GetInvalidTips().Contains(msg)); }
private void InitializeComponent() { //Propiedades del panel this.Size = new Size(785, 465); this.Location = new Point(0, 100); this.BackColor = Color.White; //Creación de los componentes secundarios this.lblTitle = new Label { Text = "Prueba 1: Corridas arriba y abajo del promedio", Size = new Size(785, 30), Location = new Point(0, 0), Font = new Font("Calibri", 18f, FontStyle.Bold), TextAlign = ContentAlignment.MiddleCenter }; this.Controls.Add(this.lblTitle); this.txtProcedimiento = new TextBox { Size = new Size(350, 360), Location = new Point(20, 45), Multiline = true, ReadOnly = true, ScrollBars = ScrollBars.Vertical, Font = new Font("Calibri", 12f) }; this.lblNumeros = new Label() { Text = "Números proporcionados: " + matrizNumeros.Length, Size = new Size(320, 25), Location = new Point(382, 50), Font = new Font("Calibri", 14f) }; this.lblSignificancia = new Label() { Text = "Nivel de significancia: ", Size = new Size(210, 25), Location = new Point(382, 90), Font = new Font("Calibri", 14f) }; this.comboBox = new ComboBox { Size = new Size(60, 40), Location = new Point(600, 85), DropDownStyle = ComboBoxStyle.DropDownList, Font = new Font("Calibri", 14f) }; this.comboBox.Items.Add("0.01"); this.comboBox.Items.Add("0.025"); this.comboBox.Items.Add("0.05"); this.comboBox.Items.Add("0.10"); this.comboBox.Items.Add("0.15"); this.comboBox.Items.Add("0.20"); this.comboBox.Items.Add("0.25"); this.comboBox.Items.Add("0.30"); this.comboBox.Items.Add("0.35"); this.comboBox.Items.Add("0.40"); this.comboBox.Items.Add("0.45"); this.comboBox.Items.Add("0.50"); this.comboBox.SelectedIndex = 2; this.btnIniciar = new Button { Text = "Iniciar prueba", Size = new Size(130, 40), Location = new Point(382, 160), Font = new Font("Calibri", 16f), BackColor = Color.FromArgb(41, 183, 18), TextAlign = ContentAlignment.MiddleCenter, ForeColor = Color.White }; this.btnIniciar.Click += IniciarPrueba; this.panelResultados = new Panel { Size = new Size(390, 200), Location = new Point(382, 207), BorderStyle = BorderStyle.FixedSingle }; this.lblStatus = new Label() { Text = "Estatus de la prueba: ", Size = new Size(175, 30), Location = new Point(20, 10), Font = new Font("Calibri", 14f, FontStyle.Bold) }; this.lblStatusValue = new Label() { Text = "Prueba no iniciada", Size = new Size(190, 30), Location = new Point(195, 10), Font = new Font("Calibri", 14f, FontStyle.Bold), ForeColor = Color.Orange }; this.picture = new PictureBox { Size = new Size(94, 94), Location = new Point(20, 50) }; this.lblInformacion = new Label { Text = "", Size = new Size(320, 60), Location = new Point(20, 155), Font = new Font("Calibri", 12f) }; this.lblJiObtenido = new Label { Text = "", Size = new Size(300, 30), Location = new Point(120, 70), Font = new Font("Calibri", 12f) }; this.lblJiTabla = new Label { Text = "", Size = new Size(300, 30), Location = new Point(120, 100), Font = new Font("Calibri", 12f) }; this.panelResultados.Controls.Add(this.lblStatus); this.panelResultados.Controls.Add(this.lblStatusValue); this.panelResultados.Controls.Add(this.picture); this.panelResultados.Controls.Add(this.lblInformacion); this.panelResultados.Controls.Add(this.lblJiObtenido); this.panelResultados.Controls.Add(this.lblJiTabla); this.btnSiguiente = new Button { Text = "Siguente", Location = new Point(650, 415), Size = new Size(120, 45), BackColor = Color.FromArgb(23, 143, 243), Font = new Font("Calibri", 14f), ForeColor = Color.White, Enabled = false }; this.btnSiguiente.Click += BtnSiguiente; this.Controls.Add(lblNumeros); this.Controls.Add(lblSignificancia); this.Controls.Add(this.comboBox); this.Controls.Add(this.txtProcedimiento); this.Controls.Add(this.btnIniciar); this.Controls.Add(this.panelResultados); this.Controls.Add(btnSiguiente); }
public void SelectDayNightCalendarName_N(string calendarName, int position) { ComboBox OneDayNightCalendarNameAdd = GetOneDayNightCalendarNameComboBox(position); OneDayNightCalendarNameAdd.SelectItem(calendarName); }
//////////////////////////////////////////////////////////////////////////// #endregion #region //// Constructors ////// //////////////////////////////////////////////////////////////////////////// public TaskControls(Manager manager) : base(manager) { MinimumWidth = 340; MinimumHeight = 140; Height = 480; Center(); Text = "Controls Test"; TopPanel.Visible = true; Caption.Text = "Information"; Description.Text = "Demonstration of various controls available in Neoforce Controls library."; Caption.TextColor = Description.TextColor = new Color(96, 96, 96); grpEdit = new GroupPanel(Manager); grpEdit.Init(); grpEdit.Parent = this; grpEdit.Anchor = Anchors.Left | Anchors.Top | Anchors.Right; grpEdit.Width = ClientWidth - 200; grpEdit.Height = 160; grpEdit.Left = 8; grpEdit.Top = TopPanel.Height + 8; grpEdit.Text = "EditBox"; pnlControls = new Panel(Manager); pnlControls.Init(); pnlControls.Passive = true; pnlControls.Parent = this; pnlControls.Anchor = Anchors.Left | Anchors.Top | Anchors.Right; pnlControls.Left = 8; pnlControls.Top = grpEdit.Top + grpEdit.Height + 8; pnlControls.Width = ClientWidth - 200; pnlControls.Height = BottomPanel.Top - 32 - pnlControls.Top; pnlControls.BevelBorder = BevelBorder.All; pnlControls.BevelMargin = 1; pnlControls.BevelStyle = BevelStyle.Etched; pnlControls.Color = Color.Transparent; lblEdit = new Label(manager); lblEdit.Init(); lblEdit.Parent = grpEdit; lblEdit.Left = 16; lblEdit.Top = 8; lblEdit.Text = "Testing field:"; lblEdit.Width = 128; lblEdit.Height = 16; txtEdit = new TextBox(manager); txtEdit.Init(); txtEdit.Parent = grpEdit; txtEdit.Left = 16; txtEdit.Top = 24; txtEdit.Width = grpEdit.ClientWidth - 32; txtEdit.Height = 20; txtEdit.Anchor = Anchors.Left | Anchors.Top | Anchors.Right | Anchors.Bottom; txtEdit.Text = "Text"; rdbNormal = new RadioButton(manager); rdbNormal.Init(); rdbNormal.Parent = grpEdit; rdbNormal.Left = 16; rdbNormal.Top = 52; rdbNormal.Width = grpEdit.ClientWidth - 32; rdbNormal.Anchor = Anchors.Left | Anchors.Bottom | Anchors.Right; rdbNormal.Checked = true; rdbNormal.Text = "Normal mode"; rdbNormal.ToolTip.Text = "Enables normal mode for TextBox control."; rdbNormal.CheckedChanged += new TomShane.Neoforce.Controls.EventHandler(ModeChanged); rdbPassword = new RadioButton(manager); rdbPassword.Init(); rdbPassword.Parent = grpEdit; rdbPassword.Left = 16; rdbPassword.Top = 68; rdbPassword.Width = grpEdit.ClientWidth - 32; rdbPassword.Anchor = Anchors.Left | Anchors.Bottom | Anchors.Right; rdbPassword.Checked = false; rdbPassword.Text = "Password mode"; rdbPassword.ToolTip.Text = "Enables password mode for TextBox control."; rdbPassword.CheckedChanged += new TomShane.Neoforce.Controls.EventHandler(ModeChanged); chkBorders = new CheckBox(manager); chkBorders.Init(); chkBorders.Parent = grpEdit; chkBorders.Left = 16; chkBorders.Top = 96; chkBorders.Width = grpEdit.ClientWidth - 32; chkBorders.Anchor = Anchors.Left | Anchors.Bottom | Anchors.Right; chkBorders.Checked = false; chkBorders.Text = "Borderless mode"; chkBorders.ToolTip.Text = "Enables or disables borderless mode for TextBox control."; chkBorders.CheckedChanged += new TomShane.Neoforce.Controls.EventHandler(chkBorders_CheckedChanged); chkReadOnly = new CheckBox(manager); chkReadOnly.Init(); chkReadOnly.Parent = grpEdit; chkReadOnly.Left = 16; chkReadOnly.Top = 110; chkReadOnly.Width = grpEdit.ClientWidth - 32; chkReadOnly.Anchor = Anchors.Left | Anchors.Bottom | Anchors.Right; chkReadOnly.Checked = false; chkReadOnly.Text = "Read only mode"; chkReadOnly.ToolTip.Text = "Enables or disables read only mode for TextBox control.\nThis mode is necessary to enable explicitly."; chkReadOnly.CheckedChanged += new TomShane.Neoforce.Controls.EventHandler(chkReadOnly_CheckedChanged); string[] colors = new string[] { "Red", "Green", "Blue", "Yellow", "Orange", "Purple", "White", "Black", "Magenta", "Cyan", "Brown", "Aqua", "Beige", "Coral", "Crimson", "Gray", "Azure", "Ivory", "Indigo", "Khaki", "Orchid", "Plum", "Salmon", "Silver", "Gold", "Pink", "Linen", "Lime", "Olive", "Slate" }; spnMain = new SpinBox(manager, SpinBoxMode.List); spnMain.Init(); spnMain.Parent = pnlControls; spnMain.Left = 16; spnMain.Top = 16; spnMain.Width = pnlControls.Width - 32; spnMain.Height = 20; spnMain.Anchor = Anchors.Left | Anchors.Top | Anchors.Right; spnMain.Items.AddRange(colors); spnMain.Mode = SpinBoxMode.Range; spnMain.ItemIndex = 0; cmbMain = new ComboBox(manager); cmbMain.Init(); cmbMain.Parent = pnlControls; cmbMain.Left = 16; cmbMain.Top = 44; cmbMain.Width = pnlControls.Width - 32; cmbMain.Height = 20; cmbMain.ReadOnly = true; cmbMain.Anchor = Anchors.Left | Anchors.Top | Anchors.Right; cmbMain.Items.AddRange(colors); cmbMain.ItemIndex = 0; cmbMain.MaxItems = 5; cmbMain.ToolTip.Color = Color.Yellow; cmbMain.Movable = cmbMain.Resizable = true; cmbMain.OutlineMoving = cmbMain.OutlineResizing = true; trkMain = new TrackBar(manager); trkMain.Init(); trkMain.Parent = pnlControls; trkMain.Left = 16; trkMain.Top = 72; trkMain.Width = pnlControls.Width - 32; trkMain.Anchor = Anchors.Left | Anchors.Top | Anchors.Right; trkMain.Range = 64; trkMain.Value = 16; trkMain.ValueChanged += new TomShane.Neoforce.Controls.EventHandler(trkMain_ValueChanged); lblTrack = new Label(manager); lblTrack.Init(); lblTrack.Parent = pnlControls; lblTrack.Left = 16; lblTrack.Top = 96; lblTrack.Width = pnlControls.Width - 32; lblTrack.Anchor = Anchors.Left | Anchors.Top | Anchors.Right; lblTrack.Alignment = Alignment.TopRight; lblTrack.TextColor = new Color(32, 32, 32); trkMain_ValueChanged(this, null); // forcing label redraw with init values mnuListBox = new ContextMenu(manager); MenuItem i1 = new MenuItem("This is very long text"); MenuItem i2 = new MenuItem("Menu", true); MenuItem i3 = new MenuItem("Item", false); //i3.Enabled = false; MenuItem i4 = new MenuItem("Separated", true); MenuItem i11 = new MenuItem(); MenuItem i12 = new MenuItem(); MenuItem i13 = new MenuItem(); MenuItem i14 = new MenuItem(); MenuItem i111 = new MenuItem(); MenuItem i112 = new MenuItem(); MenuItem i113 = new MenuItem(); mnuListBox.Items.AddRange(new MenuItem[] { i1, i2, i3, i4 }); i2.Items.AddRange(new MenuItem[] { i11, i12, i13, i14 }); i13.Items.AddRange(new MenuItem[] { i111, i112, i113 }); lstMain = new ListBox(manager); lstMain.Init(); lstMain.Parent = this; lstMain.Top = TopPanel.Height + 8; lstMain.Left = grpEdit.Left + grpEdit.Width + 8; lstMain.Width = ClientWidth - lstMain.Left - 8; lstMain.Height = ClientHeight - 16 - BottomPanel.Height - TopPanel.Height; lstMain.Anchor = Anchors.Top | Anchors.Right | Anchors.Bottom; lstMain.HideSelection = false; lstMain.Items.AddRange(colors); lstMain.ContextMenu = mnuListBox; prgMain = new ProgressBar(manager); prgMain.Init(); prgMain.Parent = this.BottomPanel; prgMain.Left = lstMain.Left; prgMain.Top = 10; prgMain.Width = lstMain.Width; prgMain.Height = 16; prgMain.Anchor = Anchors.Top | Anchors.Right; prgMain.Mode = ProgressBarMode.Infinite; prgMain.Passive = false; btnDisable = new Button(manager); btnDisable.Init(); btnDisable.Parent = BottomPanel; btnDisable.Left = 8; btnDisable.Top = 8; btnDisable.Text = "Disable"; btnDisable.Click += new Controls.EventHandler(btnDisable_Click); btnDisable.TextColor = Color.FromNonPremultiplied(255, 64, 32, 200); btnProgress = new Button(manager); btnProgress.Init(); btnProgress.Parent = BottomPanel; btnProgress.Left = prgMain.Left - 16; btnProgress.Top = prgMain.Top; btnProgress.Height = 16; btnProgress.Width = 16; btnProgress.Text = "!"; btnProgress.Anchor = Anchors.Top | Anchors.Right; btnProgress.Click += new Controls.EventHandler(btnProgress_Click); mnuMain = new MainMenu(manager); mnuMain.Items.Add(i2); mnuMain.Items.Add(i13); mnuMain.Items.Add(i3); mnuMain.Items.Add(i4); MainMenu = mnuMain; ToolBarPanel tlp = new ToolBarPanel(manager); ToolBarPanel = tlp; ToolBar tlb = new ToolBar(manager); ToolBar tlbx = new ToolBar(manager); tlb.FullRow = true; tlbx.Row = 1; tlbx.FullRow = false; tlp.Add(tlb); tlp.Add(tlbx); /* * tlb.Init(); * tlb.Width = 256; * tlb.Parent = ToolBarPanel;*/ //tlbx.Init(); /* * tlbx.Width = 512; * tlbx.Top = 25; * tlbx.Parent = ToolBarPanel;*/ /* * ToolBarButton tb1 = new ToolBarButton(manager); * tb1.Init(); * tb1.Parent = tlb; * tb1.Left = 10; * tb1.Top = 1; * tb1.Glyph = new Glyph(Manager.Skin.Images["Icon.Warning"].Resource); * tb1.Glyph.SizeMode = SizeMode.Stretched; */ StatusBar stb = new StatusBar(Manager); StatusBar = stb; DefaultControl = txtEdit; OutlineMoving = true; OutlineResizing = true; BottomPanel.BringToFront(); SkinChanged += new TomShane.Neoforce.Controls.EventHandler(TaskControls_SkinChanged); TaskControls_SkinChanged(null, null); }
public bool IsWorktimeCalendarNameInvalid_N(int position) { ComboBox OneWorktimeCalendarName = GetOneWorktimeCalendarNameComboBox(position); return(OneWorktimeCalendarName.IsComboBoxValueInvalid()); }
private void cmbx_SelectedValueChanged(object sender, EventArgs e) { if (((Control)sender).Visible == false || _clickedsubitem == null) { return; } if (sender.GetType() == typeof(EXComboBox)) { EXComboBox excmbx = (EXComboBox)sender; object item = excmbx.SelectedItem; //Is this an combobox item with one image? if (item.GetType() == typeof(EXComboBox.EXImageItem)) { EXComboBox.EXImageItem imgitem = (EXComboBox.EXImageItem)item; //Is the first column clicked -- in that case it's a ListViewItem if (_col == 0) { if (_clickeditem.GetType() == typeof(EXImageListViewItem)) { ((EXImageListViewItem)_clickeditem).MyImage = imgitem.MyImage; } else if (_clickeditem.GetType() == typeof(EXMultipleImagesListViewItem)) { EXMultipleImagesListViewItem imglstvitem = (EXMultipleImagesListViewItem)_clickeditem; imglstvitem.MyImages.Clear(); imglstvitem.MyImages.AddRange(new object[] { imgitem.MyImage }); } //another column than the first one is clicked, so we have a ListViewSubItem } else { if (_clickedsubitem.GetType() == typeof(EXImageListViewSubItem)) { EXImageListViewSubItem imgsub = (EXImageListViewSubItem)_clickedsubitem; imgsub.MyImage = imgitem.MyImage; } else if (_clickedsubitem.GetType() == typeof(EXMultipleImagesListViewSubItem)) { EXMultipleImagesListViewSubItem imgsub = (EXMultipleImagesListViewSubItem)_clickedsubitem; imgsub.MyImages.Clear(); imgsub.MyImages.Add(imgitem.MyImage); imgsub.MyValue = imgitem.MyValue; } } //or is this a combobox item with multiple images? } else if (item.GetType() == typeof(EXComboBox.EXMultipleImagesItem)) { EXComboBox.EXMultipleImagesItem imgitem = (EXComboBox.EXMultipleImagesItem)item; if (_col == 0) { if (_clickeditem.GetType() == typeof(EXImageListViewItem)) { ((EXImageListViewItem)_clickeditem).MyImage = (Image)imgitem.MyImages[0]; } else if (_clickeditem.GetType() == typeof(EXMultipleImagesListViewItem)) { EXMultipleImagesListViewItem imglstvitem = (EXMultipleImagesListViewItem)_clickeditem; imglstvitem.MyImages.Clear(); imglstvitem.MyImages.AddRange(imgitem.MyImages); } } else { if (_clickedsubitem.GetType() == typeof(EXImageListViewSubItem)) { EXImageListViewSubItem imgsub = (EXImageListViewSubItem)_clickedsubitem; if (imgitem.MyImages != null) { imgsub.MyImage = (Image)imgitem.MyImages[0]; } } else if (_clickedsubitem.GetType() == typeof(EXMultipleImagesListViewSubItem)) { EXMultipleImagesListViewSubItem imgsub = (EXMultipleImagesListViewSubItem)_clickedsubitem; imgsub.MyImages.Clear(); imgsub.MyImages.AddRange(imgitem.MyImages); imgsub.MyValue = imgitem.MyValue; } } } } ComboBox c = (ComboBox)sender; _clickedsubitem.Text = c.Text; c.Visible = false; _clickeditem.Tag = null; }
public void SelectWorktimeCalendarName_N(string calendarName, int position) { ComboBox OneWorktimeCalendarName = GetOneWorktimeCalendarNameComboBox(position); OneWorktimeCalendarName.SelectItem(calendarName); }
private void btnConfirm_Click(object sender, EventArgs e) { dirConstitute = new Dictionary <string, int>(); AJ_JN = new Dictionary <string, string>(); foreach (ComboBox folder in dir_check.Keys) { if (folder.SelectedItem != null && !string.IsNullOrWhiteSpace(folder.SelectedItem.ToString())) { if (dirConstitute.ContainsKey(folder.SelectedItem.ToString())) { MessageBox.Show("请勿重复填写!"); return; } CheckBox ckb = dir_check[folder] as CheckBox; if (ckb.Checked == true) { int num = 0; foreach (Control control in (tabPage1.Controls.Find(ckb.Name + "_Num", false))) { if (!string.IsNullOrWhiteSpace(control.Text)) { num = int.Parse(control.Text.Trim()); } } dirConstitute.Add(folder.SelectedItem.ToString(), num); } else { dirConstitute.Add(folder.SelectedItem.ToString(), 0); } } } foreach (ComboBox cbAJ in cbAJ_cbJN.Keys) { if (cbAJ.SelectedItem != null && !string.IsNullOrWhiteSpace(cbAJ.SelectedItem.ToString())) { if (AJ_JN.ContainsKey(cbAJ.SelectedItem.ToString())) { MessageBox.Show("请勿重复填写!"); return; } ComboBox cbJN = cbAJ_cbJN[cbAJ] as ComboBox; if (cbJN.SelectedItem != null && !string.IsNullOrWhiteSpace(cbJN.SelectedItem.ToString())) { AJ_JN.Add(cbAJ.SelectedItem.ToString(), cbJN.SelectedItem.ToString()); } else { MessageBox.Show("请成对填写!"); } } } foreach (Control control in (tabPage1.Controls.Find("folderRename", false))) { CheckBox checkBox = control as CheckBox; if (checkBox.Checked == true) { renameFolder = true; } } if (this.cbAJPageCount.SelectedItem != null && !string.IsNullOrWhiteSpace(this.cbAJPageCount.SelectedItem.ToString())) { AJPageCount = this.cbAJPageCount.SelectedItem.ToString(); } if (this.cbJNPageCount.SelectedItem != null && !string.IsNullOrWhiteSpace(this.cbJNPageCount.SelectedItem.ToString())) { JNPageCount = this.cbJNPageCount.SelectedItem.ToString(); } if (this.cbJNCount.SelectedItem != null && !string.IsNullOrWhiteSpace(this.cbJNCount.SelectedItem.ToString())) { JNCount = this.cbJNCount.SelectedItem.ToString(); } if (dirConstitute.Count == 0) { MessageBox.Show("请填写扫描件目录结构!"); return; } }
public void SelectWorkdayEffectiveYear_N(string year, int position) { ComboBox OneWorkdayEffectiveYearAdd = GetOneWorkdayEffectiveYearComboBox(position); OneWorkdayEffectiveYearAdd.SelectItem(year); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(TemplateEditorUI)); this.templateTextBox = new System.Windows.Forms.TextBox(); this.okButton = new System.Windows.Forms.Button(); this.tokenDropdown = new System.Windows.Forms.ComboBox(); this.insertTokenButton = new System.Windows.Forms.Button(); this.cancelButton = new System.Windows.Forms.Button(); this.SuspendLayout(); // // templateTextBox // this.templateTextBox.AcceptsReturn = true; this.templateTextBox.AcceptsTab = true; this.templateTextBox.AccessibleDescription = resources.GetString("templateTextBox.AccessibleDescription"); this.templateTextBox.AccessibleName = resources.GetString("templateTextBox.AccessibleName"); this.templateTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("templateTextBox.Anchor"))); this.templateTextBox.AutoSize = ((bool)(resources.GetObject("templateTextBox.AutoSize"))); this.templateTextBox.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("templateTextBox.BackgroundImage"))); this.templateTextBox.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("templateTextBox.Dock"))); this.templateTextBox.Enabled = ((bool)(resources.GetObject("templateTextBox.Enabled"))); this.templateTextBox.Font = ((System.Drawing.Font)(resources.GetObject("templateTextBox.Font"))); this.templateTextBox.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("templateTextBox.ImeMode"))); this.templateTextBox.Location = ((System.Drawing.Point)(resources.GetObject("templateTextBox.Location"))); this.templateTextBox.MaxLength = ((int)(resources.GetObject("templateTextBox.MaxLength"))); this.templateTextBox.Multiline = ((bool)(resources.GetObject("templateTextBox.Multiline"))); this.templateTextBox.Name = "templateTextBox"; this.templateTextBox.PasswordChar = ((char)(resources.GetObject("templateTextBox.PasswordChar"))); this.templateTextBox.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("templateTextBox.RightToLeft"))); this.templateTextBox.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("templateTextBox.ScrollBars"))); this.templateTextBox.Size = ((System.Drawing.Size)(resources.GetObject("templateTextBox.Size"))); this.templateTextBox.TabIndex = ((int)(resources.GetObject("templateTextBox.TabIndex"))); this.templateTextBox.Text = resources.GetString("templateTextBox.Text"); this.templateTextBox.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("templateTextBox.TextAlign"))); this.templateTextBox.Visible = ((bool)(resources.GetObject("templateTextBox.Visible"))); this.templateTextBox.WordWrap = ((bool)(resources.GetObject("templateTextBox.WordWrap"))); // // okButton // this.okButton.AccessibleDescription = resources.GetString("okButton.AccessibleDescription"); this.okButton.AccessibleName = resources.GetString("okButton.AccessibleName"); this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("okButton.Anchor"))); this.okButton.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("okButton.BackgroundImage"))); this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; this.okButton.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("okButton.Dock"))); this.okButton.Enabled = ((bool)(resources.GetObject("okButton.Enabled"))); this.okButton.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("okButton.FlatStyle"))); this.okButton.Font = ((System.Drawing.Font)(resources.GetObject("okButton.Font"))); this.okButton.Image = ((System.Drawing.Image)(resources.GetObject("okButton.Image"))); this.okButton.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("okButton.ImageAlign"))); this.okButton.ImageIndex = ((int)(resources.GetObject("okButton.ImageIndex"))); this.okButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("okButton.ImeMode"))); this.okButton.Location = ((System.Drawing.Point)(resources.GetObject("okButton.Location"))); this.okButton.Name = "okButton"; this.okButton.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("okButton.RightToLeft"))); this.okButton.Size = ((System.Drawing.Size)(resources.GetObject("okButton.Size"))); this.okButton.TabIndex = ((int)(resources.GetObject("okButton.TabIndex"))); this.okButton.Text = resources.GetString("okButton.Text"); this.okButton.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("okButton.TextAlign"))); this.okButton.Visible = ((bool)(resources.GetObject("okButton.Visible"))); // // tokenDropdown // this.tokenDropdown.AccessibleDescription = resources.GetString("tokenDropdown.AccessibleDescription"); this.tokenDropdown.AccessibleName = resources.GetString("tokenDropdown.AccessibleName"); this.tokenDropdown.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("tokenDropdown.Anchor"))); this.tokenDropdown.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("tokenDropdown.BackgroundImage"))); this.tokenDropdown.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("tokenDropdown.Dock"))); this.tokenDropdown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.tokenDropdown.Enabled = ((bool)(resources.GetObject("tokenDropdown.Enabled"))); this.tokenDropdown.Font = ((System.Drawing.Font)(resources.GetObject("tokenDropdown.Font"))); this.tokenDropdown.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("tokenDropdown.ImeMode"))); this.tokenDropdown.IntegralHeight = ((bool)(resources.GetObject("tokenDropdown.IntegralHeight"))); this.tokenDropdown.ItemHeight = ((int)(resources.GetObject("tokenDropdown.ItemHeight"))); this.tokenDropdown.Location = ((System.Drawing.Point)(resources.GetObject("tokenDropdown.Location"))); this.tokenDropdown.MaxDropDownItems = ((int)(resources.GetObject("tokenDropdown.MaxDropDownItems"))); this.tokenDropdown.MaxLength = ((int)(resources.GetObject("tokenDropdown.MaxLength"))); this.tokenDropdown.Name = "tokenDropdown"; this.tokenDropdown.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("tokenDropdown.RightToLeft"))); this.tokenDropdown.Size = ((System.Drawing.Size)(resources.GetObject("tokenDropdown.Size"))); this.tokenDropdown.TabIndex = ((int)(resources.GetObject("tokenDropdown.TabIndex"))); this.tokenDropdown.Text = resources.GetString("tokenDropdown.Text"); this.tokenDropdown.Visible = ((bool)(resources.GetObject("tokenDropdown.Visible"))); // // insertTokenButton // this.insertTokenButton.AccessibleDescription = resources.GetString("insertTokenButton.AccessibleDescription"); this.insertTokenButton.AccessibleName = resources.GetString("insertTokenButton.AccessibleName"); this.insertTokenButton.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("insertTokenButton.Anchor"))); this.insertTokenButton.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("insertTokenButton.BackgroundImage"))); this.insertTokenButton.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("insertTokenButton.Dock"))); this.insertTokenButton.Enabled = ((bool)(resources.GetObject("insertTokenButton.Enabled"))); this.insertTokenButton.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("insertTokenButton.FlatStyle"))); this.insertTokenButton.Font = ((System.Drawing.Font)(resources.GetObject("insertTokenButton.Font"))); this.insertTokenButton.Image = ((System.Drawing.Image)(resources.GetObject("insertTokenButton.Image"))); this.insertTokenButton.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("insertTokenButton.ImageAlign"))); this.insertTokenButton.ImageIndex = ((int)(resources.GetObject("insertTokenButton.ImageIndex"))); this.insertTokenButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("insertTokenButton.ImeMode"))); this.insertTokenButton.Location = ((System.Drawing.Point)(resources.GetObject("insertTokenButton.Location"))); this.insertTokenButton.Name = "insertTokenButton"; this.insertTokenButton.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("insertTokenButton.RightToLeft"))); this.insertTokenButton.Size = ((System.Drawing.Size)(resources.GetObject("insertTokenButton.Size"))); this.insertTokenButton.TabIndex = ((int)(resources.GetObject("insertTokenButton.TabIndex"))); this.insertTokenButton.Text = resources.GetString("insertTokenButton.Text"); this.insertTokenButton.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("insertTokenButton.TextAlign"))); this.insertTokenButton.Visible = ((bool)(resources.GetObject("insertTokenButton.Visible"))); this.insertTokenButton.Click += new System.EventHandler(this.insertTokenButton_Click); // // cancelButton // this.cancelButton.AccessibleDescription = resources.GetString("cancelButton.AccessibleDescription"); this.cancelButton.AccessibleName = resources.GetString("cancelButton.AccessibleName"); this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("cancelButton.Anchor"))); this.cancelButton.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("cancelButton.BackgroundImage"))); this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.cancelButton.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("cancelButton.Dock"))); this.cancelButton.Enabled = ((bool)(resources.GetObject("cancelButton.Enabled"))); this.cancelButton.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("cancelButton.FlatStyle"))); this.cancelButton.Font = ((System.Drawing.Font)(resources.GetObject("cancelButton.Font"))); this.cancelButton.Image = ((System.Drawing.Image)(resources.GetObject("cancelButton.Image"))); this.cancelButton.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("cancelButton.ImageAlign"))); this.cancelButton.ImageIndex = ((int)(resources.GetObject("cancelButton.ImageIndex"))); this.cancelButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("cancelButton.ImeMode"))); this.cancelButton.Location = ((System.Drawing.Point)(resources.GetObject("cancelButton.Location"))); this.cancelButton.Name = "cancelButton"; this.cancelButton.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("cancelButton.RightToLeft"))); this.cancelButton.Size = ((System.Drawing.Size)(resources.GetObject("cancelButton.Size"))); this.cancelButton.TabIndex = ((int)(resources.GetObject("cancelButton.TabIndex"))); this.cancelButton.Text = resources.GetString("cancelButton.Text"); this.cancelButton.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("cancelButton.TextAlign"))); this.cancelButton.Visible = ((bool)(resources.GetObject("cancelButton.Visible"))); this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); // // TemplateEditorUI // this.AcceptButton = this.okButton; this.AccessibleDescription = resources.GetString("$this.AccessibleDescription"); this.AccessibleName = resources.GetString("$this.AccessibleName"); this.AutoScaleBaseSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScaleBaseSize"))); this.AutoScroll = ((bool)(resources.GetObject("$this.AutoScroll"))); this.AutoScrollMargin = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMargin"))); this.AutoScrollMinSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMinSize"))); this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); this.CancelButton = this.cancelButton; this.ClientSize = ((System.Drawing.Size)(resources.GetObject("$this.ClientSize"))); this.Controls.Add(this.cancelButton); this.Controls.Add(this.insertTokenButton); this.Controls.Add(this.tokenDropdown); this.Controls.Add(this.okButton); this.Controls.Add(this.templateTextBox); this.Enabled = ((bool)(resources.GetObject("$this.Enabled"))); this.Font = ((System.Drawing.Font)(resources.GetObject("$this.Font"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("$this.ImeMode"))); this.Location = ((System.Drawing.Point)(resources.GetObject("$this.Location"))); this.MaximumSize = ((System.Drawing.Size)(resources.GetObject("$this.MaximumSize"))); this.MinimumSize = ((System.Drawing.Size)(resources.GetObject("$this.MinimumSize"))); this.Name = "TemplateEditorUI"; this.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("$this.RightToLeft"))); this.StartPosition = ((System.Windows.Forms.FormStartPosition)(resources.GetObject("$this.StartPosition"))); this.Text = resources.GetString("$this.Text"); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { Syncfusion.Windows.Forms.Edit.Implementation.Config.Config config1 = new Syncfusion.Windows.Forms.Edit.Implementation.Config.Config(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); this.editControl1 = new Syncfusion.Windows.Forms.Edit.EditControl(); this.mainFrameBarManager1 = new Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager(this); this.bar1 = new Syncfusion.Windows.Forms.Tools.XPMenus.Bar(this.mainFrameBarManager1, "Menu"); this.parentBarItem1 = new Syncfusion.Windows.Forms.Tools.XPMenus.ParentBarItem(); this.barItem1 = new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem(); this.barItem2 = new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem(); this.barItem3 = new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem(); this.barItem4 = new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem(); this.barItem5 = new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem(); this.barItem6 = new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem(); this.parentBarItem2 = new Syncfusion.Windows.Forms.Tools.XPMenus.ParentBarItem(); this.barItem7 = new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem(); this.barItem8 = new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem(); this.barItem9 = new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem(); this.parentBarItem3 = new Syncfusion.Windows.Forms.Tools.XPMenus.ParentBarItem(); this.barItem10 = new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem(); this.barItem11 = new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem(); this.barItem12 = new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem(); this.barItem13 = new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem(); this.parentBarItem4 = new Syncfusion.Windows.Forms.Tools.XPMenus.ParentBarItem(); this.barItem14 = new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem(); this.barItem15 = new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem(); this.barItem16 = new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem(); this.barItem17 = new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem(); this.parentBarItem5 = new Syncfusion.Windows.Forms.Tools.XPMenus.ParentBarItem(); this.barItem18 = new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem(); this.barItem19 = new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem(); this.barItem20 = new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem(); this.barItem21 = new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem(); this.panel1 = new System.Windows.Forms.Panel(); this.label4 = new System.Windows.Forms.Label(); this.checkBox1 = new System.Windows.Forms.CheckBox(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.button1 = new ButtonAdv(); this.comboBox2 = new System.Windows.Forms.ComboBox(); this.label3 = new System.Windows.Forms.Label(); this.comboBox1 = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.textBox1 = new System.Windows.Forms.TextBox(); this.panel2 = new System.Windows.Forms.Panel(); ((System.ComponentModel.ISupportInitialize)(this.editControl1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.mainFrameBarManager1)).BeginInit(); this.panel1.SuspendLayout(); this.groupBox1.SuspendLayout(); this.panel2.SuspendLayout(); this.SuspendLayout(); // // editControl1 // this.editControl1.AutoIndentMode = Syncfusion.Windows.Forms.Edit.Enums.AutoIndentMode.Smart; this.editControl1.BackColor = System.Drawing.SystemColors.Window; this.editControl1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.editControl1.CodeSnipptSize = new System.Drawing.Size(100, 100); this.editControl1.Configurator = config1; this.editControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.editControl1.IndicatorMarginBackColor = System.Drawing.Color.Empty; this.editControl1.LineNumbersFont = new System.Drawing.Font("Segoe UI", 8.25F); this.editControl1.Location = new System.Drawing.Point(0, 0); this.editControl1.Name = "editControl1"; this.editControl1.RenderRightToLeft = false; this.editControl1.ScrollPosition = new System.Drawing.Point(0, 0); this.editControl1.ScrollVisualStyle = Syncfusion.Windows.Forms.ScrollBarCustomDrawStyles.Metro; this.editControl1.ShowIndicatorMargin = false; this.editControl1.ShowLineNumbers = false; this.editControl1.ShowOutliningCollapsers = false; this.editControl1.Size = new System.Drawing.Size(460, 396); this.editControl1.StatusBarSettings.TextPanel.AutoSize = false; this.editControl1.TabIndex = 0; this.editControl1.Text = ""; this.editControl1.UseXPStyleBorder = true; this.editControl1.VisualColumn = 1; // // mainFrameBarManager1 // #if !NETCORE this.mainFrameBarManager1.BarPositionInfo = ((System.IO.MemoryStream)(resources.GetObject("mainFrameBarManager1.BarPositionInfo"))); #endif this.mainFrameBarManager1.Bars.Add(this.bar1); this.mainFrameBarManager1.Categories.Add("file"); this.mainFrameBarManager1.Categories.Add("launch"); this.mainFrameBarManager1.Categories.Add("find history"); this.mainFrameBarManager1.Categories.Add("replace history"); this.mainFrameBarManager1.Categories.Add("replace"); this.mainFrameBarManager1.CurrentBaseFormType = "Syncfusion.Windows.Forms.MetroForm"; this.mainFrameBarManager1.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.mainFrameBarManager1.Form = this; this.mainFrameBarManager1.Items.AddRange(new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem[] { this.parentBarItem1, this.barItem1, this.barItem2, this.barItem3, this.barItem4, this.barItem5, this.barItem6, this.parentBarItem2, this.barItem7, this.barItem8, this.barItem9, this.parentBarItem3, this.barItem10, this.barItem11, this.barItem12, this.barItem13, this.parentBarItem4, this.barItem14, this.barItem15, this.barItem16, this.barItem17, this.parentBarItem5, this.barItem18, this.barItem19, this.barItem20, this.barItem21 }); this.mainFrameBarManager1.MetroColor = System.Drawing.Color.DeepSkyBlue; this.mainFrameBarManager1.ResetCustomization = false; this.mainFrameBarManager1.Style = Syncfusion.Windows.Forms.VisualStyle.Metro; // // bar1 // this.bar1.BarName = "Menu"; this.bar1.Caption = "Menu"; this.bar1.Items.AddRange(new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem[] { this.parentBarItem1, this.parentBarItem2, this.parentBarItem3, this.parentBarItem4, this.parentBarItem5 }); this.bar1.Manager = this.mainFrameBarManager1; // // parentBarItem1 // this.parentBarItem1.BarName = "parentBarItem1"; this.parentBarItem1.CategoryIndex = 0; this.parentBarItem1.ID = "File"; this.parentBarItem1.Items.AddRange(new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem[] { this.barItem1, this.barItem2, this.barItem3, this.barItem4, this.barItem5, this.barItem6 }); this.parentBarItem1.MetroColor = System.Drawing.Color.DeepSkyBlue; this.parentBarItem1.ShowToolTipInPopUp = false; this.parentBarItem1.SizeToFit = true; this.parentBarItem1.Style = Syncfusion.Windows.Forms.VisualStyle.Metro; this.parentBarItem1.Text = "File"; // // barItem1 // this.barItem1.BarName = "barItem1"; this.barItem1.CategoryIndex = 0; this.barItem1.ID = "New"; this.barItem1.ShowToolTipInPopUp = false; this.barItem1.SizeToFit = true; this.barItem1.Text = "New"; this.barItem1.Click += new System.EventHandler(this.MainMenuClick); // // barItem2 // this.barItem2.BarName = "barItem2"; this.barItem2.CategoryIndex = 0; this.barItem2.ID = "Open"; this.barItem2.ShowToolTipInPopUp = false; this.barItem2.SizeToFit = true; this.barItem2.Text = "Open"; this.barItem2.Click += new System.EventHandler(this.MainMenuClick); // // barItem3 // this.barItem3.BarName = "barItem3"; this.barItem3.CategoryIndex = 0; this.barItem3.ID = "Save"; this.barItem3.ShowToolTipInPopUp = false; this.barItem3.SizeToFit = true; this.barItem3.Text = "Save"; this.barItem3.Click += new System.EventHandler(this.MainMenuClick); // // barItem4 // this.barItem4.BarName = "barItem4"; this.barItem4.CategoryIndex = 0; this.barItem4.ID = "SaveAs"; this.barItem4.ShowToolTipInPopUp = false; this.barItem4.SizeToFit = true; this.barItem4.Text = "SaveAs"; this.barItem4.Click += new System.EventHandler(this.MainMenuClick); // // barItem5 // this.barItem5.BarName = "barItem5"; this.barItem5.CategoryIndex = 0; this.barItem5.ID = "Close"; this.barItem5.ShowToolTipInPopUp = false; this.barItem5.SizeToFit = true; this.barItem5.Text = "Close"; this.barItem5.Click += new System.EventHandler(this.MainMenuClick); // // barItem6 // this.barItem6.BarName = "barItem6"; this.barItem6.CategoryIndex = 0; this.barItem6.ID = "Exit"; this.barItem6.ShowToolTipInPopUp = false; this.barItem6.SizeToFit = true; this.barItem6.Text = "Exit"; this.barItem6.Click += new System.EventHandler(this.MainMenuClick); // // parentBarItem2 // this.parentBarItem2.BarName = "parentBarItem2"; this.parentBarItem2.CategoryIndex = 1; this.parentBarItem2.ID = "Launch Menu"; this.parentBarItem2.Items.AddRange(new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem[] { this.barItem7, this.barItem8, this.barItem9 }); this.parentBarItem2.MetroColor = System.Drawing.Color.DeepSkyBlue; this.parentBarItem2.ShowToolTipInPopUp = false; this.parentBarItem2.SizeToFit = true; this.parentBarItem2.Style = Syncfusion.Windows.Forms.VisualStyle.Metro; this.parentBarItem2.Text = "Launch Menu"; // // barItem7 // this.barItem7.BarName = "barItem7"; this.barItem7.CategoryIndex = 1; this.barItem7.ID = "Find Dialog"; this.barItem7.ShowToolTipInPopUp = false; this.barItem7.SizeToFit = true; this.barItem7.Text = "Find Dialog"; this.barItem7.Click += new System.EventHandler(this.menuItem2_Click); // // barItem8 // this.barItem8.BarName = "barItem8"; this.barItem8.CategoryIndex = 1; this.barItem8.ID = "Replace Dialog"; this.barItem8.ShowToolTipInPopUp = false; this.barItem8.SizeToFit = true; this.barItem8.Text = "Replace Dialog"; this.barItem8.Click += new System.EventHandler(this.menuItem3_Click); // // barItem9 // this.barItem9.BarName = "barItem9"; this.barItem9.CategoryIndex = 1; this.barItem9.ID = "GoTo Dialog"; this.barItem9.ShowToolTipInPopUp = false; this.barItem9.SizeToFit = true; this.barItem9.Text = "GoTo Dialog"; this.barItem9.Click += new System.EventHandler(this.menuItem4_Click); // // parentBarItem3 // this.parentBarItem3.BarName = "parentBarItem3"; this.parentBarItem3.CategoryIndex = 2; this.parentBarItem3.ID = "Find History"; this.parentBarItem3.Items.AddRange(new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem[] { this.barItem10, this.barItem11, this.barItem12, this.barItem13 }); this.parentBarItem3.MetroColor = System.Drawing.Color.DeepSkyBlue; this.parentBarItem3.ShowToolTipInPopUp = false; this.parentBarItem3.SizeToFit = true; this.parentBarItem3.Style = Syncfusion.Windows.Forms.VisualStyle.Metro; this.parentBarItem3.Text = "Find History"; // // barItem10 // this.barItem10.BarName = "barItem10"; this.barItem10.CategoryIndex = 2; this.barItem10.ID = "Add To History"; this.barItem10.ShowToolTipInPopUp = false; this.barItem10.SizeToFit = true; this.barItem10.Text = "Add To History"; this.barItem10.Click += new System.EventHandler(this.FindHistoryMenu_Click); // // barItem11 // this.barItem11.BarName = "barItem11"; this.barItem11.CategoryIndex = 2; this.barItem11.ID = "Remove From History"; this.barItem11.ShowToolTipInPopUp = false; this.barItem11.SizeToFit = true; this.barItem11.Text = "Remove From History"; this.barItem11.Click += new System.EventHandler(this.FindHistoryMenu_Click); // // barItem12 // this.barItem12.BarName = "barItem12"; this.barItem12.CategoryIndex = 2; this.barItem12.ID = "Sort History"; this.barItem12.ShowToolTipInPopUp = false; this.barItem12.SizeToFit = true; this.barItem12.Text = "Sort History"; this.barItem12.Click += new System.EventHandler(this.FindHistoryMenu_Click); // // barItem13 // this.barItem13.BarName = "barItem13"; this.barItem13.CategoryIndex = 2; this.barItem13.ID = "Clear History"; this.barItem13.ShowToolTipInPopUp = false; this.barItem13.SizeToFit = true; this.barItem13.Text = "Clear History"; this.barItem13.Click += new System.EventHandler(this.FindHistoryMenu_Click); // // parentBarItem4 // this.parentBarItem4.BarName = "parentBarItem4"; this.parentBarItem4.CategoryIndex = 3; this.parentBarItem4.ID = "Replace History"; this.parentBarItem4.Items.AddRange(new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem[] { this.barItem14, this.barItem15, this.barItem16, this.barItem17 }); this.parentBarItem4.MetroColor = System.Drawing.Color.DeepSkyBlue; this.parentBarItem4.ShowToolTipInPopUp = false; this.parentBarItem4.SizeToFit = true; this.parentBarItem4.Style = Syncfusion.Windows.Forms.VisualStyle.Metro; this.parentBarItem4.Text = "Replace History"; // // barItem14 // this.barItem14.BarName = "barItem14"; this.barItem14.CategoryIndex = 3; this.barItem14.ID = "Add To History_1"; this.barItem14.ShowToolTipInPopUp = false; this.barItem14.SizeToFit = true; this.barItem14.Text = "Add To History"; this.barItem14.Click += new System.EventHandler(this.ReplaceHistory_Click); // // barItem15 // this.barItem15.BarName = "barItem15"; this.barItem15.CategoryIndex = 3; this.barItem15.ID = "Remove From History_1"; this.barItem15.ShowToolTipInPopUp = false; this.barItem15.SizeToFit = true; this.barItem15.Text = "Remove From History"; this.barItem15.Click += new System.EventHandler(this.ReplaceHistory_Click); // // barItem16 // this.barItem16.BarName = "barItem16"; this.barItem16.CategoryIndex = 3; this.barItem16.ID = "Sort History_1"; this.barItem16.ShowToolTipInPopUp = false; this.barItem16.SizeToFit = true; this.barItem16.Text = "Sort History"; this.barItem16.Click += new System.EventHandler(this.ReplaceHistory_Click); // // barItem17 // this.barItem17.BarName = "barItem17"; this.barItem17.CategoryIndex = 3; this.barItem17.ID = "Clear History_1"; this.barItem17.ShowToolTipInPopUp = false; this.barItem17.SizeToFit = true; this.barItem17.Text = "Clear History"; this.barItem17.Click += new System.EventHandler(this.ReplaceHistory_Click); // // parentBarItem5 // this.parentBarItem5.BarName = "parentBarItem5"; this.parentBarItem5.CategoryIndex = 4; this.parentBarItem5.ID = "Replace Search History"; this.parentBarItem5.Items.AddRange(new Syncfusion.Windows.Forms.Tools.XPMenus.BarItem[] { this.barItem18, this.barItem19, this.barItem20, this.barItem21 }); this.parentBarItem5.MetroColor = System.Drawing.Color.DeepSkyBlue; this.parentBarItem5.ShowToolTipInPopUp = false; this.parentBarItem5.SizeToFit = true; this.parentBarItem5.Style = Syncfusion.Windows.Forms.VisualStyle.Metro; this.parentBarItem5.Text = "Replace Search History"; // // barItem18 // this.barItem18.BarName = "barItem18"; this.barItem18.CategoryIndex = 4; this.barItem18.ID = "Add To History_2"; this.barItem18.ShowToolTipInPopUp = false; this.barItem18.SizeToFit = true; this.barItem18.Text = "Add To History"; // // barItem19 // this.barItem19.BarName = "barItem19"; this.barItem19.CategoryIndex = 4; this.barItem19.ID = "Remove From History_2"; this.barItem19.ShowToolTipInPopUp = false; this.barItem19.SizeToFit = true; this.barItem19.Text = "Remove From History"; // // barItem20 // this.barItem20.BarName = "barItem20"; this.barItem20.CategoryIndex = 4; this.barItem20.ID = "Sort History_2"; this.barItem20.ShowToolTipInPopUp = false; this.barItem20.SizeToFit = true; this.barItem20.Text = "Sort History"; // // barItem21 // this.barItem21.BarName = "barItem21"; this.barItem21.CategoryIndex = 4; this.barItem21.ID = "Clear History_2"; this.barItem21.ShowToolTipInPopUp = false; this.barItem21.SizeToFit = true; this.barItem21.Text = "Clear History"; // // panel1 // this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel1.Controls.Add(this.label4); this.panel1.Controls.Add(this.checkBox1); this.panel1.Controls.Add(this.groupBox1); this.panel1.Dock = System.Windows.Forms.DockStyle.Left; this.panel1.Location = new System.Drawing.Point(10, 39); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(187, 396); this.panel1.TabIndex = 4; // // label4 // this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(20, 84); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(155, 13); this.label4.TabIndex = 3; this.label4.Text = "Set Properties of Find Dialog"; // // checkBox1 // this.checkBox1.AutoSize = true; this.checkBox1.Location = new System.Drawing.Point(12, 44); this.checkBox1.Name = "checkBox1"; this.checkBox1.Size = new System.Drawing.Size(171, 17); this.checkBox1.TabIndex = 2; this.checkBox1.Text = "Use Customized Find Dialog"; this.checkBox1.UseVisualStyleBackColor = true; // // groupBox1 // this.groupBox1.Controls.Add(this.button1); this.groupBox1.Controls.Add(this.comboBox2); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.comboBox1); this.groupBox1.Controls.Add(this.label1); this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.textBox1); this.groupBox1.Location = new System.Drawing.Point(10, 100); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(168, 240); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // // button1 // this.button1.Location = new System.Drawing.Point(19, 186); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(84, 30); this.button1.TabIndex = 6; this.button1.Text = "Set"; this.button1.UseVisualStyleBackColor = true; this.button1.UseVisualStyle = true; this.button1.Appearance = ButtonAppearance.Office2016White; this.button1.Click += new System.EventHandler(this.button1_Click); // // comboBox2 // this.comboBox2.AutoCompleteCustomSource.AddRange(new string[] { "Grey", "Green" }); this.comboBox2.Text = "Gray"; this.comboBox2.FormattingEnabled = true; this.comboBox2.Items.AddRange(new object[] { "Gray", "DarkGray" }); this.comboBox2.Location = new System.Drawing.Point(19, 152); this.comboBox2.Name = "comboBox2"; this.comboBox2.Size = new System.Drawing.Size(130, 21); this.comboBox2.TabIndex = 5; // // label3 // this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(19, 131); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(115, 13); this.label3.TabIndex = 4; this.label3.Text = "CheckBox Back Color"; // // comboBox1 // this.comboBox1.FormattingEnabled = true; this.comboBox1.Items.AddRange(new object[] { "Gray", "LightGray", "Dark Gray" }); this.comboBox1.Location = new System.Drawing.Point(19, 100); this.comboBox1.Text = "Gray"; this.comboBox1.Name = "comboBox1"; this.comboBox1.Size = new System.Drawing.Size(130, 21); this.comboBox1.TabIndex = 3; // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(19, 79); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(106, 13); this.label1.TabIndex = 2; this.label1.Text = "Buttons Back Color"; // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(19, 28); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(120, 13); this.label2.TabIndex = 1; this.label2.Text = "Type Custom Message"; // // textBox1 // this.textBox1.Location = new System.Drawing.Point(19, 48); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(132, 22); this.textBox1.TabIndex = 0; this.textBox1.Text = "Type Custom message.."; // // panel2 // this.panel2.Controls.Add(this.editControl1); this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; this.panel2.Location = new System.Drawing.Point(197, 39); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(460, 396); this.panel2.TabIndex = 5; // // Form1 // this.AutoScaleBaseSize = new System.Drawing.Size(5, 15); this.ClientSize = new System.Drawing.Size(667, 445); this.Controls.Add(this.panel2); this.Controls.Add(this.panel1); this.Font = new System.Drawing.Font("Segoe UI", 8.25F); this.MinimumSize = new System.Drawing.Size(679, 482); this.Name = "Form1"; this.Padding = new System.Windows.Forms.Padding(10); this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Find and Replace"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; ((System.ComponentModel.ISupportInitialize)(this.editControl1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.mainFrameBarManager1)).EndInit(); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.panel2.ResumeLayout(false); this.ResumeLayout(false); }
public void SelectHeatingCoolingEffectiveYear_N(string year, int position) { ComboBox OneHeatingCoolingEffectiveYearAdd = GetOneHeatingCoolingEffectiveYearComboBox(position); OneHeatingCoolingEffectiveYearAdd.SelectItem(year); }
public string GetWorkdayEffectiveYearValue_N(int position) { ComboBox OneWorkdayEffectiveYearAdd = GetOneWorkdayEffectiveYearComboBox(position); return(OneWorkdayEffectiveYearAdd.GetValue()); }