2011-10-31 05:36:24 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using ANX.Framework.NonXNA;
|
|
|
|
|
using ANX.Framework;
|
2012-09-30 11:24:57 +00:00
|
|
|
|
using ANX.Framework.NonXNA.SoundSystem;
|
2011-10-31 05:36:24 +00:00
|
|
|
|
|
|
|
|
|
namespace WindowsGame1
|
|
|
|
|
{
|
|
|
|
|
public partial class AddInSelector : Form
|
|
|
|
|
{
|
|
|
|
|
public AddInSelector()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
|
|
|
|
pictureBox1.Image = Resource1.Logo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void AddInSelector_Load(object sender, EventArgs e)
|
|
|
|
|
{
|
2011-12-15 14:58:56 +00:00
|
|
|
|
AddInSystemFactory.Instance.SortAddIns();
|
|
|
|
|
|
2012-09-17 09:35:16 +00:00
|
|
|
|
foreach (IRenderSystemCreator renderSystemCreator in AddInSystemFactory.Instance.GetAvailableCreators<IRenderSystemCreator>())
|
2011-10-31 05:36:24 +00:00
|
|
|
|
{
|
|
|
|
|
cbRenderSystem.Items.Add(renderSystemCreator.Name);
|
|
|
|
|
}
|
2012-09-17 09:35:16 +00:00
|
|
|
|
cbRenderSystem.SelectedItem = AddInSystemFactory.Instance.GetDefaultCreator<IRenderSystemCreator>().Name;
|
2011-10-31 05:36:24 +00:00
|
|
|
|
|
2015-10-18 13:37:39 +02:00
|
|
|
|
foreach (var providerName in InputDeviceFactory.Instance.Providers.Select((x) => x.Key))
|
2011-10-31 05:36:24 +00:00
|
|
|
|
{
|
2015-10-18 13:37:39 +02:00
|
|
|
|
cbInputSystem.Items.Add(providerName);
|
2011-10-31 05:36:24 +00:00
|
|
|
|
}
|
2015-10-18 13:37:39 +02:00
|
|
|
|
cbInputSystem.SelectedItem = InputDeviceFactory.Instance.Providers.Select((x) => x.Key).First();
|
2011-10-31 05:36:24 +00:00
|
|
|
|
|
2012-09-17 09:35:16 +00:00
|
|
|
|
foreach (ISoundSystemCreator soundSystemCreator in AddInSystemFactory.Instance.GetAvailableCreators<ISoundSystemCreator>())
|
2011-10-31 05:36:24 +00:00
|
|
|
|
{
|
|
|
|
|
cbAudioSystem.Items.Add(soundSystemCreator.Name);
|
|
|
|
|
}
|
2012-09-17 09:35:16 +00:00
|
|
|
|
cbAudioSystem.SelectedItem = AddInSystemFactory.Instance.GetDefaultCreator<ISoundSystemCreator>().Name;
|
2011-10-31 05:36:24 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void button1_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
this.DialogResult = System.Windows.Forms.DialogResult.OK;
|
|
|
|
|
this.Close();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|