private void Fuck_Click(object sender, EventArgs e) { if (!m_gbIsSteamInitiated) { m_gConsole.MainConsole.AppendText("Steam API is not initiated, please input an AppID into the supplied text box.\n"); return; } m_gConsole.MainConsole.AppendText(CMemeworks.RequestUserStats()); }
private void RichButton_Click(object sender, EventArgs e) { if (!m_gbIsSteamInitiated) { m_gConsole.MainConsole.AppendText("Steam API is not initiated, please input an AppID into the supplied text box.\n"); return; } m_gConsole.MainConsole.AppendText(CMemeworks.SetPoorPresence(StatusInput.Text, ScoreInput.Text)); }
private void LockAllAchievements_Click(object sender, EventArgs e) { if (!m_gbIsSteamInitiated) { m_gConsole.MainConsole.AppendText("Steam API is not initiated, please input an AppID into the supplied text box.\n"); return; } m_gConsole.MainConsole.AppendText(CMemeworks.ClearAllAchievements()); }
private void InviteButton_Click(object sender, EventArgs e) { if (!m_gbIsSteamInitiated) { m_gConsole.MainConsole.AppendText("Steam API is not initiated, please input an AppID into the supplied text box.\n"); return; } m_gConsole.MainConsole.AppendText(CMemeworks.FakeInvite(TargetInput.Text, ConnectInput.Text)); }
private void UnlockSetAchievements_Click(object sender, EventArgs e) { try { int iNum = Int32.Parse(NumOfAchievements.Text); if (!m_gbIsSteamInitiated) { m_gConsole.MainConsole.AppendText("Steam API is not initiated, please input an AppID into the supplied text box.\n"); return; } m_gConsole.MainConsole.AppendText(CMemeworks.SetAchievementAmount(iNum)); } catch (FormatException exc) { //string strText = string.Format(exc.Message + "n"); m_gConsole.MainConsole.AppendText(exc.Message + "\n"); } }
private void AcceptButton_Click(object sender, EventArgs e) { string strPath = "steam_appid.txt"; string strText; // if there is no text in the "SteamAppID" text box, return if (SteamAppID.Text.Length == 0) { return; } if (m_gbIsSteamInitiated) { CMemeworks.Shutdown(); } // if "steam_appid.txt" does not exist if (!File.Exists(strPath)) { // create a new file named "steam_appid.txt" using the instance // we defined earlier, for StreamWriter // and then we use StreamWriter to put the supplied AppID from the // "SteamAppID" TextBox field, into the text file // this is required for SteamAPI to initiate using (m_gWriter = File.CreateText(strPath)) m_gWriter.Write(SteamAppID.Text); strText = string.Format("AppID file not found, creating a new one and setting the AppID as: {0}\n", SteamAppID.Text); m_gConsole.MainConsole.AppendText(strText); } else { // if the file exists, delete that C**T File.Create(strPath).Close(); // then create a new one :) // and write the AppID to it again // there's better ways to clear a text file, I was just // having stupid issues, so I took the easy way out using (m_gWriter = File.CreateText(strPath)) m_gWriter.Write(SteamAppID.Text); strText = string.Format("AppID file found, replacing with AppID: {0}\n", SteamAppID.Text); m_gConsole.MainConsole.AppendText(strText); } // using the wrapper we created to initiate the SteamAPI if (CMemeworks.Initiated()) { // if it succeeds, set the global variable to true m_gbIsSteamInitiated = true; } else { // if it fails, 99% of the time it's because of the AppID, so we just print this // bullshit out // and then set the global variable to false, as a second measure m_gConsole.MainConsole.AppendText("Input a valid AppID into the supplied text box.\n"); m_gbIsSteamInitiated = false; } }