online/offline status in tray

git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@54 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
Evgeny Gryaznov 2008-03-29 22:02:23 +00:00
parent 66033d509e
commit 543edc5131
6 changed files with 237 additions and 18 deletions

77
src/webimtray/WebIMTray/App.Designer.cs generated Normal file
View File

@ -0,0 +1,77 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.832
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace webImTray {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class App {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal App() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("webImTray.App", typeof(App).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
internal static System.Drawing.Icon Notify {
get {
object obj = ResourceManager.GetObject("Notify", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
internal static System.Drawing.Icon Notify_offl {
get {
object obj = ResourceManager.GetObject("Notify_offl", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
}
}

View File

@ -0,0 +1,127 @@
<?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>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="Notify" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>icons\Notify.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Notify_offl" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>icons\Notify_offl.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@ -50,26 +50,26 @@ namespace webImTray {
this.toolStripMenuItem1, this.toolStripMenuItem1,
this.exitToolStripMenuItem}); this.exitToolStripMenuItem});
this.notifyMenu.Name = "notifyMenu"; this.notifyMenu.Name = "notifyMenu";
this.notifyMenu.Size = new System.Drawing.Size(144, 58); this.notifyMenu.Size = new System.Drawing.Size(161, 66);
// //
// optionsToolStripMenuItem // optionsToolStripMenuItem
// //
this.optionsToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("optionsToolStripMenuItem.Image"))); this.optionsToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("optionsToolStripMenuItem.Image")));
this.optionsToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Silver; this.optionsToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Silver;
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(143, 24); this.optionsToolStripMenuItem.Size = new System.Drawing.Size(160, 28);
this.optionsToolStripMenuItem.Text = "Options.."; this.optionsToolStripMenuItem.Text = "Options..";
this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsMenu_Click); this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsMenu_Click);
// //
// toolStripMenuItem1 // toolStripMenuItem1
// //
this.toolStripMenuItem1.Name = "toolStripMenuItem1"; this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(140, 6); this.toolStripMenuItem1.Size = new System.Drawing.Size(157, 6);
// //
// exitToolStripMenuItem // exitToolStripMenuItem
// //
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(143, 24); this.exitToolStripMenuItem.Size = new System.Drawing.Size(160, 28);
this.exitToolStripMenuItem.Text = "E&xit"; this.exitToolStripMenuItem.Text = "E&xit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.menuExitClick); this.exitToolStripMenuItem.Click += new System.EventHandler(this.menuExitClick);
// //
@ -81,7 +81,7 @@ namespace webImTray {
this.toolHideWindow}); this.toolHideWindow});
this.toolbar.Location = new System.Drawing.Point(0, 0); this.toolbar.Location = new System.Drawing.Point(0, 0);
this.toolbar.Name = "toolbar"; this.toolbar.Name = "toolbar";
this.toolbar.Size = new System.Drawing.Size(864, 26); this.toolbar.Size = new System.Drawing.Size(864, 31);
this.toolbar.TabIndex = 1; this.toolbar.TabIndex = 1;
this.toolbar.Text = "toolStrip1"; this.toolbar.Text = "toolStrip1";
// //
@ -91,7 +91,7 @@ namespace webImTray {
this.toolNavigate.Image = ((System.Drawing.Image)(resources.GetObject("toolNavigate.Image"))); this.toolNavigate.Image = ((System.Drawing.Image)(resources.GetObject("toolNavigate.Image")));
this.toolNavigate.ImageTransparentColor = System.Drawing.Color.Silver; this.toolNavigate.ImageTransparentColor = System.Drawing.Color.Silver;
this.toolNavigate.Name = "toolNavigate"; this.toolNavigate.Name = "toolNavigate";
this.toolNavigate.Size = new System.Drawing.Size(23, 23); this.toolNavigate.Size = new System.Drawing.Size(23, 28);
this.toolNavigate.Text = "Show pending users"; this.toolNavigate.Text = "Show pending users";
this.toolNavigate.Click += new System.EventHandler(this.toolNavigate_Click); this.toolNavigate.Click += new System.EventHandler(this.toolNavigate_Click);
// //
@ -101,7 +101,7 @@ namespace webImTray {
this.toolOptions.Image = ((System.Drawing.Image)(resources.GetObject("toolOptions.Image"))); this.toolOptions.Image = ((System.Drawing.Image)(resources.GetObject("toolOptions.Image")));
this.toolOptions.ImageTransparentColor = System.Drawing.Color.Silver; this.toolOptions.ImageTransparentColor = System.Drawing.Color.Silver;
this.toolOptions.Name = "toolOptions"; this.toolOptions.Name = "toolOptions";
this.toolOptions.Size = new System.Drawing.Size(23, 23); this.toolOptions.Size = new System.Drawing.Size(23, 28);
this.toolOptions.Text = "Options.."; this.toolOptions.Text = "Options..";
this.toolOptions.Click += new System.EventHandler(this.optionsMenu_Click); this.toolOptions.Click += new System.EventHandler(this.optionsMenu_Click);
// //
@ -112,17 +112,17 @@ namespace webImTray {
this.toolHideWindow.Image = ((System.Drawing.Image)(resources.GetObject("toolHideWindow.Image"))); this.toolHideWindow.Image = ((System.Drawing.Image)(resources.GetObject("toolHideWindow.Image")));
this.toolHideWindow.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolHideWindow.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolHideWindow.Name = "toolHideWindow"; this.toolHideWindow.Name = "toolHideWindow";
this.toolHideWindow.Size = new System.Drawing.Size(105, 23); this.toolHideWindow.Size = new System.Drawing.Size(129, 28);
this.toolHideWindow.Text = "Hide window"; this.toolHideWindow.Text = "Hide window";
this.toolHideWindow.Click += new System.EventHandler(this.toolHideWindow_Click); this.toolHideWindow.Click += new System.EventHandler(this.toolHideWindow_Click);
// //
// webBrowser1 // webBrowser1
// //
this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
this.webBrowser1.Location = new System.Drawing.Point(0, 26); this.webBrowser1.Location = new System.Drawing.Point(0, 31);
this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser1.Name = "webBrowser1"; this.webBrowser1.Name = "webBrowser1";
this.webBrowser1.Size = new System.Drawing.Size(864, 459); this.webBrowser1.Size = new System.Drawing.Size(864, 454);
this.webBrowser1.TabIndex = 2; this.webBrowser1.TabIndex = 2;
this.webBrowser1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.webBrowser1_PreviewKeyDown); this.webBrowser1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.webBrowser1_PreviewKeyDown);
// //
@ -133,7 +133,7 @@ namespace webImTray {
// //
// MainWindow // MainWindow
// //
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
this.ClientSize = new System.Drawing.Size(864, 485); this.ClientSize = new System.Drawing.Size(864, 485);
this.Controls.Add(this.webBrowser1); this.Controls.Add(this.webBrowser1);
this.Controls.Add(this.toolbar); this.Controls.Add(this.toolbar);

View File

@ -10,7 +10,6 @@ using System.Data;
namespace webImTray { namespace webImTray {
public partial class MainWindow : LockNotificationForm { public partial class MainWindow : LockNotificationForm {
public MainWindow() { public MainWindow() {
InitializeComponent(); InitializeComponent();
PostInitialize(); PostInitialize();
@ -87,8 +86,12 @@ namespace webImTray {
void webBrowser1_DocumentTitleChanged(object sender, EventArgs e) { void webBrowser1_DocumentTitleChanged(object sender, EventArgs e) {
string s = webBrowser1.DocumentTitle; string s = webBrowser1.DocumentTitle;
if (s == null || s.Length == 0) if (s == null || s.Length == 0) {
s = "Web Messenger [loading]"; s = "Web Messenger [loading]";
this.notifyIcon.Icon = App.Notify_offl;
} else {
this.notifyIcon.Icon = App.Notify;
}
this.Text = s; this.Text = s;
} }

View File

@ -135,7 +135,7 @@
</data> </data>
<data name="notifyIcon.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="notifyIcon.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
AAABAAEAEBAAAAAAAABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAB AAABAAEAEBAAAAAACABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAB
AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAMDcwADwyqYABAQEAAgICAAMDAwAERERABYW AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAMDcwADwyqYABAQEAAgICAAMDAwAERERABYW
FgAcHBwAIiIiACkpKQBVVVUATU1NAEJCQgA5OTkAgHz/AFBQ/wCTANYA/+zMAMbW7wDW5+cAkKmtAAAA FgAcHBwAIiIiACkpKQBVVVUATU1NAEJCQgA5OTkAgHz/AFBQ/wCTANYA/+zMAMbW7wDW5+cAkKmtAAAA
MwAAAGYAAACZAAAAzAAAMwAAADMzAAAzZgAAM5kAADPMAAAz/wAAZgAAAGYzAABmZgAAZpkAAGbMAABm MwAAAGYAAACZAAAAzAAAMwAAADMzAAAzZgAAM5kAADPMAAAz/wAAZgAAAGYzAABmZgAAZpkAAGbMAABm
@ -153,10 +153,10 @@
zADMZv8A/5kAAP+ZMwD/mWYA/5mZAP+ZzAD/mf8A/8wAAP/MMwD/zGYA/8yZAP/MzAD/zP8A//8zAMz/ zADMZv8A/5kAAP+ZMwD/mWYA/5mZAP+ZzAD/mf8A/8wAAP/MMwD/zGYA/8yZAP/MzAD/zP8A//8zAMz/
ZgD//5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KCgoKCv//AAD//wAAgDEAAIAxAACAMQAAwGMAAODHAADxjwAA//8AAPGP
AADghwAA4IcAAOCHAADxjwAA//8AAP//AAA= AADghwAA4IcAAOCHAADxjwAA//8AAP//AAA=
</value> </value>

View File

@ -91,6 +91,13 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="App.ico" /> <Content Include="App.ico" />
<None Include="icons\Notify_offl.ico" />
<None Include="icons\Notify.ico" />
<Compile Include="App.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>App.resx</DependentUpon>
</Compile>
<Compile Include="LockNotificationForm.cs"> <Compile Include="LockNotificationForm.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -136,6 +143,11 @@
<DependentUpon>OptionsSoundsPanel.cs</DependentUpon> <DependentUpon>OptionsSoundsPanel.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="UserActivityHook.cs" /> <Compile Include="UserActivityHook.cs" />
<EmbeddedResource Include="App.resx">
<SubType>Designer</SubType>
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>App.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="options\About.resx"> <EmbeddedResource Include="options\About.resx">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<DependentUpon>About.cs</DependentUpon> <DependentUpon>About.cs</DependentUpon>