private void NewN64PluginSettings_Load(object sender, EventArgs e)
        {
            s  = GetSettings();
            ss = GetSyncSettings();

            CoreTypeDropdown.PopulateFromEnum <N64SyncSettings.CoreType>(ss.Core);
            RspTypeDropdown.PopulateFromEnum <N64SyncSettings.RspType>(ss.Rsp);
            PluginComboBox.PopulateFromEnum <PluginType>(ss.VideoPlugin);

            VideoResolutionXTextBox.Text = s.VideoSizeX.ToString();
            VideoResolutionYTextBox.Text = s.VideoSizeY.ToString();

            var video_setting = s.VideoSizeX
                                + " x "
                                + s.VideoSizeY;

            var index = VideoResolutionComboBox.Items.IndexOf(video_setting);

            if (index >= 0)
            {
                VideoResolutionComboBox.SelectedIndex = index;
            }
            else if (PluginComboBox.SelectedIndex != 4)
            {
                VideoResolutionComboBox.SelectedIndex = 13;
                ShowCustomVideoResolutionControls();
            }

            RicePropertyGrid.SelectedObject     = ss.RicePlugin;
            Glidemk2PropertyGrid.SelectedObject = ss.Glide64mk2Plugin;
            GlidePropertyGrid.SelectedObject    = ss.GlidePlugin;
            JaboPropertyGrid.SelectedObject     = ss.JaboPlugin;
        }
示例#2
0
文件: Form1.cs 项目: NaStacy/ootpisp
        private void PluginComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            string pluginName = PluginComboBox.GetItemText(PluginComboBox.SelectedItem);

            factory = plugin.GetPlugin(pluginName);
            creator = (ICreate)Activator.CreateInstance(factory);
        }
示例#3
0
        private void PluginComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            string pluginName = PluginComboBox.GetItemText(PluginComboBox.SelectedItem);

            currentFactory = plugin.GetPluginType(pluginName);
            currentCreator = (ICreator)Activator.CreateInstance(currentFactory);
            currentFigure  = currentCreator.Create(color, fillColor, penWidth);

            StateChange(currentCreator);
        }