Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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);
            }
        }