-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLoadSet.cs
More file actions
55 lines (53 loc) · 1.54 KB
/
LoadSet.cs
File metadata and controls
55 lines (53 loc) · 1.54 KB
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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using SmartRender.MainClass;
using System.IO;
namespace SmartRender
{
public partial class LoadSet : Form
{
public LoadSet()
{
InitializeComponent();
ok.Click(new EventHandler(ok_click));
if (Language.ViewLanguage == Language.Languages.Turkish.ToString())
{
label1.Text = "Ayar dosyası seçin (JSON)";
ok.BText = "TAMAM";
}
else
{
label1.Text = "Please Select JSON Settings File";
ok.BText = "DONE";
}
}
private void ok_click(object sender,EventArgs e)
{
string json_file = string.Format("{0}/{1}",Variables.AYARLAR,set_combo.Text);
if(File.Exists(json_file))
{
Controllers.AyarlariYukle(json_file,true);
}
else
{
SendMessage.Success("Ayarlar yüklenemedi! Dosya silinmiş, yada taşınmış","Hata");
}
Close();
}
private void set_combo_Click(object sender, EventArgs e)
{
set_combo.Items.Clear();
foreach(string json in Directory.GetFiles(Variables.AYARLAR,"*.json"))
{
set_combo.Items.Add(Path.GetFileName(json));
}
}
}
}