code formatting
This commit is contained in:
1 parent
6a3711e6e0
commit
5afb569d11
43 files changed
+200
-287
No files matched your search
@@ -400,27 +400,15 @@ namespace Microsoft.Windows.Shell
|
||||
TBPF tbpFlags = TBPF.NOPROGRESS;
|
||||
if (attached)
|
||||
{
|
||||
switch (progressState)
|
||||
tbpFlags = progressState switch
|
||||
{
|
||||
case TaskbarItemProgressState.None:
|
||||
tbpFlags = TBPF.NOPROGRESS;
|
||||
break;
|
||||
case TaskbarItemProgressState.Indeterminate:
|
||||
tbpFlags = TBPF.INDETERMINATE;
|
||||
break;
|
||||
case TaskbarItemProgressState.Normal:
|
||||
tbpFlags = TBPF.NORMAL;
|
||||
break;
|
||||
case TaskbarItemProgressState.Error:
|
||||
tbpFlags = TBPF.ERROR;
|
||||
break;
|
||||
case TaskbarItemProgressState.Paused:
|
||||
tbpFlags = TBPF.PAUSED;
|
||||
break;
|
||||
default:
|
||||
tbpFlags = TBPF.NOPROGRESS;
|
||||
break;
|
||||
}
|
||||
TaskbarItemProgressState.None => TBPF.NOPROGRESS,
|
||||
TaskbarItemProgressState.Indeterminate => TBPF.INDETERMINATE,
|
||||
TaskbarItemProgressState.Normal => TBPF.NORMAL,
|
||||
TaskbarItemProgressState.Error => TBPF.ERROR,
|
||||
TaskbarItemProgressState.Paused => TBPF.PAUSED,
|
||||
_ => TBPF.NOPROGRESS
|
||||
};
|
||||
}
|
||||
HRESULT result = this._taskbarList.SetProgressState(this._hwndSource.Handle, tbpFlags);
|
||||
if (result.Succeeded)
|
||||
|
||||
@@ -433,15 +433,12 @@ namespace Microsoft.Windows.Shell
|
||||
private WindowState _GetHwndState()
|
||||
{
|
||||
WINDOWPLACEMENT windowPlacement = NativeMethods.GetWindowPlacement(this._hwnd);
|
||||
switch (windowPlacement.showCmd)
|
||||
return windowPlacement.showCmd switch
|
||||
{
|
||||
case SW.SHOWMINIMIZED:
|
||||
return WindowState.Minimized;
|
||||
case SW.SHOWMAXIMIZED:
|
||||
return WindowState.Maximized;
|
||||
default:
|
||||
return WindowState.Normal;
|
||||
}
|
||||
SW.SHOWMINIMIZED => WindowState.Minimized,
|
||||
SW.SHOWMAXIMIZED => WindowState.Maximized,
|
||||
_ => WindowState.Normal
|
||||
};
|
||||
}
|
||||
|
||||
private Rect _GetWindowRect()
|
||||
|
||||
Reference in new issue
Block a user