Fix taskbar icon and use spaces in taskbar title

This commit is contained in:
Will Hilton 2017-08-16 15:36:27 -04:00
parent de134b2785
commit d249add410
No known key found for this signature in database
GPG key ID: 9609B8A5928BA6B9
4 changed files with 28 additions and 13 deletions

View file

@ -9,7 +9,7 @@
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>InvisbleLockScreen</RootNamespace>
<AssemblyName>InvisbleLockScreen</AssemblyName>
<AssemblyName>Invisble Lock Screen</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileUpgradeFlags>
</FileUpgradeFlags>
@ -94,11 +94,7 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="blank_screen.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="blank_screen.ico" />
<Content Include="Properties\blank_screen.ico" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

View file

@ -59,5 +59,15 @@ namespace InvisbleLockScreen.Properties {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon icon {
get {
object obj = ResourceManager.GetObject("icon", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
}
}

View file

@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
@ -60,6 +60,7 @@
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
@ -68,9 +69,10 @@
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
@ -85,9 +87,10 @@
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
@ -114,4 +117,8 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<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>
</root>

View file

@ -520,7 +520,7 @@ namespace Screensavers
#endif
primary.FormBorderStyle = FormBorderStyle.None;
primary.Text = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
primary.Icon = new Icon("Resources/blank_screen.ico");
primary.Icon = InvisbleLockScreen.Properties.Resources.icon;
foreach (Screen screen in Screen.AllScreens)
{
@ -538,7 +538,7 @@ namespace Screensavers
form.Size = screen.Bounds.Size;
form.FormBorderStyle = FormBorderStyle.None;
form.Text = primary.Text;
form.Icon = new Icon("Resources/blank_screen.ico");
form.Icon = InvisbleLockScreen.Properties.Resources.icon;
windows.Add(new Window(this, form));
}
@ -574,8 +574,9 @@ namespace Screensavers
form.FormBorderStyle = FormBorderStyle.None;
form.StartPosition = FormStartPosition.Manual;
form.Text = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
form.Icon = InvisbleLockScreen.Properties.Resources.icon;
windows = new WindowCollection(new Window[] { new Window(this, form) });
windows = new WindowCollection(new Window[] { new Window(this, form) });
form.Show();
InitializeAndStart();
@ -596,7 +597,8 @@ namespace Screensavers
Form form = new Form();
form.FormBorderStyle = FormBorderStyle.FixedSingle;
form.Text = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
form.StartPosition = FormStartPosition.CenterScreen;
form.Icon = InvisbleLockScreen.Properties.Resources.icon;
form.StartPosition = FormStartPosition.CenterScreen;
form.BackColor = Color.Black;
#if !DEBUG
form.TopMost = true;