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
5b76b77c
Commit
5b76b77c
authored
Jun 01, 2018
by
wangjunqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改部分代码
parent
7797ef44
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
23 additions
and
29 deletions
+23
-29
AdjustFrom.cs
GcDevicePc/CK_UI/AdjustFrom.cs
+1
-1
HistChartForm.cs
GcDevicePc/CK_UI/HistChartForm.cs
+1
-1
WaveTotalForm.cs
GcDevicePc/CK_UI/WaveTotalForm.cs
+1
-1
Formdebug.cs
GcDevicePc/Formdebug.cs
+2
-1
MDIBase.cs
GcDevicePc/MDIBase.cs
+5
-9
MainBase.cs
GcDevicePc/MainBase.cs
+1
-1
WTD424XOutput.cs
GcDevicePc/Module/WTD424XOutput.cs
+6
-2
Program.cs
GcDevicePc/Program.cs
+0
-6
StartForm.cs
GcDevicePc/StartForm.cs
+1
-1
UserConfig.cs
GcDevicePc/UserConfig.cs
+4
-5
WaitForm.cs
GcDevicePc/WaitForm.cs
+1
-1
No files found.
GcDevicePc/CK_UI/AdjustFrom.cs
View file @
5b76b77c
...
@@ -27,7 +27,7 @@ namespace GcDevicePc
...
@@ -27,7 +27,7 @@ namespace GcDevicePc
this
.
Controls
.
Add
(
adjust
);
this
.
Controls
.
Add
(
adjust
);
}
}
public
void
Show
()
public
new
void
Show
()
{
{
base
.
Show
();
base
.
Show
();
if
(
adjust
!=
null
)
if
(
adjust
!=
null
)
...
...
GcDevicePc/CK_UI/HistChartForm.cs
View file @
5b76b77c
...
@@ -27,7 +27,7 @@ namespace GcDevicePc
...
@@ -27,7 +27,7 @@ namespace GcDevicePc
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
Controls
.
Add
(
adjust
);
this
.
Controls
.
Add
(
adjust
);
}
}
public
void
Show
()
public
new
void
Show
()
{
{
base
.
Show
();
base
.
Show
();
if
(
adjust
!=
null
)
if
(
adjust
!=
null
)
...
...
GcDevicePc/CK_UI/WaveTotalForm.cs
View file @
5b76b77c
...
@@ -28,7 +28,7 @@ namespace GcDevicePc
...
@@ -28,7 +28,7 @@ namespace GcDevicePc
}
}
public
void
Show
()
public
new
void
Show
()
{
{
base
.
Show
();
base
.
Show
();
if
(
total
!=
null
)
if
(
total
!=
null
)
...
...
GcDevicePc/Formdebug.cs
View file @
5b76b77c
...
@@ -8,6 +8,7 @@ using System.Text;
...
@@ -8,6 +8,7 @@ using System.Text;
using
System.Windows.Forms
;
using
System.Windows.Forms
;
using
WeifenLuo.WinFormsUI.Docking
;
using
WeifenLuo.WinFormsUI.Docking
;
using
GcDevicePc.CK_UI
;
using
GcDevicePc.CK_UI
;
using
GcDevicePc.Common
;
namespace
GcDevicePc
namespace
GcDevicePc
...
@@ -46,7 +47,7 @@ namespace GcDevicePc
...
@@ -46,7 +47,7 @@ namespace GcDevicePc
}
}
catch
(
Exception
e
)
catch
(
Exception
e
)
{
{
Log
.
Error
(
e
.
Message
);
}
}
}
}
}
}
...
...
GcDevicePc/MDIBase.cs
View file @
5b76b77c
...
@@ -14,7 +14,7 @@ namespace GcDevicePc
...
@@ -14,7 +14,7 @@ namespace GcDevicePc
{
{
public
partial
class
MDIBase
:
Form
public
partial
class
MDIBase
:
Form
{
{
private
int
childFormNumber
=
0
;
//
private int childFormNumber = 0;
private
static
FormUser
_userForm
;
//用户界面
private
static
FormUser
_userForm
;
//用户界面
private
static
Formdebug
_debugForm
;
//调试界面
private
static
Formdebug
_debugForm
;
//调试界面
...
@@ -1178,20 +1178,18 @@ namespace GcDevicePc
...
@@ -1178,20 +1178,18 @@ namespace GcDevicePc
/// <param name="runtablename">批处理文件名(带.ini)</param>
/// <param name="runtablename">批处理文件名(带.ini)</param>
private
void
RunTableOpt
(
String
folder
,
String
runtablename
)
private
void
RunTableOpt
(
String
folder
,
String
runtablename
)
{
{
bool
ret
=
false
;
//
bool ret = false;
RunTableHelper
runtable
=
new
RunTableHelper
(
folder
,
runtablename
);
RunTableHelper
runtable
=
new
RunTableHelper
(
folder
,
runtablename
);
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
{
{
string
lfilename
;
string
rfilename
;
FileServerClient
rtclient
=
new
FileServerClient
();
FileServerClient
rtclient
=
new
FileServerClient
();
rtclient
.
WtClientInit
(
globaldata
.
connection_ip
,
globaldata
.
fileserverport
);
rtclient
.
WtClientInit
(
globaldata
.
connection_ip
,
globaldata
.
fileserverport
);
rtclient
.
WtClientCopytoServer
(
"RunMethod.ini"
,
Path
.
Combine
(
folder
,
runtablename
),
globaldata
.
remoteFolder
+
"运行表\\"
);
rtclient
.
WtClientCopytoServer
(
"RunMethod.ini"
,
Path
.
Combine
(
folder
,
runtablename
),
globaldata
.
remoteFolder
+
"运行表\\"
);
SendPCCMD
(
false
);
SendPCCMD
(
false
);
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_RunTab
=
Path
.
Combine
(
folder
,
runtablename
);
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_RunTab
=
Path
.
Combine
(
folder
,
runtablename
);
ret
=
true
;
//
ret = true;
}
}
}
}
...
@@ -1203,13 +1201,11 @@ namespace GcDevicePc
...
@@ -1203,13 +1201,11 @@ namespace GcDevicePc
/// <param name="count">批处理运行次数</param>
/// <param name="count">批处理运行次数</param>
private
void
RunTableOptWithCount
(
String
folder
,
String
runtablename
,
ushort
count
)
private
void
RunTableOptWithCount
(
String
folder
,
String
runtablename
,
ushort
count
)
{
{
bool
ret
=
false
;
//
bool ret = false;
RunTableHelper
runtable
=
new
RunTableHelper
(
folder
,
runtablename
);
RunTableHelper
runtable
=
new
RunTableHelper
(
folder
,
runtablename
);
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
{
{
string
lfilename
;
string
rfilename
;
FileServerClient
rtclient
=
new
FileServerClient
();
FileServerClient
rtclient
=
new
FileServerClient
();
rtclient
.
WtClientInit
(
globaldata
.
connection_ip
,
globaldata
.
fileserverport
);
rtclient
.
WtClientInit
(
globaldata
.
connection_ip
,
globaldata
.
fileserverport
);
...
@@ -1217,7 +1213,7 @@ namespace GcDevicePc
...
@@ -1217,7 +1213,7 @@ namespace GcDevicePc
hmiopt
.
SetBatCount
(
count
);
hmiopt
.
SetBatCount
(
count
);
SendSTDCMD
();
SendSTDCMD
();
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_RunTab
=
Path
.
Combine
(
folder
,
runtablename
);
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_RunTab
=
Path
.
Combine
(
folder
,
runtablename
);
ret
=
true
;
//
ret = true;
}
}
}
}
...
...
GcDevicePc/MainBase.cs
View file @
5b76b77c
...
@@ -164,7 +164,7 @@ namespace GcDevicePc
...
@@ -164,7 +164,7 @@ namespace GcDevicePc
}
}
catch
(
Exception
e
)
catch
(
Exception
e
)
{
{
Log
.
Error
(
e
.
Message
);
}
}
}
}
...
...
GcDevicePc/Module/WTD424XOutput.cs
View file @
5b76b77c
...
@@ -81,8 +81,12 @@ namespace GcDevicePc.Module
...
@@ -81,8 +81,12 @@ namespace GcDevicePc.Module
public
int
UpdateData2
(
float
[]
data
)
public
int
UpdateData2
(
float
[]
data
)
{
{
UInt16
[]
buf
=
new
UInt16
[
4
]
{
0
,
0
,
0
,
0
};
UInt16
[]
buf
=
new
UInt16
[
4
]
{
0
,
0
,
0
,
0
};
GetMaVal
(
data
,
ref
buf
);
int
ret
=
1
;
int
ret
=
rtumodbus
.
WriteMultipleRegs
(
1
,
1
,
4
,
ref
buf
);
if
(
workflag
)
{
GetMaVal
(
data
,
ref
buf
);
ret
=
rtumodbus
.
WriteMultipleRegs
(
1
,
1
,
4
,
ref
buf
);
}
return
ret
;
return
ret
;
}
}
...
...
GcDevicePc/Program.cs
View file @
5b76b77c
using
System
;
using
System
;
using
System.Threading
;
using
System.Windows.Forms
;
using
System.Windows.Forms
;
using
System.Net.NetworkInformation
;
using
System.Net.Sockets
;
using
GcDevicePc.Common
;
using
GcDevicePc.ProThread
;
namespace
GcDevicePc
namespace
GcDevicePc
{
{
...
...
GcDevicePc/StartForm.cs
View file @
5b76b77c
...
@@ -17,7 +17,7 @@ namespace GcDevicePc
...
@@ -17,7 +17,7 @@ namespace GcDevicePc
private
String
_appInitInfo
=
"系统初始化开始"
;
private
String
_appInitInfo
=
"系统初始化开始"
;
private
int
_initSec
;
private
int
_initSec
;
private
int
_initStep
;
//
private int _initStep;
private
static
Thread
_tPreload
;
private
static
Thread
_tPreload
;
private
MainForm
_mMainForm
;
private
MainForm
_mMainForm
;
...
...
GcDevicePc/UserConfig.cs
View file @
5b76b77c
...
@@ -179,13 +179,12 @@ namespace GcDevicePc
...
@@ -179,13 +179,12 @@ namespace GcDevicePc
if
(
globaldata
.
DeviceList
.
Count
>
0
)
if
(
globaldata
.
DeviceList
.
Count
>
0
)
{
{
this
.
hmiip
.
Text
=
((
globaldata
.
DeviceInfo
)
globaldata
.
DeviceList
[
globaldata
.
DeviceList
.
Count
-
1
]).
IpAddr
;
this
.
hmiip
.
Text
=
((
globaldata
.
DeviceInfo
)
globaldata
.
DeviceList
[
0
]).
IpAddr
;
this
.
hmigw
.
Text
=
((
globaldata
.
DeviceInfo
)
globaldata
.
DeviceList
[
globaldata
.
DeviceList
.
Count
-
1
]).
Gateway
;
this
.
hmigw
.
Text
=
((
globaldata
.
DeviceInfo
)
globaldata
.
DeviceList
[
0
]).
Gateway
;
this
.
hminm
.
Text
=
((
globaldata
.
DeviceInfo
)
globaldata
.
DeviceList
[
globaldata
.
DeviceList
.
Count
-
1
]).
Netmask
;
this
.
hminm
.
Text
=
((
globaldata
.
DeviceInfo
)
globaldata
.
DeviceList
[
0
]).
Netmask
;
}
}
///获取本地的IP地址
///
try
try
{
{
ManagementClass
mc
=
new
ManagementClass
(
"Win32_NetworkAdapterConfiguration"
);
ManagementClass
mc
=
new
ManagementClass
(
"Win32_NetworkAdapterConfiguration"
);
...
...
GcDevicePc/WaitForm.cs
View file @
5b76b77c
...
@@ -32,7 +32,7 @@ namespace GcDevicePc
...
@@ -32,7 +32,7 @@ namespace GcDevicePc
void
backgroundWorker1_RunWorkerCompleted
(
object
sender
,
RunWorkerCompletedEventArgs
e
)
void
backgroundWorker1_RunWorkerCompleted
(
object
sender
,
RunWorkerCompletedEventArgs
e
)
{
{
this
.
Close
();
//执行完之后,直接关闭页面
this
.
Close
();
}
}
void
backgroundWorker1_ProgressChanged
(
object
sender
,
ProgressChangedEventArgs
e
)
void
backgroundWorker1_ProgressChanged
(
object
sender
,
ProgressChangedEventArgs
e
)
...
...
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