public static void RetrieveStatus()
        {
            Console.WriteLine(@"Attempting to read 'Rocksmith.ini'...");
            Console.WriteLine("\n");
            GameCheck.CheckFile(); // We make sure that the file exists
            string text = File.ReadAllText(GameCheck.defaultpath);

            if (text.Contains("ExclusiveMode=1"))
            {
                MessageBox.Show("Exclusive Mode is currently enabled.",
                                "Exclusive Mode Status",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Information,
                                MessageBoxDefaultButton.Button1,
                                MessageBoxOptions.ServiceNotification); // Gives focus to the message.
            }
            else
            {
                MessageBox.Show("Exclusive Mode is currently disabled.",
                                "Exclusive Mode Status",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Information,
                                MessageBoxDefaultButton.Button1,
                                MessageBoxOptions.ServiceNotification); // Gives focus to the message.
            }
        }
        public static void Start()
        {
            Console.WriteLine(@"Attempting to read 'Rocksmith.ini'...");
            Console.WriteLine("\n");
            GameCheck.CheckFile(); // We make sure that the path exists and is the correct one.
            string text = File.ReadAllText(GameCheck.defaultpath);

            if (text.Contains("ExclusiveMode=1")) // We want to look for the "ExclusiveMode" line in particular.
            {
                text = text.Replace("ExclusiveMode=1", "ExclusiveMode=0");
                File.WriteAllText(GameCheck.defaultpath, text);
                MessageBox.Show("Exclusive Mode has been disabled. You should now be able to stream properly!",
                                "Success!",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Information,
                                MessageBoxDefaultButton.Button1,
                                MessageBoxOptions.ServiceNotification); // Gives focus to the message.
            }
            else
            {
                text = text.Replace("ExclusiveMode=0", "ExclusiveMode=1");
                File.WriteAllText(GameCheck.defaultpath, text);
                MessageBox.Show("Exclusive Mode has been enabled. Enjoy minimal latency!",
                                "Success!",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Information,
                                MessageBoxDefaultButton.Button1,
                                MessageBoxOptions.ServiceNotification); // Gives focus to the message.
            }
        }
 public static void CreateSaveDirectory(string rocksmithINILocation, string rocksmithEXELocation)
 {
     GameCheck.CheckFile();
     File.WriteAllText(@settingsFile, "inipath=" + rocksmithINILocation + "\n");
     GameCheck.CheckGame();
     File.WriteAllText(@settingsFile, File.ReadAllText(@settingsFile) + "gamepath=" + rocksmithEXELocation + "\n");
 }
Example #4
0
        public static void Start()
        {
            Console.WriteLine(@"Attempting to read 'Rocksmith.ini'...");
            Console.WriteLine("\n");
            GameCheck.LoadPreviousSaveDirectory();
            if (File.Exists(GameCheck.inipath))
            {
                string text = File.ReadAllText(GameCheck.inipath);

                if (text.Contains("ExclusiveMode=1"))
                {
                    text = text.Replace("ExclusiveMode=1", "ExclusiveMode=0");
                    File.WriteAllText(GameCheck.inipath, text);
                    MessageBox.Show("Exclusive Mode has been disabled. You should now be able to stream properly!",
                                    "Success!",
                                    MessageBoxButtons.OK,
                                    MessageBoxIcon.Information,
                                    MessageBoxDefaultButton.Button1,
                                    MessageBoxOptions.ServiceNotification); // Gives focus to the message.
                    RefreshForm.RefreshExclusivityMode();
                }
                else
                {
                    text = text.Replace("ExclusiveMode=0", "ExclusiveMode=1");
                    File.WriteAllText(GameCheck.inipath, text);
                    MessageBox.Show("Exclusive Mode has been enabled. Enjoy minimal latency!",
                                    "Success!",
                                    MessageBoxButtons.OK,
                                    MessageBoxIcon.Information,
                                    MessageBoxDefaultButton.Button1,
                                    MessageBoxOptions.ServiceNotification); // Gives focus to the message.
                    RefreshForm.RefreshExclusivityMode();
                }
            }
            else
            {
                GameCheck.CheckFile();
                GameCheck.CheckGame();
            }
        }
Example #5
0
 public static void launchGame()
 {
     GameCheck.CheckGame();
     System.Diagnostics.Process.Start("steam://run/221680"); // Tells Steam to launch the game regardless of path
 }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.button1 = new System.Windows.Forms.Button();
     this.button2 = new System.Windows.Forms.Button();
     this.button3 = new System.Windows.Forms.Button();
     this.SuspendLayout();
     //
     // button1
     //
     this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
     this.button1.Font         = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.button1.ForeColor    = System.Drawing.Color.Black;
     this.button1.Location     = new System.Drawing.Point(135, 50);
     this.button1.Name         = "button1";
     this.button1.Size         = new System.Drawing.Size(160, 136);
     this.button1.TabIndex     = 1;
     this.button1.TabStop      = false;
     GameCheck.LoadPreviousSaveDirectory();
     if (File.Exists(GameCheck.inipath))
     {
         if (File.ReadAllText(GameCheck.inipath).Contains("ExclusiveMode=1"))
         {
             this.button1.Text = "TURN OFF EXCLUSIVE MODE";
         }
         else if (File.ReadAllText(GameCheck.inipath).Contains("ExclusiveMode=0"))
         {
             this.button1.Text = "TURN ON EXCLUSIVE MODE";
         }
     }
     else
     {
         GameCheck.CheckFile();
         GameCheck.CheckGame();
     }
     this.button1.UseVisualStyleBackColor = true;
     this.button1.Click += new System.EventHandler(this.Button1_Click);
     //
     // button2
     //
     this.button2.Font      = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.button2.ForeColor = System.Drawing.Color.Black;
     this.button2.Location  = new System.Drawing.Point(343, 50);
     this.button2.Name      = "button2";
     this.button2.Size      = new System.Drawing.Size(164, 136);
     this.button2.TabIndex  = 2;
     this.button2.Text      = "STATUS";
     this.button2.UseVisualStyleBackColor = true;
     this.button2.Click += new System.EventHandler(this.Button2_Click);
     //
     // button3
     //
     this.button3.Font      = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.button3.ForeColor = System.Drawing.Color.Black;
     this.button3.Location  = new System.Drawing.Point(135, 206);
     this.button3.Name      = "button3";
     this.button3.Size      = new System.Drawing.Size(372, 44);
     this.button3.TabIndex  = 3;
     this.button3.Text      = "LAUNCH THE GAME";
     this.button3.UseVisualStyleBackColor = true;
     this.button3.Click += new System.EventHandler(this.Button3_Click);
     //
     // Form1
     //
     this.AcceptButton        = this.button1;
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.BackColor           = System.Drawing.SystemColors.ActiveBorder;
     this.ClientSize          = new System.Drawing.Size(638, 303);
     this.Controls.Add(this.button3);
     this.Controls.Add(this.button2);
     this.Controls.Add(this.button1);
     this.ForeColor       = System.Drawing.Color.Lime;
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
     this.Name            = "Form1";
     this.StartPosition   = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text            = "Rocksmith 2014 Exclusive Mode Settings";
     this.Load           += new System.EventHandler(this.Form1_Load);
     this.ResumeLayout(false);
 }
Example #7
0
 public static void LaunchRocksmith2014()
 {
     GameCheck.LoadPreviousSaveDirectory();
     System.Diagnostics.Process.Start("steam://run/221680");
 }