forked from toehead2001/aeroshot
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Program.cs
64 lines (54 loc) · 2.17 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/* AeroShot - Transparent screenshot utility for Windows
Copyright (C) 2021 Cvolton, starfrost
Copyright (C) 2015 toe_head2001
Copyright (C) 2012 Caleb Joseph
AeroShot 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 3 of the License, or
(at your option) any later version.
AeroShot 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, see <http://www.gnu.org/licenses/>. */
using Microsoft.VisualBasic.ApplicationServices;
using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows.Forms;
[assembly: AssemblyTitle("AeroShotCRE")]
[assembly: AssemblyProduct("AeroShotCRE")]
[assembly: AssemblyDescription("Screenshot capture utility for Windows Aero")]
[assembly: AssemblyCopyright("\u00a9 2021 Cvolton")]
[assembly: AssemblyVersion("1.9.5.0")]
[assembly: AssemblyFileVersion("1.9.5.0")]
[assembly: ComVisible(false)]
namespace AeroShot
{
class Program : WindowsFormsApplicationBase
{
public Program()
{
EnableVisualStyles = true;
MainForm = new SysTray();
IsSingleInstance = true;
}
[STAThreadAttribute]
public static void Main(string[] args)
{
Instance = new Program();
Instance.Run(args);
}
public static void Restart()
{
Instance.IsSingleInstance = false;
Application.Restart();
}
protected override void OnStartupNextInstance(StartupNextInstanceEventArgs eventArgs)
{
MessageBox.Show("An instance of AeroShot or AeroShotCRE is already running.\r\nPress Alt+PrtSc to take a screenshot.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private static Program Instance;
}
}