forked from bastimeyer/dayz-linux-cli-launcher
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Mods.axaml.cs
64 lines (50 loc) · 1.64 KB
/
Mods.axaml.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
using System;
using System.Security.Cryptography;
using System.Threading.Tasks;
using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Markup.Xaml;
using DayZLinuxGUILauncher.Data;
using DayZLinuxGUILauncher.Message;
using DayZLinuxGUILauncher.Settings;
namespace DayZLinuxGUILauncher
{
public class Mods : Window
{
public Mods()
{
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
public static ServerData UseServerData = default;
public static void Show(Window parent)
{
var msgbox = new Mods();
msgbox.ShowDialog(parent);
}
private async void ConfigureMods_OnClick(object? sender, RoutedEventArgs e)
{
var mods= await MessageDialog.DataInput("enter mods separated by space for example:100 252 354", "Enter mod");
string logs = default;
this.Find<TextBox>("log").Text = "Getting data...";
await Task.Run( () =>
{
logs= GameManagement.ConfigureMods(mods);
});
this.Find<TextBox>("log").Text = logs;
}
private async void ModList_OnClick(object? sender, RoutedEventArgs e)
{
string logs = default;
this.Find<TextBox>("log").Text = "Getting data...";
await Task.Run( () =>
{
logs= GameManagement.GetMods(UseServerData);
});
this.Find<TextBox>("log").Text = logs;
}
}
}