コード例 #1
0
 public Wzd_NewEmu_Info(Emulator emu)
 {
     InitializeComponent();
     platformComboBox.DisplayMember = "Text";
     platformComboBox.DataSource    = Dropdowns.GetSystems();
     txt_Title.Text = "New Emulator";
     this.Emulator  = emu;
 }
コード例 #2
0
 public Conf_EmuBrowser()
 {
     InitializeComponent();
     platformComboBox.DisplayMember = "Text";
     platformComboBox.DataSource    = Dropdowns.GetSystems();
     addEventHandlers();
     setupToolTip();
 }
コード例 #3
0
        private void updateEmuBox()
        {
            int prevSelected = -2;

            if (emuComboBox.SelectedItem != null)
            {
                prevSelected = ((ComboBoxItem)emuComboBox.SelectedItem).ID;
            }

            emuComboBox.SelectedIndexChanged -= new EventHandler(emuComboBox_SelectedIndexChanged);

            emuComboBox.BeginUpdate();
            emuComboBox.Items.Clear();
            foreach (ComboBoxItem item in Dropdowns.GetEmuComboBoxItems())
            {
                emuComboBox.Items.Add(item);
            }

            bool found = false;

            if (prevSelected != -2)
            {
                for (int x = 0; x < emuComboBox.Items.Count; x++)
                {
                    if (((ComboBoxItem)emuComboBox.Items[x]).ID == prevSelected)
                    {
                        emuComboBox.SelectedIndex = x;
                        found = true;
                        break;
                    }
                }
            }

            if (!found && emuComboBox.Items.Count > 0)
            {
                emuComboBox.SelectedIndex = 0;
            }

            emuComboBox.EndUpdate();
            emuComboBox.SelectedIndexChanged += new EventHandler(emuComboBox_SelectedIndexChanged);

            emuComboBox_SelectedIndexChanged(emuComboBox, new EventArgs());
        }
コード例 #4
0
        void initEmuBox()
        {
            bool selected = false;

            emuComboBox.Items.Clear();
            foreach (ComboBoxItem item in Dropdowns.GetNewRomComboBoxItems())
            {
                emuComboBox.Items.Add(item);
                if (!selected && item.ID == Emulator.GetPC().UID)
                {
                    emuComboBox.SelectedItem = item;
                    selected = true;
                }
            }
            if (!selected && emuComboBox.Items.Count > 0)
            {
                emuComboBox.SelectedItem = emuComboBox.Items[0];
            }

            emuComboBox.SelectedIndexChanged += new EventHandler(emuComboBox_SelectedIndexChanged);
            updateArgsVisibilty();
        }