FrmScreenAutomation: Variable FPS selector.
This commit is contained in:
60
VAR.ScreenAutomation/FrmScreenAutomation.Designer.cs
generated
60
VAR.ScreenAutomation/FrmScreenAutomation.Designer.cs
generated
@@ -33,6 +33,7 @@
|
|||||||
this.splitOutput = new System.Windows.Forms.SplitContainer();
|
this.splitOutput = new System.Windows.Forms.SplitContainer();
|
||||||
this.ddlAutomationBot = new System.Windows.Forms.ComboBox();
|
this.ddlAutomationBot = new System.Windows.Forms.ComboBox();
|
||||||
this.btnStartEnd = new System.Windows.Forms.Button();
|
this.btnStartEnd = new System.Windows.Forms.Button();
|
||||||
|
this.numFPS = new System.Windows.Forms.NumericUpDown();
|
||||||
this.picPreview = new VAR.ScreenAutomation.Controls.CtrImageViewer();
|
this.picPreview = new VAR.ScreenAutomation.Controls.CtrImageViewer();
|
||||||
this.ctrOutput = new VAR.ScreenAutomation.Controls.CtrOutput();
|
this.ctrOutput = new VAR.ScreenAutomation.Controls.CtrOutput();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.picCapturer)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.picCapturer)).BeginInit();
|
||||||
@@ -44,19 +45,20 @@
|
|||||||
this.splitOutput.Panel1.SuspendLayout();
|
this.splitOutput.Panel1.SuspendLayout();
|
||||||
this.splitOutput.Panel2.SuspendLayout();
|
this.splitOutput.Panel2.SuspendLayout();
|
||||||
this.splitOutput.SuspendLayout();
|
this.splitOutput.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.numFPS)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.picPreview)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.picPreview)).BeginInit();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// picCapturer
|
// picCapturer
|
||||||
//
|
//
|
||||||
this.picCapturer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
this.picCapturer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
| System.Windows.Forms.AnchorStyles.Left)
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.picCapturer.Location = new System.Drawing.Point(4, 4);
|
this.picCapturer.Location = new System.Drawing.Point(4, 4);
|
||||||
this.picCapturer.Margin = new System.Windows.Forms.Padding(4);
|
this.picCapturer.Margin = new System.Windows.Forms.Padding(4);
|
||||||
this.picCapturer.Name = "picCapturer";
|
this.picCapturer.Name = "picCapturer";
|
||||||
this.picCapturer.Padding = new System.Windows.Forms.Padding(10);
|
this.picCapturer.Padding = new System.Windows.Forms.Padding(10);
|
||||||
this.picCapturer.Size = new System.Drawing.Size(424, 799);
|
this.picCapturer.Size = new System.Drawing.Size(501, 799);
|
||||||
this.picCapturer.TabIndex = 0;
|
this.picCapturer.TabIndex = 0;
|
||||||
this.picCapturer.TabStop = false;
|
this.picCapturer.TabStop = false;
|
||||||
//
|
//
|
||||||
@@ -76,7 +78,7 @@
|
|||||||
//
|
//
|
||||||
this.splitMain.Panel2.Controls.Add(this.picCapturer);
|
this.splitMain.Panel2.Controls.Add(this.picCapturer);
|
||||||
this.splitMain.Size = new System.Drawing.Size(754, 816);
|
this.splitMain.Size = new System.Drawing.Size(754, 816);
|
||||||
this.splitMain.SplitterDistance = 309;
|
this.splitMain.SplitterDistance = 232;
|
||||||
this.splitMain.TabIndex = 3;
|
this.splitMain.TabIndex = 3;
|
||||||
//
|
//
|
||||||
// splitOutput
|
// splitOutput
|
||||||
@@ -92,59 +94,83 @@
|
|||||||
//
|
//
|
||||||
// splitOutput.Panel2
|
// splitOutput.Panel2
|
||||||
//
|
//
|
||||||
|
this.splitOutput.Panel2.Controls.Add(this.numFPS);
|
||||||
this.splitOutput.Panel2.Controls.Add(this.ddlAutomationBot);
|
this.splitOutput.Panel2.Controls.Add(this.ddlAutomationBot);
|
||||||
this.splitOutput.Panel2.Controls.Add(this.btnStartEnd);
|
this.splitOutput.Panel2.Controls.Add(this.btnStartEnd);
|
||||||
this.splitOutput.Panel2.Controls.Add(this.ctrOutput);
|
this.splitOutput.Panel2.Controls.Add(this.ctrOutput);
|
||||||
this.splitOutput.Size = new System.Drawing.Size(309, 816);
|
this.splitOutput.Size = new System.Drawing.Size(232, 816);
|
||||||
this.splitOutput.SplitterDistance = 371;
|
this.splitOutput.SplitterDistance = 283;
|
||||||
this.splitOutput.TabIndex = 4;
|
this.splitOutput.TabIndex = 4;
|
||||||
//
|
//
|
||||||
// ddlAutomationBot
|
// ddlAutomationBot
|
||||||
//
|
//
|
||||||
this.ddlAutomationBot.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
this.ddlAutomationBot.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.ddlAutomationBot.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
this.ddlAutomationBot.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.ddlAutomationBot.FormattingEnabled = true;
|
this.ddlAutomationBot.FormattingEnabled = true;
|
||||||
this.ddlAutomationBot.Location = new System.Drawing.Point(13, 4);
|
this.ddlAutomationBot.Location = new System.Drawing.Point(13, 4);
|
||||||
this.ddlAutomationBot.Name = "ddlAutomationBot";
|
this.ddlAutomationBot.Name = "ddlAutomationBot";
|
||||||
this.ddlAutomationBot.Size = new System.Drawing.Size(293, 24);
|
this.ddlAutomationBot.Size = new System.Drawing.Size(216, 24);
|
||||||
this.ddlAutomationBot.TabIndex = 4;
|
this.ddlAutomationBot.TabIndex = 4;
|
||||||
this.ddlAutomationBot.SelectedIndexChanged += new System.EventHandler(this.DdlAutomationBot_SelectedIndexChanged);
|
this.ddlAutomationBot.SelectedIndexChanged += new System.EventHandler(this.DdlAutomationBot_SelectedIndexChanged);
|
||||||
//
|
//
|
||||||
// btnStartEnd
|
// btnStartEnd
|
||||||
//
|
//
|
||||||
this.btnStartEnd.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
this.btnStartEnd.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.btnStartEnd.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.btnStartEnd.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.btnStartEnd.Location = new System.Drawing.Point(15, 34);
|
this.btnStartEnd.Location = new System.Drawing.Point(15, 34);
|
||||||
this.btnStartEnd.Name = "btnStartEnd";
|
this.btnStartEnd.Name = "btnStartEnd";
|
||||||
this.btnStartEnd.Size = new System.Drawing.Size(294, 39);
|
this.btnStartEnd.Size = new System.Drawing.Size(149, 39);
|
||||||
this.btnStartEnd.TabIndex = 3;
|
this.btnStartEnd.TabIndex = 3;
|
||||||
this.btnStartEnd.Text = "Start";
|
this.btnStartEnd.Text = "Start";
|
||||||
this.btnStartEnd.UseVisualStyleBackColor = true;
|
this.btnStartEnd.UseVisualStyleBackColor = true;
|
||||||
this.btnStartEnd.Click += new System.EventHandler(this.BtnStartEnd_Click);
|
this.btnStartEnd.Click += new System.EventHandler(this.BtnStartEnd_Click);
|
||||||
//
|
//
|
||||||
|
// numFPS
|
||||||
|
//
|
||||||
|
this.numFPS.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.numFPS.Location = new System.Drawing.Point(170, 50);
|
||||||
|
this.numFPS.Maximum = new decimal(new int[] {
|
||||||
|
60,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.numFPS.Minimum = new decimal(new int[] {
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.numFPS.Name = "numFPS";
|
||||||
|
this.numFPS.Size = new System.Drawing.Size(59, 22);
|
||||||
|
this.numFPS.TabIndex = 5;
|
||||||
|
this.numFPS.Value = new decimal(new int[] {
|
||||||
|
20,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
//
|
||||||
// picPreview
|
// picPreview
|
||||||
//
|
//
|
||||||
this.picPreview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
this.picPreview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
| System.Windows.Forms.AnchorStyles.Left)
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.picPreview.BackColor = System.Drawing.Color.Black;
|
this.picPreview.BackColor = System.Drawing.Color.Black;
|
||||||
this.picPreview.ImageShow = null;
|
this.picPreview.ImageShow = null;
|
||||||
this.picPreview.Location = new System.Drawing.Point(12, 12);
|
this.picPreview.Location = new System.Drawing.Point(12, 12);
|
||||||
this.picPreview.Name = "picPreview";
|
this.picPreview.Name = "picPreview";
|
||||||
this.picPreview.Size = new System.Drawing.Size(294, 356);
|
this.picPreview.Size = new System.Drawing.Size(217, 268);
|
||||||
this.picPreview.TabIndex = 1;
|
this.picPreview.TabIndex = 1;
|
||||||
this.picPreview.TabStop = false;
|
this.picPreview.TabStop = false;
|
||||||
//
|
//
|
||||||
// ctrOutput
|
// ctrOutput
|
||||||
//
|
//
|
||||||
this.ctrOutput.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
this.ctrOutput.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
| System.Windows.Forms.AnchorStyles.Left)
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.ctrOutput.Location = new System.Drawing.Point(12, 79);
|
this.ctrOutput.Location = new System.Drawing.Point(12, 79);
|
||||||
this.ctrOutput.Name = "ctrOutput";
|
this.ctrOutput.Name = "ctrOutput";
|
||||||
this.ctrOutput.Size = new System.Drawing.Size(294, 349);
|
this.ctrOutput.Size = new System.Drawing.Size(217, 437);
|
||||||
this.ctrOutput.TabIndex = 2;
|
this.ctrOutput.TabIndex = 2;
|
||||||
this.ctrOutput.Text = "ctrOutput1";
|
this.ctrOutput.Text = "ctrOutput1";
|
||||||
//
|
//
|
||||||
@@ -167,6 +193,7 @@
|
|||||||
this.splitOutput.Panel2.ResumeLayout(false);
|
this.splitOutput.Panel2.ResumeLayout(false);
|
||||||
((System.ComponentModel.ISupportInitialize)(this.splitOutput)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.splitOutput)).EndInit();
|
||||||
this.splitOutput.ResumeLayout(false);
|
this.splitOutput.ResumeLayout(false);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.numFPS)).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.picPreview)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.picPreview)).EndInit();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
@@ -181,6 +208,7 @@
|
|||||||
private System.Windows.Forms.SplitContainer splitOutput;
|
private System.Windows.Forms.SplitContainer splitOutput;
|
||||||
private System.Windows.Forms.Button btnStartEnd;
|
private System.Windows.Forms.Button btnStartEnd;
|
||||||
private System.Windows.Forms.ComboBox ddlAutomationBot;
|
private System.Windows.Forms.ComboBox ddlAutomationBot;
|
||||||
|
private System.Windows.Forms.NumericUpDown numFPS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace VAR.ScreenAutomation
|
|||||||
if (components == null) { components = new Container(); }
|
if (components == null) { components = new Container(); }
|
||||||
timTicker = new Timer(components)
|
timTicker = new Timer(components)
|
||||||
{
|
{
|
||||||
Interval = 100,
|
Interval = Convert.ToInt32(1000 / numFPS.Value),
|
||||||
};
|
};
|
||||||
timTicker.Tick += TimTicker_Tick;
|
timTicker.Tick += TimTicker_Tick;
|
||||||
timTicker.Enabled = true;
|
timTicker.Enabled = true;
|
||||||
@@ -70,6 +70,7 @@ namespace VAR.ScreenAutomation
|
|||||||
}
|
}
|
||||||
picPreview.ImageShow = bmpScreen;
|
picPreview.ImageShow = bmpScreen;
|
||||||
|
|
||||||
|
timTicker.Interval = Convert.ToInt32(1000 / numFPS.Value);
|
||||||
timTicker.Enabled = true;
|
timTicker.Enabled = true;
|
||||||
timTicker.Start();
|
timTicker.Start();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user