Skip to content

Commit

Permalink
about dialog draft
Browse files Browse the repository at this point in the history
  • Loading branch information
Zbynek POULICEK committed Jun 15, 2020
1 parent 1026e31 commit 74a49aa
Show file tree
Hide file tree
Showing 7 changed files with 319 additions and 2 deletions.
49 changes: 49 additions & 0 deletions AllTrayProjects.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30128.74
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrayToolkit", "Source\TrayToolkit.csproj", "{855E79EF-1E63-4A3E-953E-3B5DC52EBD4C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BrightnessControl", "..\BrightnessControl\Source\BrightnessControl.csproj", "{76AF7ACC-927F-436F-82C2-41E7C629527C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLServerSwitch", "..\SQLServerSwitch\Source\SQLServerSwitch.csproj", "{BA0EB6ED-736F-4500-8924-11A292BAFDFA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lockey", "..\Lockey\Source\Lockey.csproj", "{C402FC83-5D9C-4AE2-AED1-23806DD84AA4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RemoteControl", "..\RemoteControl\Source\RemoteControl.csproj", "{55702462-E663-4A15-A74A-AA5FAB31BB96}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{855E79EF-1E63-4A3E-953E-3B5DC52EBD4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{855E79EF-1E63-4A3E-953E-3B5DC52EBD4C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{855E79EF-1E63-4A3E-953E-3B5DC52EBD4C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{855E79EF-1E63-4A3E-953E-3B5DC52EBD4C}.Release|Any CPU.Build.0 = Release|Any CPU
{76AF7ACC-927F-436F-82C2-41E7C629527C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{76AF7ACC-927F-436F-82C2-41E7C629527C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{76AF7ACC-927F-436F-82C2-41E7C629527C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{76AF7ACC-927F-436F-82C2-41E7C629527C}.Release|Any CPU.Build.0 = Release|Any CPU
{BA0EB6ED-736F-4500-8924-11A292BAFDFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BA0EB6ED-736F-4500-8924-11A292BAFDFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BA0EB6ED-736F-4500-8924-11A292BAFDFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BA0EB6ED-736F-4500-8924-11A292BAFDFA}.Release|Any CPU.Build.0 = Release|Any CPU
{C402FC83-5D9C-4AE2-AED1-23806DD84AA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C402FC83-5D9C-4AE2-AED1-23806DD84AA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C402FC83-5D9C-4AE2-AED1-23806DD84AA4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C402FC83-5D9C-4AE2-AED1-23806DD84AA4}.Release|Any CPU.Build.0 = Release|Any CPU
{55702462-E663-4A15-A74A-AA5FAB31BB96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{55702462-E663-4A15-A74A-AA5FAB31BB96}.Debug|Any CPU.Build.0 = Debug|Any CPU
{55702462-E663-4A15-A74A-AA5FAB31BB96}.Release|Any CPU.ActiveCfg = Release|Any CPU
{55702462-E663-4A15-A74A-AA5FAB31BB96}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {789C81EB-5206-4795-962A-FB22BF8BE210}
EndGlobalSection
EndGlobal
Binary file modified Build/TrayToolkit.dll
Binary file not shown.
12 changes: 11 additions & 1 deletion Source/TrayToolkit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,21 @@
<Compile Include="CodeSamples\ProgramBase.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Helpers\ResourceHelper.cs" />
<Compile Include="UI\AboutDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\AboutDialog.Designer.cs">
<DependentUpon>AboutDialog.cs</DependentUpon>
</Compile>
<Compile Include="UI\BalloonTooltip.cs" />
<Compile Include="UI\TrayIconBase.cs">
<SubType>Form</SubType>
</Compile>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<EmbeddedResource Include="UI\AboutDialog.resx">
<DependentUpon>AboutDialog.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
101 changes: 101 additions & 0 deletions Source/UI/AboutDialog.Designer.cs

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

36 changes: 36 additions & 0 deletions Source/UI/AboutDialog.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TrayToolkit.UI
{
public partial class AboutDialog : Form
{
public AboutDialog()
{
InitializeComponent();
}

public AboutDialog(string link) : this()
{
this.loadData(link);
}

private void loadData(string link)
{
var assembly = Assembly.GetEntryAssembly();
var fvi = FileVersionInfo.GetVersionInfo(assembly.Location);

this.lblProductName.Text += fvi.ProductName;
this.lblVersion.Text += fvi.ProductVersion.ToString();
}
}
}
120 changes: 120 additions & 0 deletions Source/UI/AboutDialog.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: 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">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<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">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<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" 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">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
3 changes: 2 additions & 1 deletion Source/UI/TrayIconBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ protected void onStartUpClick(object sender, EventArgs e)

protected virtual void onAboutClick(object sender, EventArgs e)
{
Process.Start(new ProcessStartInfo(this.aboutUrl));
using (var dlg = new AboutDialog(this.aboutUrl))
dlg.ShowDialog();
}


Expand Down

0 comments on commit 74a49aa

Please sign in to comment.