Compare commits

..

1 Commits

Author SHA1 Message Date
MarioHewardt
2024b269a7 Experimental panoramic screen capture 2026-01-17 16:49:32 -08:00
52 changed files with 1706 additions and 2407 deletions

View File

@@ -39,7 +39,7 @@ namespace Microsoft.PowerToys.FilePreviewCommon
var softlineBreak = new Markdig.Extensions.Hardlines.SoftlineBreakAsHardlineExtension();
MarkdownPipelineBuilder pipelineBuilder;
pipelineBuilder = new MarkdownPipelineBuilder().UseAdvancedExtensions().UseEmojiAndSmiley().UseYamlFrontMatter().UseMathematics().DisableHtml();
pipelineBuilder = new MarkdownPipelineBuilder().UseAdvancedExtensions().UseEmojiAndSmiley().UseYamlFrontMatter().UseMathematics();
pipelineBuilder.Extensions.Add(extension);
pipelineBuilder.Extensions.Add(softlineBreak);

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,169 @@
//==============================================================================
//
// Zoomit
// Sysinternals - www.sysinternals.com
//
// Panoramic screenshot capture and stitching
//
//==============================================================================
#pragma once
#include <windows.h>
#include <vector>
#include <atomic>
#include <memory>
// WIL for unique handles
#include <wil/resource.h>
// Message to signal panorama capture stop (must match ZoomIt.h)
#define WM_USER_PANORAMA_STOP WM_USER+500
// Forward declarations
struct ID3D11Device;
struct ID3D11DeviceContext;
struct ID3D11Texture2D;
//----------------------------------------------------------------------------
// Structure to hold a captured frame with its position
//----------------------------------------------------------------------------
struct PanoramaFrame
{
std::vector<BYTE> pixels; // BGRA pixel data
int width; // Frame width
int height; // Frame height
int relativeX; // X position relative to first frame
int relativeY; // Y position relative to first frame
LONGLONG timestamp; // Capture timestamp
};
//----------------------------------------------------------------------------
// Structure for scroll offset detection result
//----------------------------------------------------------------------------
struct ScrollOffset
{
int dx; // Horizontal scroll amount
int dy; // Vertical scroll amount
double confidence; // Match confidence (0.0 - 1.0)
bool valid; // Whether a valid match was found
};
//----------------------------------------------------------------------------
// PanoramaCapture class - handles continuous capture and stitching
//----------------------------------------------------------------------------
class PanoramaCapture
{
public:
PanoramaCapture();
~PanoramaCapture();
// Start panorama capture mode with a selected rectangle
// Returns true if capture started successfully
bool Start(HWND ownerWindow, const RECT& captureRect);
// Stop capture and return stitched result as HBITMAP
// Caller is responsible for deleting the returned bitmap
HBITMAP Stop();
// Cancel capture without producing result
void Cancel();
// Check if capture is currently active
bool IsCapturing() const { return m_capturing; }
// Get the overlay window handle (for message routing)
HWND GetOverlayWindow() const { return m_overlayWindow.get(); }
// Get current frame count
size_t GetFrameCount() const { return m_frames.size(); }
// Force a frame capture (called by timer or manually)
void CaptureFrame();
private:
// Detect scroll direction and amount between two frames
// Uses normalized cross-correlation for accurate matching
ScrollOffset DetectScrollOffset(
const std::vector<BYTE>& frame1,
const std::vector<BYTE>& frame2,
int width, int height);
// Compute normalized cross-correlation between two image regions
double ComputeNCC(
const BYTE* img1, const BYTE* img2,
int width, int height, int stride,
int img1OffsetX, int img1OffsetY,
int img2OffsetX, int img2OffsetY,
int compareWidth, int compareHeight);
// Check if two frames are significantly different
bool FramesAreDifferent(
const std::vector<BYTE>& frame1,
const std::vector<BYTE>& frame2,
int width, int height);
// Stitch all captured frames into final panorama
HBITMAP StitchFrames();
// Blend a frame onto the canvas - only copy new (non-overlapping) content
void BlendFrameOntoCanvas(
BYTE* canvas, int canvasWidth, int canvasHeight,
const BYTE* frame, int frameWidth, int frameHeight,
int destX, int destY, int previousFrameBottom);
// Capture screen region to byte array
std::vector<BYTE> CaptureScreenRegion(const RECT& rect, int& outWidth, int& outHeight);
// Create and manage the overlay window
bool CreateOverlayWindow(HWND ownerWindow);
static LRESULT CALLBACK OverlayWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
LRESULT HandleOverlayMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
// Timer callback for periodic frame capture
static void CALLBACK TimerCallback(HWND hwnd, UINT msg, UINT_PTR idTimer, DWORD dwTime);
// Keyboard hook for ESC detection
static LRESULT CALLBACK KeyboardHookProc(int nCode, WPARAM wParam, LPARAM lParam);
bool InstallKeyboardHook();
void RemoveKeyboardHook();
private:
// Capture state
std::atomic<bool> m_capturing;
RECT m_captureRect;
HWND m_ownerWindow;
wil::unique_hwnd m_overlayWindow;
// Captured frames
std::vector<PanoramaFrame> m_frames;
std::vector<BYTE> m_previousFrame;
int m_previousWidth;
int m_previousHeight;
// Accumulated scroll offsets
int m_totalOffsetX;
int m_totalOffsetY;
// Timer for periodic capture
UINT_PTR m_timerID;
static const UINT CAPTURE_INTERVAL_MS = 100; // Capture every 100ms
// Detection parameters - reduced for performance
static const int SEARCH_RANGE_Y = 150; // Max vertical search range
static const int SEARCH_RANGE_X = 30; // Max horizontal search range
static const int SEARCH_STEP = 8; // Step size for search (larger = faster)
static const int STRIP_HEIGHT = 40; // Height of comparison strip
static const int MIN_SCROLL_THRESHOLD = 5; // Minimum pixels to consider as scroll
static const double MATCH_THRESHOLD; // NCC threshold for valid match
static const double DIFFERENCE_THRESHOLD; // Threshold for frame difference
// Window class name
static const wchar_t* OVERLAY_CLASS_NAME;
// Instance pointer for static callbacks
static PanoramaCapture* s_instance;
// Keyboard hook handle
HHOOK m_keyboardHook;
};

View File

@@ -66,10 +66,11 @@ type_pEnableThemeDialogTexture pEnableThemeDialogTexture;
#define WM_USER_MAGNIFY_CURSOR WM_USER+108
#define WM_USER_EXIT_MODE WM_USER+109
#define WM_USER_RELOAD_SETTINGS WM_USER+110
#define WM_USER_PANORAMA_STOP WM_USER+500
typedef struct _TYPED_KEY {
RECT rc;
struct _TYPED_KEY *Next;
struct _TYPED_KEY *Next;
} TYPED_KEY, *P_TYPED_KEY;
typedef struct _DRAW_UNDO {
@@ -108,17 +109,17 @@ typedef struct {
typedef BOOL (__stdcall *type_pGetMonitorInfo)(
HMONITOR hMonitor, // handle to display monitor
LPMONITORINFO lpmi // display monitor information
LPMONITORINFO lpmi // display monitor information
);
typedef HMONITOR (__stdcall *type_MonitorFromPoint)(
POINT pt, // point
POINT pt, // point
DWORD dwFlags // determine return value
);
typedef HRESULT (__stdcall *type_pSHAutoComplete)(
HWND hwndEdit,
DWORD dwFlags
DWORD dwFlags
);
// DPI awareness
@@ -151,7 +152,7 @@ typedef BOOL(__stdcall *type_pMagSetWindowFilterList)(
HWND* pHWND
);
typedef BOOL(__stdcall* type_pMagSetLensUseBitmapSmoothing)(
_In_ HWND,
_In_ HWND,
_In_ BOOL
);
typedef BOOL(__stdcall* type_MagSetFullscreenUseBitmapSmoothing)(
@@ -169,7 +170,7 @@ typedef BOOL(__stdcall *type_pGetPointerPenInfo)(
_Out_ POINTER_PEN_INFO *penInfo
);
typedef HRESULT (__stdcall *type_pDwmIsCompositionEnabled)(
typedef HRESULT (__stdcall *type_pDwmIsCompositionEnabled)(
BOOL *pfEnabled
);
@@ -182,7 +183,7 @@ typedef BOOL (__stdcall *type_pSetLayeredWindowAttributes)(
);
// Presentation mode check
typedef HRESULT (__stdcall *type_pSHQueryUserNotificationState)(
typedef HRESULT (__stdcall *type_pSHQueryUserNotificationState)(
QUERY_USER_NOTIFICATION_STATE *pQueryUserNotificationState
);

View File

@@ -241,6 +241,14 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="GifRecordingSession.cpp" />
<ClCompile Include="PanoramaCapture.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Use</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">Use</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">Use</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Use</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Use</PrecompiledHeader>
</ClCompile>
<ClCompile Include="pch.cpp" />
<ClCompile Include="SelectRectangle.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
@@ -296,6 +304,7 @@
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\common\sysinternals\Eula\Eula.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)..\ZoomItModuleInterface\Trace.h" />
<ClInclude Include="GifRecordingSession.h" />
<ClInclude Include="PanoramaCapture.h" />
<ClInclude Include="pch.h" />
<ClInclude Include="Registry.h" />
<ClInclude Include="resource.h" />

View File

@@ -57,6 +57,9 @@
<ClCompile Include="GifRecordingSession.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="PanoramaCapture.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Registry.h">
@@ -98,6 +101,9 @@
<ClInclude Include="ZoomItSettings.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="PanoramaCapture.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="GifRecordingSession.h">
<Filter>Header Files</Filter>
</ClInclude>

View File

@@ -17,6 +17,7 @@ DWORD g_BreakToggleKey = ((HOTKEYF_CONTROL) << 8)| '3';
DWORD g_DemoTypeToggleKey = ((HOTKEYF_CONTROL) << 8) | '7';
DWORD g_RecordToggleKey = ((HOTKEYF_CONTROL) << 8) | '5';
DWORD g_SnipToggleKey = ((HOTKEYF_CONTROL) << 8) | '6';
DWORD g_PanoramaToggleKey = ((HOTKEYF_CONTROL) << 8) | '9';
DWORD g_ShowExpiredTime = 1;
DWORD g_SliderZoomLevel = 3;
@@ -58,6 +59,7 @@ REG_SETTING RegSettings[] = {
{ L"DrawToggleKey", SETTING_TYPE_DWORD, 0, &g_DrawToggleKey, static_cast<DOUBLE>(g_DrawToggleKey) },
{ L"RecordToggleKey", SETTING_TYPE_DWORD, 0, &g_RecordToggleKey, static_cast<DOUBLE>(g_RecordToggleKey) },
{ L"SnipToggleKey", SETTING_TYPE_DWORD, 0, &g_SnipToggleKey, static_cast<DOUBLE>(g_SnipToggleKey) },
{ L"PanoramaToggleKey", SETTING_TYPE_DWORD, 0, &g_PanoramaToggleKey, static_cast<DOUBLE>(g_PanoramaToggleKey) },
{ L"PenColor", SETTING_TYPE_DWORD, 0, &g_PenColor, static_cast<DOUBLE>(g_PenColor) },
{ L"PenWidth", SETTING_TYPE_DWORD, 0, &g_RootPenWidth, static_cast<DOUBLE>(g_RootPenWidth) },
{ L"OptionsShown", SETTING_TYPE_BOOLEAN, 0, &g_OptionsShown, static_cast<DOUBLE>(g_OptionsShown) },

View File

@@ -85,6 +85,8 @@ COLORREF g_CustomColors[16];
#define DEMOTYPE_RESET_HOTKEY 11
#define RECORD_GIF_HOTKEY 12
#define RECORD_GIF_WINDOW_HOTKEY 13
#define PANORAMA_HOTKEY 14
#define PANORAMA_SAVE_HOTKEY 15
#define ZOOM_PAGE 0
#define LIVE_PAGE 1
@@ -148,6 +150,7 @@ DWORD g_BreakToggleMod;
DWORD g_DemoTypeToggleMod;
DWORD g_RecordToggleMod;
DWORD g_SnipToggleMod;
DWORD g_PanoramaToggleMod;
BOOLEAN g_ZoomOnLiveZoom = FALSE;
DWORD g_PenWidth = PEN_WIDTH;
@@ -186,6 +189,12 @@ std::wstring g_RecordingSaveLocationGIF;
winrt::IDirect3DDevice g_RecordDevice{ nullptr };
std::shared_ptr<VideoRecordingSession> g_RecordingSession = nullptr;
std::shared_ptr<GifRecordingSession> g_GifRecordingSession = nullptr;
// Panorama capture globals
BOOL g_PanoramaCapturing = FALSE;
std::unique_ptr<PanoramaCapture> g_PanoramaCapture = nullptr;
BOOL g_PanoramaSaveToFile = FALSE;
type_pGetMonitorInfo pGetMonitorInfo;
type_MonitorFromPoint pMonitorFromPoint;
type_pSHAutoComplete pSHAutoComplete;
@@ -1995,6 +2004,8 @@ void UnregisterAllHotkeys( HWND hWnd )
UnregisterHotKey( hWnd, DEMOTYPE_RESET_HOTKEY );
UnregisterHotKey( hWnd, RECORD_GIF_HOTKEY );
UnregisterHotKey( hWnd, RECORD_GIF_WINDOW_HOTKEY );
UnregisterHotKey( hWnd, PANORAMA_HOTKEY );
UnregisterHotKey( hWnd, PANORAMA_SAVE_HOTKEY );
}
//----------------------------------------------------------------------------
@@ -2027,6 +2038,16 @@ void RegisterAllHotkeys(HWND hWnd)
// Register CTRL+8 for GIF recording and CTRL+ALT+8 for GIF window recording
RegisterHotKey(hWnd, RECORD_GIF_HOTKEY, MOD_CONTROL | MOD_NOREPEAT, 568 && 0xFF);
RegisterHotKey(hWnd, RECORD_GIF_WINDOW_HOTKEY, MOD_CONTROL | MOD_ALT | MOD_NOREPEAT, 568 && 0xFF);
// Register panorama capture hotkeys
if (g_PanoramaToggleKey) {
OutputDebug( L"Registering PANORAMA_HOTKEY: key=0x%X, mod=0x%X\n", g_PanoramaToggleKey & 0xFF, g_PanoramaToggleMod );
BOOL reg1 = RegisterHotKey(hWnd, PANORAMA_HOTKEY, g_PanoramaToggleMod, g_PanoramaToggleKey & 0xFF);
BOOL reg2 = RegisterHotKey(hWnd, PANORAMA_SAVE_HOTKEY, (g_PanoramaToggleMod ^ MOD_SHIFT), g_PanoramaToggleKey & 0xFF);
OutputDebug( L"PANORAMA_HOTKEY registration result: %d, %d (LastError=%d)\n", reg1, reg2, GetLastError() );
} else {
OutputDebug( L"g_PanoramaToggleKey is 0, not registering panorama hotkey\n" );
}
}
@@ -3491,6 +3512,54 @@ inline auto CopyBytesFromTexture(winrt::com_ptr<ID3D11Texture2D> const& texture,
return bytes;
}
//----------------------------------------------------------------------------
//
// TextureToHBITMAP
//
// Convert ID3D11Texture2D to HBITMAP
//
//----------------------------------------------------------------------------
HBITMAP TextureToHBITMAP(winrt::com_ptr<ID3D11Texture2D> const& texture)
{
if (!texture)
{
return nullptr;
}
try
{
auto bytes = CopyBytesFromTexture(texture);
if (bytes.empty())
{
return nullptr;
}
D3D11_TEXTURE2D_DESC desc;
texture->GetDesc(&desc);
BITMAPINFO bitmapInfo = {};
bitmapInfo.bmiHeader.biSize = sizeof(bitmapInfo.bmiHeader);
bitmapInfo.bmiHeader.biWidth = desc.Width;
bitmapInfo.bmiHeader.biHeight = -static_cast<LONG>(desc.Height); // Top-down
bitmapInfo.bmiHeader.biPlanes = 1;
bitmapInfo.bmiHeader.biBitCount = 32;
bitmapInfo.bmiHeader.biCompression = BI_RGB;
void* bits = nullptr;
HBITMAP hBitmap = CreateDIBSection(nullptr, &bitmapInfo, DIB_RGB_COLORS, &bits, nullptr, 0);
if (hBitmap && bits)
{
CopyMemory(bits, bytes.data(), bytes.size());
}
return hBitmap;
}
catch (...)
{
return nullptr;
}
}
//----------------------------------------------------------------------------
//
@@ -3679,7 +3748,7 @@ winrt::fire_and_forget StartRecordingAsync( HWND hWnd, LPRECT rcCrop, HWND hWndR
static std::filesystem::path lastSaveFolder;
wil::unique_cotaskmem_string chosenFolderPath;
wil::com_ptr<IShellItem> currentSelectedFolder;
bool bFolderChanged = false;
bool bFolderChanged = false;
if (SUCCEEDED(saveDialog->GetFolder(currentSelectedFolder.put())))
{
if (SUCCEEDED(currentSelectedFolder->GetDisplayName(SIGDN_FILESYSPATH, chosenFolderPath.put())))
@@ -4109,6 +4178,8 @@ LRESULT APIENTRY MainWndProc(
g_DemoTypeToggleMod = GetKeyMod( g_DemoTypeToggleKey );
g_SnipToggleMod = GetKeyMod( g_SnipToggleKey );
g_RecordToggleMod = GetKeyMod( g_RecordToggleKey );
g_PanoramaToggleMod = GetKeyMod( g_PanoramaToggleKey );
OutputDebug( L"Panorama hotkey settings: g_PanoramaToggleKey=0x%X, g_PanoramaToggleMod=0x%X\n", g_PanoramaToggleKey, g_PanoramaToggleMod );
if( !g_OptionsShown && !g_StartedByPowerToys ) {
// First run should show options when running as standalone. If not running as standalone,
@@ -4174,6 +4245,19 @@ LRESULT APIENTRY MainWndProc(
APPNAME, MB_ICONERROR);
showOptions = TRUE;
}
// Register panorama hotkey at startup
if (g_PanoramaToggleKey) {
OutputDebug( L"Startup: Registering PANORAMA_HOTKEY: key=0x%X, mod=0x%X\n", g_PanoramaToggleKey & 0xFF, g_PanoramaToggleMod );
if (!RegisterHotKey(hWnd, PANORAMA_HOTKEY, g_PanoramaToggleMod, g_PanoramaToggleKey & 0xFF) ||
!RegisterHotKey(hWnd, PANORAMA_SAVE_HOTKEY, (g_PanoramaToggleMod ^ MOD_SHIFT), g_PanoramaToggleKey & 0xFF)) {
OutputDebug( L"Startup: PANORAMA_HOTKEY registration FAILED, LastError=%d\n", GetLastError() );
MessageBox(hWnd, L"The specified panorama hotkey is already in use.\nSelect a different panorama hotkey.",
APPNAME, MB_ICONERROR);
showOptions = TRUE;
} else {
OutputDebug( L"Startup: PANORAMA_HOTKEY registration SUCCESS\n" );
}
}
if( showOptions ) {
SendMessage( hWnd, WM_COMMAND, IDC_OPTIONS, 0 );
@@ -4188,6 +4272,7 @@ LRESULT APIENTRY MainWndProc(
return 0;
case WM_HOTKEY:
OutputDebug( L"WM_HOTKEY received: wParam=%d, lParam=0x%X\n", (int)wParam, (int)lParam );
if( g_RecordCropping == TRUE )
{
if( wParam != RECORD_CROP_HOTKEY )
@@ -4378,6 +4463,120 @@ LRESULT APIENTRY MainWndProc(
break;
}
case PANORAMA_SAVE_HOTKEY:
case PANORAMA_HOTKEY:
{
// Handle panorama capture hotkey
OutputDebug( L"PANORAMA_HOTKEY received, capturing=%d\n", g_PanoramaCapturing );
if( g_PanoramaCapturing )
{
// User pressed hotkey again or ESC - stop and process result
if( g_PanoramaCapture )
{
HBITMAP hResult = g_PanoramaCapture->Stop();
if( hResult )
{
if( g_PanoramaSaveToFile )
{
// Save to file - show Save As dialog
OPENFILENAME openFileName;
TCHAR filePath[MAX_PATH] = L"Panorama.png";
memset( &openFileName, 0, sizeof(openFileName) );
openFileName.lStructSize = OPENFILENAME_SIZE_VERSION_400;
openFileName.hwndOwner = hWnd;
openFileName.hInstance = static_cast<HINSTANCE>(g_hInstance);
openFileName.nMaxFile = sizeof(filePath)/sizeof(filePath[0]);
openFileName.Flags = OFN_LONGNAMES | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
openFileName.lpstrTitle = L"Save panorama screenshot...";
openFileName.lpstrDefExt = L"png";
openFileName.nFilterIndex = 1;
openFileName.lpstrFilter = L"PNG Image\0*.png\0\0";
openFileName.lpstrFile = filePath;
if( GetSaveFileName( &openFileName ) )
{
TCHAR targetFilePath[MAX_PATH];
_tcscpy( targetFilePath, filePath );
if( !_tcsrchr( targetFilePath, '.' ) )
{
_tcscat( targetFilePath, L".png" );
}
SavePng( targetFilePath, hResult );
}
}
else
{
// Copy to clipboard
if( OpenClipboard( hWnd ) )
{
EmptyClipboard();
SetClipboardData( CF_BITMAP, hResult );
CloseClipboard();
// Don't delete hResult - clipboard owns it now
hResult = nullptr;
}
}
if( hResult )
{
DeleteObject( hResult );
}
}
g_PanoramaCapture.reset();
}
g_PanoramaCapturing = FALSE;
g_PanoramaSaveToFile = FALSE;
}
else
{
// Block if LiveZoom/LiveDraw is active due to mirroring bug
if( IsWindowVisible( g_hWndLiveZoom )
&& ( GetWindowLongPtr( hWnd, GWL_EXSTYLE ) & WS_EX_LAYERED ) )
{
break;
}
// Start panorama capture
g_PanoramaSaveToFile = ( LOWORD( wParam ) == PANORAMA_SAVE_HOTKEY );
// Let user select the capture rectangle
SelectRectangle selectRectangle;
if( !selectRectangle.Start( hWnd ) )
{
break;
}
RECT captureRect = selectRectangle.SelectedRect();
selectRectangle.Stop();
// Validate rectangle size
if( (captureRect.right - captureRect.left) < 50 ||
(captureRect.bottom - captureRect.top) < 50 )
{
MessageBox( hWnd, L"Selected region is too small for panorama capture.", APPNAME, MB_OK | MB_ICONWARNING );
break;
}
// Create and start panorama capture
g_PanoramaCapture = std::make_unique<PanoramaCapture>();
if( g_PanoramaCapture->Start( hWnd, captureRect ) )
{
g_PanoramaCapturing = TRUE;
OutputDebug( L"Panorama capture started\n" );
}
else
{
g_PanoramaCapture.reset();
MessageBox( hWnd, L"Failed to start panorama capture.", APPNAME, MB_OK | MB_ICONERROR );
}
}
break;
}
case BREAK_HOTKEY:
//
// Go to break timer
@@ -5294,6 +5493,14 @@ LRESULT APIENTRY MainWndProc(
case WM_KEYDOWN:
// Handle ESC during panorama capture
if( g_PanoramaCapturing && wParam == VK_ESCAPE )
{
// Stop panorama capture and process result
PostMessage( hWnd, WM_HOTKEY, PANORAMA_HOTKEY, 0 );
return TRUE;
}
if( (g_TypeMode != TypeModeOff) && g_HaveTyped && static_cast<char>(wParam) != VK_UP && static_cast<char>(wParam) != VK_DOWN &&
(isprint( static_cast<char>(wParam)) ||
wParam == VK_RETURN || wParam == VK_DELETE || wParam == VK_BACK )) {
@@ -6384,11 +6591,11 @@ LRESULT APIENTRY MainWndProc(
{
// Reload the settings. This message is called from PowerToys after a setting is changed by the user.
reg.ReadRegSettings(RegSettings);
if (g_RecordingFormat == RecordingFormat::GIF)
{
g_RecordScaling = g_RecordScalingGIF;
g_RecordFrameRate = RECORDING_FORMAT_GIF_DEFAULT_FRAMERATE;
g_RecordFrameRate = RECORDING_FORMAT_GIF_DEFAULT_FRAMERATE;
}
else
{
@@ -6414,6 +6621,7 @@ LRESULT APIENTRY MainWndProc(
g_DemoTypeToggleMod = GetKeyMod(g_DemoTypeToggleKey);
g_SnipToggleMod = GetKeyMod(g_SnipToggleKey);
g_RecordToggleMod = GetKeyMod(g_RecordToggleKey);
g_PanoramaToggleMod = GetKeyMod(g_PanoramaToggleKey);
BOOL showOptions = FALSE;
if (g_ToggleKey)
{
@@ -6483,6 +6691,16 @@ LRESULT APIENTRY MainWndProc(
MessageBox(hWnd, L"The specified GIF recording hotkey is already in use.\nSelect a different GIF recording hotkey.", APPNAME, MB_ICONERROR);
showOptions = TRUE;
}
// Register panorama hotkeys
if (g_PanoramaToggleKey)
{
if (!RegisterHotKey(hWnd, PANORAMA_HOTKEY, g_PanoramaToggleMod, g_PanoramaToggleKey & 0xFF) ||
!RegisterHotKey(hWnd, PANORAMA_SAVE_HOTKEY, (g_PanoramaToggleMod ^ MOD_SHIFT), g_PanoramaToggleKey & 0xFF))
{
MessageBox(hWnd, L"The specified panorama hotkey is already in use.\nSelect a different panorama hotkey.", APPNAME, MB_ICONERROR);
showOptions = TRUE;
}
}
if (showOptions)
{
// To open the PowerToys settings in the ZoomIt page.
@@ -6490,6 +6708,70 @@ LRESULT APIENTRY MainWndProc(
}
break;
}
case WM_USER_PANORAMA_STOP:
{
OutputDebug( L"WM_USER_PANORAMA_STOP received\n" );
if( g_PanoramaCapturing && g_PanoramaCapture )
{
HBITMAP hResult = g_PanoramaCapture->Stop();
if( hResult )
{
if( g_PanoramaSaveToFile )
{
// Save to file - show Save As dialog
OPENFILENAME openFileName;
TCHAR filePath[MAX_PATH] = L"Panorama.png";
memset( &openFileName, 0, sizeof(openFileName) );
openFileName.lStructSize = OPENFILENAME_SIZE_VERSION_400;
openFileName.hwndOwner = hWnd;
openFileName.hInstance = static_cast<HINSTANCE>(g_hInstance);
openFileName.nMaxFile = sizeof(filePath)/sizeof(filePath[0]);
openFileName.Flags = OFN_LONGNAMES | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
openFileName.lpstrTitle = L"Save panorama screenshot...";
openFileName.lpstrDefExt = L"png";
openFileName.nFilterIndex = 1;
openFileName.lpstrFilter = L"PNG Image\0*.png\0\0";
openFileName.lpstrFile = filePath;
if( GetSaveFileName( &openFileName ) )
{
TCHAR targetFilePath[MAX_PATH];
_tcscpy( targetFilePath, filePath );
if( !_tcsrchr( targetFilePath, '.' ) )
{
_tcscat( targetFilePath, L".png" );
}
SavePng( targetFilePath, hResult );
}
DeleteObject( hResult );
}
else
{
// Copy to clipboard
if( OpenClipboard( hWnd ) )
{
EmptyClipboard();
SetClipboardData( CF_BITMAP, hResult );
CloseClipboard();
// Don't delete hResult - clipboard owns it now
}
else
{
DeleteObject( hResult );
}
}
}
g_PanoramaCapture.reset();
g_PanoramaCapturing = FALSE;
g_PanoramaSaveToFile = FALSE;
}
break;
}
case WM_COMMAND:
switch(LOWORD( wParam )) {
@@ -7081,6 +7363,14 @@ LRESULT APIENTRY MainWndProc(
case WM_DESTROY:
// Clean up panorama capture if active
if( g_PanoramaCapturing && g_PanoramaCapture )
{
g_PanoramaCapture->Cancel();
g_PanoramaCapture.reset();
g_PanoramaCapturing = FALSE;
}
PostQuitMessage( 0 );
break;

View File

@@ -60,6 +60,7 @@
#include "SelectRectangle.h"
#include "DemoType.h"
#include "versionhelper.h"
#include "PanoramaCapture.h"
// WIL
#include <wil/com.h>
@@ -83,6 +84,9 @@
#include <regex>
#include <fstream>
#include <sstream>
#include <thread>
#include <mutex>
#include <chrono>
// robmikh.common
#include <robmikh.common/composition.interop.h>

View File

@@ -104,13 +104,16 @@
#define IDC_COPY_CROP 40008
#define IDC_SAVE_CROP 40009
#define IDC_DEMOTYPE_HOTKEY 40011
#define IDC_PANORAMA_HOTKEY 40013
#define IDC_PANORAMA_CROP 40014
#define IDC_PANORAMA_SAVE 40015
// Next default values for new objects
//
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 118
#define _APS_NEXT_COMMAND_VALUE 40013
#define _APS_NEXT_COMMAND_VALUE 40016
#define _APS_NEXT_CONTROL_VALUE 1078
#define _APS_NEXT_SYMED_VALUE 101
#endif

View File

@@ -8,7 +8,6 @@ using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
namespace PowerToysExtension.Pages;
@@ -25,15 +24,15 @@ internal sealed partial class FancyZonesMonitorListItem : ListItem
var pickerPage = new FancyZonesMonitorLayoutPickerPage(monitor)
{
Name = Resources.FancyZones_SetActiveLayout,
Name = "Set active layout",
};
MoreCommands =
[
new CommandContextItem(pickerPage)
{
Title = Resources.FancyZones_SetActiveLayout,
Subtitle = Resources.FancyZones_PickLayoutForMonitor,
Title = "Set active layout",
Subtitle = "Pick a layout for this monitor",
},
];
}
@@ -43,14 +42,14 @@ internal sealed partial class FancyZonesMonitorListItem : ListItem
var currentVirtualDesktop = FancyZonesVirtualDesktop.GetCurrentVirtualDesktopIdString();
var tags = new List<IDetailsElement>
{
DetailTag(Resources.FancyZones_Monitor, monitor.Data.Monitor),
DetailTag(Resources.FancyZones_Instance, monitor.Data.MonitorInstanceId),
DetailTag(Resources.FancyZones_Serial, monitor.Data.MonitorSerialNumber),
DetailTag(Resources.FancyZones_Number, monitor.Data.MonitorNumber.ToString(CultureInfo.InvariantCulture)),
DetailTag(Resources.FancyZones_VirtualDesktop, currentVirtualDesktop),
DetailTag(Resources.FancyZones_WorkArea, $"{monitor.Data.LeftCoordinate},{monitor.Data.TopCoordinate} {monitor.Data.WorkAreaWidth}\u00D7{monitor.Data.WorkAreaHeight}"),
DetailTag(Resources.FancyZones_Resolution, $"{monitor.Data.MonitorWidth}\u00D7{monitor.Data.MonitorHeight}"),
DetailTag(Resources.FancyZones_DPI, monitor.Data.Dpi.ToString(CultureInfo.InvariantCulture)),
DetailTag("Monitor", monitor.Data.Monitor),
DetailTag("Instance", monitor.Data.MonitorInstanceId),
DetailTag("Serial", monitor.Data.MonitorSerialNumber),
DetailTag("Number", monitor.Data.MonitorNumber.ToString(CultureInfo.InvariantCulture)),
DetailTag("Virtual desktop", currentVirtualDesktop),
DetailTag("Work area", $"{monitor.Data.LeftCoordinate},{monitor.Data.TopCoordinate} {monitor.Data.WorkAreaWidth}\u00D7{monitor.Data.WorkAreaHeight}"),
DetailTag("Resolution", $"{monitor.Data.MonitorWidth}\u00D7{monitor.Data.MonitorHeight}"),
DetailTag("DPI", monitor.Data.Dpi.ToString(CultureInfo.InvariantCulture)),
};
return new Details
@@ -69,7 +68,7 @@ internal sealed partial class FancyZonesMonitorListItem : ListItem
Key = key,
Data = new DetailsTags
{
Tags = [new Tag(string.IsNullOrWhiteSpace(value) ? Resources.Common_NotAvailable : value)],
Tags = [new Tag(string.IsNullOrWhiteSpace(value) ? "n/a" : value)],
},
};
}

View File

@@ -5,24 +5,15 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using WorkspacesCsharpLibrary.Data;
namespace PowerToysExtension.Commands;
internal sealed partial class WorkspaceListItem : ListItem
{
private static readonly CompositeFormat ApplicationsFormat = CompositeFormat.Parse(Resources.Workspaces_Applications_Format);
private static readonly CompositeFormat LastLaunchedFormat = CompositeFormat.Parse(Resources.Workspaces_LastLaunched_Format);
private static readonly CompositeFormat ApplicationsCountFormat = CompositeFormat.Parse(Resources.Workspaces_ApplicationsCount_Format);
private static readonly CompositeFormat MinAgoFormat = CompositeFormat.Parse(Resources.Workspaces_MinAgo_Format);
private static readonly CompositeFormat HrAgoFormat = CompositeFormat.Parse(Resources.Workspaces_HrAgo_Format);
private static readonly CompositeFormat DaysAgoFormat = CompositeFormat.Parse(Resources.Workspaces_DaysAgo_Format);
public WorkspaceListItem(ProjectWrapper workspace, IconInfo icon)
: base(new LaunchWorkspaceCommand(workspace.Id))
{
@@ -37,13 +28,13 @@ internal sealed partial class WorkspaceListItem : ListItem
var appCount = workspace.Applications?.Count ?? 0;
var appsText = appCount switch
{
0 => Resources.Workspaces_NoApplications,
_ => string.Format(CultureInfo.CurrentCulture, ApplicationsFormat, appCount),
0 => "No applications",
_ => string.Format(CultureInfo.CurrentCulture, "{0} applications", appCount),
};
var lastLaunched = workspace.LastLaunchedTime > 0
? string.Format(CultureInfo.CurrentCulture, LastLaunchedFormat, FormatRelativeTime(workspace.LastLaunchedTime))
: Resources.Workspaces_NeverLaunched;
? $"Last launched {FormatRelativeTime(workspace.LastLaunchedTime)}"
: "Never launched";
return $"{appsText} \u2022 {lastLaunched}";
}
@@ -53,15 +44,15 @@ internal sealed partial class WorkspaceListItem : ListItem
var appCount = workspace.Applications?.Count ?? 0;
var body = appCount switch
{
0 => Resources.Workspaces_NoApplicationsInWorkspace,
1 => Resources.Workspaces_OneApplication,
_ => string.Format(CultureInfo.CurrentCulture, ApplicationsCountFormat, appCount),
0 => "No applications in this workspace",
1 => "1 application",
_ => $"{appCount} applications",
};
return new Details
{
HeroImage = icon,
Title = workspace.Name ?? Resources.Workspaces_Workspace,
Title = workspace.Name ?? "Workspace",
Body = body,
Metadata = BuildAppMetadata(workspace),
};
@@ -77,7 +68,7 @@ internal sealed partial class WorkspaceListItem : ListItem
var elements = new List<IDetailsElement>();
foreach (var app in workspace.Applications)
{
var appName = string.IsNullOrWhiteSpace(app.Application) ? Resources.Workspaces_App : app.Application;
var appName = string.IsNullOrWhiteSpace(app.Application) ? "App" : app.Application;
var title = string.IsNullOrWhiteSpace(app.Title) ? appName : app.Title;
var tags = new List<ITag>();
@@ -108,19 +99,19 @@ internal sealed partial class WorkspaceListItem : ListItem
if (delta.TotalMinutes < 1)
{
return Resources.Workspaces_JustNow;
return "just now";
}
if (delta.TotalMinutes < 60)
{
return string.Format(CultureInfo.CurrentCulture, MinAgoFormat, (int)delta.TotalMinutes);
return string.Format(CultureInfo.CurrentCulture, "{0} min ago", (int)delta.TotalMinutes);
}
if (delta.TotalHours < 24)
{
return string.Format(CultureInfo.CurrentCulture, HrAgoFormat, (int)delta.TotalHours);
return string.Format(CultureInfo.CurrentCulture, "{0} hr ago", (int)delta.TotalHours);
}
return string.Format(CultureInfo.CurrentCulture, DaysAgoFormat, (int)delta.TotalDays);
return string.Format(CultureInfo.CurrentCulture, "{0} days ago", (int)delta.TotalDays);
}
}

View File

@@ -4,16 +4,13 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json;
using FancyZonesEditorCommon.Data;
using FancyZonesEditorCommon.Utils;
using ManagedCommon;
using PowerToysExtension.Properties;
using FZPaths = FancyZonesEditorCommon.Data.FancyZonesPaths;
@@ -23,15 +20,6 @@ internal static class FancyZonesDataService
{
private const string ZeroUuid = "{00000000-0000-0000-0000-000000000000}";
private static readonly CompositeFormat ReadMonitorDataFailedFormat = CompositeFormat.Parse(Resources.FancyZones_ReadMonitorDataFailed_Format);
private static readonly CompositeFormat WriteAppliedLayoutsFailedFormat = CompositeFormat.Parse(Resources.FancyZones_WriteAppliedLayoutsFailed_Format);
private static readonly CompositeFormat LayoutAppliedNotifyFailedFormat = CompositeFormat.Parse(Resources.FancyZones_LayoutAppliedNotifyFailed_Format);
private static readonly CompositeFormat TemplateFormat = CompositeFormat.Parse(Resources.FancyZones_Template_Format);
private static readonly CompositeFormat ZonesFormat = CompositeFormat.Parse(Resources.FancyZones_Zones_Format);
private static readonly CompositeFormat CustomGridZonesFormat = CompositeFormat.Parse(Resources.FancyZones_CustomGrid_Zones_Format);
private static readonly CompositeFormat CustomCanvasZonesFormat = CompositeFormat.Parse(Resources.FancyZones_CustomCanvas_Zones_Format);
private static readonly CompositeFormat CustomZonesFormat = CompositeFormat.Parse(Resources.FancyZones_Custom_Zones_Format);
public static bool TryGetMonitors(out IReadOnlyList<FancyZonesMonitorDescriptor> monitors, out string error)
{
monitors = Array.Empty<FancyZonesMonitorDescriptor>();
@@ -43,7 +31,7 @@ internal static class FancyZonesDataService
{
if (!File.Exists(FZPaths.EditorParameters))
{
error = Resources.FancyZones_MonitorDataNotFound;
error = "FancyZones monitor data not found. Open FancyZones Editor once to initialize.";
Logger.LogWarning($"TryGetMonitors: File not found. Path={FZPaths.EditorParameters}");
return false;
}
@@ -55,7 +43,7 @@ internal static class FancyZonesDataService
var editorMonitors = editorParams.Monitors;
if (editorMonitors is null || editorMonitors.Count == 0)
{
error = Resources.FancyZones_NoFancyZonesMonitorsFound;
error = "No FancyZones monitors found.";
Logger.LogWarning($"TryGetMonitors: No monitors in file.");
return false;
}
@@ -68,7 +56,7 @@ internal static class FancyZonesDataService
}
catch (Exception ex)
{
error = string.Format(CultureInfo.CurrentCulture, ReadMonitorDataFailedFormat, ex.Message);
error = $"Failed to read FancyZones monitor data: {ex.Message}";
Logger.LogError($"TryGetMonitors: Exception. Message={ex.Message} Stack={ex.StackTrace}");
return false;
}
@@ -216,7 +204,7 @@ internal static class FancyZonesDataService
}
catch (Exception ex)
{
return (false, string.Format(CultureInfo.CurrentCulture, WriteAppliedLayoutsFailedFormat, ex.Message));
return (false, $"Failed to write applied layouts: {ex.Message}");
}
try
@@ -225,10 +213,10 @@ internal static class FancyZonesDataService
}
catch (Exception ex)
{
return (true, string.Format(CultureInfo.CurrentCulture, LayoutAppliedNotifyFailedFormat, ex.Message));
return (true, $"Layout applied, but FancyZones could not be notified: {ex.Message}");
}
return (true, Resources.FancyZones_LayoutApplied);
return (true, "Layout applied.");
}
private static AppliedLayouts.AppliedLayoutWrapper? FindAppliedLayoutEntry(AppliedLayouts.AppliedLayoutsListWrapper file, EditorParameters.NativeMonitorDataWrapper monitor, string virtualDesktopId)
@@ -305,8 +293,8 @@ internal static class FancyZonesDataService
var zoneCount = type.Equals("blank", StringComparison.OrdinalIgnoreCase)
? 0
: template.ZoneCount > 0 ? template.ZoneCount : 3;
var title = string.Format(CultureInfo.CurrentCulture, TemplateFormat, type);
var subtitle = string.Format(CultureInfo.CurrentCulture, ZonesFormat, zoneCount);
var title = $"Template: {type}";
var subtitle = $"{zoneCount} zones";
yield return new FancyZonesLayoutDescriptor
{
@@ -369,9 +357,9 @@ internal static class FancyZonesDataService
var title = custom.Name.Trim();
var subtitle = customType switch
{
"grid" => string.Format(CultureInfo.CurrentCulture, CustomGridZonesFormat, applied.ZoneCount),
"canvas" => string.Format(CultureInfo.CurrentCulture, CustomCanvasZonesFormat, applied.ZoneCount),
_ => string.Format(CultureInfo.CurrentCulture, CustomZonesFormat, applied.ZoneCount),
"grid" => $"Custom grid \u2022 {applied.ZoneCount} zones",
"canvas" => $"Custom canvas \u2022 {applied.ZoneCount} zones",
_ => $"Custom \u2022 {applied.ZoneCount} zones",
};
yield return new FancyZonesLayoutDescriptor

View File

@@ -61,21 +61,6 @@
<ProjectReference Include="..\..\..\Workspaces\Workspaces.ModuleServices\Workspaces.ModuleServices.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<PropertyGroup>
<!-- Always build/publish AOT so the extension ships as native code -->
<SelfContained>true</SelfContained>

View File

@@ -7,7 +7,6 @@ using Common.UI;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
namespace PowerToysExtension.Modules;
@@ -23,8 +22,8 @@ internal sealed class AdvancedPasteModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new OpenAdvancedPasteCommand())
{
Title = Resources.AdvancedPaste_Open_Title,
Subtitle = Resources.AdvancedPaste_Open_Subtitle,
Title = "Open Advanced Paste",
Subtitle = "Launch the Advanced Paste UI",
Icon = icon,
};
}
@@ -32,7 +31,7 @@ internal sealed class AdvancedPasteModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = Resources.AdvancedPaste_Settings_Subtitle,
Subtitle = "Open Advanced Paste settings",
Icon = icon,
};
}

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -21,7 +20,7 @@ internal sealed class AlwaysOnTopModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.AlwaysOnTop, title))
{
Title = title,
Subtitle = Resources.AlwaysOnTop_Settings_Subtitle,
Subtitle = "Open Always On Top settings",
Icon = icon,
};
}

View File

@@ -10,7 +10,6 @@ using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Pages;
using PowerToysExtension.Properties;
namespace PowerToysExtension.Modules;
@@ -27,7 +26,7 @@ internal sealed class AwakeModuleCommandProvider : ModuleCommandProvider
items.Add(new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = Resources.Awake_Settings_Subtitle,
Subtitle = "Open Awake settings",
Icon = moduleIcon,
});
@@ -50,40 +49,40 @@ internal sealed class AwakeModuleCommandProvider : ModuleCommandProvider
statusItem = new ListItem(new CommandItem(refreshCommand))
{
Title = Resources.Awake_Status_Title,
Title = "Awake: Current status",
Subtitle = AwakeStatusService.GetStatusSubtitle(),
Icon = icon,
};
items.Add(statusItem);
items.Add(new ListItem(new StartAwakeCommand(Resources.Awake_KeepIndefinite_Title, () => AwakeService.Instance.SetIndefiniteAsync(), Resources.Awake_SetIndefinite_Toast, refreshStatus))
items.Add(new ListItem(new StartAwakeCommand("Awake: Keep awake indefinitely", () => AwakeService.Instance.SetIndefiniteAsync(), "Awake set to indefinite", refreshStatus))
{
Title = Resources.Awake_KeepIndefinite_Title,
Subtitle = Resources.Awake_KeepIndefinite_Subtitle,
Title = "Awake: Keep awake indefinitely",
Subtitle = "Run Awake in indefinite mode",
Icon = icon,
});
items.Add(new ListItem(new StartAwakeCommand(Resources.Awake_Keep30Min_Title, () => AwakeService.Instance.SetTimedAsync(30), Resources.Awake_Set30Min_Toast, refreshStatus))
items.Add(new ListItem(new StartAwakeCommand("Awake: Keep awake for 30 minutes", () => AwakeService.Instance.SetTimedAsync(30), "Awake set for 30 minutes", refreshStatus))
{
Title = Resources.Awake_Keep30Min_Title,
Subtitle = Resources.Awake_Keep30Min_Subtitle,
Title = "Awake: Keep awake for 30 minutes",
Subtitle = "Run Awake timed for 30 minutes",
Icon = icon,
});
items.Add(new ListItem(new StartAwakeCommand(Resources.Awake_Keep1Hour_Title, () => AwakeService.Instance.SetTimedAsync(60), Resources.Awake_Set1Hour_Toast, refreshStatus))
items.Add(new ListItem(new StartAwakeCommand("Awake: Keep awake for 1 hour", () => AwakeService.Instance.SetTimedAsync(60), "Awake set for 1 hour", refreshStatus))
{
Title = Resources.Awake_Keep1Hour_Title,
Subtitle = Resources.Awake_Keep1Hour_Subtitle,
Title = "Awake: Keep awake for 1 hour",
Subtitle = "Run Awake timed for 1 hour",
Icon = icon,
});
items.Add(new ListItem(new StartAwakeCommand(Resources.Awake_Keep2Hours_Title, () => AwakeService.Instance.SetTimedAsync(120), Resources.Awake_Set2Hours_Toast, refreshStatus))
items.Add(new ListItem(new StartAwakeCommand("Awake: Keep awake for 2 hours", () => AwakeService.Instance.SetTimedAsync(120), "Awake set for 2 hours", refreshStatus))
{
Title = Resources.Awake_Keep2Hours_Title,
Subtitle = Resources.Awake_Keep2Hours_Subtitle,
Title = "Awake: Keep awake for 2 hours",
Subtitle = "Run Awake timed for 2 hours",
Icon = icon,
});
items.Add(new ListItem(new StopAwakeCommand(refreshStatus))
{
Title = Resources.Awake_TurnOff_Title,
Subtitle = Resources.Awake_TurnOff_Subtitle,
Title = "Awake: Turn off",
Subtitle = "Switch Awake back to Off",
Icon = icon,
});

View File

@@ -8,7 +8,6 @@ using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Pages;
using PowerToysExtension.Properties;
namespace PowerToysExtension.Modules;
@@ -25,7 +24,7 @@ internal sealed class ColorPickerModuleCommandProvider : ModuleCommandProvider
commands.Add(new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = Resources.ColorPicker_Settings_Subtitle,
Subtitle = "Open Color Picker settings",
Icon = icon,
});
@@ -37,15 +36,15 @@ internal sealed class ColorPickerModuleCommandProvider : ModuleCommandProvider
// Direct entries in the module list.
commands.Add(new ListItem(new OpenColorPickerCommand())
{
Title = Resources.ColorPicker_Open_Title,
Subtitle = Resources.ColorPicker_Open_Subtitle,
Title = "Open Color Picker",
Subtitle = "Start a color pick session",
Icon = icon,
});
commands.Add(new ListItem(new CommandItem(new ColorPickerSavedColorsPage()))
{
Title = Resources.ColorPicker_SavedColors_Title,
Subtitle = Resources.ColorPicker_SavedColors_Subtitle,
Title = "Saved colors",
Subtitle = "Browse and copy saved colors",
Icon = icon,
});

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -21,7 +20,7 @@ internal sealed class CommandNotFoundModuleCommandProvider : ModuleCommandProvid
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.CmdNotFound, title))
{
Title = title,
Subtitle = Resources.CommandNotFound_Settings_Subtitle,
Subtitle = "Open Command Not Found settings",
Icon = icon,
};
}

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -23,15 +22,15 @@ internal sealed class CropAndLockModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new CropAndLockReparentCommand())
{
Title = Resources.CropAndLock_Reparent_Title,
Subtitle = Resources.CropAndLock_Reparent_Subtitle,
Title = "Crop and Lock (Reparent)",
Subtitle = "Create a cropped reparented window",
Icon = icon,
};
yield return new ListItem(new CropAndLockThumbnailCommand())
{
Title = Resources.CropAndLock_Thumbnail_Title,
Subtitle = Resources.CropAndLock_Thumbnail_Subtitle,
Title = "Crop and Lock (Thumbnail)",
Subtitle = "Create a cropped thumbnail window",
Icon = icon,
};
}
@@ -39,7 +38,7 @@ internal sealed class CropAndLockModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = Resources.CropAndLock_Settings_Subtitle,
Subtitle = "Open Crop and Lock settings",
Icon = icon,
};
}

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -23,15 +22,15 @@ internal sealed class EnvironmentVariablesModuleCommandProvider : ModuleCommandP
{
yield return new ListItem(new OpenEnvironmentVariablesCommand())
{
Title = Resources.EnvironmentVariables_Open_Title,
Subtitle = Resources.EnvironmentVariables_Open_Subtitle,
Title = "Open Environment Variables",
Subtitle = "Launch Environment Variables editor",
Icon = icon,
};
yield return new ListItem(new OpenEnvironmentVariablesAdminCommand())
{
Title = Resources.EnvironmentVariables_OpenAdmin_Title,
Subtitle = Resources.EnvironmentVariables_OpenAdmin_Subtitle,
Title = "Open Environment Variables (Admin)",
Subtitle = "Launch Environment Variables editor as admin",
Icon = icon,
};
}
@@ -39,7 +38,7 @@ internal sealed class EnvironmentVariablesModuleCommandProvider : ModuleCommandP
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = Resources.EnvironmentVariables_Settings_Subtitle,
Subtitle = "Open Environment Variables settings",
Icon = icon,
};
}

View File

@@ -7,7 +7,6 @@ using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Pages;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -24,22 +23,22 @@ internal sealed class FancyZonesModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new CommandItem(new FancyZonesLayoutsPage()))
{
Title = Resources.FancyZones_Layouts_Title,
Subtitle = Resources.FancyZones_Layouts_Subtitle,
Title = "FancyZones: Layouts",
Subtitle = "Apply a layout to all monitors or a specific monitor",
Icon = icon,
};
yield return new ListItem(new CommandItem(new FancyZonesMonitorsPage()))
{
Title = Resources.FancyZones_Monitors_Title,
Subtitle = Resources.FancyZones_Monitors_Subtitle,
Title = "FancyZones: Monitors",
Subtitle = "Identify monitors and apply layouts",
Icon = icon,
};
yield return new ListItem(new OpenFancyZonesEditorCommand())
{
Title = Resources.FancyZones_OpenEditor_Title,
Subtitle = Resources.FancyZones_OpenEditor_Subtitle,
Title = "Open FancyZones Editor",
Subtitle = "Launch layout editor",
Icon = icon,
};
}
@@ -47,7 +46,7 @@ internal sealed class FancyZonesModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = Resources.FancyZones_Settings_Subtitle,
Subtitle = "Open FancyZones settings",
Icon = icon,
};
}

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -21,7 +20,7 @@ internal sealed class FileExplorerAddonsModuleCommandProvider : ModuleCommandPro
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.FileExplorer, title))
{
Title = title,
Subtitle = Resources.FileExplorerAddons_Settings_Subtitle,
Subtitle = "Open File Explorer add-ons settings",
Icon = icon,
};
}

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -21,7 +20,7 @@ internal sealed class FileLocksmithModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.FileLocksmith, title))
{
Title = title,
Subtitle = Resources.FileLocksmith_Settings_Subtitle,
Subtitle = "Open File Locksmith settings",
Icon = icon,
};
}

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -23,15 +22,15 @@ internal sealed class HostsModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new OpenHostsEditorCommand())
{
Title = Resources.Hosts_Open_Title,
Subtitle = Resources.Hosts_Open_Subtitle,
Title = "Open Hosts File Editor",
Subtitle = "Launch Hosts File Editor",
Icon = icon,
};
yield return new ListItem(new OpenHostsEditorAdminCommand())
{
Title = Resources.Hosts_OpenAdmin_Title,
Subtitle = Resources.Hosts_OpenAdmin_Subtitle,
Title = "Open Hosts File Editor (Admin)",
Subtitle = "Launch Hosts File Editor as admin",
Icon = icon,
};
}
@@ -39,7 +38,7 @@ internal sealed class HostsModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = Resources.Hosts_Settings_Subtitle,
Subtitle = "Open Hosts File Editor settings",
Icon = icon,
};
}

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -21,7 +20,7 @@ internal sealed class ImageResizerModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.ImageResizer, title))
{
Title = title,
Subtitle = Resources.ImageResizer_Settings_Subtitle,
Subtitle = "Open Image Resizer settings",
Icon = icon,
};
}

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -21,7 +20,7 @@ internal sealed class KeyboardManagerModuleCommandProvider : ModuleCommandProvid
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.KBM, title))
{
Title = title,
Subtitle = Resources.KeyboardManager_Settings_Subtitle,
Subtitle = "Open Keyboard Manager settings",
Icon = icon,
};
}

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -25,8 +24,8 @@ internal sealed class LightSwitchModuleCommandProvider : ModuleCommandProvider
{
items.Add(new ListItem(new ToggleLightSwitchCommand())
{
Title = Resources.LightSwitch_Toggle_Title,
Subtitle = Resources.LightSwitch_Toggle_Subtitle,
Title = "Toggle Light Switch",
Subtitle = "Toggle system/apps theme immediately",
Icon = icon,
});
}
@@ -34,7 +33,7 @@ internal sealed class LightSwitchModuleCommandProvider : ModuleCommandProvider
items.Add(new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = Resources.LightSwitch_Settings_Subtitle,
Subtitle = "Open Light Switch settings",
Icon = icon,
});

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -23,8 +22,8 @@ internal sealed class MouseUtilsModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new ToggleFindMyMouseCommand())
{
Title = Resources.MouseUtils_FindMyMouse_Title,
Subtitle = Resources.MouseUtils_FindMyMouse_Subtitle,
Title = "Trigger Find My Mouse",
Subtitle = "Focus the mouse pointer",
Icon = icon,
};
}
@@ -33,8 +32,8 @@ internal sealed class MouseUtilsModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new ToggleMouseHighlighterCommand())
{
Title = Resources.MouseUtils_Highlighter_Title,
Subtitle = Resources.MouseUtils_Highlighter_Subtitle,
Title = "Toggle Mouse Highlighter",
Subtitle = "Highlight mouse clicks",
Icon = icon,
};
}
@@ -43,8 +42,8 @@ internal sealed class MouseUtilsModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new ToggleMouseCrosshairsCommand())
{
Title = Resources.MouseUtils_Crosshairs_Title,
Subtitle = Resources.MouseUtils_Crosshairs_Subtitle,
Title = "Toggle Mouse Crosshairs",
Subtitle = "Enable or disable pointer crosshairs",
Icon = icon,
};
}
@@ -53,8 +52,8 @@ internal sealed class MouseUtilsModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new ToggleCursorWrapCommand())
{
Title = Resources.MouseUtils_CursorWrap_Title,
Subtitle = Resources.MouseUtils_CursorWrap_Subtitle,
Title = "Toggle Cursor Wrap",
Subtitle = "Wrap the cursor across monitor edges",
Icon = icon,
};
}
@@ -63,8 +62,8 @@ internal sealed class MouseUtilsModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new ShowMouseJumpPreviewCommand())
{
Title = Resources.MouseUtils_MouseJump_Title,
Subtitle = Resources.MouseUtils_MouseJump_Subtitle,
Title = "Show Mouse Jump Preview",
Subtitle = "Jump the pointer to a target",
Icon = icon,
};
}
@@ -72,7 +71,7 @@ internal sealed class MouseUtilsModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = Resources.MouseUtils_Settings_Subtitle,
Subtitle = "Open Mouse Utilities settings",
Icon = icon,
};
}

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -21,7 +20,7 @@ internal sealed class MouseWithoutBordersModuleCommandProvider : ModuleCommandPr
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.MouseWithoutBorders, title))
{
Title = title,
Subtitle = Resources.MouseWithoutBorders_Settings_Subtitle,
Subtitle = "Open Mouse Without Borders settings",
Icon = icon,
};
}

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -21,7 +20,7 @@ internal sealed class NewPlusModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.NewPlus, title))
{
Title = title,
Subtitle = Resources.NewPlus_Settings_Subtitle,
Subtitle = "Open New+ settings",
Icon = icon,
};
}

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -21,7 +20,7 @@ internal sealed class PeekModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.Peek, title))
{
Title = title,
Subtitle = Resources.Peek_Settings_Subtitle,
Subtitle = "Open Peek settings",
Icon = icon,
};
}

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -21,7 +20,7 @@ internal sealed class PowerRenameModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.PowerRename, title))
{
Title = title,
Subtitle = Resources.PowerRename_Settings_Subtitle,
Subtitle = "Open PowerRename settings",
Icon = icon,
};
}

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -21,7 +20,7 @@ internal sealed class PowerToysRunModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.PowerLauncher, title))
{
Title = title,
Subtitle = Resources.PowerToysRun_Settings_Subtitle,
Subtitle = "Open PowerToys Run settings",
Icon = icon,
};
}

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -21,7 +20,7 @@ internal sealed class QuickAccentModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.PowerAccent, title))
{
Title = title,
Subtitle = Resources.QuickAccent_Settings_Subtitle,
Subtitle = "Open Quick Accent settings",
Icon = icon,
};
}

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -23,8 +22,8 @@ internal sealed class RegistryPreviewModuleCommandProvider : ModuleCommandProvid
{
yield return new ListItem(new OpenRegistryPreviewCommand())
{
Title = Resources.RegistryPreview_Open_Title,
Subtitle = Resources.RegistryPreview_Open_Subtitle,
Title = "Open Registry Preview",
Subtitle = "Launch Registry Preview",
Icon = icon,
};
}
@@ -32,7 +31,7 @@ internal sealed class RegistryPreviewModuleCommandProvider : ModuleCommandProvid
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = Resources.RegistryPreview_Settings_Subtitle,
Subtitle = "Open Registry Preview settings",
Icon = icon,
};
}

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -23,8 +22,8 @@ internal sealed class ScreenRulerModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new ToggleScreenRulerCommand())
{
Title = Resources.ScreenRuler_Toggle_Title,
Subtitle = Resources.ScreenRuler_Toggle_Subtitle,
Title = "Toggle Screen Ruler",
Subtitle = "Start or close Screen Ruler",
Icon = icon,
};
}
@@ -32,7 +31,7 @@ internal sealed class ScreenRulerModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = Resources.ScreenRuler_Settings_Subtitle,
Subtitle = "Open Screen Ruler settings",
Icon = icon,
};
}

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -23,8 +22,8 @@ internal sealed class ShortcutGuideModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new ToggleShortcutGuideCommand())
{
Title = Resources.ShortcutGuide_Toggle_Title,
Subtitle = Resources.ShortcutGuide_Toggle_Subtitle,
Title = "Toggle Shortcut Guide",
Subtitle = "Show or hide Shortcut Guide",
Icon = icon,
};
}
@@ -32,7 +31,7 @@ internal sealed class ShortcutGuideModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = Resources.ShortcutGuide_Settings_Subtitle,
Subtitle = "Open Shortcut Guide settings",
Icon = icon,
};
}

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -23,8 +22,8 @@ internal sealed class TextExtractorModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new ToggleTextExtractorCommand())
{
Title = Resources.TextExtractor_Toggle_Title,
Subtitle = Resources.TextExtractor_Toggle_Subtitle,
Title = "Toggle Text Extractor",
Subtitle = "Start or close Text Extractor",
Icon = icon,
};
}
@@ -32,7 +31,7 @@ internal sealed class TextExtractorModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = Resources.TextExtractor_Settings_Subtitle,
Subtitle = "Open Text Extractor settings",
Icon = icon,
};
}

View File

@@ -7,7 +7,6 @@ using Common.UI;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using Workspaces.ModuleServices;
using WorkspacesCsharpLibrary.Data;
@@ -26,7 +25,7 @@ internal sealed class WorkspacesModuleCommandProvider : ModuleCommandProvider
items.Add(new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = Resources.Workspaces_Settings_Subtitle,
Subtitle = "Open Workspaces settings",
Icon = moduleIcon,
});
@@ -38,8 +37,8 @@ internal sealed class WorkspacesModuleCommandProvider : ModuleCommandProvider
// Settings entry plus common actions.
items.Add(new ListItem(new OpenWorkspaceEditorCommand())
{
Title = Resources.Workspaces_OpenEditor_Title,
Subtitle = Resources.Workspaces_OpenEditor_Subtitle,
Title = "Workspaces: Open editor",
Subtitle = "Create or edit workspaces",
Icon = icon,
});

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -22,40 +21,40 @@ internal sealed class ZoomItModuleCommandProvider : ModuleCommandProvider
if (ModuleEnablementService.IsModuleEnabled(module))
{
// Action commands via ZoomIt IPC
yield return new ListItem(new ZoomItActionCommand("zoom", Resources.ZoomIt_Zoom_Title))
yield return new ListItem(new ZoomItActionCommand("zoom", "ZoomIt: Zoom"))
{
Title = Resources.ZoomIt_Zoom_Title,
Subtitle = Resources.ZoomIt_Zoom_Subtitle,
Title = "ZoomIt: Zoom",
Subtitle = "Enter zoom mode",
Icon = icon,
};
yield return new ListItem(new ZoomItActionCommand("draw", Resources.ZoomIt_Draw_Title))
yield return new ListItem(new ZoomItActionCommand("draw", "ZoomIt: Draw"))
{
Title = Resources.ZoomIt_Draw_Title,
Subtitle = Resources.ZoomIt_Draw_Subtitle,
Title = "ZoomIt: Draw",
Subtitle = "Enter drawing mode",
Icon = icon,
};
yield return new ListItem(new ZoomItActionCommand("break", Resources.ZoomIt_Break_Title))
yield return new ListItem(new ZoomItActionCommand("break", "ZoomIt: Break"))
{
Title = Resources.ZoomIt_Break_Title,
Subtitle = Resources.ZoomIt_Break_Subtitle,
Title = "ZoomIt: Break",
Subtitle = "Enter break timer",
Icon = icon,
};
yield return new ListItem(new ZoomItActionCommand("liveZoom", Resources.ZoomIt_LiveZoom_Title))
yield return new ListItem(new ZoomItActionCommand("liveZoom", "ZoomIt: Live Zoom"))
{
Title = Resources.ZoomIt_LiveZoom_Title,
Subtitle = Resources.ZoomIt_LiveZoom_Subtitle,
Title = "ZoomIt: Live Zoom",
Subtitle = "Toggle live zoom",
Icon = icon,
};
yield return new ListItem(new ZoomItActionCommand("snip", Resources.ZoomIt_Snip_Title))
yield return new ListItem(new ZoomItActionCommand("snip", "ZoomIt: Snip"))
{
Title = Resources.ZoomIt_Snip_Title,
Subtitle = Resources.ZoomIt_Snip_Subtitle,
Title = "ZoomIt: Snip",
Subtitle = "Enter snip mode",
Icon = icon,
};
yield return new ListItem(new ZoomItActionCommand("record", Resources.ZoomIt_Record_Title))
yield return new ListItem(new ZoomItActionCommand("record", "ZoomIt: Record"))
{
Title = Resources.ZoomIt_Record_Title,
Subtitle = Resources.ZoomIt_Record_Subtitle,
Title = "ZoomIt: Record",
Subtitle = "Start recording",
Icon = icon,
};
}
@@ -63,7 +62,7 @@ internal sealed class ZoomItModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = Resources.ZoomIt_Settings_Subtitle,
Subtitle = "Open ZoomIt settings",
Icon = icon,
};
}

View File

@@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information.
using System;
using System.Globalization;
using System.Linq;
using System.Text;
using ColorPicker.ModuleServices;
@@ -11,27 +10,24 @@ using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
namespace PowerToysExtension.Pages;
internal sealed partial class ColorPickerSavedColorsPage : DynamicListPage
{
private static readonly CompositeFormat NoMatchingSavedColorsFormat = CompositeFormat.Parse(Resources.ColorPicker_NoMatchingSavedColors_Subtitle);
private readonly CommandItem _emptyContent;
public ColorPickerSavedColorsPage()
{
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("ColorPicker.png");
Title = Resources.ColorPicker_SavedColors_Title;
Title = "Saved colors";
Name = "ColorPickerSavedColors";
Id = "com.microsoft.powertoys.colorpicker.savedColors";
_emptyContent = new CommandItem()
{
Title = Resources.ColorPicker_NoSavedColors_Title,
Subtitle = Resources.ColorPicker_NoSavedColors_Subtitle,
Title = "No saved colors",
Subtitle = "Pick a color first, then try again.",
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("ColorPicker.png"),
};
@@ -74,8 +70,8 @@ internal sealed partial class ColorPickerSavedColorsPage : DynamicListPage
public override void UpdateSearchText(string oldSearch, string newSearch)
{
_emptyContent.Subtitle = string.IsNullOrWhiteSpace(newSearch)
? Resources.ColorPicker_NoSavedColors_Subtitle
: string.Format(CultureInfo.CurrentCulture, NoMatchingSavedColorsFormat, newSearch);
? "Pick a color first, then try again."
: $"No saved colors matching '{newSearch}'";
RaiseItemsChanged(0);
}

View File

@@ -11,7 +11,6 @@ using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
namespace PowerToysExtension.Pages;
@@ -22,13 +21,13 @@ internal sealed partial class FancyZonesLayoutsPage : DynamicListPage
public FancyZonesLayoutsPage()
{
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("FancyZones.png");
Name = Title = Resources.FancyZones_Layouts_Title;
Name = Title = "FancyZones Layouts";
Id = "com.microsoft.cmdpal.powertoys.fancyzones.layouts";
_emptyMessage = new CommandItem()
{
Title = Resources.FancyZones_NoLayoutsFound_Title,
Subtitle = Resources.FancyZones_NoLayoutsFound_Subtitle,
Title = "No layouts found",
Subtitle = "Open FancyZones Editor once to initialize layouts.",
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("FancyZones.png"),
};
EmptyContent = _emptyMessage;

View File

@@ -4,21 +4,16 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
namespace PowerToysExtension.Pages;
internal sealed partial class FancyZonesMonitorLayoutPickerPage : DynamicListPage
{
private static readonly CompositeFormat SetActiveLayoutForFormat = CompositeFormat.Parse(Resources.FancyZones_SetActiveLayoutFor_Format);
private readonly FancyZonesMonitorDescriptor _monitor;
private readonly CommandItem _emptyMessage;
@@ -26,13 +21,13 @@ internal sealed partial class FancyZonesMonitorLayoutPickerPage : DynamicListPag
{
_monitor = monitor;
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("FancyZones.png");
Name = Title = string.Format(CultureInfo.CurrentCulture, SetActiveLayoutForFormat, _monitor.Title);
Name = Title = $"Set active layout for {_monitor.Title}";
Id = $"com.microsoft.cmdpal.powertoys.fancyzones.monitor.{_monitor.Index}.layouts";
_emptyMessage = new CommandItem()
{
Title = Resources.FancyZones_NoLayoutsFound_Title,
Subtitle = Resources.FancyZones_NoLayoutsFound_Subtitle,
Title = "No layouts found",
Subtitle = "Open FancyZones Editor once to initialize layouts.",
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("FancyZones.png"),
};
EmptyContent = _emptyMessage;

View File

@@ -4,31 +4,26 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
namespace PowerToysExtension.Pages;
internal sealed partial class FancyZonesMonitorsPage : DynamicListPage
{
private static readonly CompositeFormat CurrentLayoutFormat = CompositeFormat.Parse(Resources.FancyZones_CurrentLayout_Format);
private readonly CommandItem _emptyMessage;
public FancyZonesMonitorsPage()
{
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("FancyZones.png");
Name = Title = Resources.FancyZones_Monitors_Title;
Name = Title = "FancyZones Monitors";
Id = "com.microsoft.cmdpal.powertoys.fancyzones.monitors";
_emptyMessage = new CommandItem()
{
Title = Resources.FancyZones_NoMonitorsFound_Title,
Subtitle = Resources.FancyZones_NoMonitorsFound_Subtitle,
Title = "No monitors found",
Subtitle = "Open FancyZones Editor once to initialize monitor data.",
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("FancyZones.png"),
};
EmptyContent = _emptyMessage;
@@ -60,8 +55,8 @@ internal sealed partial class FancyZonesMonitorsPage : DynamicListPage
}
var layoutDescription = FancyZonesDataService.TryGetAppliedLayoutForMonitor(monitor.Data, out var applied) && applied is not null
? string.Format(CultureInfo.CurrentCulture, CurrentLayoutFormat, applied.Value.Type)
: Resources.FancyZones_CurrentLayout_Unknown;
? $"Current layout: {applied.Value.Type}"
: "Current layout: unknown";
var item = new FancyZonesMonitorListItem(monitor, layoutDescription, monitorIcon);
items.Add(item);

View File

@@ -6,7 +6,6 @@ using Awake.ModuleServices;
using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Properties;
namespace PowerToysExtension;
@@ -15,32 +14,32 @@ internal sealed partial class PowerToysExtensionPage : ListPage
public PowerToysExtensionPage()
{
Icon = Helpers.PowerToysResourcesHelper.IconFromSettingsIcon("PowerToys.png");
Title = Resources.PowerToys_DisplayName;
Name = Resources.PowerToysExtension_CommandsName;
Title = "PowerToys";
Name = "PowerToys commands";
}
public override IListItem[] GetItems()
{
return [
new ListItem(new LaunchModuleCommand("PowerToys", executableName: "PowerToys.exe", displayName: Resources.PowerToysExtension_OpenPowerToys_Title))
new ListItem(new LaunchModuleCommand("PowerToys", executableName: "PowerToys.exe", displayName: "Open PowerToys"))
{
Title = Resources.PowerToysExtension_OpenPowerToys_Title,
Subtitle = Resources.PowerToysExtension_OpenPowerToys_Subtitle,
Title = "Open PowerToys",
Subtitle = "Launch the PowerToys shell",
},
new ListItem(new OpenPowerToysSettingsCommand("PowerToys", "General"))
{
Title = Resources.PowerToysExtension_OpenSettings_Title,
Subtitle = Resources.PowerToysExtension_OpenSettings_Subtitle,
Title = "Open PowerToys settings",
Subtitle = "Open the main PowerToys settings window",
},
new ListItem(new OpenPowerToysSettingsCommand("Workspaces", "Workspaces"))
{
Title = Resources.PowerToysExtension_OpenWorkspacesSettings_Title,
Subtitle = Resources.PowerToysExtension_OpenWorkspacesSettings_Subtitle,
Title = "Open Workspaces settings",
Subtitle = "Jump directly to Workspaces settings",
},
new ListItem(new OpenWorkspaceEditorCommand())
{
Title = Resources.PowerToysExtension_OpenWorkspacesEditor_Title,
Subtitle = Resources.PowerToysExtension_OpenWorkspacesEditor_Subtitle,
Title = "Open Workspaces editor",
Subtitle = "Launch the Workspaces editor",
},
];
}

View File

@@ -5,7 +5,6 @@
using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
namespace PowerToysExtension.Pages;
@@ -16,13 +15,13 @@ internal sealed partial class PowerToysListPage : ListPage
public PowerToysListPage()
{
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("PowerToys.png");
Name = Title = Resources.PowerToys_DisplayName;
Name = Title = "PowerToys";
Id = "com.microsoft.cmdpal.powertoys";
SettingsChangeNotifier.SettingsChanged += OnSettingsChanged;
_empty = new CommandItem()
{
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("PowerToys.png"),
Title = Resources.PowerToys_NoMatchingModule,
Title = "No matching module found",
Subtitle = SearchText,
};
EmptyContent = _empty;

View File

@@ -7,7 +7,6 @@ using ManagedCommon;
using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
namespace PowerToysExtension;
@@ -15,7 +14,7 @@ public sealed partial class PowerToysCommandsProvider : CommandProvider
{
public PowerToysCommandsProvider()
{
DisplayName = Resources.PowerToys_DisplayName;
DisplayName = "PowerToys";
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("PowerToys.png");
}
@@ -23,8 +22,8 @@ public sealed partial class PowerToysCommandsProvider : CommandProvider
[
new CommandItem(new Pages.PowerToysListPage())
{
Title = Resources.PowerToys_DisplayName,
Subtitle = Resources.PowerToys_Subtitle,
Title = "PowerToys",
Subtitle = "PowerToys commands and settings",
}
];

View File

@@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
namespace PowerToysExtension;
@@ -16,13 +15,13 @@ public partial class PowerToysExtensionCommandsProvider : CommandProvider
public PowerToysExtensionCommandsProvider()
{
DisplayName = Resources.PowerToys_DisplayName;
DisplayName = "PowerToys";
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("PowerToys.png");
_commands = [
new CommandItem(new Pages.PowerToysListPage())
{
Title = Resources.PowerToys_DisplayName,
Subtitle = Resources.PowerToys_Subtitle,
Title = "PowerToys",
Subtitle = "PowerToys commands and settings",
},
];
}

View File

@@ -1,630 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<!-- PowerToys CommandsProvider -->
<data name="PowerToys_DisplayName" xml:space="preserve">
<value>PowerToys</value>
</data>
<data name="PowerToys_Subtitle" xml:space="preserve">
<value>PowerToys commands and settings</value>
</data>
<data name="PowerToys_NoMatchingModule" xml:space="preserve">
<value>No matching module found</value>
</data>
<!-- PowerToys Extension Page -->
<data name="PowerToysExtension_CommandsName" xml:space="preserve">
<value>PowerToys commands</value>
</data>
<data name="PowerToysExtension_OpenPowerToys_Title" xml:space="preserve">
<value>Open PowerToys</value>
</data>
<data name="PowerToysExtension_OpenPowerToys_Subtitle" xml:space="preserve">
<value>Launch the PowerToys shell</value>
</data>
<data name="PowerToysExtension_OpenSettings_Title" xml:space="preserve">
<value>Open PowerToys settings</value>
</data>
<data name="PowerToysExtension_OpenSettings_Subtitle" xml:space="preserve">
<value>Open the main PowerToys settings window</value>
</data>
<data name="PowerToysExtension_OpenWorkspacesSettings_Title" xml:space="preserve">
<value>Open Workspaces settings</value>
</data>
<data name="PowerToysExtension_OpenWorkspacesSettings_Subtitle" xml:space="preserve">
<value>Jump directly to Workspaces settings</value>
</data>
<data name="PowerToysExtension_OpenWorkspacesEditor_Title" xml:space="preserve">
<value>Open Workspaces editor</value>
</data>
<data name="PowerToysExtension_OpenWorkspacesEditor_Subtitle" xml:space="preserve">
<value>Launch the Workspaces editor</value>
</data>
<!-- Advanced Paste Module -->
<data name="AdvancedPaste_Open_Title" xml:space="preserve">
<value>Open Advanced Paste</value>
</data>
<data name="AdvancedPaste_Open_Subtitle" xml:space="preserve">
<value>Launch the Advanced Paste UI</value>
</data>
<data name="AdvancedPaste_Settings_Subtitle" xml:space="preserve">
<value>Open Advanced Paste settings</value>
</data>
<!-- Always On Top Module -->
<data name="AlwaysOnTop_Settings_Subtitle" xml:space="preserve">
<value>Open Always On Top settings</value>
</data>
<!-- Awake Module -->
<data name="Awake_Settings_Subtitle" xml:space="preserve">
<value>Open Awake settings</value>
</data>
<data name="Awake_Status_Title" xml:space="preserve">
<value>Awake: Current status</value>
</data>
<data name="Awake_KeepIndefinite_Title" xml:space="preserve">
<value>Awake: Keep awake indefinitely</value>
</data>
<data name="Awake_KeepIndefinite_Subtitle" xml:space="preserve">
<value>Run Awake in indefinite mode</value>
</data>
<data name="Awake_Keep30Min_Title" xml:space="preserve">
<value>Awake: Keep awake for 30 minutes</value>
</data>
<data name="Awake_Keep30Min_Subtitle" xml:space="preserve">
<value>Run Awake timed for 30 minutes</value>
</data>
<data name="Awake_Keep1Hour_Title" xml:space="preserve">
<value>Awake: Keep awake for 1 hour</value>
</data>
<data name="Awake_Keep1Hour_Subtitle" xml:space="preserve">
<value>Run Awake timed for 1 hour</value>
</data>
<data name="Awake_Keep2Hours_Title" xml:space="preserve">
<value>Awake: Keep awake for 2 hours</value>
</data>
<data name="Awake_Keep2Hours_Subtitle" xml:space="preserve">
<value>Run Awake timed for 2 hours</value>
</data>
<data name="Awake_TurnOff_Title" xml:space="preserve">
<value>Awake: Turn off</value>
</data>
<data name="Awake_TurnOff_Subtitle" xml:space="preserve">
<value>Switch Awake back to Off</value>
</data>
<data name="Awake_SetIndefinite_Toast" xml:space="preserve">
<value>Awake set to indefinite</value>
</data>
<data name="Awake_Set30Min_Toast" xml:space="preserve">
<value>Awake set for 30 minutes</value>
</data>
<data name="Awake_Set1Hour_Toast" xml:space="preserve">
<value>Awake set for 1 hour</value>
</data>
<data name="Awake_Set2Hours_Toast" xml:space="preserve">
<value>Awake set for 2 hours</value>
</data>
<!-- Color Picker Module -->
<data name="ColorPicker_Settings_Subtitle" xml:space="preserve">
<value>Open Color Picker settings</value>
</data>
<data name="ColorPicker_Open_Title" xml:space="preserve">
<value>Open Color Picker</value>
</data>
<data name="ColorPicker_Open_Subtitle" xml:space="preserve">
<value>Start a color pick session</value>
</data>
<data name="ColorPicker_SavedColors_Title" xml:space="preserve">
<value>Saved colors</value>
</data>
<data name="ColorPicker_SavedColors_Subtitle" xml:space="preserve">
<value>Browse and copy saved colors</value>
</data>
<data name="ColorPicker_NoSavedColors_Title" xml:space="preserve">
<value>No saved colors</value>
</data>
<data name="ColorPicker_NoSavedColors_Subtitle" xml:space="preserve">
<value>Pick a color first, then try again.</value>
</data>
<data name="ColorPicker_NoMatchingSavedColors_Subtitle" xml:space="preserve">
<value>No saved colors matching '{0}'</value>
</data>
<!-- Command Not Found Module -->
<data name="CommandNotFound_Settings_Subtitle" xml:space="preserve">
<value>Open Command Not Found settings</value>
</data>
<!-- Crop And Lock Module -->
<data name="CropAndLock_Reparent_Title" xml:space="preserve">
<value>Crop and Lock (Reparent)</value>
</data>
<data name="CropAndLock_Reparent_Subtitle" xml:space="preserve">
<value>Create a cropped reparented window</value>
</data>
<data name="CropAndLock_Thumbnail_Title" xml:space="preserve">
<value>Crop and Lock (Thumbnail)</value>
</data>
<data name="CropAndLock_Thumbnail_Subtitle" xml:space="preserve">
<value>Create a cropped thumbnail window</value>
</data>
<data name="CropAndLock_Settings_Subtitle" xml:space="preserve">
<value>Open Crop and Lock settings</value>
</data>
<!-- Environment Variables Module -->
<data name="EnvironmentVariables_Open_Title" xml:space="preserve">
<value>Open Environment Variables</value>
</data>
<data name="EnvironmentVariables_Open_Subtitle" xml:space="preserve">
<value>Launch Environment Variables editor</value>
</data>
<data name="EnvironmentVariables_OpenAdmin_Title" xml:space="preserve">
<value>Open Environment Variables (Admin)</value>
</data>
<data name="EnvironmentVariables_OpenAdmin_Subtitle" xml:space="preserve">
<value>Launch Environment Variables editor as admin</value>
</data>
<data name="EnvironmentVariables_Settings_Subtitle" xml:space="preserve">
<value>Open Environment Variables settings</value>
</data>
<!-- FancyZones Module -->
<data name="FancyZones_Layouts_Title" xml:space="preserve">
<value>FancyZones: Layouts</value>
</data>
<data name="FancyZones_Layouts_Subtitle" xml:space="preserve">
<value>Apply a layout to all monitors or a specific monitor</value>
</data>
<data name="FancyZones_Monitors_Title" xml:space="preserve">
<value>FancyZones: Monitors</value>
</data>
<data name="FancyZones_Monitors_Subtitle" xml:space="preserve">
<value>Identify monitors and apply layouts</value>
</data>
<data name="FancyZones_OpenEditor_Title" xml:space="preserve">
<value>Open FancyZones Editor</value>
</data>
<data name="FancyZones_OpenEditor_Subtitle" xml:space="preserve">
<value>Launch layout editor</value>
</data>
<data name="FancyZones_Settings_Subtitle" xml:space="preserve">
<value>Open FancyZones settings</value>
</data>
<data name="FancyZones_LayoutsPage_Title" xml:space="preserve">
<value>FancyZones Layouts</value>
</data>
<data name="FancyZones_NoLayoutsFound_Title" xml:space="preserve">
<value>No layouts found</value>
</data>
<data name="FancyZones_NoLayoutsFound_Subtitle" xml:space="preserve">
<value>Open FancyZones Editor once to initialize layouts.</value>
</data>
<data name="FancyZones_ApplyTo_Format" xml:space="preserve">
<value>Apply to {0}</value>
</data>
<data name="FancyZones_MonitorsPage_Title" xml:space="preserve">
<value>FancyZones Monitors</value>
</data>
<data name="FancyZones_NoMonitorsFound_Title" xml:space="preserve">
<value>No monitors found</value>
</data>
<data name="FancyZones_NoMonitorsFound_Subtitle" xml:space="preserve">
<value>Open FancyZones Editor once to initialize monitor data.</value>
</data>
<data name="FancyZones_SetActiveLayout" xml:space="preserve">
<value>Set active layout</value>
</data>
<data name="FancyZones_PickLayoutForMonitor" xml:space="preserve">
<value>Pick a layout for this monitor</value>
</data>
<data name="FancyZones_SetActiveLayoutFor_Format" xml:space="preserve">
<value>Set active layout for {0}</value>
</data>
<data name="FancyZones_CurrentLayout_Format" xml:space="preserve">
<value>Current layout: {0}</value>
</data>
<data name="FancyZones_CurrentLayout_Unknown" xml:space="preserve">
<value>Current layout: unknown</value>
</data>
<data name="FancyZones_Template_Format" xml:space="preserve">
<value>Template: {0}</value>
</data>
<data name="FancyZones_Zones_Format" xml:space="preserve">
<value>{0} zones</value>
</data>
<data name="FancyZones_CustomGrid_Zones_Format" xml:space="preserve">
<value>Custom grid • {0} zones</value>
</data>
<data name="FancyZones_CustomCanvas_Zones_Format" xml:space="preserve">
<value>Custom canvas • {0} zones</value>
</data>
<data name="FancyZones_Custom_Zones_Format" xml:space="preserve">
<value>Custom • {0} zones</value>
</data>
<data name="FancyZones_LayoutApplied" xml:space="preserve">
<value>Layout applied.</value>
</data>
<data name="FancyZones_LayoutAppliedNotifyFailed_Format" xml:space="preserve">
<value>Layout applied, but FancyZones could not be notified: {0}</value>
</data>
<data name="FancyZones_WriteAppliedLayoutsFailed_Format" xml:space="preserve">
<value>Failed to write applied layouts: {0}</value>
</data>
<data name="FancyZones_MonitorDataNotFound" xml:space="preserve">
<value>FancyZones monitor data not found. Open FancyZones Editor once to initialize.</value>
</data>
<data name="FancyZones_NoFancyZonesMonitorsFound" xml:space="preserve">
<value>No FancyZones monitors found.</value>
</data>
<data name="FancyZones_ReadMonitorDataFailed_Format" xml:space="preserve">
<value>Failed to read FancyZones monitor data: {0}</value>
</data>
<!-- File Explorer Addons Module -->
<data name="FileExplorerAddons_Settings_Subtitle" xml:space="preserve">
<value>Open File Explorer add-ons settings</value>
</data>
<!-- File Locksmith Module -->
<data name="FileLocksmith_Settings_Subtitle" xml:space="preserve">
<value>Open File Locksmith settings</value>
</data>
<!-- Hosts Module -->
<data name="Hosts_Open_Title" xml:space="preserve">
<value>Open Hosts File Editor</value>
</data>
<data name="Hosts_Open_Subtitle" xml:space="preserve">
<value>Launch Hosts File Editor</value>
</data>
<data name="Hosts_OpenAdmin_Title" xml:space="preserve">
<value>Open Hosts File Editor (Admin)</value>
</data>
<data name="Hosts_OpenAdmin_Subtitle" xml:space="preserve">
<value>Launch Hosts File Editor as admin</value>
</data>
<data name="Hosts_Settings_Subtitle" xml:space="preserve">
<value>Open Hosts File Editor settings</value>
</data>
<!-- Image Resizer Module -->
<data name="ImageResizer_Settings_Subtitle" xml:space="preserve">
<value>Open Image Resizer settings</value>
</data>
<!-- Keyboard Manager Module -->
<data name="KeyboardManager_Settings_Subtitle" xml:space="preserve">
<value>Open Keyboard Manager settings</value>
</data>
<!-- Light Switch Module -->
<data name="LightSwitch_Toggle_Title" xml:space="preserve">
<value>Light Switch: Toggle theme</value>
</data>
<data name="LightSwitch_Toggle_Subtitle" xml:space="preserve">
<value>Toggle system/apps theme immediately</value>
</data>
<data name="LightSwitch_Settings_Subtitle" xml:space="preserve">
<value>Open Light Switch settings</value>
</data>
<!-- Mouse Utils Module -->
<data name="MouseUtils_FindMyMouse_Title" xml:space="preserve">
<value>Trigger Find My Mouse</value>
</data>
<data name="MouseUtils_FindMyMouse_Subtitle" xml:space="preserve">
<value>Focus the mouse pointer</value>
</data>
<data name="MouseUtils_Highlighter_Title" xml:space="preserve">
<value>Toggle Mouse Highlighter</value>
</data>
<data name="MouseUtils_Highlighter_Subtitle" xml:space="preserve">
<value>Highlight mouse clicks</value>
</data>
<data name="MouseUtils_Crosshairs_Title" xml:space="preserve">
<value>Toggle Mouse Crosshairs</value>
</data>
<data name="MouseUtils_Crosshairs_Subtitle" xml:space="preserve">
<value>Enable or disable pointer crosshairs</value>
</data>
<data name="MouseUtils_CursorWrap_Title" xml:space="preserve">
<value>Toggle Cursor Wrap</value>
</data>
<data name="MouseUtils_CursorWrap_Subtitle" xml:space="preserve">
<value>Wrap the cursor across monitor edges</value>
</data>
<data name="MouseUtils_MouseJump_Title" xml:space="preserve">
<value>Show Mouse Jump Preview</value>
</data>
<data name="MouseUtils_MouseJump_Subtitle" xml:space="preserve">
<value>Jump the pointer to a target</value>
</data>
<data name="MouseUtils_Settings_Subtitle" xml:space="preserve">
<value>Open Mouse Utilities settings</value>
</data>
<!-- Mouse Without Borders Module -->
<data name="MouseWithoutBorders_Settings_Subtitle" xml:space="preserve">
<value>Open Mouse Without Borders settings</value>
</data>
<!-- New+ Module -->
<data name="NewPlus_Settings_Subtitle" xml:space="preserve">
<value>Open New+ settings</value>
</data>
<!-- Peek Module -->
<data name="Peek_Settings_Subtitle" xml:space="preserve">
<value>Open Peek settings</value>
</data>
<!-- PowerRename Module -->
<data name="PowerRename_Settings_Subtitle" xml:space="preserve">
<value>Open PowerRename settings</value>
</data>
<!-- PowerToys Run Module -->
<data name="PowerToysRun_Settings_Subtitle" xml:space="preserve">
<value>Open PowerToys Run settings</value>
</data>
<!-- Quick Accent Module -->
<data name="QuickAccent_Settings_Subtitle" xml:space="preserve">
<value>Open Quick Accent settings</value>
</data>
<!-- Registry Preview Module -->
<data name="RegistryPreview_Open_Title" xml:space="preserve">
<value>Open Registry Preview</value>
</data>
<data name="RegistryPreview_Open_Subtitle" xml:space="preserve">
<value>Launch Registry Preview</value>
</data>
<data name="RegistryPreview_Settings_Subtitle" xml:space="preserve">
<value>Open Registry Preview settings</value>
</data>
<!-- Screen Ruler Module -->
<data name="ScreenRuler_Toggle_Title" xml:space="preserve">
<value>Toggle Screen Ruler</value>
</data>
<data name="ScreenRuler_Toggle_Subtitle" xml:space="preserve">
<value>Start or close Screen Ruler</value>
</data>
<data name="ScreenRuler_Settings_Subtitle" xml:space="preserve">
<value>Open Screen Ruler settings</value>
</data>
<!-- Shortcut Guide Module -->
<data name="ShortcutGuide_Toggle_Title" xml:space="preserve">
<value>Toggle Shortcut Guide</value>
</data>
<data name="ShortcutGuide_Toggle_Subtitle" xml:space="preserve">
<value>Show or hide Shortcut Guide</value>
</data>
<data name="ShortcutGuide_Settings_Subtitle" xml:space="preserve">
<value>Open Shortcut Guide settings</value>
</data>
<!-- Text Extractor Module -->
<data name="TextExtractor_Toggle_Title" xml:space="preserve">
<value>Toggle Text Extractor</value>
</data>
<data name="TextExtractor_Toggle_Subtitle" xml:space="preserve">
<value>Start or close Text Extractor</value>
</data>
<data name="TextExtractor_Settings_Subtitle" xml:space="preserve">
<value>Open Text Extractor settings</value>
</data>
<!-- Workspaces Module -->
<data name="Workspaces_Settings_Subtitle" xml:space="preserve">
<value>Open Workspaces settings</value>
</data>
<data name="Workspaces_OpenEditor_Title" xml:space="preserve">
<value>Workspaces: Open editor</value>
</data>
<data name="Workspaces_OpenEditor_Subtitle" xml:space="preserve">
<value>Create or edit workspaces</value>
</data>
<data name="Workspaces_NoApplications" xml:space="preserve">
<value>No applications</value>
</data>
<data name="Workspaces_Applications_Format" xml:space="preserve">
<value>{0} applications</value>
</data>
<data name="Workspaces_LastLaunched_Format" xml:space="preserve">
<value>Last launched {0}</value>
</data>
<data name="Workspaces_NeverLaunched" xml:space="preserve">
<value>Never launched</value>
</data>
<data name="Workspaces_NoApplicationsInWorkspace" xml:space="preserve">
<value>No applications in this workspace</value>
</data>
<data name="Workspaces_OneApplication" xml:space="preserve">
<value>1 application</value>
</data>
<data name="Workspaces_ApplicationsCount_Format" xml:space="preserve">
<value>{0} applications</value>
</data>
<data name="Workspaces_Workspace" xml:space="preserve">
<value>Workspace</value>
</data>
<data name="Workspaces_App" xml:space="preserve">
<value>App</value>
</data>
<data name="Workspaces_JustNow" xml:space="preserve">
<value>just now</value>
</data>
<data name="Workspaces_MinAgo_Format" xml:space="preserve">
<value>{0} min ago</value>
</data>
<data name="Workspaces_HrAgo_Format" xml:space="preserve">
<value>{0} hr ago</value>
</data>
<data name="Workspaces_DaysAgo_Format" xml:space="preserve">
<value>{0} days ago</value>
</data>
<!-- ZoomIt Module -->
<data name="ZoomIt_Zoom_Title" xml:space="preserve">
<value>ZoomIt: Zoom</value>
</data>
<data name="ZoomIt_Zoom_Subtitle" xml:space="preserve">
<value>Enter zoom mode</value>
</data>
<data name="ZoomIt_Draw_Title" xml:space="preserve">
<value>ZoomIt: Draw</value>
</data>
<data name="ZoomIt_Draw_Subtitle" xml:space="preserve">
<value>Enter drawing mode</value>
</data>
<data name="ZoomIt_Break_Title" xml:space="preserve">
<value>ZoomIt: Break</value>
</data>
<data name="ZoomIt_Break_Subtitle" xml:space="preserve">
<value>Enter break timer</value>
</data>
<data name="ZoomIt_LiveZoom_Title" xml:space="preserve">
<value>ZoomIt: Live Zoom</value>
</data>
<data name="ZoomIt_LiveZoom_Subtitle" xml:space="preserve">
<value>Toggle live zoom</value>
</data>
<data name="ZoomIt_Snip_Title" xml:space="preserve">
<value>ZoomIt: Snip</value>
</data>
<data name="ZoomIt_Snip_Subtitle" xml:space="preserve">
<value>Enter snip mode</value>
</data>
<data name="ZoomIt_Record_Title" xml:space="preserve">
<value>ZoomIt: Record</value>
</data>
<data name="ZoomIt_Record_Subtitle" xml:space="preserve">
<value>Start recording</value>
</data>
<data name="ZoomIt_Settings_Subtitle" xml:space="preserve">
<value>Open ZoomIt settings</value>
</data>
<!-- FancyZones Monitor Details -->
<data name="FancyZones_Monitor" xml:space="preserve">
<value>Monitor</value>
</data>
<data name="FancyZones_Instance" xml:space="preserve">
<value>Instance</value>
</data>
<data name="FancyZones_Serial" xml:space="preserve">
<value>Serial</value>
</data>
<data name="FancyZones_Number" xml:space="preserve">
<value>Number</value>
</data>
<data name="FancyZones_VirtualDesktop" xml:space="preserve">
<value>Virtual desktop</value>
</data>
<data name="FancyZones_WorkArea" xml:space="preserve">
<value>Work area</value>
</data>
<data name="FancyZones_Resolution" xml:space="preserve">
<value>Resolution</value>
</data>
<data name="FancyZones_DPI" xml:space="preserve">
<value>DPI</value>
</data>
<data name="Common_NotAvailable" xml:space="preserve">
<value>N/A</value>
</data>
</root>

View File

@@ -130,7 +130,6 @@ namespace Peek.FilePreviewer.Previewers
}
else if (isMarkdown)
{
IsDevFilePreview = false;
var raw = await ReadHelper.Read(File.Path.ToString());
Preview = new Uri(MarkdownHelper.PreviewTempFile(raw, File.Path, TempFolderPath.Path));
}