From 4cbc37f270e64ffdebd6433e13935b6266fad1a3 Mon Sep 17 00:00:00 2001 From: Pavel Petroshenko Date: Thu, 22 May 2008 21:52:33 +0000 Subject: [PATCH] - create text menu items instead of graphical buttons; - updated icons with the new ones; git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@89 c66351dc-e62f-0410-b875-e3a5c0b9693f --- src/webimtray/WebIMTray/Main.Designer.cs | 109 +++++++++---------- src/webimtray/WebIMTray/Main.cs | 35 +++++- src/webimtray/WebIMTray/Main.resx | 43 +------- src/webimtray/WebIMTray/icons/App.ico | Bin 3638 -> 4286 bytes src/webimtray/WebIMTray/webImTray.csproj | 3 +- src/webimtray/WebIMTray/webImTray.en-US.resx | 12 +- src/webimtray/WebIMTray/webImTray.ru-RU.resx | 12 +- 7 files changed, 101 insertions(+), 113 deletions(-) diff --git a/src/webimtray/WebIMTray/Main.Designer.cs b/src/webimtray/WebIMTray/Main.Designer.cs index efe303b4..37c0ab43 100644 --- a/src/webimtray/WebIMTray/Main.Designer.cs +++ b/src/webimtray/WebIMTray/Main.Designer.cs @@ -25,14 +25,14 @@ namespace webImTray { this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator(); this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolbar = new System.Windows.Forms.ToolStrip(); - this.toolNavigate = new System.Windows.Forms.ToolStripButton(); - this.toolOptions = new System.Windows.Forms.ToolStripButton(); - this.toolHideWindow = new System.Windows.Forms.ToolStripButton(); this.webBrowser1 = new System.Windows.Forms.WebBrowser(); this.reloadPageTimer = new System.Windows.Forms.Timer(this.components); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.refreshToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.optionsMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.hideWindowMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.notifyMenu.SuspendLayout(); - this.toolbar.SuspendLayout(); + this.menuStrip1.SuspendLayout(); this.SuspendLayout(); // // notifyIcon @@ -49,73 +49,34 @@ namespace webImTray { this.toolStripMenuItem1, this.exitToolStripMenuItem}); this.notifyMenu.Name = "notifyMenu"; - this.notifyMenu.Size = new System.Drawing.Size(131, 54); + this.notifyMenu.Size = new System.Drawing.Size(79, 54); // // optionsToolStripMenuItem // this.optionsToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("optionsToolStripMenuItem.Image"))); this.optionsToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Silver; this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; - this.optionsToolStripMenuItem.Size = new System.Drawing.Size(130, 22); + this.optionsToolStripMenuItem.Size = new System.Drawing.Size(78, 22); this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsMenu_Click); // // toolStripMenuItem1 // this.toolStripMenuItem1.Name = "toolStripMenuItem1"; - this.toolStripMenuItem1.Size = new System.Drawing.Size(127, 6); + this.toolStripMenuItem1.Size = new System.Drawing.Size(75, 6); // // exitToolStripMenuItem // this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; - this.exitToolStripMenuItem.Size = new System.Drawing.Size(130, 22); + this.exitToolStripMenuItem.Size = new System.Drawing.Size(78, 22); this.exitToolStripMenuItem.Click += new System.EventHandler(this.menuExitClick); // - // toolbar - // - this.toolbar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolNavigate, - this.toolOptions, - this.toolHideWindow}); - this.toolbar.Location = new System.Drawing.Point(0, 0); - this.toolbar.Name = "toolbar"; - this.toolbar.Size = new System.Drawing.Size(864, 25); - this.toolbar.TabIndex = 1; - // - // toolNavigate - // - this.toolNavigate.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.toolNavigate.Image = ((System.Drawing.Image)(resources.GetObject("toolNavigate.Image"))); - this.toolNavigate.ImageTransparentColor = System.Drawing.Color.Silver; - this.toolNavigate.Name = "toolNavigate"; - this.toolNavigate.Size = new System.Drawing.Size(23, 22); - this.toolNavigate.Click += new System.EventHandler(this.toolNavigate_Click); - // - // toolOptions - // - this.toolOptions.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.toolOptions.Image = ((System.Drawing.Image)(resources.GetObject("toolOptions.Image"))); - this.toolOptions.ImageTransparentColor = System.Drawing.Color.Silver; - this.toolOptions.Name = "toolOptions"; - this.toolOptions.Size = new System.Drawing.Size(23, 22); - this.toolOptions.Click += new System.EventHandler(this.optionsMenu_Click); - // - // toolHideWindow - // - this.toolHideWindow.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; - this.toolHideWindow.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.toolHideWindow.Image = ((System.Drawing.Image)(resources.GetObject("toolHideWindow.Image"))); - this.toolHideWindow.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolHideWindow.Name = "toolHideWindow"; - this.toolHideWindow.Size = new System.Drawing.Size(71, 22); - this.toolHideWindow.Click += new System.EventHandler(this.toolHideWindow_Click); - // // webBrowser1 // this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; - this.webBrowser1.Location = new System.Drawing.Point(0, 25); + this.webBrowser1.Location = new System.Drawing.Point(0, 24); this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); this.webBrowser1.Name = "webBrowser1"; - this.webBrowser1.Size = new System.Drawing.Size(864, 460); + this.webBrowser1.Size = new System.Drawing.Size(864, 461); this.webBrowser1.TabIndex = 2; this.webBrowser1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.webBrowser1_PreviewKeyDown); // @@ -124,13 +85,47 @@ namespace webImTray { this.reloadPageTimer.Interval = 5000; this.reloadPageTimer.Tick += new System.EventHandler(this.timer1_Tick); // + // menuStrip1 + // + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.refreshToolStripMenuItem, + this.optionsMenuItem, + this.hideWindowMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(864, 24); + this.menuStrip1.TabIndex = 3; + this.menuStrip1.Text = "menuStrip1"; + // + // refreshToolStripMenuItem + // + this.refreshToolStripMenuItem.Name = "refreshToolStripMenuItem"; + this.refreshToolStripMenuItem.Size = new System.Drawing.Size(57, 20); + this.refreshToolStripMenuItem.Text = "Refresh"; + this.refreshToolStripMenuItem.Click += new System.EventHandler(this.refreshToolStripMenuItem_Click); + // + // optionsMenuItem + // + this.optionsMenuItem.Name = "optionsMenuItem"; + this.optionsMenuItem.Size = new System.Drawing.Size(56, 20); + this.optionsMenuItem.Text = "Options"; + this.optionsMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem1_Click); + // + // hideWindowMenuItem + // + this.hideWindowMenuItem.Name = "hideWindowMenuItem"; + this.hideWindowMenuItem.Size = new System.Drawing.Size(79, 20); + this.hideWindowMenuItem.Text = "Hide window"; + this.hideWindowMenuItem.Click += new System.EventHandler(this.hideWindowToolStripMenuItem_Click); + // // MainWindow // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(864, 485); this.Controls.Add(this.webBrowser1); - this.Controls.Add(this.toolbar); + this.Controls.Add(this.menuStrip1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MainMenuStrip = this.menuStrip1; this.MinimizeBox = false; this.Name = "MainWindow"; this.ShowInTaskbar = false; @@ -138,24 +133,24 @@ namespace webImTray { this.GotFocus += new System.EventHandler(this.gotFocus); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Client_FormClosing); this.notifyMenu.ResumeLayout(false); - this.toolbar.ResumeLayout(false); - this.toolbar.PerformLayout(); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); } #endregion - private System.Windows.Forms.ToolStrip toolbar; - private System.Windows.Forms.ToolStripButton toolNavigate; private System.Windows.Forms.WebBrowser webBrowser1; private System.Windows.Forms.Timer reloadPageTimer; - private System.Windows.Forms.ToolStripButton toolOptions; private System.Windows.Forms.ContextMenuStrip notifyMenu; private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem; private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; - private System.Windows.Forms.ToolStripButton toolHideWindow; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem refreshToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem optionsMenuItem; + private System.Windows.Forms.ToolStripMenuItem hideWindowMenuItem; } } diff --git a/src/webimtray/WebIMTray/Main.cs b/src/webimtray/WebIMTray/Main.cs index 763001c1..183bd521 100644 --- a/src/webimtray/WebIMTray/Main.cs +++ b/src/webimtray/WebIMTray/Main.cs @@ -49,9 +49,9 @@ namespace webImTray { private void updateLocalizedControls() { // Update localized controls - toolHideWindow.Text = Options.resourceManager.GetString("hideWindow"); - toolOptions.ToolTipText = Options.resourceManager.GetString("optionsToolTip"); - toolNavigate.ToolTipText = Options.resourceManager.GetString("navigateToolTip"); + hideWindowMenuItem.Text = Options.resourceManager.GetString("hideWindow"); + optionsMenuItem.Text = Options.resourceManager.GetString("optionsMenuItem"); + refreshToolStripMenuItem.Text = Options.resourceManager.GetString("refreshMenuItem"); optionsToolStripMenuItem.Text = Options.resourceManager.GetString("trayOptions"); exitToolStripMenuItem.Text = Options.resourceManager.GetString("trayExit"); } @@ -189,5 +189,34 @@ namespace webImTray { navigateThere(); } } + + private void exitToolStripMenuItem1_Click(object sender, EventArgs e) + { + + } + + private void optionsToolStripMenuItem1_Click(object sender, EventArgs e) { + OptionsDialog dialog = new OptionsDialog(); + dialog.ShowDialog(this); + + // apply options + if (Options.ShowInTaskBar != this.ShowInTaskbar) { + this.ShowInTaskbar = !this.ShowInTaskbar; + } + + // Update localized controls + updateLocalizedControls(); + + setupReloadTimer(); + + } + + private void refreshToolStripMenuItem_Click(object sender, EventArgs e) { + navigateThere(); + } + + private void hideWindowToolStripMenuItem_Click(object sender, EventArgs e) { + hideWindow(); + } } } diff --git a/src/webimtray/WebIMTray/Main.resx b/src/webimtray/WebIMTray/Main.resx index 1bdf3bd1..689888ba 100644 --- a/src/webimtray/WebIMTray/Main.resx +++ b/src/webimtray/WebIMTray/Main.resx @@ -159,51 +159,14 @@ CgoKCgrv7+/v7wr39/f3CgoKCgoK7+/v7+8K7+/v7woKCgoKCgrv7+8KCu/v7woKCgoKCgoKCgoKCgoK CgoKCgoKCgoKCgoKCgoKCgoKCgoKCv//AAD//wAAgDEAAIAxAACAMQAAwGMAAODHAADxjwAA//8AAPGP AADghwAA4IcAAOCHAADxjwAA//8AAP//AAA= - - - - 421, 11 - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAY9JREFUOE9jYBh0 - wHTS1/+mEz7/N+n/8B/mOOOeN/+Ne17/N+59AxfD6nCzqb//m035+d908rf/JhM+/jfpew/WYNz9EmyA - UddLIH6B2xCwAVN//TedBDQA6AKQzSADDNsf/zdse/TfsPXBf4PW+3gMmPzjv+nEL0Cb34FtAmkEGaDf - dPu/fsON/3r11/7r1V3B7w2wUzuf/TdoQdikW3Pxv07V2f86lWfwa6ZKjOrWXAbadu6/dsUpuG2ahfv/ - axTs/a+Rvxu/CzRLTv7XLD7+X6PoCFDDgf/qeXvhGtSytv1Xy9r6Xy1zC3ZDVLP2/lfJ2vNfJXPnf1Ug - Vknf9l85bct/5dRNcA3KKRv+g7BK6gZUQxQSN/1XSNj4XyF+PRjLx68D0mv/y8euBmOFuFVwDQpxQH78 - 6v+KCWsQhkhHLP8vHQbEoUuBNBCHL/0vA6RlwpcAMYSGBTCILxux7L9c1HKEARI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ewBHsiwawCW57HyDAfWR - dvl0uhZQ1eqX8aVc7EKLqrum651ATLf9OJx5XQM4KmY0xPzZ0hFAiQJnXB0WwME0E3IsL5B17ZlADqWb - NYDrOepdlcysmTWWOrxqbceRWtaLk0VO1XW72D5Vckd2gMBfq8zdpmUG62NJvKM4+XyziDk24xmfWoGE - s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC 544, 11 + + 17, 48 + 173 diff --git a/src/webimtray/WebIMTray/icons/App.ico b/src/webimtray/WebIMTray/icons/App.ico index 1da8e38391df3cab39036e354bff98c28560d4da..e50df26ddd6a010e8cbd9fa1b135b9a3c6809b44 100644 GIT binary patch literal 4286 zcmeI0J4*vW6os!?+K7d93JdWU*huVbY%OdptS#&W8wLFXHex4;+6qx2io_y?g`GAk zm?lK4{<@Z0?L>wWkBIk$C4 zg5StP13rBw(tCaQoSDQtbc+2Kxx0m&mfjz&UOy}9Rq^dXp={|q)@L`Gol^+xuzYwJ zJD#^{r_M_kTUsdJS#8`LDl~bzXyxXe$So+uIM!qH_9#+4z;^jAGiVMEUVf_{z-7II z7-830kF~2kg_>Q*`v$*RY}kEx2+QYr^UFPzU$)QKZx3rYbJO|NwtNTi!6qN)%=N(Y z4t~2HytzjXW)%V(?fIi@$KDu>v43BAu`w9Kj~f$ZPQFcC<->!U3vBWc8yBCPOz})1 zo=>i`U%A{-h;dwxt4B@A$Jot_HS+!T-T3aj_C38*wJ^u@`?p8Z9=z=Cxb_^nwfJwf az-JcpM5WC*eIn8e@qdD-J@c64zU>RF=J0a> literal 3638 zcmeH}KTDiJ5QoQbf#bzO8!HQA5n>s(vODYr8*7Wel5b#>;wn=JNgyC>XOV=YxW@Ye zS0xa)6m231R|pb_*9j>m&&okxU(q)3t5bN|e5XJ?+9_ij&-Ik_hb3qotl)B7S1 zS*@%T`+ZyF1==G_b1``iKW}qo8n4H8SA;+5cFV-bQU-&8489EH`tv(!wOZ0{w`G2Q zUKSS@WocVrTa`}YfI&|oQi(U^6~VWoL*ka zs}DUA1$v|>dM;)_3upl?n5M-gqDSJZ9ZTp5Jz*sDgw7-xJ)>vzjF8b4Td_5J z=D--p9|#mU6hy_-GXxj{3;~7!gCoHZUvFgQ940fqoWfFZyT z6b+65M=%amuK)_Oy%Igs(d{k65=kCO6bTw(@iMR(SwvVOEM68kA{-Hp2uFm&O9e-S zA;J)0u+l|1A`B6ROfF^g5|XF9u)Vxi9jM5i@bXfVJHeDlnn;jfO5{##CW0h#CvyAa z@Z9L+PvlSJw?~x7pQufOA;FNSgFQB?;_n`Xnb962HOS=4uw^(h`TWru2Q|oWWaHqC z`QzqLh9$$2fygBEj{q#0gBhockYVAEP8^;|h9z4)oW(v3_7u=yP#6>jg+XCZ82sY| zLxw?NP#7`{grVaPgTkONC=7(Aqr;#uC=3dKl0OqnIjA^AVnpl+hk9)DiSj_+%FfP? z?C$Q$-rk-Z9305;@v$5o9m(0*nVg@W%Wyc9tE(#+jYe{Fb0gQ^Ro)yP@;&ZSUHcB$ zL_D`Fu9+&;uiAdos*05lMXBvxuXd>Is#jWN3lHx0#H?4%?j8A0`u(cv+u-el);GHr z%s%Ia=Kt-Ok!QyF%~K$M z&hFXSJ!^Lw_d}Z9v;XBi+nKe$tU&WSv_FY6B~2N{XG)qf?%40t4wLYmPWdV8)skDj zMk(S%G99aI+kUewv+MOxN4;~SM5#TBF+SQPyLG;i+{b<*`?j*NS=Exs_7my*9osj> Zq~h3EKHnN}xMj_je_Da&-+_NM{{Vz(q9y{21C7CA72-7F77-416C-9FD7-2DF748443E46} Debug AnyCPU - icons\App.ico + + webImTray diff --git a/src/webimtray/WebIMTray/webImTray.en-US.resx b/src/webimtray/WebIMTray/webImTray.en-US.resx index c4488489..981a6650 100644 --- a/src/webimtray/WebIMTray/webImTray.en-US.resx +++ b/src/webimtray/WebIMTray/webImTray.en-US.resx @@ -174,9 +174,6 @@ minutes - - Show pending users - Notifications @@ -186,15 +183,18 @@ Operator preferences + + Options + Web IM Tray Options - - Options... - Play sound when visitor comes + + Refresh + Russian diff --git a/src/webimtray/WebIMTray/webImTray.ru-RU.resx b/src/webimtray/WebIMTray/webImTray.ru-RU.resx index 09df56d6..9791ec56 100644 --- a/src/webimtray/WebIMTray/webImTray.ru-RU.resx +++ b/src/webimtray/WebIMTray/webImTray.ru-RU.resx @@ -174,9 +174,6 @@ минут - - Показать ожидающих клиентов - Звуковые уведомления @@ -186,15 +183,18 @@ Настройки оператора + + Настройки + Настройки Веб Мессенджер "Трей" - - Настройки... - Звуковое уведомление о появлении посетителя + + Обновить + Русский