public void StartProc() { string path = System.Windows.Forms.Application.StartupPath + "\\Record\\"; if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } DirectoryInfo directoryInfo = new DirectoryInfo(path); foreach (FileInfo file in directoryInfo.GetFiles()) { file.Delete(); } try { //_writer = new VideoFileWriter(); //_strRecordFilePath = path + Login._UserInfo.Id + System.DateTime.Now.ToString("yyyyMMddHHmm") + ".avi"; //_writer.Open(_strRecordFilePath, 640, 480, 25, VideoCodec.MPEG4); //StartVideCapture(); _strFileName = System.DateTime.Now.ToString("yyyyMMddHHmm"); AnyChatCoreSDK.StreamRecordCtrl(-1, true, 0, 0); AnyChatCoreSDK.SnapShot(-1, 0, 0); } catch (Exception ex) { string strError = ex.ToString(); ErrorCollection.GetInstance().SetErrorInfo(strError); } }
private void stop_Click(object sender, RoutedEventArgs e) { if (_stopRecTimer != null) { _stopRecTimer.IsEnabled = false; } start.IsEnabled = true; stop.IsEnabled = false; preview.IsEnabled = true; save.IsEnabled = true; AnyChatCoreSDK.StreamRecordCtrl(-1, false, 0, 0); //disapthcerTimer.IsEnabled = false; //_writer.Close(); }
// 2013-12-31: GreenRose private void StopRecTimer_Tick(Object obj, EventArgs ev) { try { _stopRecTimer.IsEnabled = false; start.IsEnabled = true; stop.IsEnabled = false; preview.IsEnabled = true; save.IsEnabled = true; AnyChatCoreSDK.StreamRecordCtrl(-1, false, 0, 0); //disapthcerTimer.IsEnabled = false; //_writer.Close(); } catch (Exception ex) { string strError = ex.ToString(); ErrorCollection.GetInstance().SetErrorInfo(strError); } }