private void timer_send_Tick(object sender, EventArgs e) { int num; this.timer_send.Enabled = false; int maxtask = config.maxtask; if (maxtask > this.runtask) { for (num = this.runtask + 1; num <= maxtask; num++) { EnForm form = new EnForm(); form.Name = "ef_" + num; form.Text = "编码进程" + num; form.taskid = num; form.MdiParent = this; form.WindowState = FormWindowState.Maximized; form.Show(); } this.runtask = maxtask; } if (maxtask < this.runtask) { for (num = this.runtask; num > maxtask; num--) { foreach (Form form2 in base.MdiChildren) { if (form2.Name == ("ef_" + num)) { form2.Close(); form2.Dispose(); } } } this.runtask = maxtask; } this.delvideo(); this.sendok(); this.timer_send.Enabled = true; }
private void main_Load(object sender, EventArgs e) { try { //Conn.ExecuteNonQuery("update ov_files set stat=0 where stat=2 and isdel=0"); foreach (string str in Directory.GetFileSystemEntries(Application.StartupPath + @"\log")) { if ((func.Right(str, 4) == ".ini") || (func.Right(str, 4) == ".del")) { System.IO.File.Delete(str); } } } catch (Exception exception) { this.AppendLog(exception.Message.ToString()); } this.tabStrip1.MdiForm = this; if ((func.readdog(0) == "1") || func.chksn()) { this.runtask = config.maxtask; for (int i = 1; i <= this.runtask; i++) { EnForm form = new EnForm(); form.Name = "ef_" + i; form.Text = "编码进程" + i; form.taskid = i; form.MdiParent = this; form.WindowState = FormWindowState.Maximized; form.Show(); } } if ((func.readdog(1) == "1") || func.chksn()) { DocForm form2 = new DocForm(); form2.MdiParent = this; form2.WindowState = FormWindowState.Maximized; form2.Show(); } }