コード例 #1
0
ファイル: MainWindow.cs プロジェクト: ohhsodead/AtomicX
        /// <summary>
        /// Disconnect from PS3 console
        /// </summary>
        private void DisconnectPS3()
        {
            try
            {
                PS3.DisconnectTarget();

                IsConsoleConnected = false;
                ConsoleType        = "";

                SetStatusConsole(null);
                EnableConsoleActions();

                MenuItemConnectPS3CCAPI.Visible      = true;
                MenuItemConnectPS3TMAPI.Visible      = true;
                MenuItemConnectPS3Disconnect.Visible = false;

                MenuItemConnectXBOX.Enabled    = true;
                MenuItemXBOXConnect.Visible    = true;
                MenuItemXBOXDisconnect.Visible = false;

                SetStatus("Successfully disconnected from console.");
                XtraMessageBox.Show(this, "Successfully disconnected from console", "Disconnected", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception ex)
            {
                SetStatus("Unable to disconnect from console - Error: " + ex.Message, ex);
                XtraMessageBox.Show(this, "Unable to disconnect from console.\\n\nError Message:\n " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }