Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Blacklight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
015
Blacklight
Commits
8d9212c7
Verified
Commit
8d9212c7
authored
3 months ago
by
Emilia
Browse files
Options
Downloads
Patches
Plain Diff
mutex
parent
08fc8b7c
Branches
Branches containing commit
Tags
v18
Tags containing commit
Loading
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.idea/.idea.Blacklight/.idea/avalonia.xml
+1
-0
1 addition, 0 deletions
.idea/.idea.Blacklight/.idea/avalonia.xml
Blacklight.Desktop/Program.cs
+8
-2
8 additions, 2 deletions
Blacklight.Desktop/Program.cs
with
9 additions
and
2 deletions
.idea/.idea.Blacklight/.idea/avalonia.xml
+
1
−
0
View file @
8d9212c7
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
<entry
key=
"Blacklight/Views/Utility/MarkdownText.axaml"
value=
"Blacklight.Desktop/Blacklight.Desktop.csproj"
/>
<entry
key=
"Blacklight/Views/Utility/MarkdownText.axaml"
value=
"Blacklight.Desktop/Blacklight.Desktop.csproj"
/>
<entry
key=
"Blacklight/Views/Views/ClientView.axaml"
value=
"Blacklight/Blacklight.csproj"
/>
<entry
key=
"Blacklight/Views/Views/ClientView.axaml"
value=
"Blacklight/Blacklight.csproj"
/>
<entry
key=
"Blacklight/Views/Views/SettingsView.axaml"
value=
"Blacklight/Blacklight.csproj"
/>
<entry
key=
"Blacklight/Views/Views/SettingsView.axaml"
value=
"Blacklight/Blacklight.csproj"
/>
<entry
key=
"Blacklight/Views/Windows/CreateChannelView.axaml"
value=
"Blacklight.Desktop/Blacklight.Desktop.csproj"
/>
<entry
key=
"Blacklight/Views/Windows/CreateChannelWindow.axaml"
value=
"Blacklight.Desktop/Blacklight.Desktop.csproj"
/>
<entry
key=
"Blacklight/Views/Windows/CreateChannelWindow.axaml"
value=
"Blacklight.Desktop/Blacklight.Desktop.csproj"
/>
</map>
</map>
</option>
</option>
...
...
This diff is collapsed.
Click to expand it.
Blacklight.Desktop/Program.cs
+
8
−
2
View file @
8d9212c7
...
@@ -6,14 +6,20 @@ namespace Blacklight.Desktop;
...
@@ -6,14 +6,20 @@ namespace Blacklight.Desktop;
sealed
class
Program
sealed
class
Program
{
{
private
static
Mutex
_mutex
=
new
Mutex
(
true
,
"{BFB1CB9E-78E6-4CC4-AB51-AD561BE8E21A}"
);
// Initialization code. Don't use any Avalonia, third-party APIs or any
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
// yet and stuff might break.
// yet and stuff might break.
[
STAThread
]
[
STAThread
]
public
static
void
Main
(
string
[]
args
)
public
static
void
Main
(
string
[]
args
)
{
{
if
(
_mutex
.
WaitOne
(
TimeSpan
.
Zero
,
true
))
{
BuildAvaloniaApp
()
BuildAvaloniaApp
()
.
StartWithClassicDesktopLifetime
(
args
);
.
StartWithClassicDesktopLifetime
(
args
);
_mutex
.
ReleaseMutex
();
}
}
}
// Avalonia configuration, don't remove; also used by visual designer.
// Avalonia configuration, don't remove; also used by visual designer.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment