Compare commits

...

1 Commits

Author SHA1 Message Date
scoliono
d798f0dab8 unfinished memo feature 2022-06-16 19:14:28 -07:00
11 changed files with 594 additions and 57 deletions

View File

@ -1,5 +1,5 @@
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
[InternetShortcut]
URL=http://ff.howfeed.biz/Downloads/
URL=http://femboyfinancial.jp/Downloads/
IDList=

View File

@ -22,13 +22,7 @@
"Entry"
{
"MsmKey" = "8:_20E2146C791105F6934C30A65E1458CA"
"OwnerKey" = "8:_5909879E9BE44DDB371A14BD798CD400"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_20E2146C791105F6934C30A65E1458CA"
"OwnerKey" = "8:_46C8C60227CD93D9A3ADA497BA320E90"
"OwnerKey" = "8:_54602D10025C6F6766454C8F6B75F417"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
@ -40,7 +34,13 @@
"Entry"
{
"MsmKey" = "8:_20E2146C791105F6934C30A65E1458CA"
"OwnerKey" = "8:_54602D10025C6F6766454C8F6B75F417"
"OwnerKey" = "8:_46C8C60227CD93D9A3ADA497BA320E90"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_20E2146C791105F6934C30A65E1458CA"
"OwnerKey" = "8:_5909879E9BE44DDB371A14BD798CD400"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
@ -70,13 +70,13 @@
"Entry"
{
"MsmKey" = "8:_54602D10025C6F6766454C8F6B75F417"
"OwnerKey" = "8:_C7272BF4A9D24FD39D08ABB04570B03C"
"OwnerKey" = "8:_F7884CBCC5F6D4C1E8E353172B9C0BA6"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_54602D10025C6F6766454C8F6B75F417"
"OwnerKey" = "8:_F7884CBCC5F6D4C1E8E353172B9C0BA6"
"OwnerKey" = "8:_C7272BF4A9D24FD39D08ABB04570B03C"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
@ -130,37 +130,7 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_20E2146C791105F6934C30A65E1458CA"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_EBEE36C33EDCA5A5ABEBF8285F4E5150"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_46C8C60227CD93D9A3ADA497BA320E90"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_54602D10025C6F6766454C8F6B75F417"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_5909879E9BE44DDB371A14BD798CD400"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_F7884CBCC5F6D4C1E8E353172B9C0BA6"
"OwnerKey" = "8:_C7272BF4A9D24FD39D08ABB04570B03C"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
@ -172,7 +142,37 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_C7272BF4A9D24FD39D08ABB04570B03C"
"OwnerKey" = "8:_F7884CBCC5F6D4C1E8E353172B9C0BA6"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_5909879E9BE44DDB371A14BD798CD400"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_54602D10025C6F6766454C8F6B75F417"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_46C8C60227CD93D9A3ADA497BA320E90"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_EBEE36C33EDCA5A5ABEBF8285F4E5150"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_20E2146C791105F6934C30A65E1458CA"
"MsmSig" = "8:_UNDEFINED"
}
}
@ -237,6 +237,19 @@
"PrerequisitesLocation" = "2:1"
"Url" = "8:"
"ComponentsUrl" = "8:"
"Items"
{
"{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.0,Profile=Client"
{
"Name" = "8:Microsoft .NET Framework 4 Client Profile (x86 and x64)"
"ProductCode" = "8:.NETFramework,Version=v4.0,Profile=Client"
}
"{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.3.1"
{
"Name" = "8:Windows Installer 3.1"
"ProductCode" = "8:Microsoft.Windows.Installer.3.1"
}
}
}
}
}
@ -274,6 +287,11 @@
"AssemblyAsmDisplayName" = "8:AForge, Version=2.2.5.0, Culture=neutral, PublicKeyToken=c1db6ff4eaa06aeb, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_20E2146C791105F6934C30A65E1458CA"
{
"Name" = "8:AForge.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:AForge.dll"
"TargetName" = "8:"
@ -300,6 +318,11 @@
"AssemblyAsmDisplayName" = "8:AForge.Imaging, Version=2.2.5.0, Culture=neutral, PublicKeyToken=ba8ddea9676ca48b, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_46C8C60227CD93D9A3ADA497BA320E90"
{
"Name" = "8:AForge.Imaging.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:AForge.Imaging.dll"
"TargetName" = "8:"
@ -326,6 +349,11 @@
"AssemblyAsmDisplayName" = "8:Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_502B38277AF62ED70F770D10BD1FD65A"
{
"Name" = "8:Newtonsoft.Json.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:Newtonsoft.Json.dll"
"TargetName" = "8:"
@ -352,6 +380,11 @@
"AssemblyAsmDisplayName" = "8:AForge.Video, Version=2.2.5.0, Culture=neutral, PublicKeyToken=cbfb6e07d173c401, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_54602D10025C6F6766454C8F6B75F417"
{
"Name" = "8:AForge.Video.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:AForge.Video.dll"
"TargetName" = "8:"
@ -378,6 +411,11 @@
"AssemblyAsmDisplayName" = "8:AForge.Controls, Version=2.2.5.0, Culture=neutral, PublicKeyToken=a8ac264d1dc6b9d9, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_5909879E9BE44DDB371A14BD798CD400"
{
"Name" = "8:AForge.Controls.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:AForge.Controls.dll"
"TargetName" = "8:"
@ -464,6 +502,11 @@
"AssemblyAsmDisplayName" = "8:AForge.Math, Version=2.2.5.0, Culture=neutral, PublicKeyToken=abba2e25397ee8c9, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_EBEE36C33EDCA5A5ABEBF8285F4E5150"
{
"Name" = "8:AForge.Math.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:AForge.Math.dll"
"TargetName" = "8:"
@ -490,6 +533,11 @@
"AssemblyAsmDisplayName" = "8:AForge.Video.DirectShow, Version=2.2.5.0, Culture=neutral, PublicKeyToken=61ea4348d43881b7, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_F7884CBCC5F6D4C1E8E353172B9C0BA6"
{
"Name" = "8:AForge.Video.DirectShow.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:AForge.Video.DirectShow.dll"
"TargetName" = "8:"
@ -598,15 +646,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:FemboyWatchdog"
"ProductCode" = "8:{75E1E013-157D-4EE1-98A4-AC33CB590ED8}"
"PackageCode" = "8:{296803F3-755E-4162-B807-73CF6C07DBEB}"
"ProductCode" = "8:{0DC9DD10-CAD3-4AB1-A53D-DD48AFA57549}"
"PackageCode" = "8:{B0FD6310-778F-4F24-961E-691BF3A69E5F}"
"UpgradeCode" = "8:{85E61D1C-4678-4F3E-898C-C62A75112C1A}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:TRUE"
"ProductVersion" = "8:0.4.0"
"ProductVersion" = "8:0.5.0"
"Manufacturer" = "8:FemboyFinancial"
"ARPHELPTELEPHONE" = "8:+1 (925) 765-8478"
"ARPHELPLINK" = "8:http://ff.howfeed.biz/"
@ -1134,7 +1182,7 @@
{
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_C7272BF4A9D24FD39D08ABB04570B03C"
{
"SourcePath" = "8:..\\FemboyWatchdog\\obj\\x86\\Release\\FemboyWatchdog.exe"
"SourcePath" = "8:..\\FemboyWatchdog\\obj\\x86\\Debug\\FemboyWatchdog.exe"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_B09D9E8F0A6E4508BA26694479354890"

View File

@ -78,6 +78,7 @@
<HintPath>..\packages\AForge.Video.DirectShow.2.2.5\lib\AForge.Video.DirectShow.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net20\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
@ -111,6 +112,13 @@
<DependentUpon>MeetingNotification.cs</DependentUpon>
</Compile>
<Compile Include="MeetingProvider.cs" />
<Compile Include="MemoProvider.cs" />
<Compile Include="MemoViewer.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MemoViewer.Designer.cs">
<DependentUpon>MemoViewer.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Settings.cs" />
@ -142,6 +150,9 @@
<EmbeddedResource Include="MeetingNotification.resx">
<DependentUpon>MeetingNotification.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MemoViewer.resx">
<DependentUpon>MemoViewer.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>

View File

@ -70,6 +70,8 @@ namespace FemboyWatchdog
if (Checking)
return;
_timer_Tick(this, null);
_timer = new Timer();
_timer.Interval = Convert.ToInt32(_checkInterval * 1000);
_timer.Tick += new EventHandler(_timer_Tick);

View File

@ -0,0 +1,148 @@
using System;
using System.Collections.Generic;
using System.Net;
using System.Windows.Forms;
using Newtonsoft.Json;
namespace FemboyWatchdog
{
public class MemoProvider
{
private WebClient _memoChecker;
private WebClient _memoCreator;
private Timer _timer;
public List<Memo> Memos { get; private set; }
private DateTime _lastReceivedMemoTime;
private double _checkInterval;
public bool Checking { get; private set; }
public event EventHandler<Memo> NewMemo;
public class Memo : EventArgs
{
public DateTime Time;
public string Message;
}
internal class MemoError : EventArgs
{
public string Error;
}
public MemoProvider(double interval = 5.0)
{
_memoChecker = new WebClient();
_memoChecker.DownloadStringCompleted += new DownloadStringCompletedEventHandler(_memoChecker_DownloadStringCompleted);
_memoCreator = new WebClient();
_memoCreator.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
_memoCreator.UploadStringCompleted += new UploadStringCompletedEventHandler(_memoCreator_UploadStringCompleted);
Memos = new List<Memo>();
_lastReceivedMemoTime = DateTime.UtcNow;
_checkInterval = interval;
Checking = false;
}
private void _memoCreator_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e)
{
// apparently headers get unset if you reuse the WebClient
_memoCreator.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
if (e.Cancelled || e.Error != null)
return;
try
{
Memos = JsonConvert.DeserializeObject<List<Memo>>(e.Result);
}
catch (JsonSerializationException err)
{
try
{
MemoError response = JsonConvert.DeserializeObject<MemoError>(e.Result);
MessageBox.Show(response.Error, "Error Sending Memo", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
catch (JsonSerializationException err2)
{
MessageBox.Show("Unknown deserialization error", "Error Sending Memo", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
public void PostNewMemo(string message)
{
_memoCreator.UploadStringAsync(
new Uri(Properties.Settings.Default.FemboyApiBaseUrl + "memo"),
string.Format("token={0}&message={1}", Properties.Settings.Default.FemboyApiToken, Uri.EscapeDataString(message))
);
}
public void StartChecking()
{
if (Checking)
return;
_timer_Tick(this, null);
_timer = new Timer();
_timer.Interval = Convert.ToInt32(_checkInterval * 1000);
_timer.Tick += new EventHandler(_timer_Tick);
_timer.Start();
Checking = true;
}
private bool FindNewMemos(Memo m)
{
return m.Time > _lastReceivedMemoTime;
}
private void _memoChecker_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
if (e.Cancelled || e.Error != null)
return;
try
{
Memos = JsonConvert.DeserializeObject<List<Memo>>(e.Result);
foreach (Memo m in Memos.FindAll(FindNewMemos))
{
_lastReceivedMemoTime = m.Time;
OnNewMemo(m);
}
}
catch (JsonSerializationException err) { }
}
protected virtual void OnNewMemo(Memo m)
{
EventHandler<Memo> handler = NewMemo;
if (handler != null)
{
handler(this, m);
}
}
private void _timer_Tick(object sender, EventArgs e)
{
if (!_memoChecker.IsBusy)
{
try
{
_memoChecker.DownloadStringAsync(new Uri(
string.Format(
"{0}memo/?token={1}",
Properties.Settings.Default.FemboyApiBaseUrl,
Properties.Settings.Default.FemboyApiToken
)
));
}
catch (WebException err) { }
}
}
}
}

79
FemboyWatchdog/MemoViewer.Designer.cs generated Normal file
View File

@ -0,0 +1,79 @@
namespace FemboyWatchdog
{
partial class MemoViewer
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.memosList = new System.Windows.Forms.ListView();
this.SuspendLayout();
//
// button1
//
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(210, 237);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Close";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// memosList
//
this.memosList.Location = new System.Drawing.Point(12, 12);
this.memosList.Name = "memosList";
this.memosList.Size = new System.Drawing.Size(470, 219);
this.memosList.TabIndex = 1;
this.memosList.UseCompatibleStateImageBehavior = false;
this.memosList.View = System.Windows.Forms.View.Details;
//
// MemoViewer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button1;
this.ClientSize = new System.Drawing.Size(494, 272);
this.Controls.Add(this.memosList);
this.Controls.Add(this.button1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.Name = "MemoViewer";
this.ShowInTaskbar = false;
this.Text = "Viewing All Company Memos";
this.TopMost = true;
this.Load += new System.EventHandler(this.MemoViewer_Load);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.ListView memosList;
}
}

View File

@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace FemboyWatchdog
{
public partial class MemoViewer : Form
{
private List<MemoProvider.Memo> _memos;
public MemoViewer(List<MemoProvider.Memo> memos)
{
InitializeComponent();
_memos = memos;
memosList.View = View.Details;
memosList.Columns.Add("Date", 150);
memosList.Columns.Add("Message", 300);
}
private void button1_Click(object sender, EventArgs e)
{
Close();
}
private void MemoViewer_Load(object sender, EventArgs e)
{
foreach (MemoProvider.Memo memo in _memos)
{
string[] columns = { memo.Time.ToString(), memo.Message };
ListViewItem li = new ListViewItem(columns);
memosList.Items.Add(li);
}
}
}
}

View File

@ -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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 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("0.0.4.0")]
[assembly: AssemblyFileVersion("0.0.4.0")]
[assembly: AssemblyVersion("0.0.5.0")]
[assembly: AssemblyFileVersion("0.0.5.0")]

View File

@ -33,8 +33,12 @@
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.meetingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.callAMeetingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.postMemoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.viewPastMemosToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.memoLabel = new System.Windows.Forms.Label();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
@ -46,7 +50,7 @@
this.helpToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(400, 24);
this.menuStrip1.Size = new System.Drawing.Size(500, 24);
this.menuStrip1.TabIndex = 1;
this.menuStrip1.Text = "menuStrip1";
this.menuStrip1.MouseEnter += new System.EventHandler(this.menuStrip1_MouseEnter);
@ -68,18 +72,40 @@
// meetingToolStripMenuItem
//
this.meetingToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.callAMeetingToolStripMenuItem});
this.callAMeetingToolStripMenuItem,
this.toolStripSeparator1,
this.postMemoToolStripMenuItem,
this.viewPastMemosToolStripMenuItem});
this.meetingToolStripMenuItem.Name = "meetingToolStripMenuItem";
this.meetingToolStripMenuItem.Size = new System.Drawing.Size(63, 20);
this.meetingToolStripMenuItem.Text = "Meeting";
this.meetingToolStripMenuItem.Size = new System.Drawing.Size(71, 20);
this.meetingToolStripMenuItem.Text = "Company";
//
// callAMeetingToolStripMenuItem
//
this.callAMeetingToolStripMenuItem.Name = "callAMeetingToolStripMenuItem";
this.callAMeetingToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
this.callAMeetingToolStripMenuItem.Size = new System.Drawing.Size(167, 22);
this.callAMeetingToolStripMenuItem.Text = "Call a Meeting";
this.callAMeetingToolStripMenuItem.Click += new System.EventHandler(this.callAMeetingToolStripMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(164, 6);
//
// postMemoToolStripMenuItem
//
this.postMemoToolStripMenuItem.Name = "postMemoToolStripMenuItem";
this.postMemoToolStripMenuItem.Size = new System.Drawing.Size(167, 22);
this.postMemoToolStripMenuItem.Text = "Post a Memo...";
this.postMemoToolStripMenuItem.Click += new System.EventHandler(this.postMemoToolStripMenuItem_Click);
//
// viewPastMemosToolStripMenuItem
//
this.viewPastMemosToolStripMenuItem.Name = "viewPastMemosToolStripMenuItem";
this.viewPastMemosToolStripMenuItem.Size = new System.Drawing.Size(167, 22);
this.viewPastMemosToolStripMenuItem.Text = "View Past Memos";
this.viewPastMemosToolStripMenuItem.Click += new System.EventHandler(this.viewPastMemosToolStripMenuItem_Click);
//
// helpToolStripMenuItem
//
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -91,16 +117,27 @@
// aboutToolStripMenuItem
//
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(107, 22);
this.aboutToolStripMenuItem.Text = "About";
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
//
// memoLabel
//
this.memoLabel.AutoSize = true;
this.memoLabel.BackColor = System.Drawing.Color.Chartreuse;
this.memoLabel.Location = new System.Drawing.Point(181, 6);
this.memoLabel.Name = "memoLabel";
this.memoLabel.Size = new System.Drawing.Size(138, 13);
this.memoLabel.TabIndex = 2;
this.memoLabel.Text = "Loading Company Memos...";
//
// Toolbar
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Lime;
this.ClientSize = new System.Drawing.Size(400, 24);
this.ClientSize = new System.Drawing.Size(500, 24);
this.Controls.Add(this.memoLabel);
this.Controls.Add(this.menuStrip1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MainMenuStrip = this.menuStrip1;
@ -128,6 +165,10 @@
private System.Windows.Forms.ToolStripMenuItem callAMeetingToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem postMemoToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem viewPastMemosToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.Label memoLabel;
}
}

View File

@ -1,4 +1,5 @@
using System;
using Microsoft.VisualBasic;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@ -11,6 +12,9 @@ namespace FemboyWatchdog
public partial class Toolbar : Form
{
private MeetingProvider meetings;
private MemoProvider memos;
private Timer _labelTimer;
private int _memoIndex;
public Toolbar()
{
@ -20,6 +24,37 @@ namespace FemboyWatchdog
meetings = new MeetingProvider();
meetings.MeetingStarted += new EventHandler<MeetingProvider.MeetingInfo>(meetings_MeetingStarted);
meetings.StartChecking();
memos = new MemoProvider();
memos.NewMemo += new EventHandler<MemoProvider.Memo>(memos_NewMemo);
memos.StartChecking();
_memoIndex = 0;
_labelTimer = new Timer();
_labelTimer.Interval = 10000;
_labelTimer.Tick += new EventHandler(_labelTimer_Tick);
_labelTimer.Start();
memoLabel.Hide();
}
private void _labelTimer_Tick(object sender, EventArgs e)
{
if (memos.Memos.Count == 0)
{
memoLabel.Hide();
}
else
{
memoLabel.Text = memos.Memos[_memoIndex++ % memos.Memos.Count].Message;
memoLabel.Show();
}
}
private void memos_NewMemo(object sender, MemoProvider.Memo m)
{
MessageBox.Show(m.Message, "NEW COMPANY MEMO", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void meetings_MeetingStarted(object sender, EventArgs e)
@ -43,5 +78,18 @@ namespace FemboyWatchdog
AboutBox dialog = new AboutBox();
dialog.ShowDialog();
}
private void postMemoToolStripMenuItem_Click(object sender, EventArgs e)
{
string message = Interaction.InputBox("Enter a messsage:", "Post a Memo");
if (message.Length > 0)
memos.PostNewMemo(message);
}
private void viewPastMemosToolStripMenuItem_Click(object sender, EventArgs e)
{
MemoViewer dialog = new MemoViewer(memos.Memos);
dialog.Show();
}
}
}