private void RecordSetCutZone(ScreenZone zone) { Recorder.SetZoneRecord(zone); double timeOfRecord = (double)Properties.Settings.Default["TimeOfRecord"]; double waitTimeBeforeRecord = (double)Properties.Settings.Default["WaitTimeBeforeRecord"]; Recorder.StartRecord(TimeSpan.FromSeconds(timeOfRecord), TimeSpan.FromSeconds(waitTimeBeforeRecord)); }
public GifRecord() { tempPath = $"{Environment.CurrentDirectory}//tempScreenshots"; CheckTempDirectory(); _screenZone = new ScreenZone { FirstPoint = new Point(150, 150), SecondPoint = new Point(300, 300) }; }
public SelectScreenZone() { tempFileNameBackground = "bg.png"; tempFilePathBackground = $"{Environment.CurrentDirectory}/{tempFileNameBackground}"; selectedFirstPoint = false; RecordImageDesktop(); InitializeComponent(); InitCanvars(); SetBackgroundImage(); screenZone = new ScreenZone(); this.MouseLeftButtonDown += SelectScreenZoneMouseLeftButtonDown; this.MouseLeftButtonUp += SelectScreenZoneMouseLeftButtonUp; this.MouseMove += SelectScreenZoneMouseMove; this.Closed += SelectScreenZoneClosed; }
/// <summary> /// Установка зоны захвата экрана /// </summary> /// <param name="screenZone"> Параметрами захвата </param> public void SetZoneRecord(ScreenZone screenZone) { _screenZone = screenZone; }