-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathApplicationEdit.cs
45 lines (39 loc) · 1.3 KB
/
ApplicationEdit.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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace NVStreamer1080 {
public partial class ApplicationEdit : Form {
public ApplicationEdit(AutoAction item) {
Item = item;
InitializeComponent();
}
readonly AutoAction Item;
private void OnBrowse(object sender, EventArgs e) {
var result=BrowseExe.ShowDialog(this);
if(result == DialogResult.OK) {
AppPath.Text = BrowseExe.FileName;
AppDir.Text = Path.GetDirectoryName(BrowseExe.FileName);
Item.Process=AppPath.Text;
Item.WorkingDirectory = AppDir.Text;
}
}
private void BtnConfirm_Click(object sender, EventArgs e) {
Close();
}
private void ApplicationEdit_Load(object sender, EventArgs e) {
AppPath.Text=Item.Process;
AppDir.Text=Item.WorkingDirectory;
}
private void AppPath_TextChanged(object sender, EventArgs e) {
Item.Process=AppPath.Text;
Item.WorkingDirectory=AppDir.Text;
}
}
}