forked from KirillSuxinin/Stalker-Studio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.xaml.cs
50 lines (47 loc) · 1.9 KB
/
App.xaml.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
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace Stalker_Studio
{
/// <summary>
/// Логика взаимодействия для App.xaml
/// </summary>
public partial class App : Application
{
public App()
{
using (var stream = new System.IO.StringReader(Stalker_Studio.Properties.Resources.LtxHighlighting))
{
using (var reader = new System.Xml.XmlTextReader(stream))
{
ICSharpCode.AvalonEdit.Highlighting.HighlightingManager.Instance.RegisterHighlighting("LTX", new string[] { ".ltx" },
ICSharpCode.AvalonEdit.Highlighting.Xshd.HighlightingLoader.Load(reader,
ICSharpCode.AvalonEdit.Highlighting.HighlightingManager.Instance));
}
}
using (var stream = new System.IO.StringReader(Stalker_Studio.Properties.Resources.LuaHighlighting))
{
using (var reader = new System.Xml.XmlTextReader(stream))
{
ICSharpCode.AvalonEdit.Highlighting.HighlightingManager.Instance.RegisterHighlighting("LUA", new string[] { ".lua", ".script" },
ICSharpCode.AvalonEdit.Highlighting.Xshd.HighlightingLoader.Load(reader,
ICSharpCode.AvalonEdit.Highlighting.HighlightingManager.Instance));
}
}
}
public static string[] Args;
protected override void OnStartup(StartupEventArgs e)
{
Args = e.Args;
for(int i = 0; i < Args.Length; i++)
{
Args[i] = Args[i].Replace("[]", " ");
}
base.OnStartup(e);
}
}
}