feat: 定时任务强制启动 (#5280)

This commit is contained in:
uye
2023-06-29 23:51:11 +08:00
committed by GitHub
12 changed files with 444 additions and 337 deletions

View File

@@ -367,7 +367,7 @@ bool Assistant::stop(bool block)
bool asst::Assistant::running() const
{
return !m_thread_idle;
return m_running;
}
void Assistant::working_proc()
@@ -378,17 +378,20 @@ void Assistant::working_proc()
while (true) {
std::unique_lock<std::mutex> lock(m_mutex);
if (m_thread_exit) {
m_running = false;
return;
}
if (m_thread_idle || m_tasks_list.empty()) {
finished_tasks.clear();
m_thread_idle = true;
m_running = false;
Log.flush();
m_condvar.wait(lock);
continue;
}
m_running = true;
const auto [id, task_ptr] = m_tasks_list.front();
lock.unlock();
// only one instance of working_proc running, unlock here to allow set_task_param to the running task

View File

@@ -157,6 +157,7 @@ namespace asst
void* m_callback_arg = nullptr;
std::atomic_bool m_thread_idle = true;
std::atomic_bool m_running = false;
mutable std::mutex m_mutex;
std::condition_variable m_condvar;

View File

@@ -172,5 +172,7 @@ namespace MaaWpfGui.Constants
public const string GachaShowDisclaimerNoMore = "Gacha.ShowDisclaimerNoMore";
public const string GuideStepIndex = "Guide.StepIndex";
public const string ForceScheduledStart = "Timer.ForceScheduledStart";
}
}

View File

@@ -171,6 +171,9 @@ namespace MaaWpfGui.Main
[DllImport("MaaCore.dll")]
private static extern bool AsstStart(AsstHandle handle);
[DllImport("MaaCore.dll")]
private static extern bool AsstRunning(AsstHandle handle);
[DllImport("MaaCore.dll")]
private static extern bool AsstStop(AsstHandle handle);
@@ -617,18 +620,8 @@ namespace MaaWpfGui.Main
_latestTaskId.Clear();
Instances.TaskQueueViewModel.ResetFightVariables();
Instances.TaskQueueViewModel.Idle = true;
Instances.TaskQueueViewModel.UseStone = false;
if (Instances.TaskQueueViewModel.UseMedicineWithNull == null)
{
Instances.TaskQueueViewModel.UseMedicine = false;
}
if (Instances.TaskQueueViewModel.HasTimesLimitedWithNull == null)
{
Instances.TaskQueueViewModel.HasTimesLimited = false;
}
Instances.CopilotViewModel.Idle = true;
Instances.RecognizerViewModel.GachaDone = true;
@@ -1378,16 +1371,21 @@ namespace MaaWpfGui.Main
return id != 0;
}
public bool AsstAppendCloseDown()
{
AsstStop();
AsstTaskId id = AsstAppendTaskWithEncoding("CloseDown");
_latestTaskId[TaskType.CloseDown] = id;
return id != 0;
}
/// <summary>
/// <c>CloseDown</c> 任务。
/// </summary>
/// <returns>是否成功。</returns>
public bool AsstStartCloseDown()
{
AsstStop();
AsstTaskId id = AsstAppendTaskWithEncoding("CloseDown");
_latestTaskId[TaskType.CloseDown] = id;
return id != 0 && AsstStart();
return AsstAppendCloseDown() && AsstStart();
}
/// <summary>
@@ -1747,6 +1745,15 @@ namespace MaaWpfGui.Main
return AsstStart(_handle);
}
/// <summary>
/// 运行中。
/// </summary>
/// <returns>是否正在运行。</returns>
public bool AsstRunning()
{
return AsstRunning(_handle);
}
/// <summary>
/// 停止。
/// </summary>

View File

@@ -1,4 +1,7 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<!-- Settings -->
<system:String x:Key="Settings">Settings</system:String>
<system:String x:Key="GeneralSettings">General</system:String>
@@ -80,7 +83,7 @@
<system:String x:Key="StartingRoles">Starting Roles</system:String>
<system:String x:Key="StartingCoreChar">Starting Operator (CN name only)</system:String>
<system:String x:Key="StartingCoreCharTip">Only supports the CN name of a single operator, default if not filled.</system:String>
<system:String x:Key="RoguelikeUseSupportUnit">Select "Starting Operator" from support unit list</system:String>
<system:String x:Key="RoguelikeUseSupportUnit">Select Starting Operator from support unit list</system:String>
<system:String x:Key="RoguelikeUseNonFriendSupport">Enable non-friend support</system:String>
<system:String x:Key="DeploymentWithPause" xml:space="preserve">Deployment with Pause (Pause-Trick) (Works for IS, Copilot and SSS) (Beta function, Not recommended yet)</system:String>
<system:String x:Key="AdbLiteEnabled">Use ADB Lite (Experimental)</system:String>
@@ -170,6 +173,8 @@
<system:String x:Key="NewVersionDownloadCompletedDesc">Do you want to upgrade MAA immediately? (restart the process)</system:String>
<system:String x:Key="NewVersionFoundButNoPackageTitle">New version found, but no update package</system:String>
<system:String x:Key="NewVersionFoundButNoPackageDesc">Please manually download the full package to update!</system:String>
<system:String x:Key="ForceScheduledStart">Force scheduled start</system:String>
<system:String x:Key="ForceScheduledStartTip">Stop current task, restart game and start new tasks</system:String>
<system:String x:Key="Timer">Timer</system:String>
<system:String x:Key="SwitchConfiguration">Switch Configuration</system:String>
<system:String x:Key="ConfigurationName">Config</system:String>
@@ -234,7 +239,7 @@ Please do not check it when the stage OF-1 is not unlocked.</system:String>
<system:String x:Key="MainViewButtonFeature">Variable function button</system:String>
<system:String x:Key="CustomStageCode">Manual entry of stage names</system:String>
<system:String x:Key="CustomStageCodeTip" xml:space="preserve">Support most main stage names + stage names from the original list (e.g. 4-10, AP-5, H10-1-Hard, etc.)
At the end of the level, enter "Normal/Hard" to switch between Standard and Adverse environment</system:String>
At the end of the level, enter Normal/Hard to switch between Standard and Adverse environment</system:String>
<system:String x:Key="AutoDetectConnection">Auto detect connection</system:String>
<system:String x:Key="AutoDetectConnectionTip">This checkbox will be automatically unchecked after each detect is completed, and can be checked again if you need to re-detect</system:String>
<system:String x:Key="AlwaysAutoDetectConnection">Re-detect every times</system:String>
@@ -345,10 +350,10 @@ At the end of the level, enter "Normal/Hard" to switch between Standard and Adve
<system:String x:Key="Toolbox">Toolbox</system:String>
<!-- Recruitment Recognition -->
<system:String x:Key="RecruitmentRecognition">Recruitment</system:String>
<system:String x:Key="RecruitmentRecognitionTip">This recruit recognition is independent from the "Farming" tab. Please open the in game recruit tag selection screen before pressing "Begin to Recruit"</system:String>
<system:String x:Key="RecruitmentRecognitionTip">This recruit recognition is independent from the Farming tab. Please open the in game recruit tag selection screen before pressing Begin to Recruit</system:String>
<system:String x:Key="AutoSettingTime">Auto set time</system:String>
<system:String x:Key="RecruitmentShowPotential">Show Potential</system:String>
<system:String x:Key="RecruitmentShowPotentialTips">Please use the "Operator" task to get the "Potential" information.</system:String>
<system:String x:Key="RecruitmentShowPotentialTips">Please use the Operator task to get the Potential information.</system:String>
<system:String x:Key="AutoSelectLevel3Tags">Auto select 3★ Tags</system:String>
<system:String x:Key="AutoSelectLevel4Tags">Auto select 4★ Tags</system:String>
<system:String x:Key="AutoSelectLevel5Tags">Auto select 5★ Tags</system:String>
@@ -357,7 +362,7 @@ At the end of the level, enter "Normal/Hard" to switch between Standard and Adve
<!-- Recruitment Recognition -->
<!-- Depot Recognition -->
<system:String x:Key="DepotRecognition">Depot</system:String>
<system:String x:Key="DepotRecognitionTip">This function is still in testing. If you encouter any unexpected results, please zip the "debug/depot" folder in the installation path and submit an issue on GitHub</system:String>
<system:String x:Key="DepotRecognitionTip">This function is still in testing. If you encouter any unexpected results, please zip the debug/depot folder in the installation path and submit an issue on GitHub</system:String>
<system:String x:Key="StartToDepotRecognition">Start to Identify</system:String>
<system:String x:Key="ExportToArkplanner">Export to Arkplanner</system:String>
<system:String x:Key="ExportToLolicon">Export to Lolicon</system:String>
@@ -365,7 +370,7 @@ At the end of the level, enter "Normal/Hard" to switch between Standard and Adve
<!-- Depot Recognition -->
<!-- Operator Recognition -->
<system:String x:Key="OperBoxRecognition">Operator</system:String>
<system:String x:Key="OperBoxRecognitionTip">This function is still in testing. If you encouter any unexpected results, please zip the "debug/oper" folder in the installation path and submit an issue on GitHub</system:String>
<system:String x:Key="OperBoxRecognitionTip">This function is still in testing. If you encouter any unexpected results, please zip the debug/oper folder in the installation path and submit an issue on GitHub</system:String>
<system:String x:Key="OperBoxRecognitionResult">Not owned: {0}\n\n{1}\n\nOwned: {2}\n\n{3}</system:String>
<system:String x:Key="StartToOperBoxRecognition">Start to Identify</system:String>
<system:String x:Key="OperBoxCopyToClipboard">Copy to Clipboard</system:String>
@@ -374,7 +379,7 @@ At the end of the level, enter "Normal/Hard" to switch between Standard and Adve
<system:String x:Key="VideoRecognition">Video</system:String>
<system:String x:Key="StartToVideoRecognition">Start to identify</system:String>
<system:String x:Key="OpenVideoRecognitionResult">Open Directory</system:String>
<system:String x:Key="VideoRecognitionTips" xml:space="preserve">For video recognition, please open the "Copilot" tab and drag the strategy video into it.\n
<system:String x:Key="VideoRecognitionTips" xml:space="preserve">For video recognition, please open the Copilot tab and drag the strategy video into it.\n
The video aspect ratio needs to be 16:9 without interference factors such as black borders, emulator borders, special shapes and screen corrections.</system:String>
<!-- Video Recognition -->
<system:String x:Key="Gacha">Gacha</system:String>
@@ -415,17 +420,17 @@ The video aspect ratio needs to be 16:9 without interference factors such as bla
<system:String x:Key="ThanksForLikeWebJson">Thanks for the likes!\nThe comment section is already open on the web page, please feel free to leave your comment!</system:String>
<system:String x:Key="AutoSquad">Auto Squad</system:String>
<system:String x:Key="LoopTimes">Loop Times</system:String>
<system:String x:Key="AutoSquadTip">"Favourite" marked operators cannot be recognized at this time</system:String>
<system:String x:Key="AutoSquadTip">Favourite marked operators cannot be recognized at this time</system:String>
<system:String x:Key="Start">Start</system:String>
<system:String x:Key="VideoLink">Video Link</system:String>
<!-- Logs -->
<system:String x:Key="CopilotTip">
Tips: \n\n
1. Please use this function only when the "Mission Start" button is visible in game.\n\n
2. You need turn off the "Auto Squad" when using a friendly support unit, then start with your support unit selected.\n\n
3. For Paradox Simulation, you need to turn off "Auto Squad" and select the skill before, then start in game "Start" screen.\n\n
4. For SSS, there are multiple built-in files under the "resource/copilot" folder.\n
Please start on the "Start Deployment" screen after manual formation (can be used with "Loop Times")\n\n
1. Please use this function only when the Mission Start button is visible in game.\n\n
2. You need turn off the Auto Squad when using a friendly support unit, then start with your support unit selected.\n\n
3. For Paradox Simulation, you need to turn off Auto Squad and select the skill before, then start in game Start screen.\n\n
4. For SSS, there are multiple built-in files under the resource/copilot folder.\n
Please start on the Start Deployment screen after manual formation (can be used with Loop Times)\n\n
5. Video recognition is now supported, please drag the strategy video to use.\n
The video aspect ratio needs to be 16:9 without interference factors such as black borders, emulator borders special shapes and screen corrections.\n\n
</system:String>
@@ -442,7 +447,7 @@ The video aspect ratio needs to be 16:9 without interference factors such as bla
<system:String x:Key="ErrorProlog">MAA has encountered an error</system:String>
<system:String x:Key="ErrorDetails">Details</system:String>
<system:String x:Key="ErrorSolution">Solution</system:String>
<system:String x:Key="ErrorSolutionCrash">Please refer to the documentation: "FAQ - Crashes" to solve.</system:String>
<system:String x:Key="ErrorSolutionCrash">Please refer to the documentation: FAQ - Crashes to solve.</system:String>
<system:String x:Key="ErrorSolutionReplaceADB">Please close the emulator and ADB or restart your computer, then open MAA with administrator privileges to proceed.</system:String>
<system:String x:Key="ErrorSolutionFailedToMove">The file is occupied, please restart the computer and try again</system:String>
<system:String x:Key="ErrorFeedbackLinkText">Create a GitHub issue</system:String>
@@ -462,7 +467,7 @@ The video aspect ratio needs to be 16:9 without interference factors such as bla
<system:String x:Key="TryToReconnect">Emulator disconnected, trying to reconnect</system:String>
<system:String x:Key="ReconnectSuccess">Reconnection succeeded. Continuing the task</system:String>
<system:String x:Key="ReconnectFailed">Reconnection failed. The connection is down!</system:String>
<system:String x:Key="TouchModeNotAvailable">Touch mode is not available, please go to "Settings - Connection Settings" to switch to a different touch mode.</system:String>
<system:String x:Key="TouchModeNotAvailable">Touch mode is not available, please go to Settings - Connection Settings to switch to a different touch mode.</system:String>
<system:String x:Key="ScreencapFailed">Screencap failed. If it happens repeatedly, try to restart or change the emulator!</system:String>
<system:String x:Key="IdentifyTheMistakes">Recognition error</system:String>
<system:String x:Key="TaskError" xml:space="preserve">Task error: </system:String>
@@ -562,7 +567,7 @@ The video aspect ratio needs to be 16:9 without interference factors such as bla
<system:String x:Key="Level1Tip">If checked when 1★ tags are identified, will skip the recruitment. If not checked when 1★ tags are identified, they will be ignored.</system:String>
<!-- AutoRecruitSettings -->
<!-- EasterEggs -->
<system:String x:Key="BuyWineOnAprilFoolsDay">Dear Doctor, ever heard of the new listings of "isopropyl alcohol" in Ms. Closure's store? Let's check it out?</system:String>
<system:String x:Key="BuyWineOnAprilFoolsDay">Dear Doctor, ever heard of the new listings of isopropyl alcohol in Ms. Closure's store? Let's check it out?</system:String>
<system:String x:Key="Burping">Ugh... Ehem</system:String>
<system:String x:Key="DrunkAndStaggering">Ah, doctor, why do you sway so much in your movement today?</system:String>
<system:String x:Key="Hangover">I won't drink so much next time...</system:String>

View File

@@ -1,4 +1,7 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<!-- 設定 -->
<system:String x:Key="Settings">設定</system:String>
<system:String x:Key="GeneralSettings">一般設定</system:String>
@@ -80,7 +83,7 @@
<system:String x:Key="StartingRoles">最初の職業</system:String>
<system:String x:Key="StartingCoreChar">最初のオペレーター(一人だけ、中国名のみを入力可能)</system:String>
<system:String x:Key="StartingCoreCharTip">一人のオペレーターの中国名のみをサポートします。入力されていない場合はデフォルトになります。</system:String>
<system:String x:Key="RoguelikeUseSupportUnit">"最初のオペレーター"をサポートから選択</system:String>
<system:String x:Key="RoguelikeUseSupportUnit">最初のオペレーターをサポートから選択</system:String>
<system:String x:Key="RoguelikeUseNonFriendSupport">フレンド以外のサポートの使用を許可</system:String>
<system:String x:Key="DeploymentWithPause">統合戦略/保全駐在でポーズトリックを使用します(ベータ機能のため非推奨です)</system:String>
<system:String x:Key="AdbLiteEnabled">軽量ADBを使用(実験機能)</system:String>
@@ -170,6 +173,8 @@
<system:String x:Key="NewVersionDownloadCompletedDesc">MAAをすぐにアップグレードしますか(処理を再開)</system:String>
<system:String x:Key="NewVersionFoundButNoPackageTitle">新バージョンが見つかりましたが、アップデートパッケージがありません</system:String>
<system:String x:Key="NewVersionFoundButNoPackageDesc">アップデートするには、手動でフルパッケージをダウンロードしてください!</system:String>
<system:String x:Key="ForceScheduledStart">強制的なタイミングで起動</system:String>
<system:String x:Key="ForceScheduledStartTip">現在のタスクを停止して、ゲームを再起動し、新しいタスクを開始します</system:String>
<system:String x:Key="Timer">タイマー</system:String>
<system:String x:Key="SwitchConfiguration">構成を切り替える</system:String>
<system:String x:Key="ConfigurationName">構成名</system:String>
@@ -234,7 +239,7 @@
<system:String x:Key="MainViewButtonFeature">スタート画面に表示する便利ボタン</system:String>
<system:String x:Key="CustomStageCode">ステージ名を入力する</system:String>
<system:String x:Key="CustomStageCodeTip" xml:space="preserve">(テスト機能)ステージ名と番号(例: 4-10、AP-5、H10-1-Hardなど
の両方がサポートされています。レベルの最後に"Normal/Hard"を入力することで、標準から強襲/厄難に難易度を切り替えることができます</system:String>
の両方がサポートされています。レベルの最後にNormal/Hardを入力することで、標準から強襲/厄難に難易度を切り替えることができます</system:String>
<system:String x:Key="AutoDetectConnection">接続自動認識</system:String>
<system:String x:Key="AutoDetectConnectionTip">このチェックボックスは、検出が完了するたびに自動的にチェックが外れますが、再検出が必要な場合は再度チェックを入れることができます</system:String>
<system:String x:Key="AlwaysAutoDetectConnection">毎回再検出する</system:String>

View File

@@ -173,6 +173,8 @@
<system:String x:Key="NewVersionDownloadCompletedDesc">지금 바로 MAA를 업그레이드하시겠습니까? (프로세스 재시작)</system:String>
<system:String x:Key="NewVersionFoundButNoPackageTitle">새로운 버전이 확인되지만 업데이트 패키지가 없음</system:String>
<system:String x:Key="NewVersionFoundButNoPackageDesc">전체 패키지를 수동으로 다운로드해 업데이트해 주세요!</system:String>
<system:String x:Key="ForceScheduledStart">강제로 예약된 시작</system:String>
<system:String x:Key="ForceScheduledStartTip">현재 작업을 중지하고 게임을 다시 시작하여 새 작업을 시작합니다</system:String>
<system:String x:Key="Timer">타이머</system:String>
<system:String x:Key="SwitchConfiguration">구성 전환</system:String>
<system:String x:Key="ConfigurationName">구성 이름</system:String>
@@ -237,7 +239,7 @@ OF-1을 해금하지 않았다면 선택하지 말아 주세요.</system:String>
<system:String x:Key="MainViewButtonFeature">메인 화면 버튼의 기능</system:String>
<system:String x:Key="CustomStageCode">스테이지 코드 수동 입력</system:String>
<system:String x:Key="CustomStageCodeTip" xml:space="preserve">대부분의 메인 스테이지와 원래 목록(예: 4-10, AP-5, H10-1-Hard)에 있는 스테이지 이름을 지원합니다.
레벨 끝에서 &quot;Normal / Hard&quot;를 입력하여 일반 및 터프 난이도 간 전환</system:String>
레벨 끝에서 Normal / Hard를 입력하여 일반 및 터프 난이도 간 전환</system:String>
<system:String x:Key="AutoDetectConnection">연결 자동 감지</system:String>
<system:String x:Key="AutoDetectConnectionTip">이 체크박스는 감지가 끝나면 자동으로 체크가 해제됩니다. 다시 감지하려면 다시 체크해주세요</system:String>
<system:String x:Key="AlwaysAutoDetectConnection">매번 재감지</system:String>

View File

@@ -83,7 +83,7 @@
<system:String x:Key="StartingRoles">开局职业组</system:String>
<system:String x:Key="StartingCoreChar">开局干员 (单个)</system:String>
<system:String x:Key="StartingCoreCharTip">仅支持单个干员中文名,不填写则默认选择。</system:String>
<system:String x:Key="RoguelikeUseSupportUnit">开局干员使用助战</system:String>
<system:String x:Key="RoguelikeUseSupportUnit">开局干员使用助战</system:String>
<system:String x:Key="RoguelikeUseNonFriendSupport">可以使用非好友助战</system:String>
<system:String x:Key="DeploymentWithPause">暂停下干员(同时影响肉鸽、自动战斗、保全)(不稳定,暂不推荐开启)</system:String>
<system:String x:Key="AdbLiteEnabled">使用 ADB Lite实验性功能</system:String>
@@ -173,6 +173,8 @@
<system:String x:Key="NewVersionDownloadCompletedDesc">是否立即更新 MAA重启进程</system:String>
<system:String x:Key="NewVersionFoundButNoPackageTitle">检测到新版本,但未找到增量包</system:String>
<system:String x:Key="NewVersionFoundButNoPackageDesc">请手动下载完整包更新!</system:String>
<system:String x:Key="ForceScheduledStart">强制定时启动</system:String>
<system:String x:Key="ForceScheduledStartTip">停止当前任务,重启游戏并开始新任务</system:String>
<system:String x:Key="Timer">定时</system:String>
<system:String x:Key="SwitchConfiguration">切换配置</system:String>
<system:String x:Key="ConfigurationName">配置名称</system:String>
@@ -351,7 +353,7 @@
<system:String x:Key="RecruitmentRecognitionTip">小提示: 和主界面的自动公招是两个独立的功能,请手动打开游戏公招 Tags 界面后使用~</system:String>
<system:String x:Key="AutoSettingTime">自动设置时间</system:String>
<system:String x:Key="RecruitmentShowPotential">显示干员潜能(四星及以上)</system:String>
<system:String x:Key="RecruitmentShowPotentialTips">请使用干员识别获取干员信息。</system:String>
<system:String x:Key="RecruitmentShowPotentialTips">请使用干员识别获取干员信息。</system:String>
<system:String x:Key="AutoSelectLevel3Tags">自动选择 3 星 Tags</system:String>
<system:String x:Key="AutoSelectLevel4Tags">自动选择 4 星 Tags</system:String>
<system:String x:Key="AutoSelectLevel5Tags">自动选择 5 星 Tags</system:String>
@@ -377,7 +379,7 @@
<system:String x:Key="VideoRecognition">视频识别</system:String>
<system:String x:Key="StartToVideoRecognition">开始识别</system:String>
<system:String x:Key="OpenVideoRecognitionResult">打开文件夹</system:String>
<system:String x:Key="VideoRecognitionTips" xml:space="preserve">请打开自动战斗页,将攻略视频文件拖入后开始即可。\n
<system:String x:Key="VideoRecognitionTips" xml:space="preserve">请打开自动战斗页,将攻略视频文件拖入后开始即可。\n
需要视频分辨率为 16:9且无黑边、模拟器边框、异形屏矫正等干扰因素。</system:String>
<!-- 视频识别 -->
<system:String x:Key="Gacha">牛牛抽卡</system:String>
@@ -418,17 +420,17 @@
<system:String x:Key="ThanksForLikeWebJson">感谢评价!\n网页已经开放评论区欢迎前往留下你的评论</system:String>
<system:String x:Key="AutoSquad">自动编队</system:String>
<system:String x:Key="LoopTimes">循环次数</system:String>
<system:String x:Key="AutoSquadTip">自动编队暂时无法识别特别关注的干员</system:String>
<system:String x:Key="AutoSquadTip">自动编队暂时无法识别特别关注的干员</system:String>
<system:String x:Key="Start">开始</system:String>
<system:String x:Key="VideoLink">视频链接</system:String>
<!-- 日志 -->
<system:String x:Key="CopilotTip">
小提示: \n\n
1. 请在有开始行动按钮的界面再使用本功能;\n\n
2. 使用好友助战可以关闭自动编队,手动选择干员后开始;\n\n
3. 模拟悖论需要关闭自动编队,并选好技能后处于开始模拟按钮的界面再开始;\n\n
1. 请在有开始行动按钮的界面再使用本功能;\n\n
2. 使用好友助战可以关闭自动编队,手动选择干员后开始;\n\n
3. 模拟悖论需要关闭自动编队,并选好技能后处于开始模拟按钮的界面再开始;\n\n
4. 保全派驻 在 resource/copilot 文件夹下内置了多份作业。\n
请手动编队后在开始部署界面开始(可配合循环次数使用)\n\n
请手动编队后在开始部署界面开始(可配合循环次数使用)\n\n
5. 现已支持视频识别,请将攻略视频文件拖入后开始。\n
需要视频分辨率为 16:9无黑边、模拟器边框、异形屏矫正等干扰元素\n\n
</system:String>
@@ -557,7 +559,7 @@
<system:String x:Key="Level3UseShortTime2">3 星设置 1:00 而非 9:00</system:String>
<system:String x:Key="Level3UseShortTimeTip">不影响其他星级 Tags</system:String>
<system:String x:Key="RecruitMaxTimes">每次执行时最大招募次数</system:String>
<system:String x:Key="ManuallySelectLevel1">手动确认支援机械</system:String>
<system:String x:Key="ManuallySelectLevel1">手动确认支援机械</system:String>
<system:String x:Key="AutoSelectLevel3">自动确认 3 星</system:String>
<system:String x:Key="AutoSelectLevel4">自动确认 4 星</system:String>
<system:String x:Key="AutoSelectLevel5">自动确认 5 星</system:String>

View File

@@ -173,6 +173,8 @@
<system:String x:Key="NewVersionDownloadCompletedDesc">是否立即更新 MAA重啟進程</system:String>
<system:String x:Key="NewVersionFoundButNoPackageTitle">檢測到新版本,但未找到增量包</system:String>
<system:String x:Key="NewVersionFoundButNoPackageDesc">請手動下載完整包更新!</system:String>
<system:String x:Key="ForceScheduledStart">強制定時啟動</system:String>
<system:String x:Key="ForceScheduledStartTip">停止當前任務,重新啟動遊戲並開始新任務</system:String>
<system:String x:Key="Timer">定時</system:String>
<system:String x:Key="SwitchConfiguration">切換配置</system:String>
<system:String x:Key="ConfigurationName">配置名稱</system:String>
@@ -237,7 +239,7 @@
<system:String x:Key="MainViewButtonFeature">主介面可選擇按鈕功能</system:String>
<system:String x:Key="CustomStageCode">手動輸入關卡代名</system:String>
<system:String x:Key="CustomStageCodeTip" xml:space="preserve">支持大部分主線關卡名與原列表的關卡名(如:4-10、AP-5、H10-1-Hard
可在關卡結尾輸入 &quot;Normal/Hard&quot; 表示需要切換標準與磨難難度</system:String>
可在關卡結尾輸入 Normal/Hard 表示需要切換標準與磨難難度</system:String>
<system:String x:Key="AutoDetectConnection">自動檢測連接</system:String>
<system:String x:Key="AutoDetectConnectionTip">每次檢測完成後會自動取消勾選,若需要重新檢測可再次勾選</system:String>
<system:String x:Key="AlwaysAutoDetectConnection">每次重新檢測</system:String>

View File

@@ -1728,6 +1728,21 @@ namespace MaaWpfGui.ViewModels.UI
public TimerModel TimerModels { get; set; } = new TimerModel();
private bool _forceScheduledStart = Convert.ToBoolean(ConfigurationHelper.GetValue(ConfigurationKeys.ForceScheduledStart, bool.FalseString));
/// <summary>
/// Gets or sets a value indicating whether to use DrGrandet mode.
/// </summary>
public bool ForceScheduledStart
{
get => _forceScheduledStart;
set
{
SetAndNotify(ref _forceScheduledStart, value);
ConfigurationHelper.SetValue(ConfigurationKeys.ForceScheduledStart, value.ToString());
}
}
/* 刷理智设置 */
private string _penguinId = ConfigurationHelper.GetValue(ConfigurationKeys.PenguinId, string.Empty);

View File

@@ -193,13 +193,17 @@ namespace MaaWpfGui.ViewModels.UI
private void InitTimer()
{
_timer.Interval = TimeSpan.FromSeconds(50);
_timer.Interval = TimeSpan.FromSeconds(59);
_timer.Tick += Timer1_Elapsed;
_timer.Start();
}
private void Timer1_Elapsed(object sender, EventArgs e)
private async void Timer1_Elapsed(object sender, EventArgs e)
{
// 提前记录时间,避免等待超过定时时间
int intHour = DateTime.Now.Hour;
int intMinute = DateTime.Now.Minute;
if (NeedToUpdateDatePrompt())
{
UpdateDatePrompt();
@@ -216,13 +220,6 @@ namespace MaaWpfGui.ViewModels.UI
});
}
refreshCustomInfrastPlanIndexByPeriod();
if (!Idle)
{
return;
}
if (NeedToCheckForUpdates())
{
if (Instances.SettingsViewModel.UpdatAutoCheck)
@@ -237,8 +234,13 @@ namespace MaaWpfGui.ViewModels.UI
}
}
int intMinute = DateTime.Now.Minute;
int intHour = DateTime.Now.Hour;
refreshCustomInfrastPlanIndexByPeriod();
if (!Idle && !Instances.SettingsViewModel.ForceScheduledStart)
{
return;
}
var timeToStart = false;
for (int i = 0; i < 8; ++i)
{
@@ -253,6 +255,28 @@ namespace MaaWpfGui.ViewModels.UI
if (timeToStart)
{
if (Instances.SettingsViewModel.ForceScheduledStart)
{
if (!Idle)
{
await Stop();
}
int count = 0;
while (Instances.AsstProxy.AsstRunning() && count <= 600)
{
await Task.Delay(100);
count++;
}
if (!Instances.AsstProxy.AsstAppendCloseDown())
{
AddLog(LocalizationHelper.GetString("CloseArknightsFailed"), UiLogColor.Error);
}
ResetFightVariables();
}
LinkStart();
}
}
@@ -831,6 +855,13 @@ namespace MaaWpfGui.ViewModels.UI
Stopping = true;
AddLog(LocalizationHelper.GetString("Stopping"));
await Task.Run(Instances.AsstProxy.AsstStop);
int count = 0;
while (Instances.AsstProxy.AsstRunning() && count <= 600)
{
await Task.Delay(100);
count++;
}
}
public void SetStopped()
@@ -2260,6 +2291,24 @@ namespace MaaWpfGui.ViewModels.UI
}
}
/// <summary>
/// Reset unsaved battle parameters.
/// </summary>
public void ResetFightVariables()
{
UseStone = false;
if (UseMedicineWithNull == null)
{
UseMedicine = false;
}
if (HasTimesLimitedWithNull == null)
{
HasTimesLimited = false;
}
}
private bool? _useMedicineWithNull = Convert.ToBoolean(ConfigurationHelper.GetValue(ConfigurationKeys.UseMedicine, bool.FalseString));
/// <summary>

View File

@@ -18,302 +18,316 @@
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition Height="auto" />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" />
<ColumnDefinition Width="200" />
</Grid.ColumnDefinitions>
<StackPanel
<CheckBox
Grid.Row="0"
Grid.Column="0"
Height="30"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<CheckBox Margin="10" IsChecked="{Binding TimerModels.Timers[0].IsOn}">
<CheckBox.Content>
<controls:TextBlock>
<controls:TextBlock.Text>
<MultiBinding StringFormat="{}{0} 1">
<Binding Source="{StaticResource Timer}" />
</MultiBinding>
</controls:TextBlock.Text>
</controls:TextBlock>
</CheckBox.Content>
</CheckBox>
<StackPanel Orientation="Horizontal">
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[0].IsOn}"
Text="{Binding TimerModels.Timers[0].Hour, StringFormat=D2}"
TextWrapping="Wrap" />
<controls:TextBlock Text=":" />
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[0].IsOn}"
Text="{Binding TimerModels.Timers[0].Min, StringFormat=D2}"
TextWrapping="Wrap" />
</StackPanel>
</StackPanel>
VerticalContentAlignment="Center"
Content="{DynamicResource ForceScheduledStart}"
IsChecked="{Binding ForceScheduledStart}"
ToolTip="{DynamicResource ForceScheduledStartTip}" />
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" />
<ColumnDefinition Width="200" />
</Grid.ColumnDefinitions>
<StackPanel
Grid.Row="1"
Grid.Column="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<CheckBox Margin="10" IsChecked="{Binding TimerModels.Timers[1].IsOn}">
<CheckBox.Content>
<controls:TextBlock>
<controls:TextBlock.Text>
<MultiBinding StringFormat="{}{0} 2">
<Binding Source="{StaticResource Timer}" />
</MultiBinding>
</controls:TextBlock.Text>
</controls:TextBlock>
</CheckBox.Content>
</CheckBox>
<StackPanel Orientation="Horizontal">
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[1].IsOn}"
Text="{Binding TimerModels.Timers[1].Hour, StringFormat=D2}"
TextWrapping="Wrap" />
<controls:TextBlock Text=":" />
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[1].IsOn}"
Text="{Binding TimerModels.Timers[1].Min, StringFormat=D2}"
TextWrapping="Wrap" />
<StackPanel
Grid.Row="0"
Grid.Column="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<CheckBox Margin="10" IsChecked="{Binding TimerModels.Timers[0].IsOn}">
<CheckBox.Content>
<controls:TextBlock>
<controls:TextBlock.Text>
<MultiBinding StringFormat="{}{0} 1">
<Binding Source="{StaticResource Timer}" />
</MultiBinding>
</controls:TextBlock.Text>
</controls:TextBlock>
</CheckBox.Content>
</CheckBox>
<StackPanel Orientation="Horizontal">
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[0].IsOn}"
Text="{Binding TimerModels.Timers[0].Hour, StringFormat=D2}"
TextWrapping="Wrap" />
<controls:TextBlock Text=":" />
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[0].IsOn}"
Text="{Binding TimerModels.Timers[0].Min, StringFormat=D2}"
TextWrapping="Wrap" />
</StackPanel>
</StackPanel>
</StackPanel>
<StackPanel
Grid.Row="2"
Grid.Column="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<CheckBox Margin="10" IsChecked="{Binding TimerModels.Timers[2].IsOn}">
<CheckBox.Content>
<controls:TextBlock>
<controls:TextBlock.Text>
<MultiBinding StringFormat="{}{0} 3">
<Binding Source="{StaticResource Timer}" />
</MultiBinding>
</controls:TextBlock.Text>
</controls:TextBlock>
</CheckBox.Content>
</CheckBox>
<StackPanel Orientation="Horizontal">
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[2].IsOn}"
Text="{Binding TimerModels.Timers[2].Hour, StringFormat=D2}"
TextWrapping="Wrap" />
<controls:TextBlock Text=":" />
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[2].IsOn}"
Text="{Binding TimerModels.Timers[2].Min, StringFormat=D2}"
TextWrapping="Wrap" />
<StackPanel
Grid.Row="1"
Grid.Column="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<CheckBox Margin="10" IsChecked="{Binding TimerModels.Timers[1].IsOn}">
<CheckBox.Content>
<controls:TextBlock>
<controls:TextBlock.Text>
<MultiBinding StringFormat="{}{0} 2">
<Binding Source="{StaticResource Timer}" />
</MultiBinding>
</controls:TextBlock.Text>
</controls:TextBlock>
</CheckBox.Content>
</CheckBox>
<StackPanel Orientation="Horizontal">
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[1].IsOn}"
Text="{Binding TimerModels.Timers[1].Hour, StringFormat=D2}"
TextWrapping="Wrap" />
<controls:TextBlock Text=":" />
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[1].IsOn}"
Text="{Binding TimerModels.Timers[1].Min, StringFormat=D2}"
TextWrapping="Wrap" />
</StackPanel>
</StackPanel>
</StackPanel>
<StackPanel
Grid.Row="3"
Grid.Column="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<CheckBox Margin="10" IsChecked="{Binding TimerModels.Timers[3].IsOn}">
<CheckBox.Content>
<controls:TextBlock>
<controls:TextBlock.Text>
<MultiBinding StringFormat="{}{0} 4">
<Binding Source="{StaticResource Timer}" />
</MultiBinding>
</controls:TextBlock.Text>
</controls:TextBlock>
</CheckBox.Content>
</CheckBox>
<StackPanel Orientation="Horizontal">
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[3].IsOn}"
Text="{Binding TimerModels.Timers[3].Hour, StringFormat=D2}"
TextWrapping="Wrap" />
<controls:TextBlock Text=":" />
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[3].IsOn}"
Text="{Binding TimerModels.Timers[3].Min, StringFormat=D2}"
TextWrapping="Wrap" />
<StackPanel
Grid.Row="2"
Grid.Column="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<CheckBox Margin="10" IsChecked="{Binding TimerModels.Timers[2].IsOn}">
<CheckBox.Content>
<controls:TextBlock>
<controls:TextBlock.Text>
<MultiBinding StringFormat="{}{0} 3">
<Binding Source="{StaticResource Timer}" />
</MultiBinding>
</controls:TextBlock.Text>
</controls:TextBlock>
</CheckBox.Content>
</CheckBox>
<StackPanel Orientation="Horizontal">
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[2].IsOn}"
Text="{Binding TimerModels.Timers[2].Hour, StringFormat=D2}"
TextWrapping="Wrap" />
<controls:TextBlock Text=":" />
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[2].IsOn}"
Text="{Binding TimerModels.Timers[2].Min, StringFormat=D2}"
TextWrapping="Wrap" />
</StackPanel>
</StackPanel>
</StackPanel>
<StackPanel
Grid.Row="0"
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<CheckBox Margin="10" IsChecked="{Binding TimerModels.Timers[4].IsOn}">
<CheckBox.Content>
<controls:TextBlock>
<controls:TextBlock.Text>
<MultiBinding StringFormat="{}{0} 5">
<Binding Source="{StaticResource Timer}" />
</MultiBinding>
</controls:TextBlock.Text>
</controls:TextBlock>
</CheckBox.Content>
</CheckBox>
<StackPanel Orientation="Horizontal">
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[4].IsOn}"
Text="{Binding TimerModels.Timers[4].Hour, StringFormat=D2}"
TextWrapping="Wrap" />
<controls:TextBlock Text=":" />
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[4].IsOn}"
Text="{Binding TimerModels.Timers[4].Min, StringFormat=D2}"
TextWrapping="Wrap" />
<StackPanel
Grid.Row="3"
Grid.Column="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<CheckBox Margin="10" IsChecked="{Binding TimerModels.Timers[3].IsOn}">
<CheckBox.Content>
<controls:TextBlock>
<controls:TextBlock.Text>
<MultiBinding StringFormat="{}{0} 4">
<Binding Source="{StaticResource Timer}" />
</MultiBinding>
</controls:TextBlock.Text>
</controls:TextBlock>
</CheckBox.Content>
</CheckBox>
<StackPanel Orientation="Horizontal">
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[3].IsOn}"
Text="{Binding TimerModels.Timers[3].Hour, StringFormat=D2}"
TextWrapping="Wrap" />
<controls:TextBlock Text=":" />
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[3].IsOn}"
Text="{Binding TimerModels.Timers[3].Min, StringFormat=D2}"
TextWrapping="Wrap" />
</StackPanel>
</StackPanel>
</StackPanel>
<StackPanel
Grid.Row="1"
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<CheckBox Margin="10" IsChecked="{Binding TimerModels.Timers[5].IsOn}">
<CheckBox.Content>
<controls:TextBlock>
<controls:TextBlock.Text>
<MultiBinding StringFormat="{}{0} 6">
<Binding Source="{StaticResource Timer}" />
</MultiBinding>
</controls:TextBlock.Text>
</controls:TextBlock>
</CheckBox.Content>
</CheckBox>
<StackPanel Orientation="Horizontal">
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[5].IsOn}"
Text="{Binding TimerModels.Timers[5].Hour, StringFormat=D2}"
TextWrapping="Wrap" />
<controls:TextBlock Text=":" />
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[5].IsOn}"
Text="{Binding TimerModels.Timers[5].Min, StringFormat=D2}"
TextWrapping="Wrap" />
<StackPanel
Grid.Row="0"
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<CheckBox Margin="10" IsChecked="{Binding TimerModels.Timers[4].IsOn}">
<CheckBox.Content>
<controls:TextBlock>
<controls:TextBlock.Text>
<MultiBinding StringFormat="{}{0} 5">
<Binding Source="{StaticResource Timer}" />
</MultiBinding>
</controls:TextBlock.Text>
</controls:TextBlock>
</CheckBox.Content>
</CheckBox>
<StackPanel Orientation="Horizontal">
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[4].IsOn}"
Text="{Binding TimerModels.Timers[4].Hour, StringFormat=D2}"
TextWrapping="Wrap" />
<controls:TextBlock Text=":" />
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[4].IsOn}"
Text="{Binding TimerModels.Timers[4].Min, StringFormat=D2}"
TextWrapping="Wrap" />
</StackPanel>
</StackPanel>
</StackPanel>
<StackPanel
Grid.Row="2"
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<CheckBox Margin="10" IsChecked="{Binding TimerModels.Timers[6].IsOn}">
<CheckBox.Content>
<controls:TextBlock>
<controls:TextBlock.Text>
<MultiBinding StringFormat="{}{0} 7">
<Binding Source="{StaticResource Timer}" />
</MultiBinding>
</controls:TextBlock.Text>
</controls:TextBlock>
</CheckBox.Content>
</CheckBox>
<StackPanel Orientation="Horizontal">
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[6].IsOn}"
Text="{Binding TimerModels.Timers[6].Hour, StringFormat=D2}"
TextWrapping="Wrap" />
<controls:TextBlock Text=":" />
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[6].IsOn}"
Text="{Binding TimerModels.Timers[6].Min, StringFormat=D2}"
TextWrapping="Wrap" />
<StackPanel
Grid.Row="1"
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<CheckBox Margin="10" IsChecked="{Binding TimerModels.Timers[5].IsOn}">
<CheckBox.Content>
<controls:TextBlock>
<controls:TextBlock.Text>
<MultiBinding StringFormat="{}{0} 6">
<Binding Source="{StaticResource Timer}" />
</MultiBinding>
</controls:TextBlock.Text>
</controls:TextBlock>
</CheckBox.Content>
</CheckBox>
<StackPanel Orientation="Horizontal">
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[5].IsOn}"
Text="{Binding TimerModels.Timers[5].Hour, StringFormat=D2}"
TextWrapping="Wrap" />
<controls:TextBlock Text=":" />
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[5].IsOn}"
Text="{Binding TimerModels.Timers[5].Min, StringFormat=D2}"
TextWrapping="Wrap" />
</StackPanel>
</StackPanel>
</StackPanel>
<StackPanel
Grid.Row="3"
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<CheckBox Margin="10" IsChecked="{Binding TimerModels.Timers[7].IsOn}">
<CheckBox.Content>
<controls:TextBlock>
<controls:TextBlock.Text>
<MultiBinding StringFormat="{}{0} 8">
<Binding Source="{StaticResource Timer}" />
</MultiBinding>
</controls:TextBlock.Text>
</controls:TextBlock>
</CheckBox.Content>
</CheckBox>
<StackPanel Orientation="Horizontal">
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[7].IsOn}"
Text="{Binding TimerModels.Timers[7].Hour, StringFormat=D2}"
TextWrapping="Wrap" />
<controls:TextBlock Text=":" />
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[7].IsOn}"
Text="{Binding TimerModels.Timers[7].Min, StringFormat=D2}"
TextWrapping="Wrap" />
<StackPanel
Grid.Row="2"
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<CheckBox Margin="10" IsChecked="{Binding TimerModels.Timers[6].IsOn}">
<CheckBox.Content>
<controls:TextBlock>
<controls:TextBlock.Text>
<MultiBinding StringFormat="{}{0} 7">
<Binding Source="{StaticResource Timer}" />
</MultiBinding>
</controls:TextBlock.Text>
</controls:TextBlock>
</CheckBox.Content>
</CheckBox>
<StackPanel Orientation="Horizontal">
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[6].IsOn}"
Text="{Binding TimerModels.Timers[6].Hour, StringFormat=D2}"
TextWrapping="Wrap" />
<controls:TextBlock Text=":" />
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[6].IsOn}"
Text="{Binding TimerModels.Timers[6].Min, StringFormat=D2}"
TextWrapping="Wrap" />
</StackPanel>
</StackPanel>
</StackPanel>
<StackPanel
Grid.Row="3"
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<CheckBox Margin="10" IsChecked="{Binding TimerModels.Timers[7].IsOn}">
<CheckBox.Content>
<controls:TextBlock>
<controls:TextBlock.Text>
<MultiBinding StringFormat="{}{0} 8">
<Binding Source="{StaticResource Timer}" />
</MultiBinding>
</controls:TextBlock.Text>
</controls:TextBlock>
</CheckBox.Content>
</CheckBox>
<StackPanel Orientation="Horizontal">
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[7].IsOn}"
Text="{Binding TimerModels.Timers[7].Hour, StringFormat=D2}"
TextWrapping="Wrap" />
<controls:TextBlock Text=":" />
<TextBox
Width="35"
Margin="10"
InputMethod.IsInputMethodEnabled="False"
IsReadOnly="{c:Binding !TimerModels.Timers[7].IsOn}"
Text="{Binding TimerModels.Timers[7].Min, StringFormat=D2}"
TextWrapping="Wrap" />
</StackPanel>
</StackPanel>
</Grid>
</Grid>
</UserControl>