public ScreenShoot(SettingsModel sm) { this.sm = sm; pa = new PiAction(); pi = pa.GetPi(sm.RecordLocation); imageName = pi.LastImageID; }
private void startRecordingBtn_Click(object sender, RoutedEventArgs e) { if (!Directory.Exists(folderLocation.Text)) { System.Windows.Forms.MessageBox.Show("Geçerli bir dizin seçiniz"); return; } sm.FPM = int.Parse(fpm.Text); sm.RecordLocation = folderLocation.Text; sm.ProgramStat = ProgramStatus.Active; sm.WxH = new System.Drawing.Size(int.Parse(www.Text), int.Parse(hhh.Text)); pi.ProjectName = projectName.Text; pi.ProjectLocation = sm.RecordLocation; pi.SettingsModel = sm; if (pi.Images == null) { pi.Images = new List <Images>(); } this.Hide(); // Keyboard listeners ... _listener = new LowLevelKeyboardListener(); _listener.OnKeyPressed += _listener_OnKeyPressed; _listener.HookKeyboard(); drawProgramStatus(); PiAction piAction = new PiAction(pi); this.pi.LastImageID = piAction.GetPi(pi.ProjectLocation).LastImageID; piAction.writePi(folderLocation.Text, pi); this.pi = piAction.GetPi(pi.ProjectLocation); this.sm = this.pi.SettingsModel; UpdateFields(pi); startRecording(); }
private void openProject_Click(object sender, RoutedEventArgs e) { FolderBrowserDialog fbd = new FolderBrowserDialog(); DialogResult result = fbd.ShowDialog(); if (fbd.SelectedPath != "") { PiAction pa = new PiAction(); this.pi = pa.GetPi(fbd.SelectedPath); if (pi == null) { return; } this.sm = this.pi.SettingsModel; UpdateFields(this.pi); } }
private void open_Click(object sender, RoutedEventArgs e) { FolderBrowserDialog fbd = new FolderBrowserDialog(); DialogResult result = fbd.ShowDialog(); if (fbd.SelectedPath != null && Directory.Exists(fbd.SelectedPath)) { p_pa = new PiAction(); p_pi = p_pa.GetPi(fbd.SelectedPath); imgCount = p_pi.Images.Count; if (imgCount > 0) { slider.Maximum = imgCount; loadImage(p_pi.Images[0].ImageName); slider.IsEnabled = true; } } else { System.Windows.Forms.MessageBox.Show("Geçerli Bir Proje Dizini Seçiniz"); return; } }