Esempio n. 1
0
        public GameRunHandler(GameTemplate Game, MainForm MainForm)
        {
            this.Game     = Game;
            this.MainForm = MainForm;

            FilesNeeded = new List <string>();
            if (this.Game.x86)
            {
                FilesNeeded.Add(@"\x360ce\x86\x360ce.exe");
                FilesNeeded.Add(@"\x360ce\x86\dinput_x86.dll");
                FilesNeeded.Add(@"\x360ce\x86\xinput1_1.dll");
                FilesNeeded.Add(@"\x360ce\x86\xinput1_2.dll");
                FilesNeeded.Add(@"\x360ce\x86\xinput1_3.dll");
                FilesNeeded.Add(@"\x360ce\x86\xinput1_4.dll");
                FilesNeeded.Add(@"\x360ce\x86\xinput9_1_0.dll");
            }
            else
            {
                FilesNeeded.Add(@"\x360ce\x64\x360ce_x64.exe");
                FilesNeeded.Add(@"\x360ce\x64\dinput_x64.dll");
                FilesNeeded.Add(@"\x360ce\x64\xinput1_1.dll");
                FilesNeeded.Add(@"\x360ce\x64\xinput1_2.dll");
                FilesNeeded.Add(@"\x360ce\x64\xinput1_3.dll");
                FilesNeeded.Add(@"\x360ce\x64\xinput1_4.dll");
                FilesNeeded.Add(@"\x360ce\x64\xinput9_1_0.dll");
            }
            FilesNeeded.Add(@"\x360ce\x360ce.ini");
        }
Esempio n. 2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            string path      = System.Reflection.Assembly.GetExecutingAssembly().Location;
            var    directory = System.IO.Path.GetDirectoryName(path);

            try
            {
                string[] read = File.ReadAllLines(directory + @"\Games.cfg");

                int n = read.Length / 4;

                for (int i = 0; i < n; i++)
                {
                    GameTemplate game = new GameTemplate();
                    game.Name      = read[i * 4];
                    game.Directory = read[(i * 4) + 1];
                    game.x86       = Convert.ToBoolean(read[(i * 4) + 2]);
                    game.Keepfiles = Convert.ToBoolean(read[(i * 4) + 3]);
                    gamesListBox.Items.Add(game);
                }
            }
            catch (Exception ex)
            {
                //TODO:Logging!!!!
            }
        }
Esempio n. 3
0
 private void cleanButton_Click(object sender, EventArgs e)
 {
     if (gamesListBox.SelectedItems.Count > 0)
     {
         GameTemplate   game    = gamesListBox.SelectedItem as GameTemplate;
         GameRunHandler Handler = new GameRunHandler(game, this);
         Handler.Clean(false);
     }
 }
Esempio n. 4
0
 private void gamesListBox_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     if (gamesListBox.SelectedItems.Count > 0)
     {
         GameTemplate   game    = gamesListBox.SelectedItem as GameTemplate;
         GameRunHandler Handler = new GameRunHandler(game, this);
         Handler.Start();
     }
 }
Esempio n. 5
0
 private void runButton_Click(object sender, EventArgs e)
 {
     if (gamesListBox.SelectedItems.Count > 0)
     {
         GameTemplate game   = gamesListBox.SelectedItem as GameTemplate;
         GameForm     dialog = new GameForm(game);
         dialog.ShowDialog(this);
         gamesListBox.Items[gamesListBox.SelectedIndex] = dialog.Game;
     }
 }
Esempio n. 6
0
 public GameForm(GameTemplate game)
 {
     InitializeComponent();
     nameTextBox.Text      = game.Name;
     directoryTextBox.Text = game.Directory;
     if (game.x86)
     {
         x86RadioButton.Checked = true;
     }
     else
     {
         x64RadioButton.Checked = true;
     }
     cleanCheckBox.Checked = !game.Keepfiles;
     this.Game             = game;
 }
Esempio n. 7
0
 public GameForm()
 {
     InitializeComponent();
     Game = new GameTemplate();
 }