FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
flashdevelop/FlashDevelop/Program.cs at development · fdorg/flashdevelop · GitHub
fdorg
flashdevelop
Repository navigation
Code
Issues
388
(388)
Pull requests
8
(8)
Actions
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
70 lines (67 loc) · 2.3 KB
Breadcrumbs
flashdevelop
/
FlashDevelop
/
Program.cs
Copy path
File metadata and controls
70 lines (67 loc) · 2.3 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
using
System
;
using
System
.
IO
;
using
System
.
Linq
;
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
)
{
if
(
!
MultiInstanceMode
||
arguments
.
Contains
(
"-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
;
Application
.
Run
(
new
MainForm
(
)
)
;
}
}
/// <summary>
/// Run FlashDevelop and catch any unhandled exceptions.
/// </summary>
static
void
RunFlashDevelopWithErrorHandling
(
string
[
]
arguments
,
bool
isFirst
)
{
Application
.
EnableVisualStyles
(
)
;
Application
.
SetCompatibleTextRenderingDefault
(
false
)
;
MainForm
.
IsFirst
=
isFirst
;
MainForm
.
Arguments
=
arguments
;
var
mainForm
=
new
MainForm
(
)
;
SingleInstanceApp
.
NewInstanceMessage
+=
(
_
,
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
bool
MultiInstanceMode
=>
File
.
Exists
(
Path
.
Combine
(
PathHelper
.
AppDir
,
".multi"
)
)
;
}
}
Back
|
FazBrowse Home
|
New Git URL