FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
flashdevelop/FlashDevelop/Program.cs at master · SandersAlex/flashdevelop · GitHub
SandersAlex
flashdevelop
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
flashdevelop
/
FlashDevelop
/
Program.cs
Copy path
More file actions
More file actions
Latest commit
History
History
History
80 lines (75 loc) · 2.54 KB
Breadcrumbs
flashdevelop
/
FlashDevelop
/
Program.cs
Copy path
File metadata and controls
80 lines (75 loc) · 2.54 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
using
System
;
using
System
.
IO
;
using
System
.
Windows
.
Forms
;
using
PluginCore
;
using
PluginCore
.
Helpers
;
using
PluginCore
.
Utilities
;
namespace
FlashDevelop
{
static
class
Program
{
[
STAThread
]
static
void
Main
(
String
[
]
arguments
)
{
if
(
Win32
.
ShouldUseWin32
(
)
)
{
if
(
SingleInstanceApp
.
AlreadyExists
)
{
Boolean
reUse
=
Array
.
IndexOf
(
arguments
,
"-reuse"
)
>
-
1
;
if
(
!
MultiInstanceMode
||
reUse
)
SingleInstanceApp
.
NotifyExistingInstance
(
arguments
)
;
else
RunFlashDevelopWithErrorHandling
(
arguments
,
false
)
;
}
else
RunFlashDevelopWithErrorHandling
(
arguments
,
true
)
;
}
else
// For other platforms
{
Application
.
EnableVisualStyles
(
)
;
Application
.
SetCompatibleTextRenderingDefault
(
false
)
;
MainForm
.
IsFirst
=
true
;
MainForm
.
Arguments
=
arguments
;
MainForm
mainForm
=
new
MainForm
(
)
;
Application
.
Run
(
mainForm
)
;
}
}
/// <summary>
/// Run FlashDevelop and catch any unhandled exceptions.
/// </summary>
static
void
RunFlashDevelopWithErrorHandling
(
String
[
]
arguments
,
Boolean
isFirst
)
{
Application
.
EnableVisualStyles
(
)
;
Application
.
SetCompatibleTextRenderingDefault
(
false
)
;
MainForm
.
IsFirst
=
isFirst
;
MainForm
.
Arguments
=
arguments
;
MainForm
mainForm
=
new
MainForm
(
)
;
SingleInstanceApp
.
NewInstanceMessage
+=
delegate
(
Object
sender
,
Object
message
)
{
MainForm
.
Arguments
=
message
as
String
[
]
;
mainForm
.
ProcessParameters
(
message
as
String
[
]
)
;
}
;
try
{
SingleInstanceApp
.
Initialize
(
)
;
Application
.
Run
(
mainForm
)
;
}
catch
(
Exception
ex
)
{
MessageBox
.
Show
(
"There was an unexpected problem while running FlashDevelop: "
+
ex
.
Message
,
"Error"
)
;
}
finally
{
SingleInstanceApp
.
Close
(
)
;
}
}
/// <summary>
/// Checks if we should run in multi instance mode.
/// </summary>
public
static
Boolean
MultiInstanceMode
{
get
{
String
file
=
Path
.
Combine
(
PathHelper
.
AppDir
,
".multi"
)
;
return
File
.
Exists
(
file
)
;
}
}
}
}
Back
|
FazBrowse Home
|
New Git URL