Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
Kivii.Client.Canon.V4.5
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陶然
Kivii.Client.Canon.V4.5
Commits
6de5be6f
Commit
6de5be6f
authored
Jun 24, 2024
by
Neo Turing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
88b558be
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
CanonForm.Designer.cs
Src/CanonForm.Designer.cs
+1
-0
CanonForm.cs
Src/CanonForm.cs
+22
-3
No files found.
Src/CanonForm.Designer.cs
View file @
6de5be6f
...
@@ -456,6 +456,7 @@
...
@@ -456,6 +456,7 @@
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
.
SaveToGroupBox
.
ResumeLayout
(
false
);
this
.
SaveToGroupBox
.
ResumeLayout
(
false
);
this
.
SaveToGroupBox
.
PerformLayout
();
this
.
SaveToGroupBox
.
PerformLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
BulbUpDo
)).
EndInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
BulbUpDo
)).
EndInit
();
...
...
Src/CanonForm.cs
View file @
6de5be6f
...
@@ -7,6 +7,7 @@ using System.Drawing;
...
@@ -7,6 +7,7 @@ using System.Drawing;
using
System.IO
;
using
System.IO
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
using
System.Windows.Forms
;
...
@@ -59,6 +60,7 @@ namespace Kivii.Canon
...
@@ -59,6 +60,7 @@ namespace Kivii.Canon
try
try
{
{
IsInit
=
false
;
IsInit
=
false
;
MainCamera
.
CloseSession
();
MainCamera
?.
Dispose
();
MainCamera
?.
Dispose
();
APIHandler
?.
Dispose
();
APIHandler
?.
Dispose
();
}
}
...
@@ -116,8 +118,11 @@ namespace Kivii.Canon
...
@@ -116,8 +118,11 @@ namespace Kivii.Canon
var
task
=
Task
.
Run
(
async
delegate
var
task
=
Task
.
Run
(
async
delegate
{
{
var
filePath
=
$"
{
dir
}
\\
{
Info
.
FileName
}
"
;
var
filePath
=
$"
{
dir
}
\\
{
Info
.
FileName
}
"
;
await
Task
.
Delay
(
1500
);
await
Task
.
Delay
(
500
);
if
(!
File
.
Exists
(
filePath
))
return
;
if
(!
File
.
Exists
(
filePath
))
{
return
;
}
if
(
DownloadCompletely
!=
null
)
if
(
DownloadCompletely
!=
null
)
{
{
DownloadCompletely
(
filePath
,
EventArgs
.
Empty
);
DownloadCompletely
(
filePath
,
EventArgs
.
Empty
);
...
@@ -164,7 +169,7 @@ namespace Kivii.Canon
...
@@ -164,7 +169,7 @@ namespace Kivii.Canon
try
try
{
{
if
((
string
)
TvCoBox
.
SelectedItem
==
"Bulb"
)
MainCamera
.
TakePhotoBulb
((
int
)
BulbUpDo
.
Value
);
if
((
string
)
TvCoBox
.
SelectedItem
==
"Bulb"
)
MainCamera
.
TakePhotoBulb
((
int
)
BulbUpDo
.
Value
);
else
MainCamera
.
TakePhotoShutter
();
else
MainCamera
.
TakePhotoShutter
Async
();
//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();
}
}
...
@@ -349,6 +354,20 @@ namespace Kivii.Canon
...
@@ -349,6 +354,20 @@ namespace Kivii.Canon
LiveViewButton
.
Text
=
"Start LV"
;
LiveViewButton
.
Text
=
"Start LV"
;
}
}
private
void
CanonForm_Load
(
object
sender
,
EventArgs
e
)
{
if
(
CameraListBox
.
SelectedIndex
>=
0
)
{
SessionButton_Click
(
null
,
null
);
Thread
.
Sleep
(
1000
);
if
(
MainCamera
?.
SessionOpen
==
true
&&
MainCamera
?.
IsLiveViewOn
==
false
)
{
LiveViewButton_Click
(
null
,
null
);
}
}
}
private
void
RefreshCamera
()
private
void
RefreshCamera
()
{
{
CameraListBox
.
Items
.
Clear
();
CameraListBox
.
Items
.
Clear
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment