Skip to content

Commit

Permalink
2.3.2.2 - Information Window implemented.
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinkendall committed Aug 21, 2020
1 parent 3e9047a commit 99b3040
Show file tree
Hide file tree
Showing 15 changed files with 327 additions and 30 deletions.
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.3.2.1")]
[assembly: AssemblyFileVersion("2.3.2.1")]
[assembly: AssemblyVersion("2.3.2.2")]
[assembly: AssemblyFileVersion("2.3.2.2")]
[assembly: NeutralResourcesLanguageAttribute("en-CA")]
2 changes: 1 addition & 1 deletion app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<assemblyIdentity
type="win32"
name="GavinKendall.AutoScreenCapture"
version="2.3.2.1"/>
version="2.3.2.2"/>
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>True/PM</dpiAware>
Expand Down
9 changes: 9 additions & 0 deletions autoscreen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@
<Compile Include="interface\FormAbout.Designer.cs">
<DependentUpon>FormAbout.cs</DependentUpon>
</Compile>
<Compile Include="interface\FormInformationWindow.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="interface\FormInformationWindow.Designer.cs">
<DependentUpon>FormInformationWindow.cs</DependentUpon>
</Compile>
<Compile Include="interface\FormKeyboardShortcuts.cs">
<SubType>Form</SubType>
</Compile>
Expand Down Expand Up @@ -263,6 +269,9 @@
<DependentUpon>FormAbout.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="interface\FormInformationWindow.resx">
<DependentUpon>FormInformationWindow.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="interface\FormKeyboardShortcuts.resx">
<DependentUpon>FormKeyboardShortcuts.cs</DependentUpon>
</EmbeddedResource>
Expand Down
1 change: 1 addition & 0 deletions interface/FormAbout.Designer.cs

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

2 changes: 1 addition & 1 deletion interface/FormAbout.resx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="richTextBoxDeveloper.Text" xml:space="preserve">
<value>Auto Screen Capture 2.3.2.1 ("Boombayah")
<value>Auto Screen Capture 2.3.2.2 ("Boombayah")
Developed by Gavin Kendall (2008 - 2020)

https://autoscreen.sourceforge.io/
Expand Down
56 changes: 56 additions & 0 deletions interface/FormInformationWindow.Designer.cs

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

44 changes: 44 additions & 0 deletions interface/FormInformationWindow.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//-----------------------------------------------------------------------
// <copyright file="FormInformationWindow.cs" company="Gavin Kendall">
// Copyright (c) 2020 Gavin Kendall
// </copyright>
// <author>Gavin Kendall</author>
// <summary>A form for asking the user for the passphrase during a locked screen capture session.</summary>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//-----------------------------------------------------------------------
using System.Drawing;
using System.Windows.Forms;

namespace AutoScreenCapture
{
public partial class FormInformationWindow : Form
{
/// <summary>
/// A small fixed tool window that shows information in its title bar.
/// </summary>
public FormInformationWindow()
{
InitializeComponent();


}

private void FormInformationWindow_FormClosing(object sender, FormClosingEventArgs e)
{
e.Cancel = true;
Hide();
}
}
}
120 changes: 120 additions & 0 deletions interface/FormInformationWindow.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 interface/main/FormMain-Schedules.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ private void timerScheduledCapture_Tick(object sender, EventArgs e)
FileSystem.CreateFile(FileSystem.CommandFile);
}

// Displays the next time screenshots are going to be captured in the system tray icon's tool tip.
// Displays the next time screenshots are going to be captured
// in the system tray icon's tool tip, the main interface, and information window.
ShowInfo();

// Process the list of schedules we need to consider.
Expand Down
5 changes: 3 additions & 2 deletions interface/main/FormMain-SystemTrayIcon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private void ShowInfo()
{
try
{
notifyIcon.Text = string.Empty;
notifyIcon.Text = "Ready to start taking screenshots";

if (_screenCapture.ApplicationError || _screenCapture.ApplicationWarning)
{
Expand All @@ -109,7 +109,7 @@ private void ShowInfo()

if (!_screenCapture.CaptureError)
{
string remainingTimeStr = string.Empty;
string remainingTimeStr = "Taking screenshots";

int remainingHours = _screenCapture.TimeRemainingForNextScreenshot.Hours;
int remainingMinutes = _screenCapture.TimeRemainingForNextScreenshot.Minutes;
Expand Down Expand Up @@ -147,6 +147,7 @@ private void ShowInfo()
}

toolStripInfo.Text = notifyIcon.Text;
_formInformationWindow.Text = notifyIcon.Text;
}
catch (Exception)
{
Expand Down
Loading

0 comments on commit 99b3040

Please sign in to comment.