Browse Source

Update to Boo revision 2371.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2176 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 19 years ago
parent
commit
2c42782129
  1. 36
      data/templates/project/CSharp/NotifyIcon.xpt
  2. 22
      src/Tools/LocalizationDbToResFile/Main.cs
  3. 22
      src/Tools/LocalizationXmlToResFile/LocalizationXmlToResFile.cs
  4. 22
      src/Tools/ResourceAssembler/ResAsm.cs

36
data/templates/project/CSharp/NotifyIcon.xpt

@ -14,7 +14,7 @@
<!-- Actions --> <!-- Actions -->
<Actions> <Actions>
<Open filename = "SysTrayIcon.cs"/> <Open filename = "NotificationIcon.cs"/>
</Actions> </Actions>
<Project language="C#"> <Project language="C#">
@ -31,7 +31,7 @@
</PropertyGroup> </PropertyGroup>
<Files> <Files>
<File name="SysTrayIcon.cs" language="C#"><![CDATA[${StandardHeader.C#} <File name="NotificationIcon.cs" language="C#"><![CDATA[${StandardHeader.C#}
using System; using System;
using System.Diagnostics; using System.Diagnostics;
using System.Drawing; using System.Drawing;
@ -40,21 +40,21 @@ using System.Windows.Forms;
namespace ${StandardNamespace} namespace ${StandardNamespace}
{ {
public sealed class SysTrayIcon public sealed class NotificationIcon
{ {
private System.Windows.Forms.NotifyIcon trayIcon; private NotifyIcon notifyIcon;
private System.Windows.Forms.ContextMenu sysTrayMenu; private ContextMenu notificationMenu;
#region Initialize icon and menu #region Initialize icon and menu
public SysTrayIcon() public NotificationIcon()
{ {
trayIcon = new NotifyIcon(); notifyIcon = new NotifyIcon();
sysTrayMenu = new ContextMenu(InitializeMenu()); notificationMenu = new ContextMenu(InitializeMenu());
trayIcon.DoubleClick += TrayIconDoubleClick; notifyIcon.DoubleClick += IconDoubleClick;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SysTrayIcon)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NotificationIcon));
trayIcon.Icon = (Icon)resources.GetObject("$this.Icon"); notifyIcon.Icon = (Icon)resources.GetObject("$this.Icon");
trayIcon.ContextMenu = sysTrayMenu; notifyIcon.ContextMenu = notificationMenu;
} }
private MenuItem[] InitializeMenu() private MenuItem[] InitializeMenu()
@ -80,13 +80,13 @@ namespace ${StandardNamespace}
// Please use a unique name for the mutex to prevent conflicts with other programs // Please use a unique name for the mutex to prevent conflicts with other programs
using (Mutex mtx = new Mutex(true, "${StandardNamespace}", out isFirstInstance)) { using (Mutex mtx = new Mutex(true, "${StandardNamespace}", out isFirstInstance)) {
if (isFirstInstance) { if (isFirstInstance) {
SysTrayIcon sysTrayIcon = new SysTrayIcon(); NotificationIcon notificationIcon = new NotificationIcon();
sysTrayIcon.trayIcon.Visible = true; notificationIcon.notifyIcon.Visible = true;
Application.Run(); Application.Run();
sysTrayIcon.trayIcon.Dispose(); notificationIcon.notifyIcon.Dispose();
} else { } else {
// The application is already running // The application is already running
// TODO: Display message box or change focus to existing application instance
} }
} // releases the Mutex } // releases the Mutex
} }
@ -103,7 +103,7 @@ namespace ${StandardNamespace}
Application.Exit(); Application.Exit();
} }
private void TrayIconDoubleClick(object sender, EventArgs e) private void IconDoubleClick(object sender, EventArgs e)
{ {
MessageBox.Show("The icon was double clicked"); MessageBox.Show("The icon was double clicked");
} }
@ -112,7 +112,7 @@ namespace ${StandardNamespace}
} }
]]> ]]>
</File> </File>
<File name="SysTrayIcon.resx" src="NotifyIconResources.resx" buildAction="EmbeddedResource" DependentUpon="SysTrayIcon.cs" /> <File name="NotificationIcon.resx" src="NotifyIconResources.resx" buildAction="EmbeddedResource" DependentUpon="NotificationIcon.cs" />
<File name="AssemblyInfo.cs" src="DefaultAssemblyInfo.cs" /> <File name="AssemblyInfo.cs" src="DefaultAssemblyInfo.cs" />
</Files> </Files>
</Project> </Project>

22
src/Tools/LocalizationDbToResFile/Main.cs

@ -1,19 +1,9 @@
// Main.cs // <file>
// Copyright (c) 2001 Mike Krueger // <copyright see="prj:///doc/copyright.txt"/>
// // <license see="prj:///doc/license.txt"/>
// This program is free software; you can redistribute it and/or modify // <owner name="" email=""/>
// it under the terms of the GNU General Public License as published by // <version>$Revision$</version>
// the Free Software Foundation; either version 2 of the License, or // </file>
// (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, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System; using System;
using System.Data; using System.Data;

22
src/Tools/LocalizationXmlToResFile/LocalizationXmlToResFile.cs

@ -1,19 +1,9 @@
// tbuilder.cs // <file>
// Copyright (c) 2001 Mike Krueger // <copyright see="prj:///doc/copyright.txt"/>
// // <license see="prj:///doc/license.txt"/>
// This program is free software; you can redistribute it and/or modify // <owner name="" email=""/>
// it under the terms of the GNU General Public License as published by // <version>$Revision$</version>
// the Free Software Foundation; either version 2 of the License, or // </file>
// (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, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System; using System;
using System.Collections; using System.Collections;

22
src/Tools/ResourceAssembler/ResAsm.cs

@ -1,19 +1,9 @@
// ResAsm.cs // <file>
// Copyright (c) 2001 Mike Krueger // <copyright see="prj:///doc/copyright.txt"/>
// // <license see="prj:///doc/license.txt"/>
// This program is free software; you can redistribute it and/or modify // <owner name="" email=""/>
// it under the terms of the GNU General Public License as published by // <version>$Revision$</version>
// the Free Software Foundation; either version 2 of the License, or // </file>
// (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, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System; using System;
using System.Collections; using System.Collections;

Loading…
Cancel
Save