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

22
src/Tools/LocalizationDbToResFile/Main.cs

@ -1,19 +1,9 @@ @@ -1,19 +1,9 @@
// Main.cs
// Copyright (c) 2001 Mike Krueger
//
// 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 2 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, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="" email=""/>
// <version>$Revision$</version>
// </file>
using System;
using System.Data;

22
src/Tools/LocalizationXmlToResFile/LocalizationXmlToResFile.cs

@ -1,19 +1,9 @@ @@ -1,19 +1,9 @@
// tbuilder.cs
// Copyright (c) 2001 Mike Krueger
//
// 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 2 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, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="" email=""/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections;

22
src/Tools/ResourceAssembler/ResAsm.cs

@ -1,19 +1,9 @@ @@ -1,19 +1,9 @@
// ResAsm.cs
// Copyright (c) 2001 Mike Krueger
//
// 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 2 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, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="" email=""/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections;

Loading…
Cancel
Save