Commit 4c29fc14 by Neo Turing

1

parent c58d2622
...@@ -30,39 +30,18 @@ ...@@ -30,39 +30,18 @@
{ {
this.FocusFar1Button = new System.Windows.Forms.Button(); this.FocusFar1Button = new System.Windows.Forms.Button();
this.FocusNear2Button = new System.Windows.Forms.Button(); this.FocusNear2Button = new System.Windows.Forms.Button();
this.MainProgressBar = new System.Windows.Forms.ProgressBar();
this.SavePathTextBox = new System.Windows.Forms.TextBox();
this.BrowseButton = new System.Windows.Forms.Button();
this.SaveToGroupBox = new System.Windows.Forms.GroupBox();
this.STBothRdButton = new System.Windows.Forms.RadioButton();
this.STComputerRdButton = new System.Windows.Forms.RadioButton();
this.STCameraRdButton = new System.Windows.Forms.RadioButton();
this.FocusNear1Button = new System.Windows.Forms.Button(); this.FocusNear1Button = new System.Windows.Forms.Button();
this.FocusNear3Button = new System.Windows.Forms.Button(); this.FocusNear3Button = new System.Windows.Forms.Button();
this.LiveViewButton = new System.Windows.Forms.Button(); this.LiveViewButton = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.TakePhotoButton = new System.Windows.Forms.Button(); this.TakePhotoButton = new System.Windows.Forms.Button();
this.BulbUpDo = new System.Windows.Forms.NumericUpDown();
this.RefreshButton = new System.Windows.Forms.Button(); this.RefreshButton = new System.Windows.Forms.Button();
this.CameraListBox = new System.Windows.Forms.ListBox(); this.CameraListBox = new System.Windows.Forms.ListBox();
this.SessionLabel = new System.Windows.Forms.Label();
this.InitGroupBox = new System.Windows.Forms.GroupBox();
this.SessionButton = new System.Windows.Forms.Button(); this.SessionButton = new System.Windows.Forms.Button();
this.SaveFolderBrowser = new System.Windows.Forms.FolderBrowserDialog();
this.ISOCoBox = new System.Windows.Forms.ComboBox();
this.FocusFar3Button = new System.Windows.Forms.Button(); this.FocusFar3Button = new System.Windows.Forms.Button();
this.LiveViewGroupBox = new System.Windows.Forms.GroupBox(); this.LiveViewGroupBox = new System.Windows.Forms.GroupBox();
this.FocusFar2Button = new System.Windows.Forms.Button(); this.FocusFar2Button = new System.Windows.Forms.Button();
this.LiveViewPicBox = new System.Windows.Forms.PictureBox(); this.LiveViewPicBox = new System.Windows.Forms.PictureBox();
this.TvCoBox = new System.Windows.Forms.ComboBox();
this.AvCoBox = new System.Windows.Forms.ComboBox();
this.SettingsGroupBox = new System.Windows.Forms.GroupBox(); this.SettingsGroupBox = new System.Windows.Forms.GroupBox();
this.SaveToGroupBox.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.BulbUpDo)).BeginInit();
this.InitGroupBox.SuspendLayout();
this.LiveViewGroupBox.SuspendLayout(); this.LiveViewGroupBox.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.LiveViewPicBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.LiveViewPicBox)).BeginInit();
this.SettingsGroupBox.SuspendLayout(); this.SettingsGroupBox.SuspendLayout();
...@@ -90,84 +69,6 @@ ...@@ -90,84 +69,6 @@
this.FocusNear2Button.UseVisualStyleBackColor = true; this.FocusNear2Button.UseVisualStyleBackColor = true;
this.FocusNear2Button.Click += new System.EventHandler(this.FocusNear2Button_Click); this.FocusNear2Button.Click += new System.EventHandler(this.FocusNear2Button_Click);
// //
// MainProgressBar
//
this.MainProgressBar.Location = new System.Drawing.Point(6, 92);
this.MainProgressBar.Name = "MainProgressBar";
this.MainProgressBar.Size = new System.Drawing.Size(282, 18);
this.MainProgressBar.TabIndex = 8;
//
// SavePathTextBox
//
this.SavePathTextBox.Enabled = false;
this.SavePathTextBox.Location = new System.Drawing.Point(6, 116);
this.SavePathTextBox.Name = "SavePathTextBox";
this.SavePathTextBox.Size = new System.Drawing.Size(282, 21);
this.SavePathTextBox.TabIndex = 6;
//
// BrowseButton
//
this.BrowseButton.Enabled = false;
this.BrowseButton.Location = new System.Drawing.Point(294, 114);
this.BrowseButton.Name = "BrowseButton";
this.BrowseButton.Size = new System.Drawing.Size(99, 21);
this.BrowseButton.TabIndex = 5;
this.BrowseButton.Text = "Browse";
this.BrowseButton.UseVisualStyleBackColor = true;
this.BrowseButton.Click += new System.EventHandler(this.BrowseButton_Click);
//
// SaveToGroupBox
//
this.SaveToGroupBox.Controls.Add(this.STBothRdButton);
this.SaveToGroupBox.Controls.Add(this.STComputerRdButton);
this.SaveToGroupBox.Controls.Add(this.STCameraRdButton);
this.SaveToGroupBox.Location = new System.Drawing.Point(297, 18);
this.SaveToGroupBox.Name = "SaveToGroupBox";
this.SaveToGroupBox.Size = new System.Drawing.Size(96, 92);
this.SaveToGroupBox.TabIndex = 4;
this.SaveToGroupBox.TabStop = false;
this.SaveToGroupBox.Text = "Save To";
//
// STBothRdButton
//
this.STBothRdButton.AutoSize = true;
this.STBothRdButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.STBothRdButton.Location = new System.Drawing.Point(6, 66);
this.STBothRdButton.Name = "STBothRdButton";
this.STBothRdButton.Size = new System.Drawing.Size(52, 20);
this.STBothRdButton.TabIndex = 0;
this.STBothRdButton.Text = "Both";
this.STBothRdButton.UseVisualStyleBackColor = true;
this.STBothRdButton.Visible = false;
this.STBothRdButton.CheckedChanged += new System.EventHandler(this.SaveToRdButton_CheckedChanged);
//
// STComputerRdButton
//
this.STComputerRdButton.AutoSize = true;
this.STComputerRdButton.Checked = true;
this.STComputerRdButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.STComputerRdButton.Location = new System.Drawing.Point(6, 42);
this.STComputerRdButton.Name = "STComputerRdButton";
this.STComputerRdButton.Size = new System.Drawing.Size(83, 20);
this.STComputerRdButton.TabIndex = 0;
this.STComputerRdButton.TabStop = true;
this.STComputerRdButton.Text = "Computer";
this.STComputerRdButton.UseVisualStyleBackColor = true;
this.STComputerRdButton.CheckedChanged += new System.EventHandler(this.SaveToRdButton_CheckedChanged);
//
// STCameraRdButton
//
this.STCameraRdButton.AutoSize = true;
this.STCameraRdButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.STCameraRdButton.Location = new System.Drawing.Point(6, 18);
this.STCameraRdButton.Name = "STCameraRdButton";
this.STCameraRdButton.Size = new System.Drawing.Size(73, 20);
this.STCameraRdButton.TabIndex = 0;
this.STCameraRdButton.Text = "Camera";
this.STCameraRdButton.UseVisualStyleBackColor = true;
this.STCameraRdButton.Visible = false;
this.STCameraRdButton.CheckedChanged += new System.EventHandler(this.SaveToRdButton_CheckedChanged);
//
// FocusNear1Button // 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.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
...@@ -192,94 +93,38 @@ ...@@ -192,94 +93,38 @@
// //
// LiveViewButton // LiveViewButton
// //
this.LiveViewButton.Location = new System.Drawing.Point(8, 18); 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.Name = "LiveViewButton";
this.LiveViewButton.Size = new System.Drawing.Size(70, 20); this.LiveViewButton.Size = new System.Drawing.Size(90, 76);
this.LiveViewButton.TabIndex = 2; this.LiveViewButton.TabIndex = 2;
this.LiveViewButton.Text = "Start LV"; this.LiveViewButton.Text = "开启实时预览";
this.LiveViewButton.UseVisualStyleBackColor = true; this.LiveViewButton.UseVisualStyleBackColor = true;
this.LiveViewButton.Click += new System.EventHandler(this.LiveViewButton_Click); this.LiveViewButton.Click += new System.EventHandler(this.LiveViewButton_Click);
// //
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.Location = new System.Drawing.Point(236, 18);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(52, 16);
this.label4.TabIndex = 3;
this.label4.Text = "Bulb (s)";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(106, 68);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(29, 16);
this.label3.TabIndex = 3;
this.label3.Text = "ISO";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(106, 43);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(23, 16);
this.label2.TabIndex = 3;
this.label2.Text = "Tv";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(106, 18);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(23, 16);
this.label1.TabIndex = 3;
this.label1.Text = "Av";
//
// TakePhotoButton // TakePhotoButton
// //
this.TakePhotoButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.TakePhotoButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.TakePhotoButton.Location = new System.Drawing.Point(142, 45); | 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.Name = "TakePhotoButton";
this.TakePhotoButton.Size = new System.Drawing.Size(146, 44); this.TakePhotoButton.Size = new System.Drawing.Size(109, 76);
this.TakePhotoButton.TabIndex = 2; this.TakePhotoButton.TabIndex = 2;
this.TakePhotoButton.Text = "Take Photo"; this.TakePhotoButton.Text = "拍照";
this.TakePhotoButton.UseVisualStyleBackColor = true; this.TakePhotoButton.UseVisualStyleBackColor = true;
this.TakePhotoButton.Click += new System.EventHandler(this.TakePhotoButton_Click); this.TakePhotoButton.Click += new System.EventHandler(this.TakePhotoButton_Click);
// //
// BulbUpDo
//
this.BulbUpDo.Location = new System.Drawing.Point(142, 18);
this.BulbUpDo.Maximum = new decimal(new int[] {
10000,
0,
0,
0});
this.BulbUpDo.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.BulbUpDo.Name = "BulbUpDo";
this.BulbUpDo.Size = new System.Drawing.Size(90, 21);
this.BulbUpDo.TabIndex = 1;
this.BulbUpDo.Value = new decimal(new int[] {
20,
0,
0,
0});
//
// RefreshButton // RefreshButton
// //
this.RefreshButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 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.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(96, 117); this.RefreshButton.Location = new System.Drawing.Point(216, 75);
this.RefreshButton.Name = "RefreshButton"; this.RefreshButton.Name = "RefreshButton";
this.RefreshButton.Size = new System.Drawing.Size(31, 21); this.RefreshButton.Size = new System.Drawing.Size(65, 21);
this.RefreshButton.TabIndex = 9; this.RefreshButton.TabIndex = 9;
this.RefreshButton.Text = "↻"; this.RefreshButton.Text = "↻";
this.RefreshButton.UseVisualStyleBackColor = true; this.RefreshButton.UseVisualStyleBackColor = true;
...@@ -291,59 +136,23 @@ ...@@ -291,59 +136,23 @@
| System.Windows.Forms.AnchorStyles.Left))); | System.Windows.Forms.AnchorStyles.Left)));
this.CameraListBox.FormattingEnabled = true; this.CameraListBox.FormattingEnabled = true;
this.CameraListBox.ItemHeight = 12; this.CameraListBox.ItemHeight = 12;
this.CameraListBox.Location = new System.Drawing.Point(8, 32); this.CameraListBox.Location = new System.Drawing.Point(18, 20);
this.CameraListBox.Name = "CameraListBox"; this.CameraListBox.Name = "CameraListBox";
this.CameraListBox.Size = new System.Drawing.Size(121, 76); this.CameraListBox.Size = new System.Drawing.Size(194, 76);
this.CameraListBox.TabIndex = 6; this.CameraListBox.TabIndex = 6;
// //
// SessionLabel
//
this.SessionLabel.AutoSize = true;
this.SessionLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.SessionLabel.Location = new System.Drawing.Point(6, 15);
this.SessionLabel.Name = "SessionLabel";
this.SessionLabel.Size = new System.Drawing.Size(109, 16);
this.SessionLabel.TabIndex = 8;
this.SessionLabel.Text = "No open session";
//
// InitGroupBox
//
this.InitGroupBox.Controls.Add(this.RefreshButton);
this.InitGroupBox.Controls.Add(this.CameraListBox);
this.InitGroupBox.Controls.Add(this.SessionLabel);
this.InitGroupBox.Controls.Add(this.SessionButton);
this.InitGroupBox.Location = new System.Drawing.Point(12, 12);
this.InitGroupBox.Name = "InitGroupBox";
this.InitGroupBox.Size = new System.Drawing.Size(135, 146);
this.InitGroupBox.TabIndex = 15;
this.InitGroupBox.TabStop = false;
this.InitGroupBox.Text = "Init";
//
// SessionButton // SessionButton
// //
this.SessionButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.SessionButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.SessionButton.Location = new System.Drawing.Point(6, 117); | System.Windows.Forms.AnchorStyles.Left)));
this.SessionButton.Location = new System.Drawing.Point(216, 20);
this.SessionButton.Name = "SessionButton"; this.SessionButton.Name = "SessionButton";
this.SessionButton.Size = new System.Drawing.Size(84, 21); this.SessionButton.Size = new System.Drawing.Size(65, 49);
this.SessionButton.TabIndex = 7; this.SessionButton.TabIndex = 7;
this.SessionButton.Text = "Open Session"; this.SessionButton.Text = "连接相机";
this.SessionButton.UseVisualStyleBackColor = true; this.SessionButton.UseVisualStyleBackColor = true;
this.SessionButton.Click += new System.EventHandler(this.SessionButton_Click); this.SessionButton.Click += new System.EventHandler(this.SessionButton_Click);
// //
// SaveFolderBrowser
//
this.SaveFolderBrowser.Description = "Save Images To...";
//
// ISOCoBox
//
this.ISOCoBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.ISOCoBox.FormattingEnabled = true;
this.ISOCoBox.Location = new System.Drawing.Point(6, 67);
this.ISOCoBox.Name = "ISOCoBox";
this.ISOCoBox.Size = new System.Drawing.Size(94, 20);
this.ISOCoBox.TabIndex = 0;
this.ISOCoBox.SelectedIndexChanged += new System.EventHandler(this.ISOCoBox_SelectedIndexChanged);
//
// FocusFar3Button // 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.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
...@@ -357,9 +166,6 @@ ...@@ -357,9 +166,6 @@
// //
// LiveViewGroupBox // LiveViewGroupBox
// //
this.LiveViewGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.LiveViewGroupBox.Controls.Add(this.FocusFar3Button); this.LiveViewGroupBox.Controls.Add(this.FocusFar3Button);
this.LiveViewGroupBox.Controls.Add(this.FocusFar2Button); this.LiveViewGroupBox.Controls.Add(this.FocusFar2Button);
this.LiveViewGroupBox.Controls.Add(this.FocusFar1Button); this.LiveViewGroupBox.Controls.Add(this.FocusFar1Button);
...@@ -367,14 +173,14 @@ ...@@ -367,14 +173,14 @@
this.LiveViewGroupBox.Controls.Add(this.FocusNear2Button); this.LiveViewGroupBox.Controls.Add(this.FocusNear2Button);
this.LiveViewGroupBox.Controls.Add(this.FocusNear3Button); this.LiveViewGroupBox.Controls.Add(this.FocusNear3Button);
this.LiveViewGroupBox.Controls.Add(this.LiveViewPicBox); this.LiveViewGroupBox.Controls.Add(this.LiveViewPicBox);
this.LiveViewGroupBox.Controls.Add(this.LiveViewButton); this.LiveViewGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.LiveViewGroupBox.Enabled = false; this.LiveViewGroupBox.Enabled = false;
this.LiveViewGroupBox.Location = new System.Drawing.Point(12, 163); this.LiveViewGroupBox.Location = new System.Drawing.Point(0, 109);
this.LiveViewGroupBox.Name = "LiveViewGroupBox"; this.LiveViewGroupBox.Name = "LiveViewGroupBox";
this.LiveViewGroupBox.Size = new System.Drawing.Size(548, 379); this.LiveViewGroupBox.Size = new System.Drawing.Size(572, 445);
this.LiveViewGroupBox.TabIndex = 16; this.LiveViewGroupBox.TabIndex = 16;
this.LiveViewGroupBox.TabStop = false; this.LiveViewGroupBox.TabStop = false;
this.LiveViewGroupBox.Text = "LiveView"; this.LiveViewGroupBox.Text = "实时预览";
// //
// FocusFar2Button // FocusFar2Button
// //
...@@ -395,77 +201,43 @@ ...@@ -395,77 +201,43 @@
this.LiveViewPicBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.LiveViewPicBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.LiveViewPicBox.Location = new System.Drawing.Point(10, 47); this.LiveViewPicBox.Location = new System.Drawing.Point(10, 47);
this.LiveViewPicBox.Name = "LiveViewPicBox"; this.LiveViewPicBox.Name = "LiveViewPicBox";
this.LiveViewPicBox.Size = new System.Drawing.Size(524, 322); this.LiveViewPicBox.Size = new System.Drawing.Size(548, 388);
this.LiveViewPicBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.LiveViewPicBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.LiveViewPicBox.TabIndex = 1; this.LiveViewPicBox.TabIndex = 1;
this.LiveViewPicBox.TabStop = false; this.LiveViewPicBox.TabStop = false;
this.LiveViewPicBox.SizeChanged += new System.EventHandler(this.LiveViewPicBox_SizeChanged); this.LiveViewPicBox.SizeChanged += new System.EventHandler(this.LiveViewPicBox_SizeChanged);
// //
// TvCoBox
//
this.TvCoBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.TvCoBox.FormattingEnabled = true;
this.TvCoBox.Location = new System.Drawing.Point(6, 42);
this.TvCoBox.Name = "TvCoBox";
this.TvCoBox.Size = new System.Drawing.Size(94, 20);
this.TvCoBox.TabIndex = 0;
this.TvCoBox.SelectedIndexChanged += new System.EventHandler(this.TvCoBox_SelectedIndexChanged);
//
// AvCoBox
//
this.AvCoBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.AvCoBox.FormattingEnabled = true;
this.AvCoBox.Location = new System.Drawing.Point(6, 18);
this.AvCoBox.Name = "AvCoBox";
this.AvCoBox.Size = new System.Drawing.Size(94, 20);
this.AvCoBox.TabIndex = 0;
this.AvCoBox.SelectedIndexChanged += new System.EventHandler(this.AvCoBox_SelectedIndexChanged);
//
// SettingsGroupBox // SettingsGroupBox
// //
this.SettingsGroupBox.Controls.Add(this.MainProgressBar); this.SettingsGroupBox.Controls.Add(this.RefreshButton);
this.SettingsGroupBox.Controls.Add(this.SavePathTextBox); this.SettingsGroupBox.Controls.Add(this.CameraListBox);
this.SettingsGroupBox.Controls.Add(this.BrowseButton); this.SettingsGroupBox.Controls.Add(this.SessionButton);
this.SettingsGroupBox.Controls.Add(this.SaveToGroupBox);
this.SettingsGroupBox.Controls.Add(this.label4);
this.SettingsGroupBox.Controls.Add(this.label3);
this.SettingsGroupBox.Controls.Add(this.label2);
this.SettingsGroupBox.Controls.Add(this.label1);
this.SettingsGroupBox.Controls.Add(this.TakePhotoButton); this.SettingsGroupBox.Controls.Add(this.TakePhotoButton);
this.SettingsGroupBox.Controls.Add(this.BulbUpDo); this.SettingsGroupBox.Controls.Add(this.LiveViewButton);
this.SettingsGroupBox.Controls.Add(this.ISOCoBox); this.SettingsGroupBox.Dock = System.Windows.Forms.DockStyle.Top;
this.SettingsGroupBox.Controls.Add(this.TvCoBox);
this.SettingsGroupBox.Controls.Add(this.AvCoBox);
this.SettingsGroupBox.Enabled = false; this.SettingsGroupBox.Enabled = false;
this.SettingsGroupBox.Location = new System.Drawing.Point(153, 12); this.SettingsGroupBox.Location = new System.Drawing.Point(0, 0);
this.SettingsGroupBox.MinimumSize = new System.Drawing.Size(407, 146); this.SettingsGroupBox.MinimumSize = new System.Drawing.Size(407, 0);
this.SettingsGroupBox.Name = "SettingsGroupBox"; this.SettingsGroupBox.Name = "SettingsGroupBox";
this.SettingsGroupBox.Size = new System.Drawing.Size(407, 146); this.SettingsGroupBox.Size = new System.Drawing.Size(572, 109);
this.SettingsGroupBox.TabIndex = 17; this.SettingsGroupBox.TabIndex = 17;
this.SettingsGroupBox.TabStop = false; this.SettingsGroupBox.TabStop = false;
this.SettingsGroupBox.Text = "Settings"; this.SettingsGroupBox.Text = "设置";
// //
// CanonForm // CanonForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(572, 554); this.ClientSize = new System.Drawing.Size(572, 554);
this.Controls.Add(this.InitGroupBox);
this.Controls.Add(this.LiveViewGroupBox); this.Controls.Add(this.LiveViewGroupBox);
this.Controls.Add(this.SettingsGroupBox); this.Controls.Add(this.SettingsGroupBox);
this.Name = "CanonForm"; this.Name = "CanonForm";
this.Text = "Canon"; this.Text = "Canon";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.CanonForm_FormClosing); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.CanonForm_FormClosing);
this.Load += new System.EventHandler(this.CanonForm_Load); this.Load += new System.EventHandler(this.CanonForm_Load);
this.SaveToGroupBox.ResumeLayout(false);
this.SaveToGroupBox.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.BulbUpDo)).EndInit();
this.InitGroupBox.ResumeLayout(false);
this.InitGroupBox.PerformLayout();
this.LiveViewGroupBox.ResumeLayout(false); this.LiveViewGroupBox.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.LiveViewPicBox)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.LiveViewPicBox)).EndInit();
this.SettingsGroupBox.ResumeLayout(false); this.SettingsGroupBox.ResumeLayout(false);
this.SettingsGroupBox.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
...@@ -474,35 +246,17 @@ ...@@ -474,35 +246,17 @@
private System.Windows.Forms.Button FocusFar1Button; private System.Windows.Forms.Button FocusFar1Button;
private System.Windows.Forms.Button FocusNear2Button; private System.Windows.Forms.Button FocusNear2Button;
private System.Windows.Forms.ProgressBar MainProgressBar;
private System.Windows.Forms.TextBox SavePathTextBox;
private System.Windows.Forms.Button BrowseButton;
private System.Windows.Forms.GroupBox SaveToGroupBox;
private System.Windows.Forms.RadioButton STBothRdButton;
private System.Windows.Forms.RadioButton STComputerRdButton;
private System.Windows.Forms.RadioButton STCameraRdButton;
private System.Windows.Forms.Button FocusNear1Button; private System.Windows.Forms.Button FocusNear1Button;
private System.Windows.Forms.Button FocusNear3Button; private System.Windows.Forms.Button FocusNear3Button;
private System.Windows.Forms.Button LiveViewButton; private System.Windows.Forms.Button LiveViewButton;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button TakePhotoButton; private System.Windows.Forms.Button TakePhotoButton;
private System.Windows.Forms.NumericUpDown BulbUpDo;
private System.Windows.Forms.Button RefreshButton; private System.Windows.Forms.Button RefreshButton;
private System.Windows.Forms.ListBox CameraListBox; private System.Windows.Forms.ListBox CameraListBox;
private System.Windows.Forms.Label SessionLabel;
private System.Windows.Forms.GroupBox InitGroupBox;
private System.Windows.Forms.Button SessionButton; private System.Windows.Forms.Button SessionButton;
private System.Windows.Forms.FolderBrowserDialog SaveFolderBrowser;
private System.Windows.Forms.ComboBox ISOCoBox;
private System.Windows.Forms.Button FocusFar3Button; private System.Windows.Forms.Button FocusFar3Button;
private System.Windows.Forms.GroupBox LiveViewGroupBox; private System.Windows.Forms.GroupBox LiveViewGroupBox;
private System.Windows.Forms.Button FocusFar2Button; private System.Windows.Forms.Button FocusFar2Button;
private System.Windows.Forms.PictureBox LiveViewPicBox; private System.Windows.Forms.PictureBox LiveViewPicBox;
private System.Windows.Forms.ComboBox TvCoBox;
private System.Windows.Forms.ComboBox AvCoBox;
private System.Windows.Forms.GroupBox SettingsGroupBox; private System.Windows.Forms.GroupBox SettingsGroupBox;
} }
} }
......
...@@ -43,8 +43,8 @@ namespace Kivii.Canon ...@@ -43,8 +43,8 @@ namespace Kivii.Canon
APIHandler.CameraAdded += APIHandler_CameraAdded; APIHandler.CameraAdded += APIHandler_CameraAdded;
ErrorHandler.SevereErrorHappened += ErrorHandler_SevereErrorHappened; ErrorHandler.SevereErrorHappened += ErrorHandler_SevereErrorHappened;
ErrorHandler.NonSevereErrorHappened += ErrorHandler_NonSevereErrorHappened; ErrorHandler.NonSevereErrorHappened += ErrorHandler_NonSevereErrorHappened;
SavePathTextBox.Text = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures), "RemotePhoto"); //SavePathTextBox.Text = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures), "RemotePhoto");
SaveFolderBrowser.Description = "Save Images To..."; //SaveFolderBrowser.Description = "Save Images To...";
LiveViewPicBox.Paint += LiveViewPicBox_Paint; LiveViewPicBox.Paint += LiveViewPicBox_Paint;
LVBw = LiveViewPicBox.Width; LVBw = LiveViewPicBox.Width;
LVBh = LiveViewPicBox.Height; LVBh = LiveViewPicBox.Height;
...@@ -87,8 +87,8 @@ namespace Kivii.Canon ...@@ -87,8 +87,8 @@ namespace Kivii.Canon
private void MainCamera_ProgressChanged(object sender, int progress) private void MainCamera_ProgressChanged(object sender, int progress)
{ {
try { Invoke((Action)delegate { MainProgressBar.Value = progress; }); } //try { Invoke((Action)delegate { MainProgressBar.Value = progress; }); }
catch (Exception ex) { ReportError(ex.Message, false); } //catch (Exception ex) { ReportError(ex.Message, false); }
} }
private void MainCamera_LiveViewUpdated(Camera sender, Stream img) private void MainCamera_LiveViewUpdated(Camera sender, Stream img)
...@@ -114,7 +114,7 @@ namespace Kivii.Canon ...@@ -114,7 +114,7 @@ namespace Kivii.Canon
var steam = sender.DownloadFile(Info); var steam = sender.DownloadFile(Info);
//Invoke((Action)delegate { dir = SavePathTextBox.Text; }); //Invoke((Action)delegate { dir = SavePathTextBox.Text; });
//sender.DownloadFile(Info, dir); //sender.DownloadFile(Info, dir);
Invoke((Action)delegate { MainProgressBar.Value = 0; }); //Invoke((Action)delegate { MainProgressBar.Value = 0; });
if (DownloadCompletely != null) if (DownloadCompletely != null)
{ {
DownloadCompletely(steam, EventArgs.Empty); DownloadCompletely(steam, EventArgs.Empty);
...@@ -173,8 +173,9 @@ namespace Kivii.Canon ...@@ -173,8 +173,9 @@ namespace Kivii.Canon
{ {
try try
{ {
if ((string)TvCoBox.SelectedItem == "Bulb") MainCamera.TakePhotoBulb((int)BulbUpDo.Value); MainCamera.TakePhotoShutterAsync();
else MainCamera.TakePhotoShutterAsync(); //if ((string)TvCoBox.SelectedItem == "Bulb") MainCamera.TakePhotoBulb((int)BulbUpDo.Value);
//else MainCamera.TakePhotoShutterAsync();
//if ((string)TvCoBox.SelectedItem == "Bulb") MainCamera.TakePhotoBulbAsync((int)BulbUpDo.Value); //if ((string)TvCoBox.SelectedItem == "Bulb") MainCamera.TakePhotoBulbAsync((int)BulbUpDo.Value);
//else MainCamera.TakePhotoShutterAsync(); //else MainCamera.TakePhotoShutterAsync();
} }
...@@ -183,47 +184,47 @@ namespace Kivii.Canon ...@@ -183,47 +184,47 @@ namespace Kivii.Canon
private void BrowseButton_Click(object sender, EventArgs e) private void BrowseButton_Click(object sender, EventArgs e)
{ {
try //try
{ //{
if (Directory.Exists(SavePathTextBox.Text)) SaveFolderBrowser.SelectedPath = SavePathTextBox.Text; // if (Directory.Exists(SavePathTextBox.Text)) SaveFolderBrowser.SelectedPath = SavePathTextBox.Text;
if (SaveFolderBrowser.ShowDialog() == DialogResult.OK) // if (SaveFolderBrowser.ShowDialog() == DialogResult.OK)
{ // {
SavePathTextBox.Text = SaveFolderBrowser.SelectedPath; // SavePathTextBox.Text = SaveFolderBrowser.SelectedPath;
} // }
} //}
catch (Exception ex) { ReportError(ex.Message, false); } //catch (Exception ex) { ReportError(ex.Message, false); }
} }
private void AvCoBox_SelectedIndexChanged(object sender, EventArgs e) private void AvCoBox_SelectedIndexChanged(object sender, EventArgs e)
{ {
try //try
{ //{
if (AvCoBox.SelectedIndex < 0) return; // if (AvCoBox.SelectedIndex < 0) return;
MainCamera.SetSetting(PropertyID.Av, AvValues.GetValue((string)AvCoBox.SelectedItem).IntValue); // MainCamera.SetSetting(PropertyID.Av, AvValues.GetValue((string)AvCoBox.SelectedItem).IntValue);
} //}
catch (Exception ex) { ReportError(ex.Message, false); } //catch (Exception ex) { ReportError(ex.Message, false); }
} }
private void TvCoBox_SelectedIndexChanged(object sender, EventArgs e) private void TvCoBox_SelectedIndexChanged(object sender, EventArgs e)
{ {
try //try
{ //{
if (TvCoBox.SelectedIndex < 0) return; // if (TvCoBox.SelectedIndex < 0) return;
MainCamera.SetSetting(PropertyID.Tv, TvValues.GetValue((string)TvCoBox.SelectedItem).IntValue); // MainCamera.SetSetting(PropertyID.Tv, TvValues.GetValue((string)TvCoBox.SelectedItem).IntValue);
BulbUpDo.Enabled = (string)TvCoBox.SelectedItem == "Bulb"; // BulbUpDo.Enabled = (string)TvCoBox.SelectedItem == "Bulb";
} //}
catch (Exception ex) { ReportError(ex.Message, false); } //catch (Exception ex) { ReportError(ex.Message, false); }
} }
private void ISOCoBox_SelectedIndexChanged(object sender, EventArgs e) private void ISOCoBox_SelectedIndexChanged(object sender, EventArgs e)
{ {
try //try
{ //{
if (ISOCoBox.SelectedIndex < 0) return; // if (ISOCoBox.SelectedIndex < 0) return;
MainCamera.SetSetting(PropertyID.ISO, ISOValues.GetValue((string)ISOCoBox.SelectedItem).IntValue); // MainCamera.SetSetting(PropertyID.ISO, ISOValues.GetValue((string)ISOCoBox.SelectedItem).IntValue);
} //}
catch (Exception ex) { ReportError(ex.Message, false); } //catch (Exception ex) { ReportError(ex.Message, false); }
} }
private void SaveToRdButton_CheckedChanged(object sender, EventArgs e) private void SaveToRdButton_CheckedChanged(object sender, EventArgs e)
...@@ -232,21 +233,22 @@ namespace Kivii.Canon ...@@ -232,21 +233,22 @@ namespace Kivii.Canon
{ {
if (IsInit) if (IsInit)
{ {
if (STCameraRdButton.Checked) MainCamera.SetSetting(PropertyID.SaveTo, (int)SaveTo.Host);
{ MainCamera.SetCapacity(4096, int.MaxValue);
MainCamera.SetSetting(PropertyID.SaveTo, (int)SaveTo.Camera); //if (STCameraRdButton.Checked)
BrowseButton.Enabled = false; //{
SavePathTextBox.Enabled = false; // MainCamera.SetSetting(PropertyID.SaveTo, (int)SaveTo.Camera);
} // BrowseButton.Enabled = false;
else // SavePathTextBox.Enabled = false;
{ //}
if (STComputerRdButton.Checked) MainCamera.SetSetting(PropertyID.SaveTo, (int)SaveTo.Host); //else
else if (STBothRdButton.Checked) MainCamera.SetSetting(PropertyID.SaveTo, (int)SaveTo.Both); //{
// if (STComputerRdButton.Checked) MainCamera.SetSetting(PropertyID.SaveTo, (int)SaveTo.Host);
MainCamera.SetCapacity(4096, int.MaxValue); // else if (STBothRdButton.Checked) MainCamera.SetSetting(PropertyID.SaveTo, (int)SaveTo.Both);
BrowseButton.Enabled = true; // MainCamera.SetCapacity(4096, int.MaxValue);
SavePathTextBox.Enabled = true; // BrowseButton.Enabled = true;
} // SavePathTextBox.Enabled = true;
//}
} }
} }
catch (Exception ex) { ReportError(ex.Message, false); } catch (Exception ex) { ReportError(ex.Message, false); }
...@@ -260,8 +262,8 @@ namespace Kivii.Canon ...@@ -260,8 +262,8 @@ namespace Kivii.Canon
{ {
try try
{ {
if (!MainCamera.IsLiveViewOn) { MainCamera.StartLiveView(); LiveViewButton.Text = "Stop LV"; } if (!MainCamera.IsLiveViewOn) { MainCamera.StartLiveView(); LiveViewButton.Text = "关闭实时预览"; }
else { MainCamera.StopLiveView(); LiveViewButton.Text = "Start LV"; } else { MainCamera.StopLiveView(); LiveViewButton.Text = "开启实时预览"; }
} }
catch (Exception ex) { ReportError(ex.Message, false); } catch (Exception ex) { ReportError(ex.Message, false); }
} }
...@@ -349,14 +351,14 @@ namespace Kivii.Canon ...@@ -349,14 +351,14 @@ namespace Kivii.Canon
private void CloseSession() private void CloseSession()
{ {
MainCamera.CloseSession(); MainCamera.CloseSession();
AvCoBox.Items.Clear(); //AvCoBox.Items.Clear();
TvCoBox.Items.Clear(); //TvCoBox.Items.Clear();
ISOCoBox.Items.Clear(); //ISOCoBox.Items.Clear();
SettingsGroupBox.Enabled = false; SettingsGroupBox.Enabled = false;
LiveViewGroupBox.Enabled = false; LiveViewGroupBox.Enabled = false;
SessionButton.Text = "Open Session"; SessionButton.Text = "连接相机";
SessionLabel.Text = "No open session"; //SessionLabel.Text = "No 连接相机";
LiveViewButton.Text = "Start LV"; LiveViewButton.Text = "开启实时预览";
} }
private void CanonForm_Load(object sender, EventArgs e) private void CanonForm_Load(object sender, EventArgs e)
...@@ -393,17 +395,17 @@ namespace Kivii.Canon ...@@ -393,17 +395,17 @@ namespace Kivii.Canon
MainCamera.StateChanged += MainCamera_StateChanged; MainCamera.StateChanged += MainCamera_StateChanged;
MainCamera.DownloadReady += MainCamera_DownloadReady; MainCamera.DownloadReady += MainCamera_DownloadReady;
SessionButton.Text = "Close Session"; SessionButton.Text = "连接相机";
SessionLabel.Text = MainCamera.DeviceName; //SessionLabel.Text = MainCamera.DeviceName;
AvList = MainCamera.GetSettingsList(PropertyID.Av); //AvList = MainCamera.GetSettingsList(PropertyID.Av);
TvList = MainCamera.GetSettingsList(PropertyID.Tv); //TvList = MainCamera.GetSettingsList(PropertyID.Tv);
ISOList = MainCamera.GetSettingsList(PropertyID.ISO); //ISOList = MainCamera.GetSettingsList(PropertyID.ISO);
foreach (var Av in AvList) AvCoBox.Items.Add(Av.StringValue); //foreach (var Av in AvList) AvCoBox.Items.Add(Av.StringValue);
foreach (var Tv in TvList) TvCoBox.Items.Add(Tv.StringValue); //foreach (var Tv in TvList) TvCoBox.Items.Add(Tv.StringValue);
foreach (var ISO in ISOList) ISOCoBox.Items.Add(ISO.StringValue); //foreach (var ISO in ISOList) ISOCoBox.Items.Add(ISO.StringValue);
AvCoBox.SelectedIndex = AvCoBox.Items.IndexOf(AvValues.GetValue(MainCamera.GetInt32Setting(PropertyID.Av)).StringValue); //AvCoBox.SelectedIndex = AvCoBox.Items.IndexOf(AvValues.GetValue(MainCamera.GetInt32Setting(PropertyID.Av)).StringValue);
TvCoBox.SelectedIndex = TvCoBox.Items.IndexOf(TvValues.GetValue(MainCamera.GetInt32Setting(PropertyID.Tv)).StringValue); //TvCoBox.SelectedIndex = TvCoBox.Items.IndexOf(TvValues.GetValue(MainCamera.GetInt32Setting(PropertyID.Tv)).StringValue);
ISOCoBox.SelectedIndex = ISOCoBox.Items.IndexOf(ISOValues.GetValue(MainCamera.GetInt32Setting(PropertyID.ISO)).StringValue); //ISOCoBox.SelectedIndex = ISOCoBox.Items.IndexOf(ISOValues.GetValue(MainCamera.GetInt32Setting(PropertyID.ISO)).StringValue);
SettingsGroupBox.Enabled = true; SettingsGroupBox.Enabled = true;
LiveViewGroupBox.Enabled = true; LiveViewGroupBox.Enabled = true;
SaveToRdButton_CheckedChanged(null, null); SaveToRdButton_CheckedChanged(null, null);
...@@ -429,7 +431,7 @@ namespace Kivii.Canon ...@@ -429,7 +431,7 @@ namespace Kivii.Canon
else else
{ {
SettingsGroupBox.Enabled = enable; SettingsGroupBox.Enabled = enable;
InitGroupBox.Enabled = enable; //InitGroupBox.Enabled = enable;
LiveViewGroupBox.Enabled = enable; LiveViewGroupBox.Enabled = enable;
} }
} }
......
...@@ -117,7 +117,4 @@ ...@@ -117,7 +117,4 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="SaveFolderBrowser.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root> </root>
\ No newline at end of file
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