check point

This commit is contained in:
meelstorm
2025-07-14 12:03:59 +02:00
commit d3cb790bd9
431 changed files with 44078 additions and 0 deletions

View File

@@ -0,0 +1,221 @@
namespace Hawkeye.VisionBuilder.Features.ImagesStrip
{
partial class ImageStripPanel
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ImageStripPanel));
toolStrip1 = new ToolStrip();
lblSelectedImage = new ToolStripLabel();
btnToStart = new ToolStripButton();
btnPrev = new ToolStripButton();
btnPlay = new ToolStripButton();
btnNext = new ToolStripButton();
btnToEnd = new ToolStripButton();
toolStripSeparator1 = new ToolStripSeparator();
cbRepeat = new ToolStripButton();
toolStripLabel1 = new ToolStripLabel();
ncInterval = new ToolStripNumberControl();
ckbExecuteWorkflow = new ToolStripButton();
ckbStopOnError = new ToolStripButton();
ckbStopOnNoError = new ToolStripButton();
listView1 = new ListView();
toolStrip1.SuspendLayout();
SuspendLayout();
//
// toolStrip1
//
toolStrip1.Items.AddRange(new ToolStripItem[] { lblSelectedImage, btnToStart, btnPrev, btnPlay, btnNext, btnToEnd, toolStripSeparator1, cbRepeat, toolStripLabel1, ncInterval, ckbExecuteWorkflow, ckbStopOnError, ckbStopOnNoError });
toolStrip1.Location = new Point(0, 0);
toolStrip1.Name = "toolStrip1";
toolStrip1.Size = new Size(876, 26);
toolStrip1.TabIndex = 0;
toolStrip1.Text = "toolStrip1";
//
// lblSelectedImage
//
lblSelectedImage.Name = "lblSelectedImage";
lblSelectedImage.Size = new Size(32, 23);
lblSelectedImage.Text = "--/--";
//
// btnToStart
//
btnToStart.DisplayStyle = ToolStripItemDisplayStyle.Image;
btnToStart.Image = Resource1.backward_fast;
btnToStart.ImageTransparentColor = Color.Magenta;
btnToStart.Name = "btnToStart";
btnToStart.Size = new Size(23, 23);
btnToStart.Text = "First";
btnToStart.Click += btnToStart_Click;
//
// btnPrev
//
btnPrev.DisplayStyle = ToolStripItemDisplayStyle.Image;
btnPrev.Image = Resource1.backward;
btnPrev.ImageTransparentColor = Color.Magenta;
btnPrev.Name = "btnPrev";
btnPrev.Size = new Size(23, 23);
btnPrev.Text = "Previous";
btnPrev.Click += btnPrev_Click;
//
// btnPlay
//
btnPlay.CheckOnClick = true;
btnPlay.DisplayStyle = ToolStripItemDisplayStyle.Image;
btnPlay.Image = Resource1.play;
btnPlay.ImageTransparentColor = Color.Magenta;
btnPlay.Name = "btnPlay";
btnPlay.Size = new Size(23, 23);
btnPlay.Text = "Play";
btnPlay.Click += btnPlay_Click;
//
// btnNext
//
btnNext.DisplayStyle = ToolStripItemDisplayStyle.Image;
btnNext.Image = Resource1.forward;
btnNext.ImageTransparentColor = Color.Magenta;
btnNext.Name = "btnNext";
btnNext.Size = new Size(23, 23);
btnNext.Text = "Next";
btnNext.Click += btnNext_Click;
//
// btnToEnd
//
btnToEnd.DisplayStyle = ToolStripItemDisplayStyle.Image;
btnToEnd.Image = Resource1.forward_fast;
btnToEnd.ImageTransparentColor = Color.Magenta;
btnToEnd.Name = "btnToEnd";
btnToEnd.Size = new Size(23, 23);
btnToEnd.Text = "Last";
btnToEnd.Click += btnToEnd_Click;
//
// toolStripSeparator1
//
toolStripSeparator1.Name = "toolStripSeparator1";
toolStripSeparator1.Size = new Size(6, 26);
//
// cbRepeat
//
cbRepeat.CheckOnClick = true;
cbRepeat.DisplayStyle = ToolStripItemDisplayStyle.Image;
cbRepeat.Image = Resource1.repeat;
cbRepeat.ImageTransparentColor = Color.Magenta;
cbRepeat.Name = "cbRepeat";
cbRepeat.Size = new Size(23, 23);
cbRepeat.Text = "Repeat";
//
// toolStripLabel1
//
toolStripLabel1.Name = "toolStripLabel1";
toolStripLabel1.Size = new Size(49, 23);
toolStripLabel1.Text = "Interval:";
//
// ncInterval
//
ncInterval.AutoSize = false;
ncInterval.Name = "ncInterval";
ncInterval.Size = new Size(64, 23);
ncInterval.Text = "100";
//
// ckbExecuteWorkflow
//
ckbExecuteWorkflow.CheckOnClick = true;
ckbExecuteWorkflow.DisplayStyle = ToolStripItemDisplayStyle.Text;
ckbExecuteWorkflow.Image = (Image)resources.GetObject("ckbExecuteWorkflow.Image");
ckbExecuteWorkflow.ImageTransparentColor = Color.Magenta;
ckbExecuteWorkflow.Name = "ckbExecuteWorkflow";
ckbExecuteWorkflow.Size = new Size(104, 23);
ckbExecuteWorkflow.Text = "Execute workflow";
//
// ckbStopOnError
//
ckbStopOnError.CheckOnClick = true;
ckbStopOnError.DisplayStyle = ToolStripItemDisplayStyle.Text;
ckbStopOnError.Image = (Image)resources.GetObject("ckbStopOnError.Image");
ckbStopOnError.ImageTransparentColor = Color.Magenta;
ckbStopOnError.Name = "ckbStopOnError";
ckbStopOnError.Size = new Size(80, 23);
ckbStopOnError.Text = "Stop on error";
//
// ckbStopOnNoError
//
ckbStopOnNoError.CheckOnClick = true;
ckbStopOnNoError.DisplayStyle = ToolStripItemDisplayStyle.Text;
ckbStopOnNoError.Image = (Image)resources.GetObject("ckbStopOnNoError.Image");
ckbStopOnNoError.ImageTransparentColor = Color.Magenta;
ckbStopOnNoError.Name = "ckbStopOnNoError";
ckbStopOnNoError.Size = new Size(97, 23);
ckbStopOnNoError.Text = "Stop on no error";
//
// listView1
//
listView1.Alignment = ListViewAlignment.Left;
listView1.Dock = DockStyle.Fill;
listView1.HeaderStyle = ColumnHeaderStyle.None;
listView1.LabelWrap = false;
listView1.Location = new Point(0, 26);
listView1.MultiSelect = false;
listView1.Name = "listView1";
listView1.Size = new Size(876, 171);
listView1.TabIndex = 1;
listView1.UseCompatibleStateImageBehavior = false;
//
// ImageStripPanel
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(876, 197);
Controls.Add(listView1);
Controls.Add(toolStrip1);
MaximizeBox = false;
MinimizeBox = false;
Name = "ImageStripPanel";
toolStrip1.ResumeLayout(false);
toolStrip1.PerformLayout();
ResumeLayout(false);
PerformLayout();
}
#endregion
private ToolStrip toolStrip1;
private ToolStripButton btnToStart;
private ToolStripButton btnPrev;
private ToolStripButton btnPlay;
private ToolStripButton btnNext;
private ToolStripButton btnToEnd;
private ToolStripSeparator toolStripSeparator1;
private ToolStripButton cbRepeat;
private ListView listView1;
private ToolStripLabel toolStripLabel1;
private ToolStripNumberControl ncInterval;
private ToolStripButton ckbExecuteWorkflow;
private ToolStripLabel lblSelectedImage;
private ToolStripButton ckbStopOnError;
private ToolStripButton ckbStopOnNoError;
}
}

View File

@@ -0,0 +1,319 @@
using System.Drawing.Drawing2D;
using OpenCvSharp;
using OpenCvSharp.Extensions;
using VisionBuilder.UI.Common.RecipeProcessing;
using Size = System.Drawing.Size;
namespace Hawkeye.VisionBuilder.Features.ImagesStrip
{
public partial class ImageStripPanel : Form, IImageSource
{
public ImageStripPanel()
{
InitializeComponent();
listView1.SelectedIndexChanged += ListView1_SelectedIndexChanged;
}
private void ListView1_SelectedIndexChanged(object? sender, EventArgs e)
{
if (listView1.SelectedItems.Count > 0)
{
lblSelectedImage.Text = $"{listView1.SelectedIndices[0] + 1}/{listView1.Items.Count}";
var path = (string)listView1.SelectedItems[0].Tag;
listView1.SelectedItems[0].ImageKey = path;
var img = new Mat(path);
var image = new Workflow.Datatypes.HawkeyeImage()
{
Filename = path,
ImageData = img
};
listView1.LargeImageList.Images.RemoveByKey(path);
listView1.LargeImageList.Images.Add(path, img.Resize(new OpenCvSharp.Size(108, 108)).ToBitmap());
ImageSelected(image);
}
}
public bool IsExecutingWorkflow
{
get => ckbExecuteWorkflow.Checked;
set => ckbExecuteWorkflow.Checked = value;
}
public event Action<Workflow.Datatypes.HawkeyeImage> ImageSelected = delegate { };
public void LoadImage(Mat image)
{
ImageList imageList = new ImageList();
imageList.ImageSize = new Size(108, 108);
listView1.LargeImageList = imageList;
listView1.Items.Clear();
imageList.Images.Add("image", image.ToBitmap());
var item = listView1.Items.Add("image");
item.Tag = new Workflow.Datatypes.HawkeyeImage()
{
Filename = "image",
ImageData = image
};
item.Text = "";
item.ImageKey = "image";
listView1.SelectedIndices.Clear();
listView1.SelectedIndices.Add(0);
}
public Bitmap FitImage(Image image, int targetWidth, int targetHeight)
{
var aspectRatio = (float)image.Width / image.Height;
int width;
int height;
if ((float)targetWidth / targetHeight > aspectRatio)
{
width = (int)(targetHeight * aspectRatio);
height = targetHeight;
}
else
{
width = targetWidth;
height = (int)(targetWidth / aspectRatio);
}
Bitmap bitmap = new Bitmap(targetWidth, targetHeight);
using (Graphics graphics = Graphics.FromImage(bitmap))
{
graphics.DrawImage(image, new Rectangle(0, 0, width, height));
return bitmap;
}
}
public void LoadImages(string directory)
{
listView1.BeginUpdate();
ImageList imageList = new ImageList();
imageList.ImageSize = new Size(108, 108);
listView1.LargeImageList = imageList;
listView1.Items.Clear();
var mock = new Bitmap(108, 108);
using (Graphics g = Graphics.FromImage(mock))
{
var brush = new HatchBrush(HatchStyle.Percent50, Color.LightGray, Color.Transparent);
g.FillRectangle(brush, 0, 0, 108, 108);
g.DrawString("Not loaded", new Font("Arial", 12), Brushes.Gray, new PointF(0, 0));
}
var allImages = Directory.GetFiles(directory, "*.bmp")
.Concat(Directory.GetFiles(directory, "*.png"))
.Concat(Directory.GetFiles(directory, "*.jpg"))
.Where(x => !Path.GetFileNameWithoutExtension(x).Contains("_analysis"))
//.Select(x=>new {path=x,bmp = new Bitmap(x)})
.Select(x => new { path = x, bmp = mock })
.ToArray();
imageList.Images.Add("none", mock);
foreach (var image in allImages)
{
var item = listView1.Items.Add(image.path);
item.Text = "";
item.Tag = image.path;
item.ImageKey = "none";
}
if (listView1.Items.Count > 0)
{
listView1.SelectedIndices.Clear();
listView1.SelectedIndices.Add(0);
toolStrip1.Enabled = true;
}
else
{
toolStrip1.Enabled = false;
}
listView1.EndUpdate();
}
private void btnToStart_Click(object sender, EventArgs e)
{
listView1.SelectedIndices.Clear();
listView1.SelectedIndices.Add(0);
listView1.EnsureVisible(listView1.SelectedIndices[0]);
}
public void Prev()
{
btnPrev_Click(null, null);
}
private void btnPrev_Click(object sender, EventArgs e)
{
if (listView1.SelectedIndices.Count == 0) return;
var index = listView1.SelectedIndices[0];
index--;
if (index < 0) index++;
listView1.SelectedIndices.Clear();
listView1.SelectedIndices.Add(index);
listView1.EnsureVisible(listView1.SelectedIndices[0]);
}
public void Next()
{
btnNext_Click(null, null);
}
private void btnNext_Click(object sender, EventArgs e)
{
if (listView1.SelectedIndices.Count == 0) return;
var index = listView1.SelectedIndices[0];
index++;
if (index > listView1.Items.Count - 1) index--;
listView1.SelectedIndices.Clear();
listView1.SelectedIndices.Add(index);
listView1.EnsureVisible(listView1.SelectedIndices[0]);
}
private void btnToEnd_Click(object sender, EventArgs e)
{
listView1.SelectedIndices.Clear();
listView1.SelectedIndices.Add(listView1.Items.Count - 1);
listView1.EnsureVisible(listView1.SelectedIndices[0]);
}
private void btnPlay_Click(object sender, EventArgs e)
{
Task.Run(Playback);
}
private async Task Playback()
{
while (btnPlay.Checked)
{
Action a = () =>
{
if (listView1.SelectedIndices.Count == 0) return;
var index = listView1.SelectedIndices[0];
index++;
if (index > listView1.Items.Count - 1)
{
if (cbRepeat.Checked)
{
index = 0;
}
else
{
btnPlay.Checked = false;
return;
}
}
listView1.SelectedIndices.Clear();
listView1.SelectedIndices.Add(index);
listView1.EnsureVisible(listView1.SelectedIndices[0]);
};
listView1.Invoke(a);
await Task.Delay(int.Parse((string)ncInterval.Text));
}
}
public string GetName()
{
return "ImageStripPanel";
}
public Task<Mat> GetImage(CancellationToken token)
{
return Task.FromResult(GetImage());
}
public Mat GetImage()
{
if (listView1.SelectedIndices.Count == 0) return null;
var path = listView1.SelectedItems[0].ImageKey;
return new Mat(path);
}
public string GetImagePath()
{
if (listView1.SelectedIndices.Count == 0) return null;
var path = listView1.SelectedItems[0].Tag as string;
if (path == null) return null;
return path;
}
public bool StopOnErrors
{
get => ckbStopOnError.Checked;
set => ckbStopOnError.Checked = value;
}
public bool StopOnNoErrors
{
get => ckbStopOnNoError.Checked;
set => ckbStopOnNoError.Checked = value;
}
public void InformImageProcessed(bool result)
{
if (!result)
{
if (ckbStopOnError.Checked)
{
btnPlay.Checked = false;
}
}
else
{
if (ckbStopOnNoError.Checked)
{
btnPlay.Checked = false;
}
}
}
public void RemoveImage(Workflow.Datatypes.HawkeyeImage currentImage)
{
if (listView1.SelectedIndices.Count == 0) return;
var index = listView1.SelectedIndices[0];
listView1.Items.RemoveAt(index);
if (listView1.Items.Count > 0)
{
if (index > listView1.Items.Count - 1) index--;
listView1.SelectedIndices.Clear();
listView1.SelectedIndices.Add(index);
listView1.EnsureVisible(listView1.SelectedIndices[0]);
}
}
public List<string> GetFileList()
{
return listView1.Items.Cast<ListViewItem>().Select(x => (string)x.Tag).ToList();
}
public void ReSelect()
{
if(listView1.SelectedIndices.Count == 0) return;
var index = listView1.SelectedIndices[0];
listView1.SelectedIndices.Clear();
listView1.SelectedIndices.Add(index);
listView1.EnsureVisible(listView1.SelectedIndices[0]);
}
public void SelectImage(string nextFile)
{
var index = listView1.Items.Cast<ListViewItem>().Where(x => (string)x.Tag == nextFile).Select(x => x.Index).FirstOrDefault();
if (index == -1) return;
listView1.SelectedIndices.Clear();
listView1.SelectedIndices.Add(index);
listView1.EnsureVisible(listView1.SelectedIndices[0]);
}
}
}

View File

@@ -0,0 +1,151 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="ckbExecuteWorkflow.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACRSURBVDhPY/j27dt/SjDYACcnJ7IwigEf3n8kCZNswPNb
J/+f6DYF0yA+yQac6Db5f6hWCmwIiE+mC0wIu2DS2Vf/F1x6DefjwlgNyNr34r/0wkdgTMgQDAOQNRNj
CIoBOg0rMTTDMLIhIHbriZeYBmDTiIxBGkEYxge5liQDsGGQqykyAISpZwAlmIEywMAAAAc1/Jwvt6sN
AAAAAElFTkSuQmCC
</value>
</data>
<data name="ckbStopOnError.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACRSURBVDhPY/j27dt/SjDYACcnJ7IwigEf3n8kCZNswPNb
J/+f6DYF0yA+yQac6Db5f6hWCmwIiE+mC0wIu2DS2Vf/F1x6DefjwlgNyNr34r/0wkdgTMgQDAOQNRNj
CIoBOg0rMTTDMLIhIHbriZeYBmDTiIxBGkEYxge5liQDsGGQqykyAISpZwAlmIEywMAAAAc1/Jwvt6sN
AAAAAElFTkSuQmCC
</value>
</data>
<data name="ckbStopOnNoError.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACRSURBVDhPY/j27dt/SjDYACcnJ7IwigEf3n8kCZNswPNb
J/+f6DYF0yA+yQac6Db5f6hWCmwIiE+mC0wIu2DS2Vf/F1x6DefjwlgNyNr34r/0wkdgTMgQDAOQNRNj
CIoBOg0rMTTDMLIhIHbriZeYBmDTiIxBGkEYxge5liQDsGGQqykyAISpZwAlmIEywMAAAAc1/Jwvt6sN
AAAAAElFTkSuQmCC
</value>
</data>
</root>

View File

@@ -0,0 +1,133 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Hawkeye.VisionBuilder.Features.ImagesStrip {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resource1 {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resource1() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Hawkeye.VisionBuilder.Features.ImagesStrip.Resource1", typeof(Resource1).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap backward {
get {
object obj = ResourceManager.GetObject("backward", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap backward_fast {
get {
object obj = ResourceManager.GetObject("backward-fast", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap forward {
get {
object obj = ResourceManager.GetObject("forward", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap forward_fast {
get {
object obj = ResourceManager.GetObject("forward-fast", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap pause {
get {
object obj = ResourceManager.GetObject("pause", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap play {
get {
object obj = ResourceManager.GetObject("play", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap repeat {
get {
object obj = ResourceManager.GetObject("repeat", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@@ -0,0 +1,142 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="backward" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>images\backward.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="backward-fast" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>images\backward-fast.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="forward" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>images\forward.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="forward-fast" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>images\forward-fast.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="pause" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>images\pause.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="play" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>images\play.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="repeat" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>images\repeat.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@@ -0,0 +1,41 @@
using System.Windows.Forms.Design;
namespace Hawkeye.VisionBuilder.Features.ImagesStrip;
[ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.ToolStrip)]
public class ToolStripNumberControl : ToolStripControlHost
{
public ToolStripNumberControl()
: base(new NumericUpDown())
{
(Control as NumericUpDown).Maximum = 10000;
(Control as NumericUpDown).Minimum = 0;
}
protected override void OnSubscribeControlEvents(Control control)
{
base.OnSubscribeControlEvents(control);
((NumericUpDown)control).ValueChanged += new EventHandler(OnValueChanged);
}
protected override void OnUnsubscribeControlEvents(Control control)
{
base.OnUnsubscribeControlEvents(control);
((NumericUpDown)control).ValueChanged -= new EventHandler(OnValueChanged);
}
public event EventHandler ValueChanged;
public Control NumericUpDownControl
{
get { return Control as NumericUpDown; }
}
public void OnValueChanged(object sender, EventArgs e)
{
if (ValueChanged != null)
{
ValueChanged(this, e);
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB