Skip to content

Commit

Permalink
Change taskbar title to "Ctrl+L To Unlock"
Browse files Browse the repository at this point in the history
  • Loading branch information
billiegoose committed Aug 17, 2017
1 parent 51475c9 commit 3ce5583
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
1 change: 1 addition & 0 deletions InvisibleLockScreenSaver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public TransparentLockSaver()
Based on:
Screensaver.cs © Rei Miyasaka 2006 [email protected]";
this.WindowTitle = InvisbleLockScreen.Properties.Resources.WindowTitle;
}

[STAThread]
Expand Down
9 changes: 9 additions & 0 deletions Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,7 @@
<data name="icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\blank_screen.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="WindowTitle" xml:space="preserve">
<value>Ctrl+L To Unlock</value>
</data>
</root>
17 changes: 14 additions & 3 deletions Screensaver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,17 @@ private void RunPreview()
previewShutdownEvent.WaitOne();
}

string windowTitle = "";

/// <summary>
/// Gets or sets text to be displayed in the taskbar window title.
/// </summary>
public string WindowTitle
{
get { return windowTitle; }
set { windowTitle = value; }
}

private void RunNormal()
{
Cursor.Hide();
Expand Down Expand Up @@ -521,7 +532,7 @@ private void RunNormalMultipleWindows()
primary.TopMost = true;
#endif
primary.FormBorderStyle = FormBorderStyle.None;
primary.Text = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
primary.Text = WindowTitle;
primary.Icon = InvisbleLockScreen.Properties.Resources.icon;

foreach (Screen screen in Screen.AllScreens)
Expand Down Expand Up @@ -575,7 +586,7 @@ private void RunNormalSingleWindow()
#endif
form.FormBorderStyle = FormBorderStyle.None;
form.StartPosition = FormStartPosition.Manual;
form.Text = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
form.Text = WindowTitle;
form.Icon = InvisbleLockScreen.Properties.Resources.icon;

windows = new WindowCollection(new Window[] { new Window(this, form) });
Expand All @@ -597,7 +608,7 @@ private void RunWindowed()
{
Form form = new Form();
form.FormBorderStyle = FormBorderStyle.FixedSingle;
form.Text = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
form.Text = WindowTitle;
form.Icon = InvisbleLockScreen.Properties.Resources.icon;
form.StartPosition = FormStartPosition.CenterScreen;
form.BackColor = Color.Black;
Expand Down

0 comments on commit 3ce5583

Please sign in to comment.