mirror of
https://github.com/tiennm99/time-mocker-csharp.git
synced 2026-06-06 04:13:05 +00:00
feat: cleanup
This commit is contained in:
@@ -42,13 +42,10 @@ namespace TimeMocker.UI.Core
|
||||
|
||||
// Current fake time settings to apply on auto-inject
|
||||
public DateTime FakeUtc { get; set; } = DateTime.UtcNow;
|
||||
public bool MockEnabled { get; set; } = false;
|
||||
|
||||
public event Action<string> LogMessage;
|
||||
public event Action<InjectedProcess> ProcessAutoInjected;
|
||||
|
||||
public IReadOnlyList<PatternRule> Rules => _rules;
|
||||
|
||||
public ProcessWatcher(InjectionManager mgr)
|
||||
{
|
||||
_injectionMgr = mgr;
|
||||
|
||||
@@ -169,7 +169,6 @@ namespace TimeMocker.UI.Forms
|
||||
btnSetNow.Click += (s, e) =>
|
||||
{
|
||||
dtpDate.Value = dtpTime.Value = DateTime.Now;
|
||||
ApplyTime();
|
||||
};
|
||||
|
||||
btnApply = MakeButton("Set", 70, Color.FromArgb(70, 140, 200));
|
||||
@@ -490,7 +489,6 @@ namespace TimeMocker.UI.Forms
|
||||
if (chkWatcherEnabled.Checked)
|
||||
{
|
||||
_watcher.FakeUtc = GetFakeTime().ToUniversalTime();
|
||||
_watcher.MockEnabled = true;
|
||||
_watcher.Start();
|
||||
AppendLog("Process watcher started.");
|
||||
}
|
||||
@@ -537,7 +535,6 @@ namespace TimeMocker.UI.Forms
|
||||
var dt = GetFakeTime().ToUniversalTime();
|
||||
_injMgr.SetFakeTimeAll(dt);
|
||||
_watcher.FakeUtc = dt;
|
||||
_watcher.MockEnabled = true;
|
||||
|
||||
UpdateTimePreview();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user