예제 #1
0
        private void ProfileTile_ItemClick(object sender, TileItemEventArgs e)
        {
            var tag = (TileTag)e.Item.Tag;

            try
            {
                Cursor = Cursors.WaitCursor;
                WindowsTaskbarHelper.SetProgressState(TaskbarButtonProgressMode.Indeterminate);
                mainForm.ShowWaitForm("Signing in...");
                tag.Profile.SignIn(0);
                SignedInProfile = tag.Profile;
                Cursor          = Cursors.Default;
                WindowsTaskbarHelper.SetProgressState(TaskbarButtonProgressMode.NoProgress);
                mainForm.CloseWaitForm();
                Close();
            }
            catch (Exception ex)
            {
                Cursor = Cursors.Default;
                WindowsTaskbarHelper.SetProgressState(TaskbarButtonProgressMode.Error);
                mainForm.CloseWaitForm();
                XtraMessageBox.Show(string.Format("{0} failed to sign in.{1}{2}", tag.Profile.Gamertag, Environment.NewLine, ex.Message), "DevTool Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            WindowsTaskbarHelper.SetProgressState(TaskbarButtonProgressMode.NoProgress);
        }
예제 #2
0
 private void DrivePathEdit_ButtonClick(object sender, ButtonPressedEventArgs e)
 {
     try
     {
         Cursor = Cursors.WaitCursor;
         WindowsTaskbarHelper.SetProgressState(TaskbarButtonProgressMode.Indeterminate);
         mainForm.ShowWaitForm("Listing mounted packages...");
         var sb = new StringBuilder();
         sb.AppendLine("These packages are currently mounted and can be accessed. You do not have write access to PIRS/LIVE packages. Console signed volumes will continue to expand until their maximum size (4 GB) is reached.");
         sb.AppendLine();
         foreach (var package in drives.GetMountedPackageDeviceNames())
         {
             sb.AppendLine(package.Key);
             sb.AppendLine(package.Value);
         }
         Cursor = Cursors.Default;
         WindowsTaskbarHelper.SetProgressState(TaskbarButtonProgressMode.NoProgress);
         mainForm.CloseWaitForm();
         using (var txtdf = new TextDisplayForm("Mounted Packages", sb)) txtdf.ShowDialog();
     }
     catch (Exception ex)
     {
         Cursor = Cursors.Default;
         WindowsTaskbarHelper.SetProgressState(TaskbarButtonProgressMode.Error);
         mainForm.CloseWaitForm();
         XtraMessageBox.Show("Failed to list the mounted package structures." + Environment.NewLine + XDKUtilities.CreateExceptionMessage(ex, manager), "DevTool Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     WindowsTaskbarHelper.SetProgressState(TaskbarButtonProgressMode.NoProgress);
 }
예제 #3
0
        protected override void Execute(SessionRecording recording, ShowDesktopActionSettings settings)
        {
            if (settings.MinimizeAll)
            {
                TryMinimizeAllWindows();
            }

            if (settings.ShowTaskbar.HasValue)
            {
                var taskbar = new WindowsTaskbarHelper();
                _taskbar = taskbar;
                if (settings.ShowTaskbar.Value)
                {
                    Task.Run(() => taskbar.Show()).Forget();
                }
                else
                {
                    Task.Run(() => taskbar.Hide()).Forget();
                }
            }
        }