forked from Ylianst/MeshCentralRouter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFileDialogMsgForm.cs
36 lines (32 loc) · 1.01 KB
/
FileDialogMsgForm.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
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 MeshCentralRouter
{
public partial class FileDialogMsgForm : Form
{
private FileViewer xparent = null;
public FileDialogMsgForm(FileViewer xparent)
{
this.xparent = xparent;
InitializeComponent();
Translate.TranslateControl(this);
}
public void UpdateStatus(string msg, string file, int progress)
{
if (msg != null) { mainLabel1.Text = msg; } else { mainLabel1.Text = ""; }
if (file != null) { mainLabel2.Text = file; } else { mainLabel2.Text = ""; }
if ((progress >= 0) && (progress <= 100)) { progressBar1.Value = progress; }
}
private void cancelButton_Click(object sender, EventArgs e)
{
xparent.requestCancel();
}
}
}