private void button6_Click(object sender, EventArgs e) { isRecord = false; AccordRecord = false; button5.Text = "暂停"; this.textBox1.Enabled = true; this.button3.Enabled = true; timer.Stop(); this.label1.Text = "00:00:00"; AccordModel.OverAvi(); }
private void button4_Click(object sender, EventArgs e) { if (Directory.Exists(this.textBox1.Text)) { this.textBox1.Enabled = false; this.button3.Enabled = false; bmpls.Clear(); Screen screen = (Screen)comboBox1.SelectedValue; AccordModel.WriteAvi(this.textBox1.Text + @"\" + DateTime.Now.Ticks + ".avi", screen.WorkingArea.Width, screen.WorkingArea.Height); isRecord = true; AccordRecord = true; timer.Start(); } }
private void Time_Tick(object sender, EventArgs e) { Graphics gs = this.CreateGraphics(); this.OnPaint(new PaintEventArgs(gs, new Rectangle())); Image result = ScreenModel.GetScreenBitmap((Screen)comboBox1.SelectedValue); if (isRecord) { if (AccordRecord) { AccordModel.AddBmpInAvi((Image)result.Clone()); } if (AForgeRecord) { AForgeModel.AddBmpInAvi((Image)result.Clone()); } } Image img = ScreenModel.GetPicThumbnail(result, 50, this.panel1.Height, this.panel1.Width); gs.DrawImage(img, panel1.Location); }