示例#1
0
        private void btnEnableGamepadMapper_Click(object sender, EventArgs e)
        {
            string launcherText = File.ReadAllText(Launcher.rootDir + "nullDCNetplayLauncher\\launcher.cfg");

            string[] cfgLines    = File.ReadAllLines(Launcher.rootDir + "nulldc-1-0-4-en-win\\nullDC.cfg");
            string   cfgText     = File.ReadAllText(Launcher.rootDir + "nulldc-1-0-4-en-win\\nullDC.cfg");
            var      player1_old = cfgLines.Where(s => s.Contains("player1=")).ToList().First();

            launcherText = launcherText.Replace("launch_antimicro=0", "launch_antimicro=1");
            cfgText      = cfgText.Replace(player1_old, "player1=keyboard");
            Launcher.LaunchAntiMicro();
            File.WriteAllText(Launcher.rootDir + "nullDCNetplayLauncher\\launcher.cfg", launcherText);
            File.WriteAllText(Launcher.rootDir + "nulldc-1-0-4-en-win\\nullDC.cfg", cfgText);
        }
示例#2
0
        private void joystickBgWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            //ui update
            string launcherText = File.ReadAllText(Launcher.rootDir + "nullDCNetplayLauncher\\launcher.cfg");

            string[] cfgLines    = File.ReadAllLines(Launcher.rootDir + "nulldc-1-0-4-en-win\\nullDC.cfg");
            string   cfgText     = File.ReadAllText(Launcher.rootDir + "nulldc-1-0-4-en-win\\nullDC.cfg");
            var      player1_old = cfgLines.Where(s => s.Contains("player1=")).ToList().First();

            if (ZDetected)
            {
                launcherText = launcherText.Replace("launch_antimicro=0", "launch_antimicro=1");
                cfgText      = cfgText.Replace(player1_old, "player1=keyboard");
                Launcher.LaunchAntiMicro(hidden: true);

                ClearArcadeStick();
                lblController.Text = "Z-Axis Trigger Detected. Gamepad Mapper Enabled.\n\nSet your controls in AntiMicro to match the current keyboard mapping and minimize.\n\nClick \"Play Offline\" to test your controls.";
                hideAllButtons();
                showLaunchAntimicroButtons();
            }
            else
            {
                launcherText = launcherText.Replace("launch_antimicro=1", "launch_antimicro=0");
                cfgText      = cfgText.Replace(player1_old, "player1=joy1");
                Launcher.KillAntiMicro();

                File.WriteAllText(Launcher.rootDir + "nulldc-1-0-4-en-win//qkoJAMMA//" + JoystickName + ".qjc", ButtonAssignmentText);

                picArcadeStick.Image = global::nullDCNetplayLauncher.Properties.Resources.base_full;
                lblController.Size   = new System.Drawing.Size(286, 114);
                lblController.Text   = $"\nNew qkoJAMMA Profile \"{JoystickName}\" Created\n\nExit any old instances of NullDC and \nclick \"Play Offline\" to test your controls.";
                hideAllButtons();
                btnSkip.Enabled   = false;
                btnCancel.Enabled = false;
                btnSetup.Enabled  = true;
            }
            File.WriteAllText(Launcher.rootDir + "nullDCNetplayLauncher\\launcher.cfg", launcherText);
            File.WriteAllText(Launcher.rootDir + "nulldc-1-0-4-en-win\\nullDC.cfg", cfgText);
        }
示例#3
0
 private void btnLaunchAntimicro_Click(object sender, EventArgs e)
 {
     Launcher.LaunchAntiMicro();
 }