Пример #1
0
        private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (closing)
            {
                SteamContext.Shutdown();
                return;
            }

            e.Cancel = true;
            this.Hide();
        }
Пример #2
0
        void AttachSteam()
        {
            Log("Trying to attach Steam...");

            try
            {
                SteamContext.Init();

                lblSteam.Text          = "Steam Status: Ready";
                btnSteamAttach.Enabled = false;

                Log("Done!");
            }
            catch (SteamException ex)
            {
                lblSteam.Text          = string.Format("Steam Status: Error: {0}", ex.Message);
                btnSteamAttach.Enabled = true;

                Log("Error: {0}", ex);
            }
        }