mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-12 13:35:39 +02:00
gray out restore snapshot menu until a snapshot is captured
This commit is contained in:
parent
b1cd8d8775
commit
dfb5f87067
4 changed files with 10 additions and 0 deletions
|
@ -134,6 +134,7 @@ namespace Ninjacrab.PersistentWindows.Common
|
||||||
|
|
||||||
public delegate void CallBackBool(bool en);
|
public delegate void CallBackBool(bool en);
|
||||||
public CallBackBool enableRestoreMenu;
|
public CallBackBool enableRestoreMenu;
|
||||||
|
public CallBackBool enableRestoreSnapshotMenu;
|
||||||
|
|
||||||
private PowerModeChangedEventHandler powerModeChangedHandler;
|
private PowerModeChangedEventHandler powerModeChangedHandler;
|
||||||
private EventHandler displaySettingsChangingHandler;
|
private EventHandler displaySettingsChangingHandler;
|
||||||
|
|
|
@ -292,6 +292,8 @@ namespace Ninjacrab.PersistentWindows.SystrayShell
|
||||||
if (prompt)
|
if (prompt)
|
||||||
systrayForm.notifyIconMain.ShowBalloonTip(5000, $"snapshot '{c}' is captured", $"click icon then immediately press key '{c}' to restore the snapshot", ToolTipIcon.Info);
|
systrayForm.notifyIconMain.ShowBalloonTip(5000, $"snapshot '{c}' is captured", $"click icon then immediately press key '{c}' to restore the snapshot", ToolTipIcon.Info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
systrayForm.EnableSnapshotRestore();
|
||||||
}
|
}
|
||||||
|
|
||||||
static public void ChangeZorderMethod()
|
static public void ChangeZorderMethod()
|
||||||
|
|
|
@ -137,6 +137,8 @@ namespace Ninjacrab.PersistentWindows.SystrayShell
|
||||||
this.restoreSnapshotMenuItem.Size = new System.Drawing.Size(135, 22);
|
this.restoreSnapshotMenuItem.Size = new System.Drawing.Size(135, 22);
|
||||||
this.restoreSnapshotMenuItem.Text = "R&estore snapshot";
|
this.restoreSnapshotMenuItem.Text = "R&estore snapshot";
|
||||||
this.restoreSnapshotMenuItem.Click += new System.EventHandler(this.RestoreSnapshotClickHandler);
|
this.restoreSnapshotMenuItem.Click += new System.EventHandler(this.RestoreSnapshotClickHandler);
|
||||||
|
this.restoreSnapshotMenuItem.Enabled = false;
|
||||||
|
|
||||||
// suspend/resume auto restore
|
// suspend/resume auto restore
|
||||||
//
|
//
|
||||||
this.pauseResumeToolStripMenuItem.Name = "suspend/resume";
|
this.pauseResumeToolStripMenuItem.Name = "suspend/resume";
|
||||||
|
|
|
@ -175,6 +175,11 @@ namespace Ninjacrab.PersistentWindows.SystrayShell
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void EnableSnapshotRestore()
|
||||||
|
{
|
||||||
|
restoreSnapshotMenuItem.Enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
private void CheckUpgrade()
|
private void CheckUpgrade()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue