Commit 7ad78b7d by Neo Turing

init

parent 0097ab64
......@@ -28,103 +28,37 @@
/// </summary>
private void InitializeComponent()
{
this.FocusFar1Button = new System.Windows.Forms.Button();
this.FocusNear2Button = new System.Windows.Forms.Button();
this.FocusNear1Button = new System.Windows.Forms.Button();
this.FocusNear3Button = new System.Windows.Forms.Button();
this.LiveViewButton = new System.Windows.Forms.Button();
this.TakePhotoButton = new System.Windows.Forms.Button();
this.RefreshButton = new System.Windows.Forms.Button();
this.CameraListBox = new System.Windows.Forms.ListBox();
this.SessionButton = new System.Windows.Forms.Button();
this.FocusFar3Button = new System.Windows.Forms.Button();
this.plTools = new System.Windows.Forms.Panel();
this.InitGroupBox = new System.Windows.Forms.GroupBox();
this.SettingsGroupBox = new System.Windows.Forms.GroupBox();
this.TakePhotoButton = new System.Windows.Forms.Button();
this.LiveViewButton = new System.Windows.Forms.Button();
this.LiveViewGroupBox = new System.Windows.Forms.GroupBox();
this.FocusFar3Button = new System.Windows.Forms.Button();
this.FocusFar2Button = new System.Windows.Forms.Button();
this.FocusFar1Button = new System.Windows.Forms.Button();
this.FocusNear1Button = new System.Windows.Forms.Button();
this.FocusNear2Button = new System.Windows.Forms.Button();
this.FocusNear3Button = new System.Windows.Forms.Button();
this.LiveViewPicBox = new System.Windows.Forms.PictureBox();
this.SettingsGroupBox = new System.Windows.Forms.GroupBox();
this.plTools.SuspendLayout();
this.InitGroupBox.SuspendLayout();
this.SettingsGroupBox.SuspendLayout();
this.LiveViewGroupBox.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.LiveViewPicBox)).BeginInit();
this.SettingsGroupBox.SuspendLayout();
this.SuspendLayout();
//
// FocusFar1Button
//
this.FocusFar1Button.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FocusFar1Button.Location = new System.Drawing.Point(277, 18);
this.FocusFar1Button.Name = "FocusFar1Button";
this.FocusFar1Button.Size = new System.Drawing.Size(28, 21);
this.FocusFar1Button.TabIndex = 6;
this.FocusFar1Button.Text = ">";
this.FocusFar1Button.UseVisualStyleBackColor = true;
this.FocusFar1Button.Click += new System.EventHandler(this.FocusFar1Button_Click);
//
// FocusNear2Button
//
this.FocusNear2Button.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FocusNear2Button.Location = new System.Drawing.Point(209, 18);
this.FocusNear2Button.Name = "FocusNear2Button";
this.FocusNear2Button.Size = new System.Drawing.Size(28, 21);
this.FocusNear2Button.TabIndex = 6;
this.FocusNear2Button.Text = "<<";
this.FocusNear2Button.UseVisualStyleBackColor = true;
this.FocusNear2Button.Click += new System.EventHandler(this.FocusNear2Button_Click);
//
// FocusNear1Button
//
this.FocusNear1Button.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FocusNear1Button.Location = new System.Drawing.Point(243, 18);
this.FocusNear1Button.Name = "FocusNear1Button";
this.FocusNear1Button.Size = new System.Drawing.Size(28, 21);
this.FocusNear1Button.TabIndex = 6;
this.FocusNear1Button.Text = "<";
this.FocusNear1Button.UseVisualStyleBackColor = true;
this.FocusNear1Button.Click += new System.EventHandler(this.FocusNear1Button_Click);
//
// FocusNear3Button
//
this.FocusNear3Button.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FocusNear3Button.Location = new System.Drawing.Point(175, 18);
this.FocusNear3Button.Name = "FocusNear3Button";
this.FocusNear3Button.Size = new System.Drawing.Size(28, 21);
this.FocusNear3Button.TabIndex = 6;
this.FocusNear3Button.Text = "<<<";
this.FocusNear3Button.UseVisualStyleBackColor = true;
this.FocusNear3Button.Click += new System.EventHandler(this.FocusNear3Button_Click);
//
// LiveViewButton
//
this.LiveViewButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.LiveViewButton.Font = new System.Drawing.Font("宋体", 15F);
this.LiveViewButton.Location = new System.Drawing.Point(353, 20);
this.LiveViewButton.Name = "LiveViewButton";
this.LiveViewButton.Size = new System.Drawing.Size(90, 76);
this.LiveViewButton.TabIndex = 2;
this.LiveViewButton.Text = "开启实时预览";
this.LiveViewButton.UseVisualStyleBackColor = true;
this.LiveViewButton.Click += new System.EventHandler(this.LiveViewButton_Click);
//
// TakePhotoButton
//
this.TakePhotoButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.TakePhotoButton.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.TakePhotoButton.Location = new System.Drawing.Point(449, 20);
this.TakePhotoButton.Name = "TakePhotoButton";
this.TakePhotoButton.Size = new System.Drawing.Size(109, 76);
this.TakePhotoButton.TabIndex = 2;
this.TakePhotoButton.Text = "拍照";
this.TakePhotoButton.UseVisualStyleBackColor = true;
this.TakePhotoButton.Click += new System.EventHandler(this.TakePhotoButton_Click);
//
// RefreshButton
//
this.RefreshButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.RefreshButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.RefreshButton.Location = new System.Drawing.Point(216, 75);
this.RefreshButton.Location = new System.Drawing.Point(206, 64);
this.RefreshButton.Name = "RefreshButton";
this.RefreshButton.Size = new System.Drawing.Size(65, 21);
this.RefreshButton.Size = new System.Drawing.Size(65, 32);
this.RefreshButton.TabIndex = 9;
this.RefreshButton.Text = "↻";
this.RefreshButton.UseVisualStyleBackColor = true;
......@@ -136,7 +70,7 @@
| System.Windows.Forms.AnchorStyles.Left)));
this.CameraListBox.FormattingEnabled = true;
this.CameraListBox.ItemHeight = 12;
this.CameraListBox.Location = new System.Drawing.Point(18, 20);
this.CameraListBox.Location = new System.Drawing.Point(6, 20);
this.CameraListBox.Name = "CameraListBox";
this.CameraListBox.Size = new System.Drawing.Size(194, 76);
this.CameraListBox.TabIndex = 6;
......@@ -145,24 +79,75 @@
//
this.SessionButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.SessionButton.Location = new System.Drawing.Point(216, 20);
this.SessionButton.Location = new System.Drawing.Point(206, 20);
this.SessionButton.Name = "SessionButton";
this.SessionButton.Size = new System.Drawing.Size(65, 49);
this.SessionButton.Size = new System.Drawing.Size(65, 45);
this.SessionButton.TabIndex = 7;
this.SessionButton.Text = "连接相机";
this.SessionButton.UseVisualStyleBackColor = true;
this.SessionButton.Click += new System.EventHandler(this.SessionButton_Click);
//
// FocusFar3Button
// plTools
//
this.FocusFar3Button.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FocusFar3Button.Location = new System.Drawing.Point(345, 18);
this.FocusFar3Button.Name = "FocusFar3Button";
this.FocusFar3Button.Size = new System.Drawing.Size(28, 21);
this.FocusFar3Button.TabIndex = 6;
this.FocusFar3Button.Text = ">>>";
this.FocusFar3Button.UseVisualStyleBackColor = true;
this.FocusFar3Button.Click += new System.EventHandler(this.FocusFar3Button_Click);
this.plTools.Controls.Add(this.SettingsGroupBox);
this.plTools.Controls.Add(this.InitGroupBox);
this.plTools.Dock = System.Windows.Forms.DockStyle.Top;
this.plTools.Location = new System.Drawing.Point(0, 0);
this.plTools.Name = "plTools";
this.plTools.Size = new System.Drawing.Size(572, 103);
this.plTools.TabIndex = 17;
//
// InitGroupBox
//
this.InitGroupBox.Controls.Add(this.RefreshButton);
this.InitGroupBox.Controls.Add(this.SessionButton);
this.InitGroupBox.Controls.Add(this.CameraListBox);
this.InitGroupBox.Dock = System.Windows.Forms.DockStyle.Left;
this.InitGroupBox.Location = new System.Drawing.Point(0, 0);
this.InitGroupBox.Name = "InitGroupBox";
this.InitGroupBox.Size = new System.Drawing.Size(289, 103);
this.InitGroupBox.TabIndex = 17;
this.InitGroupBox.TabStop = false;
this.InitGroupBox.Text = "连接相机";
//
// SettingsGroupBox
//
this.SettingsGroupBox.Controls.Add(this.TakePhotoButton);
this.SettingsGroupBox.Controls.Add(this.LiveViewButton);
this.SettingsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.SettingsGroupBox.Enabled = false;
this.SettingsGroupBox.Location = new System.Drawing.Point(289, 0);
this.SettingsGroupBox.Name = "SettingsGroupBox";
this.SettingsGroupBox.Size = new System.Drawing.Size(283, 103);
this.SettingsGroupBox.TabIndex = 19;
this.SettingsGroupBox.TabStop = false;
this.SettingsGroupBox.Text = "操作";
//
// TakePhotoButton
//
this.TakePhotoButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.TakePhotoButton.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.TakePhotoButton.Location = new System.Drawing.Point(160, 20);
this.TakePhotoButton.Name = "TakePhotoButton";
this.TakePhotoButton.Size = new System.Drawing.Size(109, 70);
this.TakePhotoButton.TabIndex = 2;
this.TakePhotoButton.Text = "拍照";
this.TakePhotoButton.UseVisualStyleBackColor = true;
this.TakePhotoButton.Click += new System.EventHandler(this.TakePhotoButton_Click);
//
// LiveViewButton
//
this.LiveViewButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.LiveViewButton.Font = new System.Drawing.Font("宋体", 15F);
this.LiveViewButton.Location = new System.Drawing.Point(64, 20);
this.LiveViewButton.Name = "LiveViewButton";
this.LiveViewButton.Size = new System.Drawing.Size(90, 70);
this.LiveViewButton.TabIndex = 2;
this.LiveViewButton.Text = "开启实时预览";
this.LiveViewButton.UseVisualStyleBackColor = true;
this.LiveViewButton.Click += new System.EventHandler(this.LiveViewButton_Click);
//
// LiveViewGroupBox
//
......@@ -175,13 +160,24 @@
this.LiveViewGroupBox.Controls.Add(this.LiveViewPicBox);
this.LiveViewGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.LiveViewGroupBox.Enabled = false;
this.LiveViewGroupBox.Location = new System.Drawing.Point(0, 109);
this.LiveViewGroupBox.Location = new System.Drawing.Point(0, 103);
this.LiveViewGroupBox.Name = "LiveViewGroupBox";
this.LiveViewGroupBox.Size = new System.Drawing.Size(572, 445);
this.LiveViewGroupBox.TabIndex = 16;
this.LiveViewGroupBox.Size = new System.Drawing.Size(572, 451);
this.LiveViewGroupBox.TabIndex = 18;
this.LiveViewGroupBox.TabStop = false;
this.LiveViewGroupBox.Text = "实时预览";
//
// FocusFar3Button
//
this.FocusFar3Button.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FocusFar3Button.Location = new System.Drawing.Point(345, 18);
this.FocusFar3Button.Name = "FocusFar3Button";
this.FocusFar3Button.Size = new System.Drawing.Size(28, 21);
this.FocusFar3Button.TabIndex = 6;
this.FocusFar3Button.Text = ">>>";
this.FocusFar3Button.UseVisualStyleBackColor = true;
this.FocusFar3Button.Click += new System.EventHandler(this.FocusFar3Button_Click);
//
// FocusFar2Button
//
this.FocusFar2Button.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
......@@ -193,6 +189,50 @@
this.FocusFar2Button.UseVisualStyleBackColor = true;
this.FocusFar2Button.Click += new System.EventHandler(this.FocusFar2Button_Click);
//
// FocusFar1Button
//
this.FocusFar1Button.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FocusFar1Button.Location = new System.Drawing.Point(277, 18);
this.FocusFar1Button.Name = "FocusFar1Button";
this.FocusFar1Button.Size = new System.Drawing.Size(28, 21);
this.FocusFar1Button.TabIndex = 6;
this.FocusFar1Button.Text = ">";
this.FocusFar1Button.UseVisualStyleBackColor = true;
this.FocusFar1Button.Click += new System.EventHandler(this.FocusFar1Button_Click);
//
// FocusNear1Button
//
this.FocusNear1Button.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FocusNear1Button.Location = new System.Drawing.Point(243, 18);
this.FocusNear1Button.Name = "FocusNear1Button";
this.FocusNear1Button.Size = new System.Drawing.Size(28, 21);
this.FocusNear1Button.TabIndex = 6;
this.FocusNear1Button.Text = "<";
this.FocusNear1Button.UseVisualStyleBackColor = true;
this.FocusNear1Button.Click += new System.EventHandler(this.FocusNear1Button_Click);
//
// FocusNear2Button
//
this.FocusNear2Button.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FocusNear2Button.Location = new System.Drawing.Point(209, 18);
this.FocusNear2Button.Name = "FocusNear2Button";
this.FocusNear2Button.Size = new System.Drawing.Size(28, 21);
this.FocusNear2Button.TabIndex = 6;
this.FocusNear2Button.Text = "<<";
this.FocusNear2Button.UseVisualStyleBackColor = true;
this.FocusNear2Button.Click += new System.EventHandler(this.FocusNear2Button_Click);
//
// FocusNear3Button
//
this.FocusNear3Button.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FocusNear3Button.Location = new System.Drawing.Point(175, 18);
this.FocusNear3Button.Name = "FocusNear3Button";
this.FocusNear3Button.Size = new System.Drawing.Size(28, 21);
this.FocusNear3Button.TabIndex = 6;
this.FocusNear3Button.Text = "<<<";
this.FocusNear3Button.UseVisualStyleBackColor = true;
this.FocusNear3Button.Click += new System.EventHandler(this.FocusNear3Button_Click);
//
// LiveViewPicBox
//
this.LiveViewPicBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
......@@ -201,28 +241,10 @@
this.LiveViewPicBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.LiveViewPicBox.Location = new System.Drawing.Point(10, 47);
this.LiveViewPicBox.Name = "LiveViewPicBox";
this.LiveViewPicBox.Size = new System.Drawing.Size(548, 388);
this.LiveViewPicBox.Size = new System.Drawing.Size(548, 394);
this.LiveViewPicBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.LiveViewPicBox.TabIndex = 1;
this.LiveViewPicBox.TabStop = false;
this.LiveViewPicBox.SizeChanged += new System.EventHandler(this.LiveViewPicBox_SizeChanged);
//
// SettingsGroupBox
//
this.SettingsGroupBox.Controls.Add(this.RefreshButton);
this.SettingsGroupBox.Controls.Add(this.CameraListBox);
this.SettingsGroupBox.Controls.Add(this.SessionButton);
this.SettingsGroupBox.Controls.Add(this.TakePhotoButton);
this.SettingsGroupBox.Controls.Add(this.LiveViewButton);
this.SettingsGroupBox.Dock = System.Windows.Forms.DockStyle.Top;
this.SettingsGroupBox.Enabled = false;
this.SettingsGroupBox.Location = new System.Drawing.Point(0, 0);
this.SettingsGroupBox.MinimumSize = new System.Drawing.Size(407, 0);
this.SettingsGroupBox.Name = "SettingsGroupBox";
this.SettingsGroupBox.Size = new System.Drawing.Size(572, 109);
this.SettingsGroupBox.TabIndex = 17;
this.SettingsGroupBox.TabStop = false;
this.SettingsGroupBox.Text = "设置";
//
// CanonForm
//
......@@ -230,34 +252,37 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(572, 554);
this.Controls.Add(this.LiveViewGroupBox);
this.Controls.Add(this.SettingsGroupBox);
this.Controls.Add(this.plTools);
this.Name = "CanonForm";
this.Text = "Canon";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.CanonForm_FormClosing);
this.Load += new System.EventHandler(this.CanonForm_Load);
this.plTools.ResumeLayout(false);
this.InitGroupBox.ResumeLayout(false);
this.SettingsGroupBox.ResumeLayout(false);
this.LiveViewGroupBox.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.LiveViewPicBox)).EndInit();
this.SettingsGroupBox.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button FocusFar1Button;
private System.Windows.Forms.Button FocusNear2Button;
private System.Windows.Forms.Button FocusNear1Button;
private System.Windows.Forms.Button FocusNear3Button;
private System.Windows.Forms.Button LiveViewButton;
private System.Windows.Forms.Button TakePhotoButton;
private System.Windows.Forms.Button RefreshButton;
private System.Windows.Forms.ListBox CameraListBox;
private System.Windows.Forms.Button SessionButton;
private System.Windows.Forms.Button FocusFar3Button;
private System.Windows.Forms.Panel plTools;
private System.Windows.Forms.GroupBox InitGroupBox;
private System.Windows.Forms.GroupBox SettingsGroupBox;
private System.Windows.Forms.Button TakePhotoButton;
private System.Windows.Forms.Button LiveViewButton;
private System.Windows.Forms.GroupBox LiveViewGroupBox;
private System.Windows.Forms.Button FocusFar3Button;
private System.Windows.Forms.Button FocusFar2Button;
private System.Windows.Forms.Button FocusFar1Button;
private System.Windows.Forms.Button FocusNear1Button;
private System.Windows.Forms.Button FocusNear2Button;
private System.Windows.Forms.Button FocusNear3Button;
private System.Windows.Forms.PictureBox LiveViewPicBox;
private System.Windows.Forms.GroupBox SettingsGroupBox;
}
}
......@@ -235,20 +235,6 @@ namespace Kivii.Canon
{
MainCamera.SetSetting(PropertyID.SaveTo, (int)SaveTo.Host);
MainCamera.SetCapacity(4096, int.MaxValue);
//if (STCameraRdButton.Checked)
//{
// MainCamera.SetSetting(PropertyID.SaveTo, (int)SaveTo.Camera);
// BrowseButton.Enabled = false;
// SavePathTextBox.Enabled = false;
//}
//else
//{
// if (STComputerRdButton.Checked) MainCamera.SetSetting(PropertyID.SaveTo, (int)SaveTo.Host);
// else if (STBothRdButton.Checked) MainCamera.SetSetting(PropertyID.SaveTo, (int)SaveTo.Both);
// MainCamera.SetCapacity(4096, int.MaxValue);
// BrowseButton.Enabled = true;
// SavePathTextBox.Enabled = true;
//}
}
}
catch (Exception ex) { ReportError(ex.Message, false); }
......@@ -431,7 +417,7 @@ namespace Kivii.Canon
else
{
SettingsGroupBox.Enabled = enable;
//InitGroupBox.Enabled = enable;
InitGroupBox.Enabled = enable;
LiveViewGroupBox.Enabled = enable;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment