private void button8_Click(object sender, EventArgs e) { isRecord = false; AForgeRecord = false; button5.Text = "暂停"; this.textBox1.Enabled = true; this.button3.Enabled = true; timer.Stop(); this.label1.Text = "00:00:00"; AForgeModel.OverAvi(); }
private void button7_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; AForgeModel.WriteAvi(this.textBox1.Text + @"\" + DateTime.Now.Ticks + ".mp4", screen.WorkingArea.Width, screen.WorkingArea.Height, AForge.Video.FFMPEG.VideoCodec.MPEG4); isRecord = true; AForgeRecord = 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); }