public void Set(Vector2 p, float fWidth, int iFontSize, Component component, Action <PropertyInfo, FieldInfo> f) { rect = new Rect(p.x - fWidth, p.y, fWidth, 0f); fRightPos = p.x + fWidth; fUpPos = p.y; gsLabel = new GUIStyle("label"); gsLabel.fontSize = iFontSize; gsLabel.alignment = TextAnchor.MiddleLeft; gsButton = new GUIStyle("button"); gsButton.fontSize = iFontSize; gsButton.alignment = TextAnchor.MiddleCenter; fMargin = iFontSize * 0.3f; func = f; show = true; isField = false; this.propertyBox = new CustomComboBox(); this.propertyBox.Text = Translation.GetText("PropertyPicker", "property"); this.fieldBox = new CustomComboBox(); this.fieldBox.Text = Translation.GetText("PropertyPicker", "field"); this.okButton = new CustomButton(); this.okButton.Text = Translation.GetText("UI", "ok"); this.okButton.Click = this.Ok; this.cancelButton = new CustomButton(); this.cancelButton.Text = Translation.GetText("UI", "cancel"); this.cancelButton.Click = this.Cancel; this.LoadProperties(component); }
//dodaje kontrolki do edytowania po załadowaniu tabeli z comboboxa public static void AddEditControls(FlowLayoutPanel panel, string table) { panel.Controls.Clear(); List <string> columnNames = Columns.ColumnNames(table); for (int i = 0; i < columnNames.Count; i++) { if (columnNames[i] == "Club") { CustomComboBox club = new CustomComboBox(); club.Clubs(); panel.Controls.Add(club); } else if (columnNames[i] == "Position") { CustomComboBox position = new CustomComboBox(); position.Position(); panel.Controls.Add(position); } else { AttributeControlEdit attribute = new AttributeControlEdit(); attribute.AttributeName = columnNames[i]; panel.Controls.Add(attribute); } } }
/// <summary> /// Gets a dropdown list. /// </summary> /// <returns>Returns a frameworkelement of type <see cref="CustomComboBox"/>.</returns> private FrameworkElement GetDropDownList() { FrameworkElement newControl = new CustomComboBox(); newControl.GetType().GetProperty("Width").SetValue(newControl, 150); return(newControl); }
public SelectFrequencyDropDown(CustomComboBox.CustomComboBox parent, IList<double> resonances) { InitializeComponent(); this.parent = parent; for (int i = 0; i < resonances.Count; i++) lstResonances.Items.Add(new ListBoxItem(i + 1, resonances[i])); }
public ItemPickerWindow(int iWIndowID) { WINDOW_ID = iWIndowID; buttons = new List <CustomTextureButton>(); this.categoryBox = new CustomComboBox(ConstantValues.PropParts.Keys.ToArray()); this.categoryBox.SelectedIndex = 0; this.categoryBox.SelectedIndexChanged += this.ChangeCategory; Menus = new Dictionary <MPN, List <MenuInfo> >(); }
void IComponentConnector.Connect(int connectionId, object target) { if (connectionId == 1) { this.mAutoComboBox = (CustomComboBox)target; } else { this._contentLoaded = true; } }
public static void cargarSitIva(CustomComboBox combo, string textoPrimerItem = "", int idSitPorDefecto = 0) { try { ComboBoxItem item; // Obtiene las localidades List <SituacionFrenteIva> sitIva = Global.Servicio.obtenerTodosSitIva(); // Limpia el contenido del combobox combo.Items.Clear(); // Agrega el primer elemento con el texto especificado if (textoPrimerItem != "") { item = new ComboBoxItem(textoPrimerItem, null); combo.Items.Add(item); } // Origen de datos para Autocompletado AutoCompleteStringCollection nombreSituacionesIVA = new AutoCompleteStringCollection(); int indice = 0; // Carga las localidades obtenidas foreach (SituacionFrenteIva si in sitIva) { item = new ComboBoxItem(si.nombre, si); combo.Items.Add(item); nombreSituacionesIVA.Add(si.nombre); if (idSitPorDefecto == si.id) { indice = combo.Items.Count - 1; } } combo.AutoCompleteCustomSource = nombreSituacionesIVA; combo.AutoCompleteSource = AutoCompleteSource.CustomSource; combo.SelectedIndex = indice; } catch (Exception ex) { Mensaje unMensaje = new Mensaje(ex.Message, Mensaje.TipoMensaje.Error, Mensaje.Botones.OK); unMensaje.ShowDialog(); } }
public static void AddEditableControls(int start_index, int[] RGB, FlowLayoutPanel panel, List <string> values, string table) { panel.Controls.Clear(); List <string> columnNames = Columns.ColumnNames(table); // wypełnij tablicę pustymi stringami jeśli values jest puste if (!values.Any()) { for (int i = 0; i < columnNames.Count; i++) { values.Add(""); } } for (int i = start_index; i < columnNames.Count; i++) { if (columnNames[i] == "Club") { CustomComboBox club = new CustomComboBox(); club.Clubs(); club.BackColor = Color.FromArgb(RGB[0], RGB[1], RGB[2]); club.SetCurrentIndex = values[i]; panel.Controls.Add(club); } else if (columnNames[i] == "Position") { CustomComboBox position = new CustomComboBox(); position.Position(); position.BackColor = Color.FromArgb(RGB[0], RGB[1], RGB[2]); position.SetCurrentIndex = values[i]; panel.Controls.Add(position); } else { AttributeControlEdit attribute = new AttributeControlEdit(); attribute.BackColor = Color.FromArgb(RGB[0], RGB[1], RGB[2]); attribute.AttributeName = columnNames[i]; attribute.AttributeValue = values[i]; panel.Controls.Add(attribute); } } }
///------------------------------------------------------------------------- /// <summary>データ設定トグルチェック変更イベント</summary> /// <param name="sender">イベント送信者</param> /// <param name="args">イベント引数(未使用)</param> ///------------------------------------------------------------------------- private void DataSettingButton_CheckedChanged(object sender, EventArgs args) { try { // コンボボックスを閉じる CustomComboBox.CloseAllDropDownList(); // 環境設定ボタン有効の場合のみ if (this.IsEnableDataSettingButton) { if (this.dataSettingButton.Value) { this.SelectedMode = ConstantValues.EditMode.Data; } } } catch (Exception e) { Debug.LogError(e.ToString()); } }
internal static void ManageControl(Control control, String formName) { CustomComboBox controlCustomCombo = ((CustomComboBox)control); if (controlCustomCombo.CustomContextMenuStrip != null) { LanguageUtil.CicleControls(formName, controlCustomCombo.CustomContextMenuStrip.Items); } String items = LanguageUtil.GetCurrentLanguageString(String.Format("{0}Items", controlCustomCombo.Name), formName); if (String.IsNullOrEmpty(items)) { return; } String[] itemsSplitted = items.Split(new[] { Environment.NewLine }, StringSplitOptions.None); for (int i = 0; i < controlCustomCombo.Items.Count; i++) { controlCustomCombo.Items[i] = itemsSplitted[i]; } }
public static void cargarLotes(CustomComboBox combo, TipoArticulo tipoArt, short estado, string textoPrimerItem = "") { try { ComboBoxItem item; List <Lote> lotes = Global.Servicio.obtenerLotes(tipoArt, estado); // Limpia el contenido del combobox combo.Items.Clear(); // Agrega el primer elemento con el texto especificado if (textoPrimerItem != "") { item = new ComboBoxItem(textoPrimerItem, null); combo.Items.Add(item); } int indice = 0; foreach (Lote lote in lotes) { item = new ComboBoxItem(lote.numero, lote); combo.Items.Add(item); } if (combo.Items.Count > 0) { combo.SelectedIndex = indice; } } catch (Exception ex) { Mensaje unMensaje = new Mensaje(ex.Message, Mensaje.TipoMensaje.Error, Mensaje.Botones.OK); unMensaje.ShowDialog(); } }
void IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.MultiInstanceWindow = (MultiInstanceView)target; this.MultiInstanceWindow.Deactivated += new EventHandler(this.MultiInstanceWindow_Deactivated); break; case 3: this.mMainGrid = (Grid)target; break; case 4: this.mConfigButton = (ToggleButton)target; break; case 5: this.mBatchDeleteButton = (CustomButton)target; break; case 6: this.SortOptionComboBox = (CustomComboBox)target; break; case 7: this.mEcoModeStackPanel = (StackPanel)target; break; case 8: this.mEcoModeHelp = (CustomPictureBox)target; this.mEcoModeHelp.MouseEnter += new MouseEventHandler(this.EcoModeHelp_MouseEnter); this.mEcoModeHelp.MouseLeave += new MouseEventHandler(this.EcoModeHelp_MouseLeave); break; case 9: this.mOverlayGrid = (Grid)target; break; case 10: this.mConfigMenuItem = (CustomPopUp)target; this.mConfigMenuItem.Opened += new EventHandler(this.mConfigMenuItem_Opened); break; case 11: this.mShadowBorder = (Border)target; break; case 12: this.mGrid = (Grid)target; break; case 13: this.mMaskBorder = (Border)target; break; case 14: ((UIElement)target).MouseEnter += new MouseEventHandler(this.Grid_MouseEnter); ((UIElement)target).MouseLeave += new MouseEventHandler(this.Grid_MouseLeave); break; case 15: ((UIElement)target).MouseEnter += new MouseEventHandler(this.Grid_MouseEnter); ((UIElement)target).MouseLeave += new MouseEventHandler(this.Grid_MouseLeave); break; case 16: this.mEcoModeHelpPopup = (CustomPopUp)target; this.mEcoModeHelpPopup.MouseLeave += new MouseEventHandler(this.EcoModeHelp_MouseLeave); break; case 17: this.mEcoModeHelpPopupBorder = (Border)target; break; case 18: ((UIElement)target).MouseDown += new MouseButtonEventHandler(this.EcoModeHelpPopup_MouseDown); break; default: this._contentLoaded = true; break; } }
private void InitializeComponent() { ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (SettingsTabPanel)); this.SettingsTabPanel_NetworkSettingsInstructionsLbl = new Label(); this.SettingsTabPanel_NetworkSettingsSeparator = new CustomLabelSeparator(); this.SettingsTabPanel_NetworkSettingsComboBox = new CustomComboBox(); this.SettingsTabPanel_NetworkSettingsRestoreBtnBox = new CustomButtonPushHorizBox(); this.SettingsTabPanel_NetworkSettingsRestoreBtn = new CustomButtonPush(); this.SettingsTabPanel_NetworkSettingsGroupBox = new GroupBox(); this.SettingsTabPanel_NetworkSettingsRadioButtonGroup = new CustomRadioButtonGroup(); this.SettingsTabPanel_NetworkSettingsWarningLbl = new Label(); this.SettingsTabPanel_NetworkSettingsRestoreBtnBox.SuspendLayout(); this.SettingsTabPanel_NetworkSettingsGroupBox.SuspendLayout(); this.SuspendLayout(); componentResourceManager.ApplyResources((object) this.SettingsTabPanel_NetworkSettingsInstructionsLbl, "SettingsTabPanel_NetworkSettingsInstructionsLbl"); this.SettingsTabPanel_NetworkSettingsInstructionsLbl.Name = "SettingsTabPanel_NetworkSettingsInstructionsLbl"; this.SettingsTabPanel_NetworkSettingsSeparator.BackColor = Color.White; componentResourceManager.ApplyResources((object) this.SettingsTabPanel_NetworkSettingsSeparator, "SettingsTabPanel_NetworkSettingsSeparator"); this.SettingsTabPanel_NetworkSettingsSeparator.Name = "SettingsTabPanel_NetworkSettingsSeparator"; this.SettingsTabPanel_NetworkSettingsSeparator.TabStop = false; this.SettingsTabPanel_NetworkSettingsComboBox.DrawMode = DrawMode.OwnerDrawFixed; this.SettingsTabPanel_NetworkSettingsComboBox.DropDownStyle = ComboBoxStyle.DropDownList; this.SettingsTabPanel_NetworkSettingsComboBox.FormattingEnabled = true; componentResourceManager.ApplyResources((object) this.SettingsTabPanel_NetworkSettingsComboBox, "SettingsTabPanel_NetworkSettingsComboBox"); this.SettingsTabPanel_NetworkSettingsComboBox.Name = "SettingsTabPanel_NetworkSettingsComboBox"; this.SettingsTabPanel_NetworkSettingsComboBox.Text = (string) null; this.SettingsTabPanel_NetworkSettingsRestoreBtnBox.Controls.Add((Control) this.SettingsTabPanel_NetworkSettingsRestoreBtn); componentResourceManager.ApplyResources((object) this.SettingsTabPanel_NetworkSettingsRestoreBtnBox, "SettingsTabPanel_NetworkSettingsRestoreBtnBox"); this.SettingsTabPanel_NetworkSettingsRestoreBtnBox.HorizontalJustification = HorizontalJustificationEnum.Right; this.SettingsTabPanel_NetworkSettingsRestoreBtnBox.Name = "SettingsTabPanel_NetworkSettingsRestoreBtnBox"; this.SettingsTabPanel_NetworkSettingsRestoreBtn.BackColor = Color.White; this.SettingsTabPanel_NetworkSettingsRestoreBtn.BtnColor = PushButtonColorEnum.BlueGrey; this.SettingsTabPanel_NetworkSettingsRestoreBtn.BtnDoubleEndCaps = false; this.SettingsTabPanel_NetworkSettingsRestoreBtn.BtnEnabled = true; componentResourceManager.ApplyResources((object) this.SettingsTabPanel_NetworkSettingsRestoreBtn, "SettingsTabPanel_NetworkSettingsRestoreBtn"); this.SettingsTabPanel_NetworkSettingsRestoreBtn.Name = "SettingsTabPanel_NetworkSettingsRestoreBtn"; this.SettingsTabPanel_NetworkSettingsGroupBox.Controls.Add((Control) this.SettingsTabPanel_NetworkSettingsComboBox); this.SettingsTabPanel_NetworkSettingsGroupBox.Controls.Add((Control) this.SettingsTabPanel_NetworkSettingsRadioButtonGroup); componentResourceManager.ApplyResources((object) this.SettingsTabPanel_NetworkSettingsGroupBox, "SettingsTabPanel_NetworkSettingsGroupBox"); this.SettingsTabPanel_NetworkSettingsGroupBox.Name = "SettingsTabPanel_NetworkSettingsGroupBox"; this.SettingsTabPanel_NetworkSettingsGroupBox.TabStop = false; this.SettingsTabPanel_NetworkSettingsRadioButtonGroup.BackColor = Color.Transparent; componentResourceManager.ApplyResources((object) this.SettingsTabPanel_NetworkSettingsRadioButtonGroup, "SettingsTabPanel_NetworkSettingsRadioButtonGroup"); this.SettingsTabPanel_NetworkSettingsRadioButtonGroup.Name = "SettingsTabPanel_NetworkSettingsRadioButtonGroup"; this.SettingsTabPanel_NetworkSettingsRadioButtonGroup.SelectedIndex = 0; componentResourceManager.ApplyResources((object) this.SettingsTabPanel_NetworkSettingsWarningLbl, "SettingsTabPanel_NetworkSettingsWarningLbl"); this.SettingsTabPanel_NetworkSettingsWarningLbl.ForeColor = Color.Red; this.SettingsTabPanel_NetworkSettingsWarningLbl.Name = "SettingsTabPanel_NetworkSettingsWarningLbl"; this.BackColor = Color.White; this.Controls.Add((Control) this.SettingsTabPanel_NetworkSettingsRestoreBtnBox); this.Controls.Add((Control) this.SettingsTabPanel_NetworkSettingsWarningLbl); this.Controls.Add((Control) this.SettingsTabPanel_NetworkSettingsGroupBox); this.Controls.Add((Control) this.SettingsTabPanel_NetworkSettingsInstructionsLbl); this.Controls.Add((Control) this.SettingsTabPanel_NetworkSettingsSeparator); componentResourceManager.ApplyResources((object) this, "$this"); this.Name = "SettingsTabPanel"; this.SettingsTabPanel_NetworkSettingsRestoreBtnBox.ResumeLayout(false); this.SettingsTabPanel_NetworkSettingsGroupBox.ResumeLayout(false); this.ResumeLayout(false); }
void IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.CustomRam = (CustomTextBox)target; break; case 2: this.OrientationComboBox = (CustomComboBox)target; break; case 3: this.ResolutionComboBox = (CustomComboBox)target; break; case 4: this.CustomResolutionTextBoxes = (StackPanel)target; break; case 5: this.CustomResolutionWidth = (CustomTextBox)target; break; case 6: this.CustomResolutionHeight = (CustomTextBox)target; break; case 7: this.mAbi64AutoRadioButtonPanel = (StackPanel)target; this.mAbi64AutoRadioButtonPanel.MouseEnter += new MouseEventHandler(this.CustomRadioButtonAuto_MouseEnter); this.mAbi64AutoRadioButtonPanel.MouseLeave += new MouseEventHandler(this.CustomRadioButtonAuto_MouseLeave); break; case 8: this.mAbi64AutoRadioButton = (CustomRadioButton)target; break; case 9: this.mAbi64ARMRadioButtonPanel = (StackPanel)target; this.mAbi64ARMRadioButtonPanel.MouseEnter += new MouseEventHandler(this.CustomRadioButtonARM_MouseEnter); this.mAbi64ARMRadioButtonPanel.MouseLeave += new MouseEventHandler(this.CustomRadioButtonARM_MouseLeave); break; case 10: this.mAbi64ARMRadioButton = (CustomRadioButton)target; break; case 11: this.mDisabledAbiPopup = (CustomPopUp)target; break; case 12: this.mDisabledAbiPopupBorder = (Border)target; break; default: this._contentLoaded = true; break; } }
private void HighlightComboBoxColor(CustomComboBox cmbBox) { cmbBox.BorderBrush = (Brush) new BrushConverter().ConvertFrom((object)"Red"); }
private void customComboBox_Expression_Enter(object sender, EventArgs e) { CustomComboBox _customComboBox = (CustomComboBox)sender; _customComboBox.BackColor = this.customComboBox_Expression_BackColor; }
void IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.mScrollBar = (ScrollViewer)target; break; case 2: this.mProfileLoader = (Border)target; break; case 3: this.mNoInternetWarning = (Border)target; break; case 4: this.mChildGrid = (Grid)target; break; case 5: this.mChooseProfile = (CustomRadioButton)target; this.mChooseProfile.Checked += new RoutedEventHandler(this.Profile_Checked); break; case 6: this.mPredefinedProfilesComboBox = (CustomComboBox)target; this.mPredefinedProfilesComboBox.SelectionChanged += new SelectionChangedEventHandler(this.mPredefinedProfilesComboBox_SelectionChanged); break; case 7: this.mCustomProfile = (CustomRadioButton)target; this.mCustomProfile.Checked += new RoutedEventHandler(this.Profile_Checked); break; case 8: this.mCustomProfileGrid = (Grid)target; break; case 9: this.mManufacturerTextBox = (CustomTextBox)target; break; case 10: this.mBrandTextBox = (CustomTextBox)target; break; case 11: this.mModelNumberTextBox = (CustomTextBox)target; break; case 12: this.mTryAgainBtnGrid = (Grid)target; break; case 13: ((ButtonBase)target).Click += new RoutedEventHandler(this.TryAgainBtn_Click); break; case 14: this.mMobileOperatorGrid = (Grid)target; break; case 15: this.mMobileOpertorText = (TextBlock)target; break; case 16: this.mMobileNetworkSetupText = (TextBlock)target; break; case 17: this.mMobileOperatorsCombobox = (CustomComboBox)target; this.mMobileOperatorsCombobox.SelectionChanged += new SelectionChangedEventHandler(this.MobileOperatorsCombobox_SelectionChanged); break; case 18: this.mRootAccessGrid = (Grid)target; break; case 19: this.mEnableRootAccessCheckBox = (CustomCheckbox)target; this.mEnableRootAccessCheckBox.Click += new RoutedEventHandler(this.mEnableRootAccessCheckBox_Click); break; case 20: this.mInfoIcon = (CustomPictureBox)target; break; case 21: this.mSaveChangesBtn = (CustomButton)target; this.mSaveChangesBtn.Click += new RoutedEventHandler(this.SaveChangesBtn_Click); break; default: this._contentLoaded = true; break; } }
void IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 2: this.mBorder = (Border)target; break; case 3: ((UIElement)target).MouseLeftButtonDown += new MouseButtonEventHandler(this.TitleMouseButonDown); break; case 4: this.CloseBtn = (CustomPictureBox)target; this.CloseBtn.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(this.CloseBtn_MouseLeftButtonUp); break; case 5: this.label = (TextBlock)target; break; case 6: this.mGifGrid = (StackPanel)target; break; case 7: this.mLoadingImage = (Image)target; break; case 8: this.mCategoryStackPanel = (StackPanel)target; break; case 9: this.mCategoryTextBlock = (TextBlock)target; break; case 10: this.mCategoryComboBox = (CustomComboBox)target; this.mCategoryComboBox.PreviewMouseDown += new MouseButtonEventHandler(this.mCategoryComboBox_PreviewMouseDown); this.mCategoryComboBox.SelectionChanged += new SelectionChangedEventHandler(this.CategoryChanged); break; case 11: this.mSubCategoryStackPanel = (StackPanel)target; break; case 12: this.mSubCategoryTextBlock = (TextBlock)target; break; case 13: this.mSubCategoryCombobox = (CustomComboBox)target; this.mSubCategoryCombobox.PreviewMouseDown += new MouseButtonEventHandler(this.mSubCategoryCombobox_PreviewMouseDown); this.mSubCategoryCombobox.SelectionChanged += new SelectionChangedEventHandler(this.SubCategoryChanged); break; case 14: this.mAppDetailsTextBlock = (TextBlock)target; break; case 15: this.mAppNameTitle = (TextBlock)target; break; case 16: this.mAppListComboBox = (CustomComboBox)target; this.mAppListComboBox.PreviewMouseDown += new MouseButtonEventHandler(this.mAppListComboBox_PreviewMouseDown); break; case 17: this.mAppNameGrid = (Grid)target; break; case 18: this.mAppNameTextBox = (CustomTextBox)target; break; case 19: this.mDescribeProblemTextBlock = (TextBlock)target; break; case 20: this.mDescribeProblemTextBox = (CustomTextBox)target; this.mDescribeProblemTextBox.GotKeyboardFocus += new KeyboardFocusChangedEventHandler(this.DescribeProblemTextBox_GotKeyboardFocus); break; case 21: this.mChooseButton = (CustomButton)target; this.mChooseButton.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(this.mChooseButton_PreviewMouseLeftButtonUp); break; case 22: this.mAttachedFilesListBox = (ListBox)target; break; case 23: this.mEmailTextBlock = (TextBlock)target; break; case 24: this.mEmailTextBox = (CustomTextBox)target; this.mEmailTextBox.GotKeyboardFocus += new KeyboardFocusChangedEventHandler(this.EmailTextBox_GotKeyboardFocus); break; case 25: this.mAlIOemsCheckbox = (CustomCheckbox)target; this.mAlIOemsCheckbox.Unchecked += new RoutedEventHandler(this.mAllInstancesCheckbox_Unchecked); break; case 26: this.mHelpIcon = (CustomPictureBox)target; this.mHelpIcon.MouseDown += new MouseButtonEventHandler(this.CustomPictureBox_MouseDown); break; case 27: this.mStartAllOemsCheckbox = (CustomCheckbox)target; break; case 28: this.mBtn = (CustomButton)target; this.mBtn.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(this.mSubmitBtn_PreviewMouseLeftButtonUp); break; default: this._contentLoaded = true; break; } }