diff --git a/src/Magpie.App/App.idl b/src/Magpie.App/App.idl index 9df1310f0..60edfbdbb 100644 --- a/src/Magpie.App/App.idl +++ b/src/Magpie.App/App.idl @@ -25,7 +25,7 @@ namespace Magpie.App { #include "EffectParametersViewModel.idl" #include "ScalingModeEffectItem.idl" #include "ScalingModeItem.idl" -#include "ScalingConfigurationViewModel.idl" +#include "ScalingModesViewModel.idl" #include "ProfileViewModel.idl" #include "SettingsViewModel.idl" #include "CandidateWindowItem.idl" @@ -34,7 +34,7 @@ namespace Magpie.App { #include "RootPage.idl" #include "AboutPage.idl" #include "HomePage.idl" -#include "ScalingConfigurationPage.idl" +#include "ScalingModesPage.idl" #include "ProfilePage.idl" #include "SettingsPage.idl" diff --git a/src/Magpie.App/EffectParametersViewModel.h b/src/Magpie.App/EffectParametersViewModel.h index 7e568be74..b4cbd7fe0 100644 --- a/src/Magpie.App/EffectParametersViewModel.h +++ b/src/Magpie.App/EffectParametersViewModel.h @@ -59,7 +59,7 @@ struct ScalingModeFloatParameter : ScalingModeFloatParameterTCode - - ScalingConfigurationViewModel.idl + + ScalingModesViewModel.idl Code @@ -171,8 +171,8 @@ PageFrame.xaml Code - - ScalingConfigurationPage.xaml + + ScalingModesPage.xaml Code @@ -317,8 +317,8 @@ Code - - ScalingConfigurationViewModel.idl + + ScalingModesViewModel.idl Code @@ -338,8 +338,8 @@ PageFrame.xaml Code - - ScalingConfigurationPage.xaml + + ScalingModesPage.xaml Code @@ -443,7 +443,7 @@ Designer - + Designer @@ -455,8 +455,8 @@ Designer - - ScalingConfigurationPage.xaml + + ScalingModesPage.xaml Code @@ -548,7 +548,7 @@ Designer - + Designer diff --git a/src/Magpie.App/Resources.language-de.resw b/src/Magpie.App/Resources.language-de.resw index 846484912..75c3ede50 100644 --- a/src/Magpie.App/Resources.language-de.resw +++ b/src/Magpie.App/Resources.language-de.resw @@ -1,6 +1,65 @@ - + + @@ -136,7 +195,7 @@ An - + Skalierungs Konfiguration @@ -151,7 +210,7 @@ Verzögerung in Sekunden - + Skalierungs Konfiguration @@ -169,12 +228,9 @@ Skalierung - + Weitere Optionen - - Skalierungsmodus - Du brauchst Administrationsrechte, um diese Einstellung zu nutzen @@ -322,13 +378,13 @@ Starten - + Exportieren - + Importieren - + Importiere ScaleModels.json @@ -340,97 +396,97 @@ Github repository - + Parameter - + Weitere Optionen - + Löschen - + Runter - + Umbenennen - + OK - + Umbenennen - + Effekt hinzufügen - + Löschen - + Es wird von den folgenden Profilen verwendet: - + Sind Sie sicher, dass Sie diesen Skalierungsmodus löschen wollen? - + Aufwärts bewegen - + Ziehen zum Neuordnen - + Neuer Skalierungsmodus - + Neuer Skalierungsmodus - + Skalierung - + Kopieren von - + keiner - + Erstellen - + Name - + Höhe (Skalierungsfaktor) - + Höhe (Pixel) - + Breite (Skalierungsfaktor) - + Breite (Pixel) - + Typ - + Absolut - + Einstellen der Größe nach der Skalierung - + Faktor - + Füllen - + Füllt den Bildschirm aus, das Bild könnte gestreckt werden - + Einstellen des Skalierungsfaktors nach dem proportionalen Ausfüllen des Bildschirms @@ -439,7 +495,7 @@ Umbenennen - + Anpassen @@ -454,7 +510,7 @@ Umsortieren - + Parsing fehlgeschlagen @@ -586,10 +642,10 @@ Magpie Neustarten - + Unbekannter Effekt - + Einige Effekte können nicht geparst werden @@ -710,19 +766,19 @@ Lizenz - + Löschen - + Drag and drop wird bei der Ausführung als Administrator nicht unterstützt - + Runter - + Hoch - + Einstellen des Skalierungsfaktors relativ zum Eingabebild diff --git a/src/Magpie.App/Resources.language-en-US.resw b/src/Magpie.App/Resources.language-en-US.resw index 3775855de..59f272d11 100644 --- a/src/Magpie.App/Resources.language-en-US.resw +++ b/src/Magpie.App/Resources.language-en-US.resw @@ -210,11 +210,11 @@ Profiles - - Scaling configuration + + Scaling modes - - Scaling configuration + + Scaling modes Advanced @@ -279,21 +279,18 @@ Launch - + Export - + Import - + Import ScaleModels.json - + More options - - Scaling modes - You need to run as administrator to use this setting @@ -330,115 +327,115 @@ Github repository - + Parameters - + More options - + Delete - + Move down - + Move up - + Rename - + OK - + Rename - + Add effect - + Delete - + Delete - + It is being used by the following profiles: - + Are you sure you want to delete this scaling mode? - + Drag and drop is not supported when running as administrator - + Drag to reorder - + Move down - + Move up - + New scaling mode - + New scaling mode - + Scale - + Copy from - + None - + Create - + Name - + Height (scaling factor) - + Height (pixels) - + Width (scaling factor) - + Width (pixels) - + Type - + Absolute - + Set the size after scaling - + Factor - + Set the scaling factor relative to the input image - + Fill - + Fills screen, image may be stretched - + Fit - + Set the scaling factor after filling the screen with proportional scaling @@ -507,7 +504,7 @@ Reorder - + Parsing failed @@ -715,10 +712,10 @@ Restart Magpie - + Unknown effect - + Some effects cannot be parsed diff --git a/src/Magpie.App/Resources.language-es.resw b/src/Magpie.App/Resources.language-es.resw index 071b4ea0d..f2a8585a3 100644 --- a/src/Magpie.App/Resources.language-es.resw +++ b/src/Magpie.App/Resources.language-es.resw @@ -198,7 +198,7 @@ Nuevo perfil - + Configuración de escalado @@ -255,18 +255,15 @@ Lanzamiento - + Exportar - + Importar ScaleModels.json - + Mas opciones - - Modos de escalado - Ejecutar siempre como administrador @@ -285,67 +282,67 @@ Licencia - + Parámetros - + Borrar - + Mover hacia abajo - + Mover hacia arriba - + Renombrar - + Guardar - + Renombrar - + Agregar efecto - + Borrar - + ¿Está seguro de que desea eliminar este modo de escalado? - + Arrastrar y soltar no es compatible cuando se ejecuta como administrador - + Mover hacia arriba - + Copiado de - + Ninguno - + Crear - + Nombre - + Ancho (píxeles) - + Tipo - + Establecer el tamaño después de escalar - + Factor - + Adaptar @@ -396,7 +393,7 @@ Reordenar - + Análisis fallido @@ -522,10 +519,10 @@ Reiniciar Magpie - + Efecto desconocido - + Algunos efectos no se pueden analizar @@ -558,7 +555,7 @@ Acerca de - + Configuración de escalado @@ -570,13 +567,13 @@ Atajo para la superposición en el juego - + Mover hacia abajo Renombrar - + Importar @@ -585,10 +582,10 @@ Necesita ejecutar como administrador para usar esta configuración - + Está siendo utilizado por los siguientes perfiles: - + Absoluto @@ -600,52 +597,52 @@ Repositorio Github - + Arrastre para reordenar - + Escalado Otros enlaces - + Mas opciones Preguntas más frecuentes - + Borrar - + Nuevo modo de escalado - + Nuevo modo de escalado - + Altura (factor de escala) - + Altura (píxeles) - + Ancho (factor de escala) - + Establecer el factor de escala relativo a la imagen de entrada - + Llenar - + Establecer el factor de escala después de llenar la pantalla con escala proporcional Método de captura - + Llena la pantalla, la imagen puede estirarse diff --git a/src/Magpie.App/Resources.language-fr.resw b/src/Magpie.App/Resources.language-fr.resw index 3e926e06a..c70ec6f83 100644 --- a/src/Magpie.App/Resources.language-fr.resw +++ b/src/Magpie.App/Resources.language-fr.resw @@ -162,7 +162,7 @@ Nom - + Configuration de mise a l'échelle @@ -171,13 +171,13 @@ Thème - + Importer ScaleModels.json Le fichier de configuration n'est pas un fichier JSON valide - + Effet inconnu @@ -255,7 +255,7 @@ Nouveau profil - + Configuration de mise a l'échelle @@ -306,10 +306,10 @@ Lancez - + Importer - + Plus d'options @@ -321,7 +321,7 @@ Raccourcis de mise a l'échelle - + Exporter @@ -333,7 +333,7 @@ Redémarrer Magpie - + Certains effet n'ont pas pu être analysés @@ -376,7 +376,7 @@ Mode développeur est activer. - + Ajuster @@ -415,10 +415,10 @@ Me le rappeler plus tard - + Définir le facteur d'échelle par rapport à l'image d'entrée - + OK @@ -436,24 +436,21 @@ Fichier JSON - + Plus d'options Écran coupés par la fenêtre source - + Absolu Ouvrir l'emplacement du programme - + Ajouter effet - - Modes de mise à l'échelle - Plus d'options @@ -466,10 +463,10 @@ Sauvegarde du code source lors de l'analyse des effets - + Facteur - + Créer @@ -481,7 +478,7 @@ Barre de titre de la capture - + Monter @@ -499,10 +496,10 @@ Personnalisé - + Supprimer - + Aucun @@ -529,10 +526,10 @@ La droite - + Définir le facteur d'échelle après avoir rempli l'écran avec une échelle proportionnelle - + Descendre @@ -553,10 +550,10 @@ Télécharger et installer - + Faire glisser pour réorganiser - + Largeur (facteur de mise à l'échelle) @@ -568,10 +565,10 @@ Télécharger et installer - + Définir la taille après la mise à l'échelle - + Type @@ -580,7 +577,7 @@ Les notifications et les fenêtres contextuelles de certaines applications seront bloquées - + Renommer @@ -589,13 +586,13 @@ Recadrage personnalisé - + Remplit l'écran, l'image peut être étirée - + Hauteur (facteur de mise à l'échelle) - + Renommer @@ -607,7 +604,7 @@ Choisissez le fichier exécutable pour lancer le programme - + Nom @@ -616,7 +613,7 @@ Renommer - + Descendre @@ -628,7 +625,7 @@ Méthode de capture - + Monter @@ -649,7 +646,7 @@ Discussions - + Remplir @@ -670,13 +667,13 @@ Vérifier automatiquement les mises à jour - + L'analyse a échoué - + Paramètres - + Nouveau mode de mise à l'échelle @@ -700,7 +697,7 @@ Écrans préférés - + Supprimer @@ -709,25 +706,25 @@ Vous devez exécuter l'application en mode administrateur pour utiliser ce paramètre - + Copie de Réorganisation - + Êtes-vous sûr de vouloir supprimer ce mode de mise à l'échelle ? Toujours exécuter en mode administrateur - + Il est utilisé par les profils suivants : Le haut - + Nouveau mode de mise à l'échelle @@ -745,7 +742,7 @@ Avertissement - + Le glisser-déposer n'est pas pris en charge lorsque l'utilisateur est un administrateur @@ -754,10 +751,10 @@ Désactiver DirectFlip - + Largeur (pixels) - + Supprimer @@ -775,10 +772,10 @@ Téléchargement - + Mise à l'échelle - + Hauteur (pixels) diff --git a/src/Magpie.App/Resources.language-hu.resw b/src/Magpie.App/Resources.language-hu.resw index 01ddbbc7a..2fe1f5077 100644 --- a/src/Magpie.App/Resources.language-hu.resw +++ b/src/Magpie.App/Resources.language-hu.resw @@ -181,7 +181,7 @@ Egyéni - + Törlés @@ -220,7 +220,7 @@ Nyelv - + Importálás @@ -250,7 +250,7 @@ Világos - + Név @@ -298,7 +298,7 @@ Beszélgetések - + Kitöltés diff --git a/src/Magpie.App/Resources.language-id.resw b/src/Magpie.App/Resources.language-id.resw index ceb32ca5a..3d5084b52 100644 --- a/src/Magpie.App/Resources.language-id.resw +++ b/src/Magpie.App/Resources.language-id.resw @@ -162,10 +162,10 @@ Profil - + Konfigurasi penskalaan - + Konfigurasi penskalaan @@ -231,21 +231,18 @@ Jalankan - + Ekspor - + Impor - + Impor ScaleModels.json - + Opsi lainnya - - Mode penskalaan - Selalu jalan sebagai administrator @@ -300,94 +297,94 @@ Repositori Github - + Parameter - + Opsi lainnya - + Hapus - + Pindah ke bawah - + Pindah ke atas - + Ganti nama - + Oke - + Ganti nama - + Tambah efek - + Hapus - + Hapus - + Sedang digunakan oleh profil: - + Apakah kamu yakin ingin menghapus mode penskalaan ini? - + Drag and drop tidak didukung saat jalan sebagai administrator - + Drag untuk menyusun ulang - + Pindah ke bawah - + Pindah ke atas - + Mode penskalaan baru - + Mode penskalaan baru - + Skala - + Tinggi (piksel) - + Lebar (faktor skala) - + Lebar (piksel) - + Tipe - + Absolut - + Faktor - + Isi - + Isi layar, gambar mungkin meregang - + Pas - + Atur faktor penskalaan setelah mengisi layar dengan penskalaan proporsional @@ -426,25 +423,25 @@ Hanya pintasan yang berawal dengan tombol Windows, Ctrl, Alt, atau Shift yang berlaku. - + Tinggi (faktor skala) - + Tidak ada - + Nama - + Buat - + Salin dari - + Atur faktor penskalaan relatif terhadap gambar input - + Atur ukuran setelah penskalaan @@ -507,7 +504,7 @@ Susun ulang - + Gagal parsing diff --git a/src/Magpie.App/Resources.language-it.resw b/src/Magpie.App/Resources.language-it.resw index f6f564d63..c00cc0647 100644 --- a/src/Magpie.App/Resources.language-it.resw +++ b/src/Magpie.App/Resources.language-it.resw @@ -195,7 +195,7 @@ Profili - + Configurazione del ridimensionamento @@ -222,21 +222,18 @@ Avvia - + Esporta - + Importa - + Importa ScaleModels.json - + Altre opzioni - - Modalità di ridimensionamento - Devi eseguire l'app come amministratore per usare questa impostazione @@ -264,91 +261,91 @@ Linee guida per contribuire - + Cancella - + Sposta in basso - + Sposta in alto - + Cancella - + Cancella - + Viene utilizzato dai seguenti profili: - + Sei sicuro di voler eliminare questa modalità di ridimensionamento? - + Il trascinamento non è supportato quando si usa l'app come amministratore - + Trascina per riordinare - + Sposta in basso - + Sposta in alto - + Nuova modalità di ridimensionamento - + Ridimensiona - + Copia da - + Nessuno - + Crea - + Nome - + Altezza (fattore di scala) - + Altezza (pixel) - + Larghezza (fattore di scala) - + Larghezza (pixel) - + Tipo - + Assoluto - + Imposta la dimensione dopo il ridimensionamento - + Fattore - + Impostare il fattore di scala relativo all'immagine in entrata - + Riempi - + Riempi lo schermo, l'immagine potrebbe essere allungata - + Adatta @@ -357,7 +354,7 @@ Modalità gioco 3D - + Imposta il fattore di ridimensionamento dopo aver riempito lo schermo con il ridimensionamento proporzionale @@ -529,10 +526,10 @@ Finestra principale - + Effetto sconosciuto - + Alcuni effetti non possono essere analizzati @@ -607,7 +604,7 @@ Nome - + Configurazione del ridimensionamento @@ -655,25 +652,25 @@ Repository Github - + Altre opzioni - + Parametri - + Nuova modalità di ridimensionamento - + Rinomina - + OK - + Rinomina - + Aggiungi effetto @@ -730,7 +727,7 @@ Riordina - + Analisi non riuscita diff --git a/src/Magpie.App/Resources.language-ja.resw b/src/Magpie.App/Resources.language-ja.resw index 0b8d51a87..afa6691c6 100644 --- a/src/Magpie.App/Resources.language-ja.resw +++ b/src/Magpie.App/Resources.language-ja.resw @@ -59,7 +59,7 @@ : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> - + @@ -177,7 +177,7 @@ 名前 - + スケーリング設定 @@ -225,7 +225,7 @@ からコピー - + スケーリング設定 @@ -288,21 +288,18 @@ 起動 - + エクスポート - + インポート - + 古いバージョンのScaleModels.jsonをインポートする - + その他のオプション - - スケーリングモード - 定期的に更新を確認する @@ -330,70 +327,70 @@ Githubリポジトリ - + パラメータ - + 下へ移動 - + 上へ移動 - + リネーム - + リネーム - + 効果を追加 - + 削除 - + 削除 - + このスケーリング モードを削除してもよろしいですか? - + 新しいスケーリングモード - + 新しいスケーリングモード - + スケーリング - + なし - + 作成 - + 高さ(倍率) - + 高さ(ピクセル) - + 幅 (ピクセル) - + タイプ - + スケーリング後のサイズを指定する - + 倍率指定 - + 画面いっぱいに最適化 - + 最適化 @@ -432,7 +429,7 @@ 並べ替え - + 解析に失敗しました @@ -607,49 +604,49 @@ 貢献ガイドライン - + 以下のプロファイルは、このスケーリングモードを使用しています: - + その他のオプション - + 削除 - + 確定 - + 管理者として実行しているとき、ドラッグ&ドロップはサポートされていません - + ドラッグして並べ替え - + 下へ移動 - + 上へ移動 - + からコピー - + 名前 - + 絶対値 - + 入力画像に対するスケーリング倍率の指定 - + 幅(倍率) - + 指定された縦横比でスケーリングされた際の倍率 - + モニタいっぱいに表示されます、縦横比は無視 @@ -709,13 +706,13 @@ デバッグモード - + 未知の効果 メインウィンドウ - + 一部のエフェクトを解析できません diff --git a/src/Magpie.App/Resources.language-ko.resw b/src/Magpie.App/Resources.language-ko.resw index 86ccb9fb1..3187ac4f3 100644 --- a/src/Magpie.App/Resources.language-ko.resw +++ b/src/Magpie.App/Resources.language-ko.resw @@ -156,16 +156,16 @@ 이름 바꾸기 - + 아래로 이동 FAQ - + 절대값 - + 삭제 @@ -243,10 +243,10 @@ 프로파일 - + 스케일링 구성 - + 스케일링 구성 @@ -300,13 +300,13 @@ 실행 - + 내보내기 - + 가져오기 - + 더 많은 옵션 @@ -318,34 +318,34 @@ 라이선스 - + 삭제 - + 다음 프로파일에서 사용되고 있습니다: - + 이 스케일링 모드를 삭제할까요? - + 아래로 이동 - + 끌어서 순서 바꾸기 - + 높이(픽셀) - + 너비(스케일링 인수) - + 유형 - + 맞추기 - + 비례 스케일링으로 화면을 채운 후에 스케일링 인수를 설정합니다 @@ -372,7 +372,7 @@ 순서 바꾸기 - + 구문분석 실패 @@ -498,7 +498,7 @@ 합계 - + 이름 바꾸기 @@ -510,7 +510,7 @@ 다운로드 및 설치 - + 만들기 @@ -531,7 +531,7 @@ 창 선택 - + 새 스케일링 모드 @@ -540,13 +540,13 @@ 포터블 모드 - + 매개변수 - + 위로 이동 - + 다음에서 복사 @@ -567,28 +567,25 @@ 고급 - + ScaleModels.json 가져오기 - - 스케일링 모드 - 깃허브 저장소 항상 관리자 권한으로 실행 - + 스케일 - + 없음 - + 높이(스케일링 인수) - + 관리자 권한으로 실행 중일 때는 드래그 앤 드롭이 지원되지 않습니다 @@ -598,52 +595,52 @@ 기타 링크 - + 더 많은 옵션 - + 삭제 - + 입력 이미지를 기준으로 스케일링 인수를 설정합니다 - + 확인 - + 이름 바꾸기 순서 바꾸기 - + 효과 추가 - + 인수 - + 스케일링 한 후에 크기를 설정합니다 - + 화면을 채웁니다. 이미지가 늘어날 수 있습니다 - + 위로 이동 - + 새 스케일링 모드 - + 채우기 - + 이름 개발자 옵션 - + 너비(픽셀) @@ -739,10 +736,10 @@ Magpie 다시 시작 - + 알 수 없는 효과 - + 일부 효과를 구문분석 할 수 없습니다 diff --git a/src/Magpie.App/Resources.language-pt-BR.resw b/src/Magpie.App/Resources.language-pt-BR.resw index 3cfe89417..8c7cc04ad 100644 --- a/src/Magpie.App/Resources.language-pt-BR.resw +++ b/src/Magpie.App/Resources.language-pt-BR.resw @@ -165,10 +165,10 @@ Abra uma nova janela para criar um perfil - + Configuração de redimensionamento - + Configuração de redimensionamento @@ -210,10 +210,10 @@ Ativado - + Exportar - + Importar @@ -234,58 +234,58 @@ Repositório no GitHub - + Parâmetros - + OK - + Excluir - + Está sendo usado pelos seguintes perfis: - + Tem certeza de que deseja excluir este modo de redimensionamento? - + Novo modo de redimensionamento - + Copiar de - + Nenhum - + Criar - + Nome - + Altura (em pixels) - + Tipo - + Fator - + Definir o fator de redimensionamento em relação à imagem original - + Preenchimento - + Preenche a tela, a imagem pode ser esticada - + Ajustar - + Definir o fator de redimensionamento após preencher a tela com escalonamento proporcional @@ -327,7 +327,7 @@ Reorganizar - + A análise falhou @@ -453,15 +453,12 @@ Inicialização - + Importar ScaleModels.json - + Mais opções - - Modos de redimensionamento - É necessário executar como administrador para utilizar essa configuração @@ -480,58 +477,58 @@ Licença - + Mais opções - + Excluir - + Excluir - + Mover para cima - + Mover para baixo - + Mover para cima - + Renomear - + Renomear - + Adicionar efeito - + Arrastar e soltar não é suportado ao executar como administrador - + Arraste para reorganizar - + Mover para baixo - + Novo modo de redimensionamento Geral - + Altura (fator de redimensionamento) - + Largura (em pixels) - + Largura (fator de redimensionamento) - + Definir o tamanho após o redimensionamento @@ -606,7 +603,7 @@ Aviso - + Não foi possível analisar alguns efeitos @@ -615,7 +612,7 @@ Reiniciar Magpie - + Efeito desconhecido @@ -699,10 +696,10 @@ Home - + Redimensionamento - + Absoluto diff --git a/src/Magpie.App/Resources.language-ru.resw b/src/Magpie.App/Resources.language-ru.resw index d397f1d76..87a66c637 100644 --- a/src/Magpie.App/Resources.language-ru.resw +++ b/src/Magpie.App/Resources.language-ru.resw @@ -59,7 +59,7 @@ : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> - + @@ -126,25 +126,25 @@ Очистить - + Параметры - + Больше настроек - + Удалить - + Опустить - + Поднять - + Переименовать - + Заполнение @@ -261,10 +261,10 @@ Профили - + Настройки масштабирования - + Настройки масштабирования @@ -324,21 +324,18 @@ Запуск - + Экспортировать - + Импортировать - + Импортировать ScaleModels.json - + Больше настроек - - Режимы масштабирования - Для использования этой настройки нужно запустить приложение от имени администратора @@ -375,97 +372,97 @@ Github репозиторий - + Отлично - + Переименовать - + Добавить эффект - + Удалить - + Удалить - + Его используют следующие профили: - + Вы уверены, что хотите удалить этот режим масштабирования? - + Перетаскивание не поддерживается при работе от имени администратора - + Перетащите, чтобы переупорядочить - + Опустить - + Поднять - + Новый режим масштабирования - + Новый режим масштабирования - + Масштабирование - + Копировать из - + Ничего - + Создать - + Название - + Высота (множитель масштабирования) - + Высота (пиксели) - + Ширина (множитель масштабирования) - + Заполняет экран, изображение может быть растянуто - + Вписывание - + Ширина (пиксели) - + Тип - + Абсолютно - + Установить размер после масштабирования - + Множитель - + Выставить множитель масштабирования относительно входного изображения Все мониторы - + Выставить множитель масштабирования после заполнения экрана пропорциональным масштабированием @@ -531,7 +528,7 @@ Переупорядочить - + Сбой парсинга @@ -724,10 +721,10 @@ Импортировать ScaleModels.json - + Некоторые эффекты нельзя анализировать - + Неизвестный эффект diff --git a/src/Magpie.App/Resources.language-tr.resw b/src/Magpie.App/Resources.language-tr.resw index 0e6d82eb1..990e988e0 100644 --- a/src/Magpie.App/Resources.language-tr.resw +++ b/src/Magpie.App/Resources.language-tr.resw @@ -59,7 +59,7 @@ : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> - + @@ -117,10 +117,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + Tür - + Ekranı orantılı ölçek ile doldurduktan sonra ölçek etkenini ayarla @@ -246,7 +246,7 @@ Profiller - + Ölçek yapılandırması @@ -309,21 +309,18 @@ Başlat - + Dışarı aktar - + İçeri aktar - + İçeri aktar ScaleModels.json - + Diğer seçenekler - - Ölçek kipleri - Bu ayarı kullanmak için yönetici olarak çalıştırmak gerekir @@ -357,97 +354,97 @@ Github deposu - + Parametreler - + Diğer seçenekler - + Sil - + Aşağı taşı - + Yukarı taşı - + Adlandır - + Tamam - + Adlandır - + Efekt ekle - + Sil - + Sil - + Aşağıdaki profiller tarafından kullanılmaktadır: - + Bu ölçek kipini silmek istediğinizden emin misiniz? - + Sıralamak için sürükle - + Aşağı taşı - + Yukarı taşı - + Yeni ölçek kipi - + Şuradan kopyala - + Yok - + Oluştur - + İsim - + Yükseklik (ölçek etkeni) - + Yükseklik (piksel) - + Genişlik (ölçek etkeni) - + Genişlik (piksel) - + Ölçek sonrası boyutu ayarla - + Etken - + Giriş görüntüsüne göre ölçek etkeni ayarla - + Doldur - + Ekranı doldurur, görüntü uzatılabilir - + Sığdır @@ -480,7 +477,7 @@ Yukarı taşı - + Ayrıştırma başarısız @@ -489,7 +486,7 @@ Performans - + Salt @@ -670,10 +667,10 @@ Yeniden başlat - + Bilinmeyen efekt - + Bazı efektler ayrıştırılamıyor @@ -697,7 +694,7 @@ Oluştur - + Ölçek yapılandırması @@ -712,13 +709,13 @@ Katkı kuralları - + Yönetici olarak çalışırken sürükle ve bırak desteklenmez - + Ölçek - + Yeni ölçek kipi diff --git a/src/Magpie.App/Resources.language-uk.resw b/src/Magpie.App/Resources.language-uk.resw index fa729faeb..2c9954e3c 100644 --- a/src/Magpie.App/Resources.language-uk.resw +++ b/src/Magpie.App/Resources.language-uk.resw @@ -189,10 +189,10 @@ Профілі - + Конфігурація масштабування - + Конфігурація масштабування @@ -234,18 +234,15 @@ Запуск - + Експорт - + Імпортувати ScaleModels.json - + Додаткові параметри - - Режими масштабування - Щоб скористатися цим параметром, вам потрібно запустити від імені адміністратора @@ -270,97 +267,97 @@ Рекомендації щодо внеску - + Параметри - + Додаткові параметри - + Видалити - + Перемістити вниз - + Перемістити вгору - + Перейменувати - + OK - + Перейменувати - + Додати ефект - + Видалити - + Видалити - + Його використовують наступні профілі: - + Перетягування не підтримується під час роботи від імені адміністратора - + Перетягніть, щоб змінити порядок - + Перемістити вгору - + Новий режим масштабування - + Масштаб - + Копіювати з - + Немає - + Створити - + Ім'я - + Висота (коефіцієнт масштабування) - + Висота (пікселі) - + Ширина (пікселі) - + Тип - + Абсолютний - + Встановити розмір після масштабування - + Коефіцієнт - + Заповнити - + Заповнює екран, зображення може розтягуватися - + Підігнати @@ -414,7 +411,7 @@ Перемістити вниз - + Помилка синтаксичного аналізу @@ -574,7 +571,7 @@ Вже використовується - + Ви впевнені, що хочете видалити цей режим масштабування? @@ -613,7 +610,7 @@ Повідомити про помилку - + Імпорт @@ -628,10 +625,10 @@ Репозиторій Github - + Перемістити вниз - + Новий режим масштабування @@ -640,16 +637,16 @@ Не вдалося перевірити наявність оновлень, спробуйте пізніше - + Встановити коефіцієнт масштабування відносно вхідного зображення - + Ширина (коефіцієнт масштабування) Ви впевнені, що хочете видалити цей профіль? - + Встановити коефіцієнт масштабування після заповнення екрана за допомогою пропорційного масштабування @@ -691,10 +688,10 @@ Імітація ексклюзивного повноекранного режиму при масштабуванні - + Невідомий ефект - + Деякі ефекти не можуть бути проаналізовані diff --git a/src/Magpie.App/Resources.language-vi.resw b/src/Magpie.App/Resources.language-vi.resw index 4aad1dd16..62d2c5b74 100644 --- a/src/Magpie.App/Resources.language-vi.resw +++ b/src/Magpie.App/Resources.language-vi.resw @@ -334,7 +334,7 @@ Cấu hình - + Cài đặt Scaling @@ -517,142 +517,139 @@ Vô hiệu hóa thay đổi cỡ cửa sổ - + Xuất - + Nhập - + Nhập file ScaleModels.json - + Tùy chọn - + Cài đặt Scaling - + Thông số - + Phân giải thất bại - - Các chế độ scale - - + Thêm hiệu ứng - + Xóa - + Xóa - + Hiệu ứng này đang được sử dụng bởi: - + Bạn có chắc chắn muốn xóa hiệu ứng này? - + Hiệu ứng không xác định - + Không thể kéo thả khi đang chạy dưới quyền quản trị - + Kéo thả để thay đổi thứ tự - + Một số hiệu ứng không thể được phân giải - + Tùy chọn - + Xóa - + Xuống - + Lên - + Xuống - + Lên - + Chế độ scale mới - + Chép từ - + Không - + Tạo - + Tên - + Chế độ scale mới - + Đổi tên - + OK - + Đổi tên - + Scale - + Chiều cao (theo tỷ lệ scale) - + Chiều cao (theo pixel) - + Loại - + Tuyệt đối - + Đặt kích cỡ sau scale - + Tỷ lệ scale - + Đặt tỷ lệ tương đối với hình ảnh gốc - + Vừa màn hình - + Hiển thị đầy màn hình, hình ảnh có thể bị méo - + Giữ tỷ lệ - + Giữ tỷ lệ hình ảnh sau khi làm đầy màn hình - + Chiều rông (theo tỷ lệ) - + Chiều rộng (theo pixel) diff --git a/src/Magpie.App/Resources.language-zh-Hans.resw b/src/Magpie.App/Resources.language-zh-Hans.resw index 421f53abb..44a8b7226 100644 --- a/src/Magpie.App/Resources.language-zh-Hans.resw +++ b/src/Magpie.App/Resources.language-zh-Hans.resw @@ -210,11 +210,11 @@ 配置文件 - - 缩放配置 + + 缩放模式 - - 缩放配置 + + 缩放模式 高级 @@ -279,21 +279,18 @@ 启动 - + 导出 - + 导入 - + 导入旧版程序的 ScaleModels.json - + 更多选项 - - 缩放模式 - 以管理员身份运行时才能使用此选项 @@ -330,115 +327,115 @@ Github 仓库 - + 参数 - + 更多选项 - + 删除 - + 下移 - + 上移 - + 重命名 - + 确定 - + 重命名 - + 添加效果 - + 删除 - + 删除 - + 以下配置文件正在使用这个缩放模式: - + 确定删除这个缩放模式? - + 管理员身份下不支持拖拽排序 - + 拖拽以重新排序 - + 下移 - + 上移 - + 新建缩放模式 - + 新建缩放模式 - + 缩放 - + 复制自 - + - + 确定 - + 名称 - + 高(缩放倍数) - + 高(像素) - + 宽(缩放倍数) - + 宽(像素) - + 类型 - + 绝对 - + 指定缩放后的尺寸 - + 倍数 - + 指定相对于输入图像的缩放倍数 - + 填充 - + 充满屏幕,画面可能被拉伸 - + 适应 - + 指定等比缩放到充满屏幕后的缩放倍数 @@ -507,7 +504,7 @@ 重新排序 - + 解析失败 @@ -715,10 +712,10 @@ 重新启动 Magpie - + 未知效果 - + 部分效果未能正确解析 diff --git a/src/Magpie.App/Resources.language-zh-Hant.resw b/src/Magpie.App/Resources.language-zh-Hant.resw index 65fbf2a67..a46ed2102 100644 --- a/src/Magpie.App/Resources.language-zh-Hant.resw +++ b/src/Magpie.App/Resources.language-zh-Hant.resw @@ -201,10 +201,10 @@ 新增設定檔 - + 縮放設定 - + 縮放設定 @@ -264,13 +264,13 @@ 啟動 - + 匯出 - + 匯入 - + 匯入舊版程式的 ScaleModels.json @@ -291,12 +291,9 @@ 已啟用 - + 更多設定 - - 縮放模式 - 以管理員身份執行時才能使用此選項 @@ -327,100 +324,100 @@ Github 倉庫 - + 更多設定 - + 刪除 - + 下移 - + 上移 - + 重新命名 - + 重新命名 - + 新增效果 - + 刪除 - + 刪除 - + 確定刪除這個縮放模式? - + 拖曳以重新排列 - + 下移 - + 上移 - + 縮放 - + 新增縮放模式 - + 複製自 - + - + 新增 - + 名稱 - + 高(縮放倍數) - + 高(像素) - + 寬(縮放倍數) - + 寬(像素) - + 類型 - + 絕對 - + 指定縮放後的尺寸 - + 倍數 - + 指定相對於影像的縮放倍數 - + 填滿 - + 填滿螢幕,畫面可能被拉伸 - + 適應 - + 指定等比縮放到填滿螢幕後的縮放倍數 @@ -456,7 +453,7 @@ 重新排列 - + 剖析失敗 @@ -631,10 +628,10 @@ 重新啟動 Magpie - + 未知的效果 - + 部分效果未能正確剖析 @@ -652,19 +649,19 @@ 貢獻指南 - + 參數 - + 確定 - + 以下設定檔正在使用這個縮放模式: - + 管理員身份下不支援拖曳排列 - + 新增縮放模式 diff --git a/src/Magpie.App/RootPage.cpp b/src/Magpie.App/RootPage.cpp index 551a0eba3..c497e2465 100644 --- a/src/Magpie.App/RootPage.cpp +++ b/src/Magpie.App/RootPage.cpp @@ -119,8 +119,8 @@ void RootPage::NavigationView_SelectionChanged( Interop::TypeName typeName; if (tagStr == L"Home") { typeName = xaml_typename(); - } else if (tagStr == L"ScalingConfiguration") { - typeName = xaml_typename(); + } else if (tagStr == L"ScalingModes") { + typeName = xaml_typename(); } else if (tagStr == L"About") { typeName = xaml_typename(); } else { diff --git a/src/Magpie.App/RootPage.xaml b/src/Magpie.App/RootPage.xaml index 16a8e85f2..d9d85c13a 100644 --- a/src/Magpie.App/RootPage.xaml +++ b/src/Magpie.App/RootPage.xaml @@ -40,8 +40,8 @@ - + diff --git a/src/Magpie.App/ScalingModeEffectItem.cpp b/src/Magpie.App/ScalingModeEffectItem.cpp index 552e8e0ce..d2e1f271c 100644 --- a/src/Magpie.App/ScalingModeEffectItem.cpp +++ b/src/Magpie.App/ScalingModeEffectItem.cpp @@ -32,7 +32,7 @@ ScalingModeEffectItem::ScalingModeEffectItem(uint32_t scalingModeIdx, uint32_t e ResourceLoader resourceLoader = ResourceLoader::GetForCurrentView(CommonSharedConstants::APP_RESOURCE_MAP_ID); _name = StrUtils::Concat( - resourceLoader.GetString(L"ScalingConfiguration_ScalingModes_Description_UnknownEffect"), + resourceLoader.GetString(L"ScalingModes_Description_UnknownEffect"), L" (", data.name, L")" @@ -71,20 +71,20 @@ IVector ScalingModeEffectItem::ScalingTypes() noexcept { return single_threaded_vector(std::vector{ Magpie::App::ScalingType( - resourceLoader.GetString(L"ScalingConfiguration_ScalingModes_ScaleFlyout_Type_Factor"), - resourceLoader.GetString(L"ScalingConfiguration_ScalingModes_ScaleFlyout_Type_Factor_Description") + resourceLoader.GetString(L"ScalingModes_ScaleFlyout_Type_Factor"), + resourceLoader.GetString(L"ScalingModes_ScaleFlyout_Type_Factor_Description") ), Magpie::App::ScalingType( - resourceLoader.GetString(L"ScalingConfiguration_ScalingModes_ScaleFlyout_Type_Fit"), - resourceLoader.GetString(L"ScalingConfiguration_ScalingModes_ScaleFlyout_Type_Fit_Description") + resourceLoader.GetString(L"ScalingModes_ScaleFlyout_Type_Fit"), + resourceLoader.GetString(L"ScalingModes_ScaleFlyout_Type_Fit_Description") ), Magpie::App::ScalingType( - resourceLoader.GetString(L"ScalingConfiguration_ScalingModes_ScaleFlyout_Type_Absolute"), - resourceLoader.GetString(L"ScalingConfiguration_ScalingModes_ScaleFlyout_Type_Absolute_Description") + resourceLoader.GetString(L"ScalingModes_ScaleFlyout_Type_Absolute"), + resourceLoader.GetString(L"ScalingModes_ScaleFlyout_Type_Absolute_Description") ), Magpie::App::ScalingType( - resourceLoader.GetString(L"ScalingConfiguration_ScalingModes_ScaleFlyout_Type_Fill"), - resourceLoader.GetString(L"ScalingConfiguration_ScalingModes_ScaleFlyout_Type_Fill_Description") + resourceLoader.GetString(L"ScalingModes_ScaleFlyout_Type_Fill"), + resourceLoader.GetString(L"ScalingModes_ScaleFlyout_Type_Fill_Description") ), }); } diff --git a/src/Magpie.App/ScalingModeItem.cpp b/src/Magpie.App/ScalingModeItem.cpp index dc07a6809..dfd4f984c 100644 --- a/src/Magpie.App/ScalingModeItem.cpp +++ b/src/Magpie.App/ScalingModeItem.cpp @@ -234,7 +234,7 @@ hstring ScalingModeItem::Description() const noexcept { ResourceLoader resourceLoader = ResourceLoader::GetForCurrentView(CommonSharedConstants::APP_RESOURCE_MAP_ID); result += L'('; - result += resourceLoader.GetString(L"ScalingConfiguration_ScalingModes_Description_UnknownEffect"); + result += resourceLoader.GetString(L"ScalingModes_Description_UnknownEffect"); result += L')'; } } diff --git a/src/Magpie.App/ScalingConfigurationPage.cpp b/src/Magpie.App/ScalingModesPage.cpp similarity index 74% rename from src/Magpie.App/ScalingConfigurationPage.cpp rename to src/Magpie.App/ScalingModesPage.cpp index 7a1446c09..d1f3d4660 100644 --- a/src/Magpie.App/ScalingConfigurationPage.cpp +++ b/src/Magpie.App/ScalingModesPage.cpp @@ -1,7 +1,7 @@ #include "pch.h" -#include "ScalingConfigurationPage.h" -#if __has_include("ScalingConfigurationPage.g.cpp") -#include "ScalingConfigurationPage.g.cpp" +#include "ScalingModesPage.h" +#if __has_include("ScalingModesPage.g.cpp") +#include "ScalingModesPage.g.cpp" #endif #if __has_include("ScalingType.g.cpp") #include "ScalingType.g.cpp" @@ -18,11 +18,11 @@ using namespace Windows::UI::Xaml::Input; namespace winrt::Magpie::App::implementation { -ScalingConfigurationPage::ScalingConfigurationPage() { +ScalingModesPage::ScalingModesPage() { _BuildEffectMenu(); } -INumberFormatter2 ScalingConfigurationPage::NumberFormatter() noexcept { +INumberFormatter2 ScalingModesPage::NumberFormatter() noexcept { static DecimalFormatter numberFormatter = []() { DecimalFormatter result; IncrementNumberRounder rounder; @@ -36,25 +36,25 @@ INumberFormatter2 ScalingConfigurationPage::NumberFormatter() noexcept { return numberFormatter; } -void ScalingConfigurationPage::ComboBox_DropDownOpened(IInspectable const& sender, IInspectable const&) { +void ScalingModesPage::ComboBox_DropDownOpened(IInspectable const& sender, IInspectable const&) { ComboBoxHelper::DropDownOpened(*this, sender); } -void ScalingConfigurationPage::EffectSettingsCard_Loaded(IInspectable const& sender, RoutedEventArgs const&) { +void ScalingModesPage::EffectSettingsCard_Loaded(IInspectable const& sender, RoutedEventArgs const&) { XamlUtils::UpdateThemeOfTooltips(sender.as(), ActualTheme()); } -void ScalingConfigurationPage::AddEffectButton_Click(IInspectable const& sender, RoutedEventArgs const&) { +void ScalingModesPage::AddEffectButton_Click(IInspectable const& sender, RoutedEventArgs const&) { Button btn = sender.as - - - - @@ -522,14 +525,15 @@ - + - - + + \ No newline at end of file diff --git a/src/Magpie.App/ScalingConfigurationViewModel.cpp b/src/Magpie.App/ScalingModesViewModel.cpp similarity index 81% rename from src/Magpie.App/ScalingConfigurationViewModel.cpp rename to src/Magpie.App/ScalingModesViewModel.cpp index 0ef1120b8..041745631 100644 --- a/src/Magpie.App/ScalingConfigurationViewModel.cpp +++ b/src/Magpie.App/ScalingModesViewModel.cpp @@ -1,7 +1,7 @@ #include "pch.h" -#include "ScalingConfigurationViewModel.h" -#if __has_include("ScalingConfigurationViewModel.g.cpp") -#include "ScalingConfigurationViewModel.g.cpp" +#include "ScalingModesViewModel.h" +#if __has_include("ScalingModesViewModel.g.cpp") +#include "ScalingModesViewModel.g.cpp" #endif #include "EffectsService.h" #include "AppSettings.h" @@ -17,15 +17,15 @@ using namespace ::Magpie::Core; namespace winrt::Magpie::App::implementation { -ScalingConfigurationViewModel::ScalingConfigurationViewModel() { +ScalingModesViewModel::ScalingModesViewModel() { _AddScalingModes(); _scalingModeAddedRevoker = ScalingModesService::Get().ScalingModeAdded( - auto_revoke, { this, &ScalingConfigurationViewModel::_ScalingModesService_Added }); + auto_revoke, { this, &ScalingModesViewModel::_ScalingModesService_Added }); _scalingModeMovedRevoker = ScalingModesService::Get().ScalingModeMoved( - auto_revoke, { this, &ScalingConfigurationViewModel::_ScalingModesService_Moved }); + auto_revoke, { this, &ScalingModesViewModel::_ScalingModesService_Moved }); _scalingModeRemovedRevoker = ScalingModesService::Get().ScalingModeRemoved( - auto_revoke, { this, &ScalingConfigurationViewModel::_ScalingModesService_Removed }); + auto_revoke, { this, &ScalingModesViewModel::_ScalingModesService_Removed }); } static std::optional OpenFileDialogForJson(IFileDialog* fileDialog) noexcept { @@ -40,7 +40,7 @@ static std::optional OpenFileDialogForJson(IFileDialog* fileDialog return FileDialogHelper::OpenFileDialog(fileDialog, FOS_STRICTFILETYPES); } -void ScalingConfigurationViewModel::Export() const noexcept { +void ScalingModesViewModel::Export() const noexcept { com_ptr fileDialog = try_create_instance(CLSID_FileSaveDialog); if (!fileDialog) { Logger::Get().Error("创建 FileSaveDialog 失败"); @@ -111,20 +111,20 @@ static bool ImportImpl(bool legacy) noexcept { return ScalingModesService::Get().Import(((const rapidjson::Document&)doc).GetObj(), false); } -void ScalingConfigurationViewModel::_Import(bool legacy) { +void ScalingModesViewModel::_Import(bool legacy) { ShowErrorMessage(false); if (!ImportImpl(legacy)) { ShowErrorMessage(true); } } -void ScalingConfigurationViewModel::PrepareForAdd() { +void ScalingModesViewModel::PrepareForAdd() { std::vector copyFromList; ResourceLoader resourceLoader = ResourceLoader::GetForCurrentView(CommonSharedConstants::APP_RESOURCE_MAP_ID); copyFromList.push_back(box_value(resourceLoader.GetString( - L"ScalingConfiguration_ScalingModes_NewScalingModeFlyout_CopyFrom_None"))); + L"ScalingModes_NewScalingModeFlyout_CopyFrom_None"))); for (const auto& scalingMode : AppSettings::Get().ScalingModes()) { copyFromList.push_back(box_value(scalingMode.name)); @@ -139,17 +139,17 @@ void ScalingConfigurationViewModel::PrepareForAdd() { RaisePropertyChanged(L"NewScalingModeCopyFrom"); } -void ScalingConfigurationViewModel::NewScalingModeName(const hstring& value) noexcept { +void ScalingModesViewModel::NewScalingModeName(const hstring& value) noexcept { _newScalingModeName = value; RaisePropertyChanged(L"NewScalingModeName"); RaisePropertyChanged(L"IsAddButtonEnabled"); } -void ScalingConfigurationViewModel::AddScalingMode() { +void ScalingModesViewModel::AddScalingMode() { ScalingModesService::Get().AddScalingMode(_newScalingModeName, _newScalingModeCopyFrom - 1); } -fire_and_forget ScalingConfigurationViewModel::_AddScalingModes(bool isInitialExpanded) { +fire_and_forget ScalingModesViewModel::_AddScalingModes(bool isInitialExpanded) { if (_addingScalingModes) { co_return; } @@ -200,11 +200,11 @@ fire_and_forget ScalingConfigurationViewModel::_AddScalingModes(bool isInitialEx _addingScalingModes = false; } -void ScalingConfigurationViewModel::_ScalingModesService_Added(EffectAddedWay way) { +void ScalingModesViewModel::_ScalingModesService_Added(EffectAddedWay way) { _AddScalingModes(way == EffectAddedWay::Add); } -void ScalingConfigurationViewModel::_ScalingModesService_Moved(uint32_t index, bool isMoveUp) { +void ScalingModesViewModel::_ScalingModesService_Moved(uint32_t index, bool isMoveUp) { const uint32_t targetIndex = isMoveUp ? index - 1 : index + 1; ScalingModeItem targetItem = _scalingModes.GetAt(targetIndex).as(); @@ -212,7 +212,7 @@ void ScalingConfigurationViewModel::_ScalingModesService_Moved(uint32_t index, b _scalingModes.InsertAt(index, targetItem); } -void ScalingConfigurationViewModel::_ScalingModesService_Removed(uint32_t index) { +void ScalingModesViewModel::_ScalingModesService_Removed(uint32_t index) { _scalingModes.RemoveAt(index); } diff --git a/src/Magpie.App/ScalingConfigurationViewModel.h b/src/Magpie.App/ScalingModesViewModel.h similarity index 81% rename from src/Magpie.App/ScalingConfigurationViewModel.h rename to src/Magpie.App/ScalingModesViewModel.h index e41976837..a8a4fbd58 100644 --- a/src/Magpie.App/ScalingConfigurationViewModel.h +++ b/src/Magpie.App/ScalingModesViewModel.h @@ -1,13 +1,13 @@ #pragma once -#include "ScalingConfigurationViewModel.g.h" +#include "ScalingModesViewModel.g.h" #include "WinRTUtils.h" #include "ScalingModesService.h" namespace winrt::Magpie::App::implementation { -struct ScalingConfigurationViewModel : ScalingConfigurationViewModelT, - wil::notify_property_changed_base { - ScalingConfigurationViewModel(); +struct ScalingModesViewModel : ScalingModesViewModelT, + wil::notify_property_changed_base { + ScalingModesViewModel(); void Export() const noexcept; @@ -88,7 +88,7 @@ struct ScalingConfigurationViewModel : ScalingConfigurationViewModelT { +struct ScalingModesViewModel : ScalingModesViewModelT { }; } diff --git a/src/Magpie.App/ScalingConfigurationViewModel.idl b/src/Magpie.App/ScalingModesViewModel.idl similarity index 77% rename from src/Magpie.App/ScalingConfigurationViewModel.idl rename to src/Magpie.App/ScalingModesViewModel.idl index 70ea714a4..608b03deb 100644 --- a/src/Magpie.App/ScalingConfigurationViewModel.idl +++ b/src/Magpie.App/ScalingModesViewModel.idl @@ -1,6 +1,6 @@ namespace Magpie.App { - runtimeclass ScalingConfigurationViewModel : Windows.UI.Xaml.Data.INotifyPropertyChanged { - ScalingConfigurationViewModel(); + runtimeclass ScalingModesViewModel : Windows.UI.Xaml.Data.INotifyPropertyChanged { + ScalingModesViewModel(); void Export(); void Import(); diff --git a/src/Magpie/XamlApp.cpp b/src/Magpie/XamlApp.cpp index 7ad66cd2a..eb2ad2994 100644 --- a/src/Magpie/XamlApp.cpp +++ b/src/Magpie/XamlApp.cpp @@ -7,11 +7,38 @@ #include "ThemeHelper.h" #include "NotifyIconService.h" +namespace winrt { +using namespace Magpie::App; +} + namespace Magpie { static UINT WM_MAGPIE_SHOWME; static UINT WM_MAGPIE_QUIT; +static void InitMessages() noexcept { + WM_MAGPIE_SHOWME = RegisterWindowMessage(CommonSharedConstants::WM_MAGPIE_SHOWME); + WM_MAGPIE_QUIT = RegisterWindowMessage(CommonSharedConstants::WM_MAGPIE_QUIT); +} + +// 我们需要尽可能高的时钟分辨率来提高渲染帧率。 +// 通常 Magpie 被 OS 认为是后台进程,下面的调用避免 OS 自动降低时钟分辨率。 +// 见 https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-setprocessinformation +static void IncreaseTimerResolution() noexcept { + PROCESS_POWER_THROTTLING_STATE powerThrottling{ + .Version = PROCESS_POWER_THROTTLING_CURRENT_VERSION, + .ControlMask = PROCESS_POWER_THROTTLING_EXECUTION_SPEED | + PROCESS_POWER_THROTTLING_IGNORE_TIMER_RESOLUTION, + .StateMask = 0 + }; + SetProcessInformation( + GetCurrentProcess(), + ProcessPowerThrottling, + &powerThrottling, + sizeof(powerThrottling) + ); +} + // 提前加载 twinapi.appcore.dll 和 threadpoolwinrt.dll 以避免退出时崩溃。应在 Windows.UI.Xaml.dll 被加载前调用 // 来自 https://github.com/CommunityToolkit/Microsoft.Toolkit.Win32/blob/6fb2c3e00803ea563af20f6bc9363091b685d81f/Microsoft.Toolkit.Win32.UI.XamlApplication/XamlApplication.cpp#L140 // 参见: https://github.com/microsoft/microsoft-ui-xaml/issues/7260#issuecomment-1231314776 @@ -20,16 +47,32 @@ static void FixThreadPoolCrash() noexcept { LoadLibraryEx(L"threadpoolwinrt.dll", nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32); } -static void InitMessages() noexcept { - WM_MAGPIE_SHOWME = RegisterWindowMessage(CommonSharedConstants::WM_MAGPIE_SHOWME); - WM_MAGPIE_QUIT = RegisterWindowMessage(CommonSharedConstants::WM_MAGPIE_QUIT); +static void InitializeLogger() noexcept { + Logger& logger = Logger::Get(); + logger.Initialize( + spdlog::level::info, + CommonSharedConstants::LOG_PATH, + 100000, + 2 + ); + + // 初始化 Magpie.App.dll 中的 Logger + // 单例无法在 exe 和 dll 间共享 + winrt::LoggerHelper::Initialize((uint64_t)&logger); } bool XamlApp::Initialize(HINSTANCE hInstance, const wchar_t* arguments) { _hInst = hInstance; + // 提高时钟分辨率 + IncreaseTimerResolution(); + + // 程序结束时也不应调用 uninit_apartment + // 见 https://kennykerr.ca/2018/03/24/cppwinrt-hosting-the-windows-runtime/ + winrt::init_apartment(winrt::apartment_type::single_threaded); + FixThreadPoolCrash(); - _InitializeLogger(); + InitializeLogger(); Logger::Get().Info(fmt::format("程序启动\n\t版本: {}\n\t管理员: {}", #ifdef MAGPIE_VERSION_TAG @@ -48,9 +91,9 @@ bool XamlApp::Initialize(HINSTANCE hInstance, const wchar_t* arguments) { } // 初始化 UWP 应用 - _uwpApp = winrt::Magpie::App::App(); + _uwpApp = winrt::App(); - winrt::Magpie::App::StartUpOptions options = _uwpApp.Initialize(0); + winrt::StartUpOptions options = _uwpApp.Initialize(0); if (options.IsError) { Logger::Get().Error("初始化失败"); return false; @@ -216,20 +259,6 @@ bool XamlApp::_CheckSingleInstance() noexcept { return true; } -void XamlApp::_InitializeLogger() noexcept { - Logger& logger = Logger::Get(); - logger.Initialize( - spdlog::level::info, - CommonSharedConstants::LOG_PATH, - 100000, - 2 - ); - - // 初始化 dll 中的 Logger - // Logger 的单例无法在 exe 和 dll 间共享 - winrt::Magpie::App::LoggerHelper::Initialize((uint64_t)&logger); -} - bool XamlApp::_CreateMainWindow() noexcept { if (!_mainWindow.Create(_hInst, _mainWindowCenter, _mainWindowSizeInDips, _isMainWndMaximized)) { return false; diff --git a/src/Magpie/XamlApp.h b/src/Magpie/XamlApp.h index 66f324e39..cb1beedf6 100644 --- a/src/Magpie/XamlApp.h +++ b/src/Magpie/XamlApp.h @@ -33,8 +33,6 @@ class XamlApp { bool _CheckSingleInstance() noexcept; - void _InitializeLogger() noexcept; - bool _CreateMainWindow() noexcept; void _QuitWithoutMainWindow(); diff --git a/src/Magpie/main.cpp b/src/Magpie/main.cpp index ec508e084..e186fa2b8 100644 --- a/src/Magpie/main.cpp +++ b/src/Magpie/main.cpp @@ -30,24 +30,6 @@ static void SetWorkingDir() noexcept { FAIL_FAST_IF_WIN32_BOOL_FALSE(SetCurrentDirectory(path.c_str())); } -static void IncreaseTimerResolution() noexcept { - // 我们需要尽可能高的时钟分辨率来提高渲染帧率。 - // 通常 Magpie 被 OS 认为是后台进程,下面的调用避免 OS 自动降低时钟分辨率。 - // 见 https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-setprocessinformation - PROCESS_POWER_THROTTLING_STATE powerThrottling{ - .Version = PROCESS_POWER_THROTTLING_CURRENT_VERSION, - .ControlMask = PROCESS_POWER_THROTTLING_EXECUTION_SPEED | - PROCESS_POWER_THROTTLING_IGNORE_TIMER_RESOLUTION, - .StateMask = 0 - }; - SetProcessInformation( - GetCurrentProcess(), - ProcessPowerThrottling, - &powerThrottling, - sizeof(powerThrottling) - ); -} - int APIENTRY wWinMain( _In_ HINSTANCE hInstance, _In_opt_ HINSTANCE /*hPrevInstance*/, @@ -61,13 +43,6 @@ int APIENTRY wWinMain( // 堆损坏时终止进程 HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, nullptr, 0); - // 提高时钟分辨率 - IncreaseTimerResolution(); - - // 程序结束时也不应调用 uninit_apartment - // 见 https://kennykerr.ca/2018/03/24/cppwinrt-hosting-the-windows-runtime/ - winrt::init_apartment(winrt::apartment_type::single_threaded); - SetWorkingDir(); auto& app = Magpie::XamlApp::Get(); diff --git a/src/Shared/Logger.cpp b/src/Shared/Logger.cpp index 35a747792..b324e79c2 100644 --- a/src/Shared/Logger.cpp +++ b/src/Shared/Logger.cpp @@ -15,7 +15,11 @@ bool Logger::Initialize( _logger->set_level(logLevel); _logger->set_pattern("%Y-%m-%d %H:%M:%S.%e|%l|%s:%#|%!|%v"); _logger->flush_on(spdlog::level::warn); +#ifdef _DEBUG spdlog::flush_every(5s); +#else + spdlog::flush_every(30s); +#endif } catch (const spdlog::spdlog_ex&) { return false; }