public void FillTypeCombobox(string page, string control) { //page = "tab"; //control = "TypeComboBox"; DataTable Typetab = VSWebBL.DashboardBL.KeyMetricsBL.Ins.GetspecificServerType(page, control); TypeComboBox.DataSource = Typetab; TypeComboBox.TextField = "ServerType"; TypeComboBox.DataBind(); //2/25/2016 Durga Modified for VSPLUS-2611 try { if (Typetab.Rows.Count > 0) { TypeComboBox.SelectedItem = TypeComboBox.Items.FindByText(Typetab.Rows[0]["ServerType"].ToString()); } } catch { TypeComboBox.SelectedIndex = 0; } if (Request.QueryString["ServerType"] != null) { TypeComboBox.SelectedItem = TypeComboBox.Items.FindByText(Request.QueryString["ServerType"].ToString()); } }
private void Window_Loaded(object sender, RoutedEventArgs e) { if (IsEditing) { MainBorder.Background = TryFindResource("Vector.Pen") as Brush; TypeTextBlock.Text = LocalizationHelper.Get("S.Edit"); TypeComboBox.SelectedIndex = (int)(CurrentPreset?.Type ?? UploadDestinations.NotDefined); TypeComboBox.IsEnabled = false; EnabledCheckBox.Visibility = Visibility.Visible; TypeComboBox.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next)); } else { //If the file type is set, only display services that supports upload for that. if (Type.HasValue) { FilterRun.Text = $"\n(*.{Type.ToString().ToLower()})"; if (!ImgurPresetItem.AllowedTypes.Contains(Type.Value)) { TypeComboBox.Items.Remove(ImgurPresetItem); } if (!GfycatPresetItem.AllowedTypes.Contains(Type.Value)) { TypeComboBox.Items.Remove(GfycatPresetItem); } } TypeComboBox.Focus(); } }
private void MarkAllValid() { NameTextBox.ClearValue(Control.StyleProperty); CityTextBox.ClearValue(Control.StyleProperty); CapacityIntTextBox.ClearValue(Control.StyleProperty); CapacityNatTextBox.ClearValue(Control.StyleProperty); StateComboBox.ClearValue(Control.StyleProperty); TypeComboBox.ClearValue(Control.StyleProperty); }
private void SetTypeCombox(Configuration.ValueType valueType, int length) { string textToSelect = null; switch (valueType) { case Configuration.ValueType.unsigned: if (length == 1) { textToSelect = uint8Txt; } if (length == 2) { textToSelect = uint16Txt; } if (length == 4) { textToSelect = uint32Txt; } break; case Configuration.ValueType.signed: if (length == 1) { textToSelect = int8Txt; } if (length == 2) { textToSelect = int16Txt; } if (length == 4) { textToSelect = int32Txt; } break; case Configuration.ValueType.single: if (length == 4) { textToSelect = floatSingleTxt; } break; case Configuration.ValueType.@double: if (length == 4) { textToSelect = floatDoubleTxt; } break; } if (textToSelect != null) { TypeComboBox.SelectedIndex = TypeComboBox.FindStringExact(textToSelect); } }
private void ClearInputs() { MarkAllValid(); DebugIDLabel.ClearValue(Label.ContentProperty); NameTextBox.Clear(); CityTextBox.Clear(); CapacityIntTextBox.Clear(); CapacityNatTextBox.Clear(); StateComboBox.ClearValue(ComboBox.SelectedValueProperty); TypeComboBox.ClearValue(ComboBox.SelectedValueProperty); }
public void FillCombobox() { DataTable Typetab = VSWebBL.DashboardBL.KeyMetricsBL.Ins.GetType(); TypeComboBox.DataSource = Typetab; TypeComboBox.TextField = "Type"; TypeComboBox.DataBind(); //9/26/2013 NS commented out the option All in order to display a manageable amount of data per page //TypeComboBox.Items.Insert(0, new DevExpress.Web.ListEditItem("All", 0)); //TypeComboBox.Items[0].Selected = true; TypeComboBox.SelectedItem = TypeComboBox.Items.FindByText("Domino"); }
public void FillTypeCombobox(string page, string control) { DataTable Typetab = VSWebBL.DashboardBL.KeyMetricsBL.Ins.GetspecificServerType(page, control); TypeComboBox.DataSource = Typetab; TypeComboBox.TextField = "ServerType"; TypeComboBox.DataBind(); //2/16/1016 Durga modified for VSPLUS-2611 if (Request.QueryString["ServerType"] != null) { TypeComboBox.SelectedItem = TypeComboBox.Items.FindByText(Request.QueryString["ServerType"].ToString()); } }
private void Window_Loaded(object sender, RoutedEventArgs e) { TypeComboBox.Focus(); if (IsEditing) { MainViewbox.Child = TryFindResource("Vector.Pen") as Canvas; TypeTextBlock.Text = LocalizationHelper.Get("S.Edit"); TypeComboBox.SelectedIndex = (int)(CurrentTask?.TaskType ?? DefaultTaskModel.TaskTypeEnum.NotDeclared); TypeComboBox.IsEnabled = false; TypeComboBox.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next)); } }
private void Window_Loaded(object sender, RoutedEventArgs e) { TypeComboBox.Focus(); if (IsEditing) { MainBorder.Background = TryFindResource("Vector.Pen") as Brush; TypeTextBlock.Text = LocalizationHelper.Get("S.Edit"); TypeComboBox.SelectedIndex = (int)(CurrentTask?.TaskType ?? TaskTypes.NotDeclared); TypeComboBox.IsEnabled = false; EnabledCheckBox.Visibility = Visibility.Visible; TypeComboBox.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next)); } }
public void FillCombobox() { DataTable Typetab = VSWebBL.DashboardBL.KeyMetricsBL.Ins.GetServerTypeForCostperUserserved(); TypeComboBox.DataSource = Typetab; TypeComboBox.TextField = "ServerType"; TypeComboBox.DataBind(); try { TypeComboBox.SelectedItem = TypeComboBox.Items.FindByText("Domino"); } catch { TypeComboBox.SelectedIndex = 0; } }
public void FillTypeCombobox(string page, string control) { //page = "BiggestMailFiles.aspx"; //control = "TypeComboBox"; DataTable Typetab = VSWebBL.DashboardBL.KeyMetricsBL.Ins.GetspecificServerType(page, control); TypeComboBox.DataSource = Typetab; TypeComboBox.TextField = "ServerType"; TypeComboBox.DataBind(); //TypeComboBox.SelectedIndex = 0; try { TypeComboBox.SelectedItem = TypeComboBox.Items.FindByText("Domino"); } catch { TypeComboBox.SelectedIndex = 0; } }
private void DiscoverTypes() { // try to get a reference to the type discovery service ITypeDiscoveryService discovery = null; if (_control.Site != null) { discovery = (ITypeDiscoveryService)_control.Site.GetService(typeof(ITypeDiscoveryService)); } if (discovery != null) { // saves the cursor and sets the wait cursor Cursor previousCursor = Cursor.Current; Cursor.Current = Cursors.WaitCursor; try { // gets all types using the type discovery service ICollection types = discovery.GetTypes(typeof(object), true); TypeComboBox.BeginUpdate(); TypeComboBox.Items.Clear(); // adds the types to the list foreach (Type type in types) { if (type.Assembly.FullName.Substring(0, type.Assembly.FullName.IndexOf(",")) != "Csla" && typeof(Csla.Core.IBusinessObject).IsAssignableFrom(type)) { string name = type.AssemblyQualifiedName; if (name.Substring(name.Length - 19, 19) == "PublicKeyToken=null") { name = name.Substring(0, name.IndexOf(",", name.IndexOf(",") + 1)); } TypeComboBox.Items.Add(name); } } } finally { Cursor.Current = previousCursor; TypeComboBox.EndUpdate(); } } }
//2/4/2015 NS added for public void FillCombobox() { //10/20/2015 NS modified for VSPLUS-2072 DataTable Typetab = VSWebBL.DashboardBL.KeyMetricsBL.Ins.GetType("'Domino','Exchange','Sharepoint'"); TypeComboBox.DataSource = Typetab; TypeComboBox.TextField = "Type"; TypeComboBox.DataBind(); //9/26/2013 NS commented out the option All in order to display a manageable amount of data per page //TypeComboBox.Items.Insert(0, new DevExpress.Web.ListEditItem("All", 0)); //TypeComboBox.Items[0].Selected = true; try { TypeComboBox.SelectedItem = TypeComboBox.Items.FindByText("Domino"); } catch { TypeComboBox.SelectedIndex = 0; } }
public void FillTypeCombobox(string page, string control) { DataTable Typetab = VSWebBL.DashboardBL.KeyMetricsBL.Ins.GetspecificServerType(page, control); TypeComboBox.DataSource = Typetab; TypeComboBox.TextField = "ServerType"; TypeComboBox.DataBind(); //TypeComboBox.SelectedIndex = 0; //try //{ // TypeComboBox.SelectedItem = TypeComboBox.Items.FindByText("Domino"); //} //catch //{ // TypeComboBox.SelectedIndex = 0; //} //15/2/2016 Sowmya Added for VSPLUS 2610 if (Request.QueryString["type"] != null) { TypeComboBox.SelectedItem = TypeComboBox.Items.FindByText(Request.QueryString["type"]); } }
protected CameraPanelBase() { InitializeComponent(); Loading = true; TypeComboBox.DataSource = Enum.GetValues(typeof(CameraType)); SetStyle(ControlStyles.OptimizedDoubleBuffer, true); TypeComboBox.Resize += (s, e) => { if (!TypeComboBox.IsHandleCreated) { return; } TypeComboBox.BeginInvoke(new Action(() => { var parent = TypeComboBox.FindForm(); if (parent == null) { return; } if (parent.ActiveControl == null) { return; } if (parent.ActiveControl == TypeComboBox) { return; } TypeComboBox.SelectionLength = 0; })); }; TypeComboBox.MouseWheel += TypeComboBox_MouseWheel; SetupUnsaved(); Loading = false; }
/// <summary> /// Инициализация данных для ComboBox /// </summary> private ObservableCollection <string> InitComboBoxData(TypeComboBox type) { HashSet <string> data = new HashSet <string>(); if (employees != null) { if (employees.Count > 0) { if (type == TypeComboBox.WORKPOS) { foreach (Employee item in employees) { data.Add(item.WorkPosition); } } else if (type == TypeComboBox.CITYNAME) { foreach (Employee item in employees) { data.Add(item.CityName); } } else if (type == TypeComboBox.STREETNAME) { foreach (Employee item in employees) { data.Add(item.StreetName); } } return(new ObservableCollection <string>(data)); } } return(new ObservableCollection <string>()); }
/// <summary> /// Gets the available types or maps for the currently selcted item given a specified race and part /// Hair, Face, and Mounts that are demihuman, contain types, all others do not. /// </summary> private void PartComboBoxChanged() { if (selectedCategory != "UI") { var body = ""; var modelID = selectedItem.PrimaryModelID; var imc = imcVersion; var vfx = VFXVersion; var part = selectedPart.Name; if (selectedItem.PrimaryMTRLFolder != null) { if (selectedItem.PrimaryMTRLFolder.Contains("weapon")) { var imcData = IMC.GetVersion(selectedCategory, selectedItem, false); imc = imcData.Item1; vfx = imcData.Item2; modelID = selectedItem.PrimaryModelID; body = selectedItem.PrimaryModelBody; part = selectedPart.Name; } } if (SelectedPart.Name.Equals("s")) { var imcData = IMC.GetVersion(selectedCategory, selectedItem, true); imc = imcData.Item1; vfx = imcData.Item2; modelID = selectedItem.SecondaryModelID; body = selectedItem.SecondaryModelBody; part = "a"; if (body == null) { body = "0001"; } } if (selectedCategory.Equals(Strings.Pets)) { body = "a"; } var info = MTRL.GetMTRLData(selectedItem, selectedRace.ID, selectedCategory, part, imc, body, modelID, vfx); mtrlData = info.Item1; if (selectedItem.ItemName.Equals(Strings.Face) || selectedItem.ItemName.Equals(Strings.Hair)) { TypeComboBox = info.Item2; TypeIndex = 0; } else if (selectedCategory.Equals(Strings.Mounts)) { bool isDemiHuman = selectedItem.PrimaryMTRLFolder.Contains("demihuman"); if (isDemiHuman) { TypeComboBox = info.Item2; TypeIndex = 0; } else { MapComboBox = info.Item2; if (MapComboBox.Count < (currMap + 1)) { MapIndex = 0; } else { MapIndex = currMap; } TypeComboBox.Clear(); } } else { MapComboBox = info.Item2; if (MapComboBox.Count < (currMap + 1)) { MapIndex = 0; } else { MapIndex = currMap; } TypeComboBox.Clear(); } } else { var info = MTRL.GetUIData(selectedItem); mtrlData = info.Item1; MapComboBox = info.Item2; if (MapComboBox.Count < (currMap + 1)) { MapIndex = 0; } else { MapIndex = currMap; } TypeComboBox.Clear(); } if (TypeComboBox.Count > 1) { TypeEnabled = true; } else { TypeEnabled = false; } if (MapComboBox.Count > 0) { MapEnabled = true; } else { MapEnabled = false; } }