private void PictureBox_MouseClick(object sender, MouseEventArgs e) { bool needAllUpdate = false; if (!AnalyzeDirector.Loaded) { return; } if (AnalyzeDirector.Analized) { if (!AnalyzeDirector.AskPurgeMotionData()) { return; } } Point p = GetImagePos(e.X, e.Y); Parameters para = AnalyzeDirector.Parameters; if (radioButtonRaw.Checked) { if (e.Button == MouseButtons.Left) { if (para.Ruler.Count == 2) { para.Ruler.Clear(); } para.Ruler.Add(p); } else if (e.Button == MouseButtons.Right) { para.TargetColor = pictureBoxIpl.ImageIpl.At <Vec3b>(p.Y, p.X); needAllUpdate = true; } } else if (radioButtonRange.Checked) { if (e.Button == MouseButtons.Left) { para.Range.Add(p); } else if (e.Button == MouseButtons.Right) { para.Range.Clear(); } } if (needAllUpdate) { AnalyzeDirector.UpdateAllControll(); } else { UpdateCtrl(); } }
// tabGraph private void GraphCtrlValueChanged(object sender, EventArgs e) { if (AnalyzeDirector.Loaded) { AnalyzeDirector.Parameters.StoroboStep = (int)numericUpDownStorobo.Value; AnalyzeDirector.Parameters.LSWindow = (double)numericUpDownWindow.Value; AnalyzeDirector.Parameters.XaxisAngle = (int)numericUpDownXaxis.Value; AnalyzeDirector.Parameters.ReverseYaxis = checkBoxRevYaxis.Checked; AnalyzeDirector.UpdateAllControll(); } }
// tabCondision private void CondisionCtrlValueChanged(object sender, EventArgs e) { if (AnalyzeDirector.Loaded) { AnalyzeDirector.Parameters.Thresh = (int)numericBinary.Value; AnalyzeDirector.Parameters.Shape = (Parameters.TargetShape)comboBoxShape.SelectedValue; AnalyzeDirector.Parameters.DetectAngle = checkBoxAngle.Checked; checkBoxAngle.Enabled = (Parameters.TargetShape)comboBoxShape.SelectedValue != Parameters.TargetShape.Circle; AnalyzeDirector.UpdateAllControll(); } }
private void TabControl_SelectedIndexChanged(object sender, EventArgs e) { var tab = (AnalyzeDirector.TabMode)tabControl.SelectedTab.Tag; if (AnalyzeDirector.Analized && tab == AnalyzeDirector.TabMode.Condition) { if (!AnalyzeDirector.AskPurgeMotionData()) { tabControl.SelectedTab = tabPageGraph; tab = AnalyzeDirector.TabMode.Graph; } } AnalyzeDirector.Tab = tab; AnalyzeDirector.UpdateAllControll(); }
public MainForm() { InitializeComponent(); MainTitle = ""; AnalyzeDirector.InitFormsAndShow(this); }
// tabLamp private void ButtonLamp_Click(object sender, EventArgs e) { var list = listBoxLamp.SelectedItems.Cast <string>(); AnalyzeDirector.LampAnalyze(list); }
private void ButtonAggregate_Click(object sender, EventArgs e) { AnalyzeDirector.SaveAggregateData(); }
// tabAggerage private void ListBoxAggregate_SelectedIndexChanged(object sender, EventArgs e) { var list = listBoxAggregate.SelectedItems.Cast <string>(); AnalyzeDirector.AggregateListChanged(list); }
private void ButtonAnalyze_Click(object sender, EventArgs e) { AnalyzeDirector.AnalyzeAllFrames(); }
private void ButtonEFrame_Click(object sender, EventArgs e) { AnalyzeDirector.Parameters.EndFrame = AnalyzeDirector.VideoImaging.PosFrames; AnalyzeDirector.UpdateAllControll(); }
// tabView private void ButtonLoad_Click(object sender, EventArgs e) { AnalyzeDirector.LoadVideoFile(listView.SelectedItems[0].Name); }