private void Resolution_Change(object sender, SelectionChangedEventArgs e) { if (-1 == this.ResolutionBox.SelectedIndex) { return; } ComboBoxCustomItem comboBoxCustomItem = (ComboBoxCustomItem)this.ResolutionBox.SelectedItem; this.m_Setting.m_strSizeChoose = comboBoxCustomItem.text; this.m_Setting.m_nWidthChoose = comboBoxCustomItem.width; this.m_Setting.m_nHeightChoose = comboBoxCustomItem.height; }
private void setDisplayComboBox(bool _bFullScreen) { this.ResolutionBox.Items.Clear(); int nDisplay = this.m_Setting.m_nDisplay; foreach (MainWindow.DisplayMode displayMode in (_bFullScreen ? this.m_listCurrentDisplay[nDisplay].list : this.m_listDefaultDisplay)) { ComboBoxCustomItem newItem = new ComboBoxCustomItem { text = displayMode.text, width = displayMode.Width, height = displayMode.Height }; this.ResolutionBox.Items.Add(newItem); } }