private void resetFailedToolStripMenuItem_Click(object sender, EventArgs e) { foreach (ListViewItem l in lstEntries.SelectedItems) { UploadDownloadDataThread.ResetUploadDownload((string)l.Tag); } }
private void cmdOK_Click(object sender, EventArgs e) { if (Entries.Count == 0) { MessageBox.Show(this, "There're no entries to upload.", Program.Title, MessageBoxButtons.OK, MessageBoxIcon.Information); return; } List <FileEntry> pf = new List <FileEntry>(); string Error = ""; foreach (FileEntry file in Entries) { if (UploadDownloadDataThread.AddUploadToServer(MID, file.LocalFile, file.RemoteFile, chkIgnoreMeteredConnection.Checked, out Error) == false) { MessageBox.Show(this, "There's an error processing the file\n" + file.LocalFile + " -> " + file.RemoteFile + "\n" + Error, Program.Title, MessageBoxButtons.OK, MessageBoxIcon.Information); foreach (FileEntry file2 in pf) { Entries.Remove(file2); } LoadList(); return; } } this.DialogResult = DialogResult.OK; this.Close(); }
private void connectToolStripMenuItem_Click(object sender, EventArgs e) { frmLogin frm = new frmLogin(); if (frm.ShowDialog(this) != System.Windows.Forms.DialogResult.OK) { return; } this.Text = Program.Title + " - Connected to " + Program.net.serverinfo.Name; connectToolStripMenuItem.Enabled = false; timer_ping.Enabled = true; //Build tree treeAction.Nodes.Clear(); treeAction.Nodes.Add("server", "This server", 14, 14); treeAction.Nodes.Add("unapprovcomputer", "Unapproved computers", 2, 2); treeAction.Nodes.Add("allcomputers", "All computers", 2, 2); treeAction.Nodes.Add("allprograms", "All programs", 3, 3); treeAction.Nodes.Add("alldiskdata", "All disk status", 7, 7); treeAction.Nodes.Add("alleventlogs", "All Event logs", 11, 11); treeAction.Nodes.Add("allstartup", "Startup Elements", 22, 22); #if ENABLECHAT treeAction.Nodes.Add("pendingchats", "Pending chats", 16, 16); #endif treeAction.Nodes.Add("uploaddownload", "Uploads / Downloads", 21, 21); treeAction.Nodes.Add("simpletasks", "Simple Tasks", 23, 23); GroupFolders.CreateRootFolder(treeAction); treeAction.SelectedNode = treeAction.Nodes[0]; settingsToolStripMenuItem.Enabled = true; uploadPackageToolStripMenuItem.Enabled = true; deletePackageToolStripMenuItem.Enabled = true; createReportToolStripMenuItem.Enabled = true; UploadDownloadDataThread.StartThread(); }