Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
GC_Branch
Project
Project
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
周磊
GC_Branch
Commits
ccb3e4a3
Commit
ccb3e4a3
authored
Jun 06, 2018
by
wangjunqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复com不定和数字键盘bug
parent
0f79d20c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
20 deletions
+62
-20
LandIn.cs
GcDevicePc/CK_UI/LandIn.cs
+16
-3
MethodBase.Designer.cs
GcDevicePc/ConfigDlg/MethodBase.Designer.cs
+1
-1
PCBuffer.cs
GcDevicePc/GCBuffer/PCBuffer.cs
+17
-0
MDIBase.cs
GcDevicePc/MDIBase.cs
+28
-16
No files found.
GcDevicePc/CK_UI/LandIn.cs
View file @
ccb3e4a3
...
@@ -31,15 +31,28 @@ namespace GcDevicePc.CK_UI
...
@@ -31,15 +31,28 @@ namespace GcDevicePc.CK_UI
{
{
Island
=
false
;
Island
=
false
;
}
}
if
(
form
!=
null
)
if
(
form
!=
null
)
{
{
form
.
Dispose
();
form
.
Close
();
if
(!
form
.
IsDisposed
)
{
form
.
Dispose
();
}
}
}
}
}
private
void
button2_Click
(
object
sender
,
EventArgs
e
)
//放弃
private
void
button2_Click
(
object
sender
,
EventArgs
e
)
//放弃
{
{
Island
=
false
;
Island
=
false
;
if
(
form
!=
null
)
{
form
.
Close
();
if
(!
form
.
IsDisposed
)
{
form
.
Dispose
();
}
}
}
}
private
void
LandIn_Load
(
object
sender
,
EventArgs
e
)
private
void
LandIn_Load
(
object
sender
,
EventArgs
e
)
...
@@ -50,7 +63,7 @@ namespace GcDevicePc.CK_UI
...
@@ -50,7 +63,7 @@ namespace GcDevicePc.CK_UI
private
void
textBox2_Click
(
object
sender
,
EventArgs
e
)
private
void
textBox2_Click
(
object
sender
,
EventArgs
e
)
{
{
form
=
CKVocAnalyzer
.
NumForm
.
GetInstance
((
TextBox
)
sender
);
// new CKVocAnalyzer.NumForm((TextBox)sender);
form
=
CKVocAnalyzer
.
NumForm
.
GetInstance
((
TextBox
)
sender
);
// new CKVocAnalyzer.NumForm((TextBox)sender);
form
.
Icon
=
this
.
Icon
;
form
.
Show
();
form
.
Show
();
}
}
}
}
...
...
GcDevicePc/ConfigDlg/MethodBase.Designer.cs
View file @
ccb3e4a3
...
@@ -31,7 +31,7 @@ namespace GcDevicePc.ConfigDlg
...
@@ -31,7 +31,7 @@ namespace GcDevicePc.ConfigDlg
{
{
this
.
components
=
new
System
.
ComponentModel
.
Container
();
this
.
components
=
new
System
.
ComponentModel
.
Container
();
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
MethodBase
));
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
MethodBase
));
this
.
methodimgList
=
new
System
.
Windows
.
Forms
.
ImageList
(
this
.
components
);
this
.
methodimgList
=
new
System
.
Windows
.
Forms
.
ImageList
();
this
.
Methodtitle
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
Methodtitle
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
mmixbtn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
mmixbtn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
mclose
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
mclose
=
new
System
.
Windows
.
Forms
.
Button
();
...
...
GcDevicePc/GCBuffer/PCBuffer.cs
View file @
ccb3e4a3
...
@@ -47,7 +47,12 @@ namespace GcDevicePc.GCBuffer
...
@@ -47,7 +47,12 @@ namespace GcDevicePc.GCBuffer
public
string
ip
;
public
string
ip
;
public
string
mask
;
public
string
mask
;
public
string
gw
;
public
string
gw
;
}
public
struct
OutPutInfo
{
public
byte
port
;
}
}
public
struct
ThreadInfo
public
struct
ThreadInfo
...
@@ -62,6 +67,8 @@ namespace GcDevicePc.GCBuffer
...
@@ -62,6 +67,8 @@ namespace GcDevicePc.GCBuffer
public
WorkInfo
pcworkinfo
;
public
WorkInfo
pcworkinfo
;
public
ModuleInfo
moduleinfo
;
public
ModuleInfo
moduleinfo
;
public
ThreadInfo
pcthreadinfo
;
public
ThreadInfo
pcthreadinfo
;
public
OutPutInfo
outputinfo
;
}
}
public
PCInfo
gcpcinfo
=
new
PCInfo
();
public
PCInfo
gcpcinfo
=
new
PCInfo
();
...
@@ -93,6 +100,8 @@ namespace GcDevicePc.GCBuffer
...
@@ -93,6 +100,8 @@ namespace GcDevicePc.GCBuffer
gcpcinfo
.
moduleinfo
.
ip
=
""
;
gcpcinfo
.
moduleinfo
.
ip
=
""
;
gcpcinfo
.
outputinfo
.
port
=
0
;
string
file
=
System
.
Windows
.
Forms
.
Application
.
StartupPath
+
"\\startup.ini"
;
string
file
=
System
.
Windows
.
Forms
.
Application
.
StartupPath
+
"\\startup.ini"
;
...
@@ -106,6 +115,9 @@ namespace GcDevicePc.GCBuffer
...
@@ -106,6 +115,9 @@ namespace GcDevicePc.GCBuffer
string
wtd624x_mask
=
test
.
INIGetStringValue
(
"WTD624X"
,
"MASK"
,
null
);
string
wtd624x_mask
=
test
.
INIGetStringValue
(
"WTD624X"
,
"MASK"
,
null
);
string
wtd624x_gw
=
test
.
INIGetStringValue
(
"WTD624X"
,
"GW"
,
null
);
string
wtd624x_gw
=
test
.
INIGetStringValue
(
"WTD624X"
,
"GW"
,
null
);
string
gc485
=
test
.
INIGetStringValue
(
"GC485"
,
"COM"
,
null
);
//string senddata = test.INIGetStringValue("StartUp", "SendData", null);
//string senddata = test.INIGetStringValue("StartUp", "SendData", null);
if
(
Convert
.
ToInt32
(
opensys
)
==
1
)
if
(
Convert
.
ToInt32
(
opensys
)
==
1
)
...
@@ -127,6 +139,11 @@ namespace GcDevicePc.GCBuffer
...
@@ -127,6 +139,11 @@ namespace GcDevicePc.GCBuffer
{
{
gcpcinfo
.
moduleinfo
.
gw
=
wtd624x_gw
;
gcpcinfo
.
moduleinfo
.
gw
=
wtd624x_gw
;
}
}
if
(!
String
.
IsNullOrEmpty
(
gc485
))
{
gcpcinfo
.
outputinfo
.
port
=
Convert
.
ToByte
(
gc485
);
}
}
}
// gcpcinfo.pcworkinfo.RunType = 0; //运行类型 0 打开运行 1 智能运行 2 批处理
// gcpcinfo.pcworkinfo.RunType = 0; //运行类型 0 打开运行 1 智能运行 2 批处理
...
...
GcDevicePc/MDIBase.cs
View file @
ccb3e4a3
...
@@ -550,8 +550,12 @@ namespace GcDevicePc
...
@@ -550,8 +550,12 @@ namespace GcDevicePc
Slavetest
=
new
GCModbusSlave
();
Slavetest
=
new
GCModbusSlave
();
Slavetest
.
CModbusSlaveInit
(
1
,
2
,
3
,
5
);
Slavetest
.
CModbusSlaveInit
(
1
,
2
,
3
,
5
);
Slave485test
=
new
GCModbusSlave485
(
1
,
9600
);
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
outputinfo
.
port
!=
0
)
Slave485test
.
CModbusSlave485Init
(
1
,
2
,
3
,
5
);
{
Slave485test
=
new
GCModbusSlave485
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
outputinfo
.
port
,
9600
);
Slave485test
.
CModbusSlave485Init
(
1
,
2
,
3
,
5
);
}
}
}
catch
(
Exception
e
)
catch
(
Exception
e
)
...
@@ -1016,18 +1020,22 @@ namespace GcDevicePc
...
@@ -1016,18 +1020,22 @@ namespace GcDevicePc
}
}
}
}
count
=
0
;
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
outputinfo
.
port
!=
0
)
ret
=
Slave485test
.
CModbusSlave485Close
();
while
(
ret
!=
0
)
{
{
count
++
;
count
=
0
;
ret
=
Slave485test
.
CModbusSlave485Close
();
ret
=
Slave485test
.
CModbusSlave485Close
();
Thread
.
Sleep
(
100
);
while
(
ret
!=
0
)
if
(
count
>
3
)
{
{
break
;
count
++;
ret
=
Slave485test
.
CModbusSlave485Close
();
Thread
.
Sleep
(
100
);
if
(
count
>
3
)
{
break
;
}
}
}
}
}
}
}
...
@@ -1084,18 +1092,22 @@ namespace GcDevicePc
...
@@ -1084,18 +1092,22 @@ namespace GcDevicePc
}
}
}
}
count
=
0
;
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
outputinfo
.
port
!=
0
)
ret
=
Slave485test
.
CModbusSlave485Close
();
while
(
ret
!=
0
)
{
{
count
++
;
count
=
0
;
ret
=
Slave485test
.
CModbusSlave485Close
();
ret
=
Slave485test
.
CModbusSlave485Close
();
Thread
.
Sleep
(
100
);
while
(
ret
!=
0
)
if
(
count
>
3
)
{
{
break
;
count
++;
ret
=
Slave485test
.
CModbusSlave485Close
();
Thread
.
Sleep
(
100
);
if
(
count
>
3
)
{
break
;
}
}
}
}
}
}
}
...
...
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