mirror of
https://github.com/Ylianst/MeshCentralRouter
synced 2025-12-06 00:13:33 +00:00
Completed first version of file manager.
This commit is contained in:
@@ -26,16 +26,39 @@ namespace MeshCentralRouter
|
||||
{
|
||||
mainLabel1.Text = (string)fileViewer.uploadFileArray[fileViewer.uploadFileArrayPtr];
|
||||
progressBar1.Maximum = (int)fileViewer.uploadFileSize;
|
||||
progressBar1.Value = (int)fileViewer.uploadFilePtr;
|
||||
int x = (int)fileViewer.uploadFilePtr;
|
||||
if (x < 0) { x = 0; }
|
||||
if (x > (int)fileViewer.uploadFileSize) { x = (int)fileViewer.uploadFileSize; }
|
||||
progressBar1.Value = x;
|
||||
|
||||
progressBar2.Maximum = fileViewer.uploadFileArray.Count;
|
||||
x = (int)(int)fileViewer.uploadFileSize;
|
||||
if (x < 0) { x = 0; }
|
||||
if (x > (int)fileViewer.uploadFileArray.Count) { x = fileViewer.uploadFileArray.Count; }
|
||||
progressBar2.Value = fileViewer.uploadFileArrayPtr;
|
||||
}
|
||||
else if (fileViewer.downloadActive)
|
||||
{
|
||||
mainLabel1.Text = (string)fileViewer.downloadFileArray[fileViewer.downloadFileArrayPtr];
|
||||
progressBar1.Maximum = (int)fileViewer.downloadFileSize;
|
||||
int x = (int)fileViewer.downloadFilePtr;
|
||||
if (x < 0) { x = 0; }
|
||||
if (x > (int)fileViewer.downloadFileSize) { x = (int)fileViewer.downloadFileSize; }
|
||||
progressBar1.Value = x;
|
||||
|
||||
progressBar2.Maximum = fileViewer.downloadFileArray.Count;
|
||||
x = (int)(int)fileViewer.downloadFileSize;
|
||||
if (x < 0) { x = 0; }
|
||||
if (x > (int)fileViewer.downloadFileArray.Count) { x = fileViewer.downloadFileArray.Count; }
|
||||
progressBar2.Value = fileViewer.downloadFileArrayPtr;
|
||||
}
|
||||
else { Close(); }
|
||||
}
|
||||
|
||||
private void FileTransferStatusForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (fileViewer.uploadActive) { fileViewer.uploadStop = true; }
|
||||
if (fileViewer.downloadActive) { fileViewer.downloadStop = true; }
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user