-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExplorerForm.cs
More file actions
46 lines (43 loc) · 1.39 KB
/
ExplorerForm.cs
File metadata and controls
46 lines (43 loc) · 1.39 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
using Resource_Redactor.Descriptions;
using Resource_Redactor.Descriptions.Redactors;
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;
namespace Resource_Redactor
{
public partial class ExplorerForm : Form
{
public List<string> SelectedResources { get; private set; } = null;
public ExplorerForm(string path, bool multiselect = false, params ResourceType[] type)
{
InitializeComponent();
ResourceExplorer.TypeFilter = type;
ResourceExplorer.MultiSelect = multiselect;
ResourceExplorer.LoadLocation(path);
}
private void ResourceExplorer_ItemLoaded(object sender, ExplorerEventArgs e)
{
DialogResult = DialogResult.OK;
SelectedResources = new List<string>(1);
SelectedResources.Add(e.LocalPath);
Close();
}
private void SelectButton_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
SelectedResources = ResourceExplorer.SelectedItems;
Close();
}
private void CancelButton_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
Close();
}
}
}