Example #1
0
 public bool Connect()
 {
     try
     {
         XboxUtils.Connect();
         XboxUtils.ConfirmMessage("Successfully connected to console: " + XboxUtils.GetConsoleName());
         return(true);
     }
     catch (Exception exception)
     {
         XboxUtils.ErrorMessage(exception.Message);
         return(false);
     }
 }
Example #2
0
        public bool Disconnect()
        {
            if (!XboxUtils.IsConnected())
            {
                return(true);
            }

            try
            {
                string consoleName = XboxUtils.GetConsoleName();
                XboxUtils.Disconnect();
                XboxUtils.ConfirmMessage("Successfully disconnected from console: " + consoleName);
                return(true);
            }
            catch (Exception exception)
            {
                XboxUtils.ErrorMessage(exception.Message);
                return(false);
            }
        }