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
05093bee
Commit
05093bee
authored
May 10, 2018
by
wangjunqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除一些冗余文件,优化了启动界面
parent
5e1bfd33
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
410 additions
and
1732 deletions
+410
-1732
AppInit.cs
GcDevicePc/AppInit.cs
+102
-309
ConfigInfo.Designer.cs
GcDevicePc/ConfigInfo.Designer.cs
+3
-0
CreateConfig.Designer.cs
GcDevicePc/CreateConfig.Designer.cs
+2
-0
GcDevicePc.csproj
GcDevicePc/GcDevicePc.csproj
+0
-18
MDIBase.Designer.cs
GcDevicePc/MDIBase.Designer.cs
+77
-77
MDIBase.cs
GcDevicePc/MDIBase.cs
+3
-103
MainBase.cs
GcDevicePc/MainBase.cs
+2
-2
Program.cs
GcDevicePc/Program.cs
+1
-135
RunTables.Designer.cs
GcDevicePc/RunTables.Designer.cs
+25
-5
RunTables.cs
GcDevicePc/RunTables.cs
+1
-1
SendConfig.Designer.cs
GcDevicePc/SendConfig.Designer.cs
+2
-0
StartForm.Designer.cs
GcDevicePc/StartForm.Designer.cs
+71
-17
StartForm.cs
GcDevicePc/StartForm.cs
+113
-46
StartForm.resx
GcDevicePc/StartForm.resx
+4
-1
StartWin.Designer.cs
GcDevicePc/StartWin.Designer.cs
+0
-103
StartWin.cs
GcDevicePc/StartWin.cs
+0
-64
StartWin.resx
GcDevicePc/StartWin.resx
+0
-290
UpdateTest.Designer.cs
GcDevicePc/UpdateTest.Designer.cs
+0
-165
UpdateTest.cs
GcDevicePc/UpdateTest.cs
+0
-95
UpdateTest.resx
GcDevicePc/UpdateTest.resx
+0
-287
UserConfig.Designer.cs
GcDevicePc/UserConfig.Designer.cs
+1
-0
WaitForm.Designer.cs
GcDevicePc/WaitForm.Designer.cs
+1
-0
auxtool.Designer.cs
GcDevicePc/auxtool.Designer.cs
+2
-0
auxtool.cs
GcDevicePc/auxtool.cs
+0
-14
No files found.
GcDevicePc/AppInit.cs
View file @
05093bee
This diff is collapsed.
Click to expand it.
GcDevicePc/ConfigInfo.Designer.cs
View file @
05093bee
...
@@ -485,8 +485,11 @@
...
@@ -485,8 +485,11 @@
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
label2
);
this
.
Controls
.
Add
(
this
.
label2
);
this
.
Controls
.
Add
(
this
.
label1
);
this
.
Controls
.
Add
(
this
.
label1
);
this
.
FormBorderStyle
=
System
.
Windows
.
Forms
.
FormBorderStyle
.
FixedSingle
;
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
MaximizeBox
=
false
;
this
.
Name
=
"ConfigInfo"
;
this
.
Name
=
"ConfigInfo"
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
Text
=
"设备配置"
;
this
.
Text
=
"设备配置"
;
this
.
TopMost
=
true
;
this
.
TopMost
=
true
;
this
.
Load
+=
new
System
.
EventHandler
(
this
.
ConfigInfo_Load
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
ConfigInfo_Load
);
...
...
GcDevicePc/CreateConfig.Designer.cs
View file @
05093bee
...
@@ -1177,7 +1177,9 @@
...
@@ -1177,7 +1177,9 @@
this
.
Controls
.
Add
(
this
.
detectgroup
);
this
.
Controls
.
Add
(
this
.
detectgroup
);
this
.
Controls
.
Add
(
this
.
Ovengroup
);
this
.
Controls
.
Add
(
this
.
Ovengroup
);
this
.
Controls
.
Add
(
this
.
samplegroup
);
this
.
Controls
.
Add
(
this
.
samplegroup
);
this
.
FormBorderStyle
=
System
.
Windows
.
Forms
.
FormBorderStyle
.
FixedSingle
;
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
MaximizeBox
=
false
;
this
.
Name
=
"CreateConfig"
;
this
.
Name
=
"CreateConfig"
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
Text
=
"配置创建"
;
this
.
Text
=
"配置创建"
;
...
...
GcDevicePc/GcDevicePc.csproj
View file @
05093bee
...
@@ -481,24 +481,12 @@
...
@@ -481,24 +481,12 @@
<Compile
Include=
"StartForm.Designer.cs"
>
<Compile
Include=
"StartForm.Designer.cs"
>
<DependentUpon>
StartForm.cs
</DependentUpon>
<DependentUpon>
StartForm.cs
</DependentUpon>
</Compile>
</Compile>
<Compile
Include=
"StartWin.cs"
>
<SubType>
Form
</SubType>
</Compile>
<Compile
Include=
"StartWin.Designer.cs"
>
<DependentUpon>
StartWin.cs
</DependentUpon>
</Compile>
<Compile
Include=
"Test.cs"
>
<Compile
Include=
"Test.cs"
>
<SubType>
Form
</SubType>
<SubType>
Form
</SubType>
</Compile>
</Compile>
<Compile
Include=
"Test.Designer.cs"
>
<Compile
Include=
"Test.Designer.cs"
>
<DependentUpon>
Test.cs
</DependentUpon>
<DependentUpon>
Test.cs
</DependentUpon>
</Compile>
</Compile>
<Compile
Include=
"UpdateTest.cs"
>
<SubType>
Form
</SubType>
</Compile>
<Compile
Include=
"UpdateTest.Designer.cs"
>
<DependentUpon>
UpdateTest.cs
</DependentUpon>
</Compile>
<Compile
Include=
"UserConfig.cs"
>
<Compile
Include=
"UserConfig.cs"
>
<SubType>
Form
</SubType>
<SubType>
Form
</SubType>
</Compile>
</Compile>
...
@@ -672,15 +660,9 @@
...
@@ -672,15 +660,9 @@
<EmbeddedResource
Include=
"StartForm.resx"
>
<EmbeddedResource
Include=
"StartForm.resx"
>
<DependentUpon>
StartForm.cs
</DependentUpon>
<DependentUpon>
StartForm.cs
</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
<EmbeddedResource
Include=
"StartWin.resx"
>
<DependentUpon>
StartWin.cs
</DependentUpon>
</EmbeddedResource>
<EmbeddedResource
Include=
"Test.resx"
>
<EmbeddedResource
Include=
"Test.resx"
>
<DependentUpon>
Test.cs
</DependentUpon>
<DependentUpon>
Test.cs
</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
<EmbeddedResource
Include=
"UpdateTest.resx"
>
<DependentUpon>
UpdateTest.cs
</DependentUpon>
</EmbeddedResource>
<EmbeddedResource
Include=
"UserConfig.resx"
>
<EmbeddedResource
Include=
"UserConfig.resx"
>
<DependentUpon>
UserConfig.cs
</DependentUpon>
<DependentUpon>
UserConfig.cs
</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
...
...
GcDevicePc/MDIBase.Designer.cs
View file @
05093bee
This diff is collapsed.
Click to expand it.
GcDevicePc/MDIBase.cs
View file @
05093bee
...
@@ -149,94 +149,8 @@ namespace GcDevicePc
...
@@ -149,94 +149,8 @@ namespace GcDevicePc
//点火接口
//点火接口
_userForm
.
autofire
+=
new
Fireport
(
fireupopt
);
_userForm
.
autofire
+=
new
Fireport
(
fireupopt
);
}
/*private void ShowNewForm(object sender, EventArgs e)
{
Form childForm = new Form();
childForm.MdiParent = this;
childForm.Text = "窗口 " + childFormNumber++;
childForm.Show();
}
private void OpenFile(object sender, EventArgs e)
{
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
openFileDialog.Filter = "文本文件(*.txt)|*.txt|所有文件(*.*)|*.*";
if (openFileDialog.ShowDialog(this) == DialogResult.OK)
{
string FileName = openFileDialog.FileName;
}
}
private void SaveAsToolStripMenuItem_Click(object sender, EventArgs e)
{
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
saveFileDialog.Filter = "文本文件(*.txt)|*.txt|所有文件(*.*)|*.*";
if (saveFileDialog.ShowDialog(this) == DialogResult.OK)
{
string FileName = saveFileDialog.FileName;
}
}
private void ExitToolsStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
}
private void CutToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void CopyToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void PasteToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void ToolBarToolStripMenuItem_Click(object sender, EventArgs e)
{
// toolStrip.Visible = toolBarToolStripMenuItem.Checked;
}
private void StatusBarToolStripMenuItem_Click(object sender, EventArgs e)
{
// statusStrip.Visible = statusBarToolStripMenuItem.Checked;
}
private void CascadeToolStripMenuItem_Click(object sender, EventArgs e)
{
LayoutMdi(MdiLayout.Cascade);
}
}
private void TileVerticalToolStripMenuItem_Click(object sender, EventArgs e)
{
LayoutMdi(MdiLayout.TileVertical);
}
private void TileHorizontalToolStripMenuItem_Click(object sender, EventArgs e)
{
LayoutMdi(MdiLayout.TileHorizontal);
}
private void ArrangeIconsToolStripMenuItem_Click(object sender, EventArgs e)
{
LayoutMdi(MdiLayout.ArrangeIcons);
}
private void CloseAllToolStripMenuItem_Click(object sender, EventArgs e)
{
foreach (Form childForm in MdiChildren)
{
childForm.Close();
}
}*/
/// <summary>
/// <summary>
/// 判断是否要开启系统
/// 判断是否要开启系统
...
@@ -287,7 +201,7 @@ namespace GcDevicePc
...
@@ -287,7 +201,7 @@ namespace GcDevicePc
ParameterSettingMenu
.
Visible
=
true
;
ParameterSettingMenu
.
Visible
=
true
;
DebugMainMenu
.
Visible
=
true
;
DebugMainMenu
.
Visible
=
true
;
HmiStatus
.
Visible
=
true
;
HmiStatus
.
Visible
=
true
;
SettingSeparator
.
Visible
=
true
;
}
else
}
else
{
{
...
@@ -302,6 +216,7 @@ namespace GcDevicePc
...
@@ -302,6 +216,7 @@ namespace GcDevicePc
ParameterSettingMenu
.
Visible
=
false
;
ParameterSettingMenu
.
Visible
=
false
;
DebugMainMenu
.
Visible
=
false
;
DebugMainMenu
.
Visible
=
false
;
HmiStatus
.
Visible
=
false
;
HmiStatus
.
Visible
=
false
;
SettingSeparator
.
Visible
=
false
;
}
}
}
}
...
@@ -822,7 +737,7 @@ namespace GcDevicePc
...
@@ -822,7 +737,7 @@ namespace GcDevicePc
try
try
{
{
mainclient
.
WtClientInit
(
globaldata
.
connection_ip
,
globaldata
.
fileserverport
);
mainclient
.
WtClientInit
(
globaldata
.
connection_ip
,
globaldata
.
fileserverport
);
if
(!
System
.
IO
.
File
.
Exists
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_BATMethodName
))
if
(!
File
.
Exists
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_BATMethodName
))
{
{
getFileName
=
tmpFileName
.
Substring
(
tmpFileName
.
LastIndexOf
(
"\\"
)
+
1
);
getFileName
=
tmpFileName
.
Substring
(
tmpFileName
.
LastIndexOf
(
"\\"
)
+
1
);
ret
=
mainclient
.
WtClientCopyfromServer
(
getFileName
,
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_BATMethodName
,
globaldata
.
remoteFolder
+
"仪器方法\\"
);
ret
=
mainclient
.
WtClientCopyfromServer
(
getFileName
,
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_BATMethodName
,
globaldata
.
remoteFolder
+
"仪器方法\\"
);
...
@@ -1299,13 +1214,6 @@ namespace GcDevicePc
...
@@ -1299,13 +1214,6 @@ namespace GcDevicePc
FileServerClient
rtclient
=
new
FileServerClient
();
FileServerClient
rtclient
=
new
FileServerClient
();
rtclient
.
WtClientInit
(
globaldata
.
connection_ip
,
globaldata
.
fileserverport
);
rtclient
.
WtClientInit
(
globaldata
.
connection_ip
,
globaldata
.
fileserverport
);
//for (int i = 1; i < runtable._methodname.Count; i++)
//{
// rfilename = runtable._methodname[i];
// lfilename = Path.Combine(globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.MethodFolder, rfilename);
// rtclient.WtClientCopytoServer(rfilename, lfilename, globaldata.remoteFolder + "仪器方法\\");
// Thread.Sleep(200);
//}
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
);
...
@@ -1331,14 +1239,6 @@ namespace GcDevicePc
...
@@ -1331,14 +1239,6 @@ namespace GcDevicePc
FileServerClient
rtclient
=
new
FileServerClient
();
FileServerClient
rtclient
=
new
FileServerClient
();
rtclient
.
WtClientInit
(
globaldata
.
connection_ip
,
globaldata
.
fileserverport
);
rtclient
.
WtClientInit
(
globaldata
.
connection_ip
,
globaldata
.
fileserverport
);
//for (int i = 1; i < runtable._methodname.Count; i++)
//{
// rfilename = runtable._methodname[i];
// lfilename = Path.Combine(globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.MethodFolder, rfilename);
// rtclient.WtClientCopytoServer(rfilename, lfilename, globaldata.remoteFolder + "仪器方法\\");
// Thread.Sleep(200);
//}
rtclient
.
WtClientCopytoServer
(
"RunMethodStd.ini"
,
Path
.
Combine
(
folder
,
runtablename
),
globaldata
.
remoteFolder
+
"运行表\\"
);
rtclient
.
WtClientCopytoServer
(
"RunMethodStd.ini"
,
Path
.
Combine
(
folder
,
runtablename
),
globaldata
.
remoteFolder
+
"运行表\\"
);
hmiopt
.
SetBatCount
(
count
);
hmiopt
.
SetBatCount
(
count
);
SendSTDCMD
();
SendSTDCMD
();
...
...
GcDevicePc/MainBase.cs
View file @
05093bee
...
@@ -971,8 +971,8 @@ namespace GcDevicePc
...
@@ -971,8 +971,8 @@ namespace GcDevicePc
/// <param name="e"></param>
/// <param name="e"></param>
private
void
filetest_test
(
object
sender
,
EventArgs
e
)
private
void
filetest_test
(
object
sender
,
EventArgs
e
)
{
{
UpdateTest
filetest
=
new
UpdateTest
();
//
UpdateTest filetest = new UpdateTest();
filetest
.
Show
();
//
filetest.Show();
}
}
private
void
Load_Win
()
private
void
Load_Win
()
...
...
GcDevicePc/Program.cs
View file @
05093bee
...
@@ -11,128 +11,6 @@ namespace GcDevicePc
...
@@ -11,128 +11,6 @@ namespace GcDevicePc
{
{
static
class
Program
static
class
Program
{
{
private
static
void
Isnetworkok
()
{
String
localip
=
""
;
while
(
true
)
{
try
{
NetworkInterface
[]
nics
=
NetworkInterface
.
GetAllNetworkInterfaces
();
foreach
(
NetworkInterface
adapter
in
nics
)
{
// if (adapter.Name == "本地连接")
{
bool
pd1
=
(
adapter
.
NetworkInterfaceType
==
NetworkInterfaceType
.
Ethernet
||
adapter
.
NetworkInterfaceType
==
NetworkInterfaceType
.
Wireless80211
);
if
(
pd1
)
{
IPInterfaceProperties
ip
=
adapter
.
GetIPProperties
();
UnicastIPAddressInformationCollection
ipCollection
=
ip
.
UnicastAddresses
;
foreach
(
UnicastIPAddressInformation
ipadd
in
ipCollection
)
{
if
(
ipadd
.
Address
.
AddressFamily
==
AddressFamily
.
InterNetwork
)
localip
=
ipadd
.
Address
.
ToString
();
}
if
(
localip
!=
""
)
{
globaldata
.
StartNetwork
=
true
;
}
}
}
}
}
catch
(
Exception
e
)
{
Log
.
Error
(
e
.
Message
);
}
if
(
globaldata
.
OffLinkMode
||
globaldata
.
StartNetwork
)
{
break
;
}
Thread
.
Sleep
(
1000
);
}
}
static
public
bool
Ping
(
string
ip
)
{
Ping
p
;
PingOptions
options
;
PingReply
reply
;
string
data
;
int
timeout
;
try
{
p
=
new
Ping
();
options
=
new
PingOptions
();
options
.
DontFragment
=
true
;
data
=
"Test Data!"
;
byte
[]
buffer
=
System
.
Text
.
Encoding
.
ASCII
.
GetBytes
(
data
);
timeout
=
1000
;
reply
=
p
.
Send
(
ip
,
timeout
,
buffer
,
options
);
if
(
reply
.
Status
==
IPStatus
.
Success
)
{
globaldata
.
StartNetwork
=
true
;
return
true
;
}
else
return
false
;
}
catch
{
}
return
false
;
}
static
string
ip
;
private
static
void
CheckHmi
()
{
HMISearch
mysearch
=
new
HMISearch
(
null
);
int
hmicount
=
0
;
bool
ret
=
false
;
while
(
true
)
{
ret
=
mysearch
.
ThStart
();
if
(
ret
)
{
Thread
.
Sleep
(
3000
);
hmicount
=
mysearch
.
HMICount
();
if
(
hmicount
>=
1
)
{
ip
=
(((
globaldata
.
DeviceInfo
)(
mysearch
.
myHMIList
[
0
])).
IpAddr
);
globaldata
.
connection_ip
=
ip
;
mysearch
.
ThStop
();
break
;
}
mysearch
.
ThStop
();
ret
=
false
;
}
else
{
mysearch
.
ReGetHmiIp
();
Thread
.
Sleep
(
2000
);
}
if
(
globaldata
.
OffLinkMode
)
{
globaldata
.
connection_ip
=
""
;
break
;
}
}
}
private
static
void
RunStartWin
()
{
DialogResult
dr
=
new
StartWin
().
ShowDialog
();
}
[
STAThread
]
[
STAThread
]
static
void
Main
()
static
void
Main
()
...
@@ -142,21 +20,12 @@ namespace GcDevicePc
...
@@ -142,21 +20,12 @@ namespace GcDevicePc
bool
createNew
;
bool
createNew
;
Thread
tStartWin
=
new
Thread
(
RunStartWin
)
{
IsBackground
=
true
};
tStartWin
.
Start
();
Isnetworkok
();
CheckHmi
();
{
{
using
(
System
.
Threading
.
Mutex
mutex
=
new
System
.
Threading
.
Mutex
(
true
,
Application
.
ProductName
,
out
createNew
))
using
(
System
.
Threading
.
Mutex
mutex
=
new
System
.
Threading
.
Mutex
(
true
,
Application
.
ProductName
,
out
createNew
))
{
{
if
(
createNew
)
if
(
createNew
)
{
{
Application
.
Run
(
new
StartForm
());
Application
.
Run
(
new
StartForm
());
// Application.Run(new Test());
}
}
else
else
{
{
...
@@ -166,9 +35,6 @@ namespace GcDevicePc
...
@@ -166,9 +35,6 @@ namespace GcDevicePc
}
}
}
}
}
}
}
}
}
}
}
}
GcDevicePc/RunTables.Designer.cs
View file @
05093bee
...
@@ -55,6 +55,7 @@
...
@@ -55,6 +55,7 @@
this
.
LocalRunTableView
=
new
System
.
Windows
.
Forms
.
DataGridView
();
this
.
LocalRunTableView
=
new
System
.
Windows
.
Forms
.
DataGridView
();
this
.
delRunTable
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
delRunTable
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
addRunTable
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
addRunTable
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label4
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
LocalMethodView
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
LocalMethodView
)).
BeginInit
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
...
@@ -66,7 +67,7 @@
...
@@ -66,7 +67,7 @@
//
//
// rtsave
// rtsave
//
//
this
.
rtsave
.
Location
=
new
System
.
Drawing
.
Point
(
4
59
,
316
);
this
.
rtsave
.
Location
=
new
System
.
Drawing
.
Point
(
4
48
,
316
);
this
.
rtsave
.
Name
=
"rtsave"
;
this
.
rtsave
.
Name
=
"rtsave"
;
this
.
rtsave
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
rtsave
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
rtsave
.
TabIndex
=
0
;
this
.
rtsave
.
TabIndex
=
0
;
...
@@ -76,7 +77,7 @@
...
@@ -76,7 +77,7 @@
//
//
// tabrun
// tabrun
//
//
this
.
tabrun
.
Location
=
new
System
.
Drawing
.
Point
(
5
40
,
316
);
this
.
tabrun
.
Location
=
new
System
.
Drawing
.
Point
(
5
39
,
316
);
this
.
tabrun
.
Name
=
"tabrun"
;
this
.
tabrun
.
Name
=
"tabrun"
;
this
.
tabrun
.
Size
=
new
System
.
Drawing
.
Size
(
93
,
23
);
this
.
tabrun
.
Size
=
new
System
.
Drawing
.
Size
(
93
,
23
);
this
.
tabrun
.
TabIndex
=
1
;
this
.
tabrun
.
TabIndex
=
1
;
...
@@ -98,6 +99,7 @@
...
@@ -98,6 +99,7 @@
//
//
this
.
LocalMethodView
.
AllowUserToAddRows
=
false
;
this
.
LocalMethodView
.
AllowUserToAddRows
=
false
;
this
.
LocalMethodView
.
AllowUserToDeleteRows
=
false
;
this
.
LocalMethodView
.
AllowUserToDeleteRows
=
false
;
this
.
LocalMethodView
.
BackgroundColor
=
System
.
Drawing
.
Color
.
White
;
this
.
LocalMethodView
.
ColumnHeadersHeightSizeMode
=
System
.
Windows
.
Forms
.
DataGridViewColumnHeadersHeightSizeMode
.
AutoSize
;
this
.
LocalMethodView
.
ColumnHeadersHeightSizeMode
=
System
.
Windows
.
Forms
.
DataGridViewColumnHeadersHeightSizeMode
.
AutoSize
;
this
.
LocalMethodView
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
20
);
this
.
LocalMethodView
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
20
);
this
.
LocalMethodView
.
Name
=
"LocalMethodView"
;
this
.
LocalMethodView
.
Name
=
"LocalMethodView"
;
...
@@ -186,6 +188,7 @@
...
@@ -186,6 +188,7 @@
//
//
this
.
RunTableView
.
AllowDrop
=
true
;
this
.
RunTableView
.
AllowDrop
=
true
;
this
.
RunTableView
.
AllowUserToAddRows
=
false
;
this
.
RunTableView
.
AllowUserToAddRows
=
false
;
this
.
RunTableView
.
BackgroundColor
=
System
.
Drawing
.
Color
.
White
;
this
.
RunTableView
.
EditMode
=
System
.
Windows
.
Forms
.
DataGridViewEditMode
.
EditOnEnter
;
this
.
RunTableView
.
EditMode
=
System
.
Windows
.
Forms
.
DataGridViewEditMode
.
EditOnEnter
;
this
.
RunTableView
.
Location
=
new
System
.
Drawing
.
Point
(
13
,
20
);
this
.
RunTableView
.
Location
=
new
System
.
Drawing
.
Point
(
13
,
20
);
this
.
RunTableView
.
MultiSelect
=
false
;
this
.
RunTableView
.
MultiSelect
=
false
;
...
@@ -204,7 +207,7 @@
...
@@ -204,7 +207,7 @@
//
//
// AddMethodbtn
// AddMethodbtn
//
//
this
.
AddMethodbtn
.
Location
=
new
System
.
Drawing
.
Point
(
3
65
,
316
);
this
.
AddMethodbtn
.
Location
=
new
System
.
Drawing
.
Point
(
3
57
,
316
);
this
.
AddMethodbtn
.
Name
=
"AddMethodbtn"
;
this
.
AddMethodbtn
.
Name
=
"AddMethodbtn"
;
this
.
AddMethodbtn
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
AddMethodbtn
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
AddMethodbtn
.
TabIndex
=
4
;
this
.
AddMethodbtn
.
TabIndex
=
4
;
...
@@ -258,7 +261,7 @@
...
@@ -258,7 +261,7 @@
//
//
// stopbat
// stopbat
//
//
this
.
stopbat
.
Location
=
new
System
.
Drawing
.
Point
(
6
50
,
316
);
this
.
stopbat
.
Location
=
new
System
.
Drawing
.
Point
(
6
48
,
316
);
this
.
stopbat
.
Name
=
"stopbat"
;
this
.
stopbat
.
Name
=
"stopbat"
;
this
.
stopbat
.
Size
=
new
System
.
Drawing
.
Size
(
85
,
23
);
this
.
stopbat
.
Size
=
new
System
.
Drawing
.
Size
(
85
,
23
);
this
.
stopbat
.
TabIndex
=
5
;
this
.
stopbat
.
TabIndex
=
5
;
...
@@ -280,10 +283,13 @@
...
@@ -280,10 +283,13 @@
//
//
this
.
LocalRunTableView
.
AllowUserToAddRows
=
false
;
this
.
LocalRunTableView
.
AllowUserToAddRows
=
false
;
this
.
LocalRunTableView
.
AllowUserToDeleteRows
=
false
;
this
.
LocalRunTableView
.
AllowUserToDeleteRows
=
false
;
this
.
LocalRunTableView
.
BackgroundColor
=
System
.
Drawing
.
Color
.
White
;
this
.
LocalRunTableView
.
ColumnHeadersHeightSizeMode
=
System
.
Windows
.
Forms
.
DataGridViewColumnHeadersHeightSizeMode
.
AutoSize
;
this
.
LocalRunTableView
.
ColumnHeadersHeightSizeMode
=
System
.
Windows
.
Forms
.
DataGridViewColumnHeadersHeightSizeMode
.
AutoSize
;
this
.
LocalRunTableView
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
20
);
this
.
LocalRunTableView
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
20
);
this
.
LocalRunTableView
.
Name
=
"LocalRunTableView"
;
this
.
LocalRunTableView
.
Name
=
"LocalRunTableView"
;
this
.
LocalRunTableView
.
ReadOnly
=
true
;
this
.
LocalRunTableView
.
RowHeadersVisible
=
false
;
this
.
LocalRunTableView
.
RowHeadersVisible
=
false
;
this
.
LocalRunTableView
.
RowHeadersWidthSizeMode
=
System
.
Windows
.
Forms
.
DataGridViewRowHeadersWidthSizeMode
.
AutoSizeToDisplayedHeaders
;
this
.
LocalRunTableView
.
RowTemplate
.
Height
=
23
;
this
.
LocalRunTableView
.
RowTemplate
.
Height
=
23
;
this
.
LocalRunTableView
.
SelectionMode
=
System
.
Windows
.
Forms
.
DataGridViewSelectionMode
.
FullRowSelect
;
this
.
LocalRunTableView
.
SelectionMode
=
System
.
Windows
.
Forms
.
DataGridViewSelectionMode
.
FullRowSelect
;
this
.
LocalRunTableView
.
Size
=
new
System
.
Drawing
.
Size
(
264
,
104
);
this
.
LocalRunTableView
.
Size
=
new
System
.
Drawing
.
Size
(
264
,
104
);
...
@@ -296,7 +302,7 @@
...
@@ -296,7 +302,7 @@
this
.
delRunTable
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
delRunTable
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
delRunTable
.
Location
=
new
System
.
Drawing
.
Point
(
239
,
340
);
this
.
delRunTable
.
Location
=
new
System
.
Drawing
.
Point
(
239
,
340
);
this
.
delRunTable
.
Name
=
"delRunTable"
;
this
.
delRunTable
.
Name
=
"delRunTable"
;
this
.
delRunTable
.
Size
=
new
System
.
Drawing
.
Size
(
2
8
,
23
);
this
.
delRunTable
.
Size
=
new
System
.
Drawing
.
Size
(
2
7
,
23
);
this
.
delRunTable
.
TabIndex
=
7
;
this
.
delRunTable
.
TabIndex
=
7
;
this
.
delRunTable
.
Text
=
"-"
;
this
.
delRunTable
.
Text
=
"-"
;
this
.
delRunTable
.
UseVisualStyleBackColor
=
false
;
this
.
delRunTable
.
UseVisualStyleBackColor
=
false
;
...
@@ -313,11 +319,21 @@
...
@@ -313,11 +319,21 @@
this
.
addRunTable
.
UseVisualStyleBackColor
=
true
;
this
.
addRunTable
.
UseVisualStyleBackColor
=
true
;
this
.
addRunTable
.
Click
+=
new
System
.
EventHandler
(
this
.
addRunTable_Click
);
this
.
addRunTable
.
Click
+=
new
System
.
EventHandler
(
this
.
addRunTable_Click
);
//
//
// label4
//
this
.
label4
.
AutoSize
=
true
;
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
37
,
343
);
this
.
label4
.
Name
=
"label4"
;
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
53
,
12
);
this
.
label4
.
TabIndex
=
9
;
this
.
label4
.
Text
=
"双击选中"
;
//
// RunTables
// RunTables
//
//
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
(
750
,
380
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
750
,
380
);
this
.
Controls
.
Add
(
this
.
label4
);
this
.
Controls
.
Add
(
this
.
addRunTable
);
this
.
Controls
.
Add
(
this
.
addRunTable
);
this
.
Controls
.
Add
(
this
.
delRunTable
);
this
.
Controls
.
Add
(
this
.
delRunTable
);
this
.
Controls
.
Add
(
this
.
groupBox3
);
this
.
Controls
.
Add
(
this
.
groupBox3
);
...
@@ -327,7 +343,9 @@
...
@@ -327,7 +343,9 @@
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
tabrun
);
this
.
Controls
.
Add
(
this
.
tabrun
);
this
.
Controls
.
Add
(
this
.
rtsave
);
this
.
Controls
.
Add
(
this
.
rtsave
);
this
.
FormBorderStyle
=
System
.
Windows
.
Forms
.
FormBorderStyle
.
FixedSingle
;
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
MaximizeBox
=
false
;
this
.
Name
=
"RunTables"
;
this
.
Name
=
"RunTables"
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
Text
=
"批处理设置"
;
this
.
Text
=
"批处理设置"
;
...
@@ -342,6 +360,7 @@
...
@@ -342,6 +360,7 @@
this
.
groupBox3
.
ResumeLayout
(
false
);
this
.
groupBox3
.
ResumeLayout
(
false
);
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
LocalRunTableView
)).
EndInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
LocalRunTableView
)).
EndInit
();
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
}
}
...
@@ -372,5 +391,6 @@
...
@@ -372,5 +391,6 @@
private
System
.
Windows
.
Forms
.
DataGridView
LocalRunTableView
;
private
System
.
Windows
.
Forms
.
DataGridView
LocalRunTableView
;
private
System
.
Windows
.
Forms
.
Button
delRunTable
;
private
System
.
Windows
.
Forms
.
Button
delRunTable
;
private
System
.
Windows
.
Forms
.
Button
addRunTable
;
private
System
.
Windows
.
Forms
.
Button
addRunTable
;
private
System
.
Windows
.
Forms
.
Label
label4
;
}
}
}
}
\ No newline at end of file
GcDevicePc/RunTables.cs
View file @
05093bee
...
@@ -515,7 +515,7 @@ namespace GcDevicePc
...
@@ -515,7 +515,7 @@ namespace GcDevicePc
lfilename
=
null
;
lfilename
=
null
;
rfilename
=
null
;
rfilename
=
null
;
rfilename
=
RunTableView
.
Rows
[
i
].
Cells
[
1
].
Value
.
ToString
();
rfilename
=
RunTableView
.
Rows
[
i
].
Cells
[
1
].
Value
.
ToString
();
lfilename
=
System
.
IO
.
Path
.
Combine
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfolderinfo
.
MethodFolder
,
rfilename
);
lfilename
=
Path
.
Combine
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfolderinfo
.
MethodFolder
,
rfilename
);
if
(
rtclient
!=
null
)
if
(
rtclient
!=
null
)
rtclient
.
WtClientCopytoServer
(
rfilename
,
lfilename
,
globaldata
.
remoteFolder
+
"仪器方法\\"
);
rtclient
.
WtClientCopytoServer
(
rfilename
,
lfilename
,
globaldata
.
remoteFolder
+
"仪器方法\\"
);
}
}
...
...
GcDevicePc/SendConfig.Designer.cs
View file @
05093bee
...
@@ -93,7 +93,9 @@
...
@@ -93,7 +93,9 @@
this
.
Controls
.
Add
(
this
.
label2
);
this
.
Controls
.
Add
(
this
.
label2
);
this
.
Controls
.
Add
(
this
.
label1
);
this
.
Controls
.
Add
(
this
.
label1
);
this
.
Controls
.
Add
(
this
.
localStatusList
);
this
.
Controls
.
Add
(
this
.
localStatusList
);
this
.
FormBorderStyle
=
System
.
Windows
.
Forms
.
FormBorderStyle
.
FixedSingle
;
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
MaximizeBox
=
false
;
this
.
Name
=
"SendConfig"
;
this
.
Name
=
"SendConfig"
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
Text
=
"配置分发"
;
this
.
Text
=
"配置分发"
;
...
...
GcDevicePc/StartForm.Designer.cs
View file @
05093bee
...
@@ -29,43 +29,97 @@
...
@@ -29,43 +29,97 @@
private
void
InitializeComponent
()
private
void
InitializeComponent
()
{
{
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
StartForm
));
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
StartForm
));
this
.
pictureBox1
=
new
System
.
Windows
.
Forms
.
PictureBox
();
this
.
bgpicture
=
new
System
.
Windows
.
Forms
.
PictureBox
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
pictureBox1
)).
BeginInit
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
offlinebth
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
StartFormbgWorker
=
new
System
.
ComponentModel
.
BackgroundWorker
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
bgpicture
)).
BeginInit
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
//
pictureBox1
//
bgpicture
//
//
this
.
pictureBox1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
bgpicture
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
pictureBox1
.
Image
=
((
System
.
Drawing
.
Image
)(
resources
.
GetObject
(
"pictureBox1.Image"
)));
this
.
bgpicture
.
Image
=
((
System
.
Drawing
.
Image
)(
resources
.
GetObject
(
"bgpicture.Image"
)));
this
.
pictureBox1
.
ImageLocation
=
""
;
this
.
bgpicture
.
ImageLocation
=
""
;
this
.
pictureBox1
.
InitialImage
=
null
;
this
.
bgpicture
.
InitialImage
=
null
;
this
.
pictureBox1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
bgpicture
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
pictureBox1
.
Name
=
"pictureBox1"
;
this
.
bgpicture
.
Name
=
"bgpicture"
;
this
.
pictureBox1
.
Size
=
new
System
.
Drawing
.
Size
(
479
,
403
);
this
.
bgpicture
.
Size
=
new
System
.
Drawing
.
Size
(
479
,
403
);
this
.
pictureBox1
.
TabIndex
=
0
;
this
.
bgpicture
.
TabIndex
=
0
;
this
.
pictureBox1
.
TabStop
=
false
;
this
.
bgpicture
.
TabStop
=
false
;
this
.
bgpicture
.
Paint
+=
new
System
.
Windows
.
Forms
.
PaintEventHandler
(
this
.
bgpicture_Paint
);
this
.
bgpicture
.
MouseDoubleClick
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
bgpicture_MouseDoubleClick
);
//
// label1
//
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
label1
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
14F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label1
.
ForeColor
=
System
.
Drawing
.
Color
.
White
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
372
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
76
,
19
);
this
.
label1
.
TabIndex
=
1
;
this
.
label1
.
Text
=
"初始化:"
;
//
// label2
//
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
label2
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
14F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label2
.
ForeColor
=
System
.
Drawing
.
Color
.
White
;
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
93
,
372
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
69
,
19
);
this
.
label2
.
TabIndex
=
2
;
this
.
label2
.
Text
=
"label2"
;
//
// offlinebth
//
this
.
offlinebth
.
Location
=
new
System
.
Drawing
.
Point
(
392
,
368
);
this
.
offlinebth
.
Name
=
"offlinebth"
;
this
.
offlinebth
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
offlinebth
.
TabIndex
=
3
;
this
.
offlinebth
.
Text
=
"离线模式"
;
this
.
offlinebth
.
UseVisualStyleBackColor
=
true
;
this
.
offlinebth
.
Click
+=
new
System
.
EventHandler
(
this
.
offlinebth_Click
);
//
// StartFormbgWorker
//
this
.
StartFormbgWorker
.
WorkerReportsProgress
=
true
;
this
.
StartFormbgWorker
.
WorkerSupportsCancellation
=
true
;
this
.
StartFormbgWorker
.
DoWork
+=
new
System
.
ComponentModel
.
DoWorkEventHandler
(
this
.
StartFormbgWorker_DoWork
);
this
.
StartFormbgWorker
.
ProgressChanged
+=
new
System
.
ComponentModel
.
ProgressChangedEventHandler
(
this
.
StartFormbgWorker_ProgressChanged
);
//
//
// StartForm
// StartForm
//
//
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
(
479
,
403
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
479
,
403
);
this
.
Controls
.
Add
(
this
.
pictureBox1
);
this
.
Controls
.
Add
(
this
.
offlinebth
);
this
.
Controls
.
Add
(
this
.
label2
);
this
.
Controls
.
Add
(
this
.
label1
);
this
.
Controls
.
Add
(
this
.
bgpicture
);
this
.
FormBorderStyle
=
System
.
Windows
.
Forms
.
FormBorderStyle
.
None
;
this
.
FormBorderStyle
=
System
.
Windows
.
Forms
.
FormBorderStyle
.
None
;
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Name
=
"StartForm"
;
this
.
Name
=
"StartForm"
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
Text
=
"StartForm"
;
this
.
Text
=
"StartForm"
;
this
.
TopMost
=
true
;
this
.
Load
+=
new
System
.
EventHandler
(
this
.
StartForm_Load
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
StartForm_Load
);
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
pictureBox1
)).
EndInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
bgpicture
)).
EndInit
();
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
}
}
#
endregion
#
endregion
private
System
.
Windows
.
Forms
.
PictureBox
pictureBox1
;
private
System
.
Windows
.
Forms
.
PictureBox
bgpicture
;
private
System
.
Windows
.
Forms
.
Label
label1
;
private
System
.
Windows
.
Forms
.
Label
label2
;
private
System
.
Windows
.
Forms
.
Button
offlinebth
;
private
System
.
ComponentModel
.
BackgroundWorker
StartFormbgWorker
;
}
}
}
}
\ No newline at end of file
GcDevicePc/StartForm.cs
View file @
05093bee
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Windows.Forms
;
using
System.Windows.Forms
;
using
System.Threading
;
using
System.Threading
;
...
@@ -13,28 +8,34 @@ namespace GcDevicePc
...
@@ -13,28 +8,34 @@ namespace GcDevicePc
{
{
public
partial
class
StartForm
:
Form
public
partial
class
StartForm
:
Form
{
{
private
double
m_CurrentOpacity
=
0
;
#
region
窗口效果需要变量
private
double
_mCurrentOpacity
;
private
const
double
OpacityInterval
=
0.02
;
//0.02
private
const
double
OpacityInterval
=
0.02
;
//0.02
private
const
double
StayTime
=
2000
;
//5s
private
const
double
StayTime
=
2000
;
//5s
System
.
Timers
.
Timer
_opacityTimer
;
#
endregion
private
String
_appInitInfo
=
"系统初始化开始"
;
private
int
_initSec
;
private
int
_initStep
;
System
.
Timers
.
Timer
OpacityTimer
;
private
static
Thread
_tPreload
;
static
Thread
t_preload
;
private
MainForm
_mMainForm
;
MainForm
m_mainform
;
#
region
窗口淡入淡出效果
private
void
OpacityTimerProcOpen
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
private
void
OpacityTimerProcOpen
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
{
{
if
(
this
.
m_
CurrentOpacity
<
1
)
if
(
_m
CurrentOpacity
<
1
)
{
{
////如果当前的透明度小于1,则继续增加透明度
////如果当前的透明度小于1,则继续增加透明度
this
.
m_
CurrentOpacity
+=
OpacityInterval
;
_m
CurrentOpacity
+=
OpacityInterval
;
MethodInvoker
mi
=
new
MethodInvoker
(
UpdateFrmOpacity
);
MethodInvoker
mi
=
new
MethodInvoker
(
UpdateFrmOpacity
);
this
.
BeginInvoke
(
mi
);
BeginInvoke
(
mi
);
}
}
else
else
{
{
//如果当前已经完全不透明,则停止timer
//如果当前已经完全不透明,则停止timer
this
.
O
pacityTimer
.
Stop
();
_o
pacityTimer
.
Stop
();
System
.
Timers
.
Timer
t
=
new
System
.
Timers
.
Timer
(
StayTime
);
//设置时间间隔为5秒
System
.
Timers
.
Timer
t
=
new
System
.
Timers
.
Timer
(
StayTime
);
//设置时间间隔为5秒
t
.
Elapsed
+=
new
System
.
Timers
.
ElapsedEventHandler
(
Timer_TimesUp
);
t
.
Elapsed
+=
new
System
.
Timers
.
ElapsedEventHandler
(
Timer_TimesUp
);
t
.
AutoReset
=
false
;
//每到指定时间Elapsed事件是触发一次(false),还是一直触发(true)
t
.
AutoReset
=
false
;
//每到指定时间Elapsed事件是触发一次(false),还是一直触发(true)
...
@@ -44,20 +45,20 @@ namespace GcDevicePc
...
@@ -44,20 +45,20 @@ namespace GcDevicePc
private
void
OpacityTimerProcClose
(
object
sender
,
EventArgs
e
)
private
void
OpacityTimerProcClose
(
object
sender
,
EventArgs
e
)
{
{
if
(
this
.
m_
CurrentOpacity
>
0
)
if
(
this
.
_m
CurrentOpacity
>
0
)
{
{
t_p
reload
.
Join
();
//拦截透明度下降请求
_tP
reload
.
Join
();
//拦截透明度下降请求
//如果当前的透明度>0,则降低透明度
//如果当前的透明度>0,则降低透明度
this
.
m_
CurrentOpacity
-=
OpacityInterval
;
this
.
_m
CurrentOpacity
-=
OpacityInterval
;
MethodInvoker
mi
=
new
MethodInvoker
(
UpdateFrmOpacity
);
MethodInvoker
mi
=
new
MethodInvoker
(
UpdateFrmOpacity
);
this
.
BeginInvoke
(
mi
);
this
.
BeginInvoke
(
mi
);
}
}
else
else
{
{
//如果完全不透明,则关闭降低透明度timer,且关闭窗体
//如果完全不透明,则关闭降低透明度timer,且关闭窗体
this
.
O
pacityTimer
.
Stop
();
this
.
_o
pacityTimer
.
Stop
();
this
.
O
pacityTimer
.
Enabled
=
false
;
this
.
_o
pacityTimer
.
Enabled
=
false
;
MethodInvoker
mi
=
new
MethodInvoker
(
MainFrmStartProc
);
MethodInvoker
mi
=
new
MethodInvoker
(
MainFrmStartProc
);
this
.
BeginInvoke
(
mi
);
this
.
BeginInvoke
(
mi
);
...
@@ -66,36 +67,59 @@ namespace GcDevicePc
...
@@ -66,36 +67,59 @@ namespace GcDevicePc
private
void
UpdateFrmOpacity
()
private
void
UpdateFrmOpacity
()
{
{
this
.
Opacity
=
this
.
m_
CurrentOpacity
;
this
.
Opacity
=
this
.
_m
CurrentOpacity
;
}
}
p
ublic
StartForm
(
)
p
rivate
void
Timer_TimesUp
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
{
{
InitializeComponent
();
_opacityTimer
=
new
System
.
Timers
.
Timer
();
_opacityTimer
.
Interval
=
30
;
_opacityTimer
.
Elapsed
+=
new
System
.
Timers
.
ElapsedEventHandler
(
OpacityTimerProcClose
);
_opacityTimer
.
Start
();
}
#
endregion
private
void
bgpicture_Paint
(
object
sender
,
PaintEventArgs
e
)
{
foreach
(
Control
C
in
this
.
Controls
)
{
if
(
C
is
Label
)
{
Label
L
=
(
Label
)
C
;
L
.
Visible
=
false
;
e
.
Graphics
.
DrawString
(
L
.
Text
,
L
.
Font
,
new
SolidBrush
(
L
.
ForeColor
),
L
.
Left
-
bgpicture
.
Left
,
L
.
Top
-
bgpicture
.
Top
);
}
}
}
this
.
Opacity
=
this
.
m_CurrentOpacity
;
private
void
bgpicture_MouseDoubleClick
(
object
sender
,
MouseEventArgs
e
)
OpacityTimer
=
new
System
.
Timers
.
Timer
();
{
OpacityTimer
.
Interval
=
30
;
offlinebth
.
Visible
=
true
;
OpacityTimer
.
Elapsed
+=
new
System
.
Timers
.
ElapsedEventHandler
(
OpacityTimerProcOpen
);
offlinebth
.
Enabled
=
true
;
OpacityTimer
.
Start
();
}
}
p
rivate
void
Timer_TimesUp
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
p
ublic
StartForm
(
)
{
{
OpacityTimer
=
new
System
.
Timers
.
Timer
();
InitializeComponent
();
OpacityTimer
.
Interval
=
30
;
OpacityTimer
.
Elapsed
+=
new
System
.
Timers
.
ElapsedEventHandler
(
OpacityTimerProcClose
);
Opacity
=
_mCurrentOpacity
;
OpacityTimer
.
Start
();
_opacityTimer
=
new
System
.
Timers
.
Timer
();
_opacityTimer
.
Interval
=
30
;
_opacityTimer
.
Elapsed
+=
new
System
.
Timers
.
ElapsedEventHandler
(
OpacityTimerProcOpen
);
_opacityTimer
.
Start
();
}
}
private
void
MainFrmStartProc
()
private
void
MainFrmStartProc
()
{
{
if
(
t_p
reload
!=
null
)
if
(
_tP
reload
!=
null
)
{
{
t_preload
.
Join
();
_tPreload
.
Join
();
m_mainform
=
new
MainForm
();
_mMainForm
=
new
MainForm
();
this
.
Hide
();
StartFormbgWorker
.
CancelAsync
();
m_mainform
.
Show
();
Hide
();
_mMainForm
.
Show
();
}
}
}
}
...
@@ -106,25 +130,68 @@ namespace GcDevicePc
...
@@ -106,25 +130,68 @@ namespace GcDevicePc
/// <param name="e"></param>
/// <param name="e"></param>
private
void
StartForm_Load
(
object
sender
,
EventArgs
e
)
private
void
StartForm_Load
(
object
sender
,
EventArgs
e
)
{
{
offlinebth
.
Enabled
=
false
;
offlinebth
.
Visible
=
false
;
StartFormbgWorker
.
RunWorkerAsync
();
//载入时开启预载线程
//载入时开启预载线程
t_p
reload
=
new
Thread
(
PreLoadingProc
);
_tP
reload
=
new
Thread
(
PreLoadingProc
);
t_p
reload
.
IsBackground
=
true
;
_tP
reload
.
IsBackground
=
true
;
t_p
reload
.
Start
();
_tP
reload
.
Start
();
}
}
/// <summary>
/// <summary>
/// 预载操作
/// 预载操作
/// </summary>
/// </summary>
private
void
PreLoadingProc
()
private
void
PreLoadingProc
()
{
{
_appInitInfo
=
"系统初始化开始"
;
_appInitInfo
=
"检测本地网络"
;
globaldata
.
m_appinit
.
LocalNetworkCheck
();
_appInitInfo
=
"搜寻设备"
;
globaldata
.
m_appinit
.
ConnectionIPInit
();
_appInitInfo
=
"检查运行环境"
;
globaldata
.
m_appinit
.
InitAppFolder
();
globaldata
.
m_appinit
.
InitAppFolder
();
_appInitInfo
=
"载入方法配置"
;
globaldata
.
m_appinit
.
InitAppDefaultConfig
();
globaldata
.
m_appinit
.
InitAppDefaultConfig
();
}
private
void
StartFormbgWorker_DoWork
(
object
sender
,
DoWorkEventArgs
e
)
{
var
worker
=
sender
as
BackgroundWorker
;
while
(
true
)
{
if
(
StartFormbgWorker
.
CancellationPending
)
{
e
.
Cancel
=
true
;
break
;
}
// globaldata.m_appinit.InitDB();
_initSec
++;
// globaldata.m_appinit.InitAllGC();
string
tail
=
""
;
//globaldata.m_appinit.InitAllGCConfig();
for
(
int
i
=
0
;
i
<
(
_initSec
%
4
);
i
++)
//globaldata.m_appinit.InitGCThread();
{
//globaldata.m_appinit.InitGCControl();
tail
+=
"."
;
}
if
(
worker
!=
null
)
worker
.
ReportProgress
(
50
,
_appInitInfo
+
tail
);
Thread
.
Sleep
(
500
);
}
}
private
void
StartFormbgWorker_ProgressChanged
(
object
sender
,
ProgressChangedEventArgs
e
)
{
label2
.
Text
=
e
.
UserState
.
ToString
();
bgpicture
.
Invalidate
();
}
private
void
offlinebth_Click
(
object
sender
,
EventArgs
e
)
{
globaldata
.
OffLinkMode
=
true
;
}
}
}
}
}
}
GcDevicePc/StartForm.resx
View file @
05093bee
...
@@ -118,7 +118,7 @@
...
@@ -118,7 +118,7 @@
<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>
<assembly
alias=
"System.Drawing"
name=
"System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
/>
<assembly
alias=
"System.Drawing"
name=
"System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
/>
<data
name=
"
pictureBox1
.Image"
type=
"System.Drawing.Bitmap, System.Drawing"
mimetype=
"application/x-microsoft.net.object.bytearray.base64"
>
<data
name=
"
bgpicture
.Image"
type=
"System.Drawing.Bitmap, System.Drawing"
mimetype=
"application/x-microsoft.net.object.bytearray.base64"
>
<value>
<value>
iVBORw0KGgoAAAANSUhEUgAAAd8AAAGTCAIAAADm+I8YAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAu
iVBORw0KGgoAAAANSUhEUgAAAd8AAAGTCAIAAADm+I8YAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAu
IgAALiIBquLdkgAA/7JJREFUeF7M/fmXJEmS3wcWOsPdLnePcI/w+749PO47IyIz8r6Pqsq676quPqd7
IgAALiIBquLdkgAA/7JJREFUeF7M/fmXJEmS3wcWOsPdLnePcI/w+749PO47IyIz8r6Pqsq676quPqd7
...
@@ -3597,6 +3597,9 @@
...
@@ -3597,6 +3597,9 @@
hvuLW8h2iMssDWofeG+b3WYBVzId17i9x8ubsYnLOMPbhWWxpv3/AR2VLtfAMfOXAAAAAElFTkSuQmCC
hvuLW8h2iMssDWofeG+b3WYBVzId17i9x8ubsYnLOMPbhWWxpv3/AR2VLtfAMfOXAAAAAElFTkSuQmCC
</value>
</value>
</data>
</data>
<metadata
name=
"StartFormbgWorker.TrayLocation"
type=
"System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>
<value>
17, 17
</value>
</metadata>
<data
name=
"$this.Icon"
type=
"System.Drawing.Icon, System.Drawing"
mimetype=
"application/x-microsoft.net.object.bytearray.base64"
>
<data
name=
"$this.Icon"
type=
"System.Drawing.Icon, System.Drawing"
mimetype=
"application/x-microsoft.net.object.bytearray.base64"
>
<value>
<value>
AAABAAEAMDAAAAEAIACoJQAAFgAAACgAAAAwAAAAYAAAAAEAIAAAAAAAACQAAAAAAAAAAAAAAAAAAAAA
AAABAAEAMDAAAAEAIACoJQAAFgAAACgAAAAwAAAAYAAAAAEAIAAAAAAAACQAAAAAAAAAAAAAAAAAAAAA
...
...
GcDevicePc/StartWin.Designer.cs
deleted
100644 → 0
View file @
5e1bfd33
namespace
GcDevicePc
{
partial
class
StartWin
{
/// <summary>
/// Required designer variable.
/// </summary>
private
System
.
ComponentModel
.
IContainer
components
=
null
;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected
override
void
Dispose
(
bool
disposing
)
{
if
(
disposing
&&
(
components
!=
null
))
{
components
.
Dispose
();
}
base
.
Dispose
(
disposing
);
}
#
region
Windows
Form
Designer
generated
code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private
void
InitializeComponent
()
{
this
.
components
=
new
System
.
ComponentModel
.
Container
();
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
StartWin
));
this
.
searchinfo
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
checkhmitimer
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
infopanel
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
offline
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
infopanel
.
SuspendLayout
();
this
.
SuspendLayout
();
//
// searchinfo
//
this
.
searchinfo
.
AutoSize
=
true
;
this
.
searchinfo
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
searchinfo
.
Location
=
new
System
.
Drawing
.
Point
(
64
,
23
);
this
.
searchinfo
.
Name
=
"searchinfo"
;
this
.
searchinfo
.
Size
=
new
System
.
Drawing
.
Size
(
88
,
16
);
this
.
searchinfo
.
TabIndex
=
0
;
this
.
searchinfo
.
Text
=
"系统启动中"
;
//
// checkhmitimer
//
this
.
checkhmitimer
.
Enabled
=
true
;
this
.
checkhmitimer
.
Interval
=
1000
;
this
.
checkhmitimer
.
Tick
+=
new
System
.
EventHandler
(
this
.
checkhmitimer_Tick
);
//
// infopanel
//
this
.
infopanel
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
infopanel
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
FixedSingle
;
this
.
infopanel
.
Controls
.
Add
(
this
.
searchinfo
);
this
.
infopanel
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
12
);
this
.
infopanel
.
Name
=
"infopanel"
;
this
.
infopanel
.
Size
=
new
System
.
Drawing
.
Size
(
225
,
63
);
this
.
infopanel
.
TabIndex
=
1
;
//
// offline
//
this
.
offline
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
offline
.
Location
=
new
System
.
Drawing
.
Point
(
79
,
81
);
this
.
offline
.
Name
=
"offline"
;
this
.
offline
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
offline
.
TabIndex
=
2
;
this
.
offline
.
Text
=
"offline"
;
this
.
offline
.
UseVisualStyleBackColor
=
true
;
this
.
offline
.
Click
+=
new
System
.
EventHandler
(
this
.
offline_Click
);
//
// StartWin
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
228
)))),
((
int
)(((
byte
)(
238
)))),
((
int
)(((
byte
)(
250
)))));
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
249
,
112
);
this
.
Controls
.
Add
(
this
.
offline
);
this
.
Controls
.
Add
(
this
.
infopanel
);
this
.
FormBorderStyle
=
System
.
Windows
.
Forms
.
FormBorderStyle
.
None
;
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Name
=
"StartWin"
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
Text
=
"StartWin"
;
this
.
infopanel
.
ResumeLayout
(
false
);
this
.
infopanel
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
}
#
endregion
private
System
.
Windows
.
Forms
.
Label
searchinfo
;
private
System
.
Windows
.
Forms
.
Timer
checkhmitimer
;
private
System
.
Windows
.
Forms
.
Panel
infopanel
;
private
System
.
Windows
.
Forms
.
Button
offline
;
}
}
\ No newline at end of file
GcDevicePc/StartWin.cs
deleted
100644 → 0
View file @
5e1bfd33
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
namespace
GcDevicePc
{
public
partial
class
StartWin
:
Form
{
private
int
searchsec
=
0
;
private
int
i
=
0
;
public
StartWin
()
{
InitializeComponent
();
}
private
void
checkhmitimer_Tick
(
object
sender
,
EventArgs
e
)
{
searchsec
++;
if
(
globaldata
.
StartNetwork
)
{
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
{
this
.
Close
();
}
else
{
this
.
searchinfo
.
Text
=
"设备搜索中"
;
for
(
i
=
0
;
i
<
(
searchsec
%
4
);
i
++)
{
this
.
searchinfo
.
Text
+=
"."
;
}
}
}
else
{
this
.
searchinfo
.
Text
=
"本机网络未就绪"
;
for
(
i
=
0
;
i
<
(
searchsec
%
4
);
i
++)
{
this
.
searchinfo
.
Text
+=
"."
;
}
}
if
(
globaldata
.
OffLinkMode
)
{
this
.
Close
();
}
}
private
void
offline_Click
(
object
sender
,
EventArgs
e
)
{
globaldata
.
OffLinkMode
=
true
;
}
}
}
GcDevicePc/StartWin.resx
deleted
100644 → 0
View file @
5e1bfd33
This diff is collapsed.
Click to expand it.
GcDevicePc/UpdateTest.Designer.cs
deleted
100644 → 0
View file @
5e1bfd33
namespace
GcDevicePc
{
partial
class
UpdateTest
{
/// <summary>
/// Required designer variable.
/// </summary>
private
System
.
ComponentModel
.
IContainer
components
=
null
;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected
override
void
Dispose
(
bool
disposing
)
{
if
(
disposing
&&
(
components
!=
null
))
{
components
.
Dispose
();
}
base
.
Dispose
(
disposing
);
}
#
region
Windows
Form
Designer
generated
code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private
void
InitializeComponent
()
{
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
UpdateTest
));
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
localstr
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
runbtn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
chosenbtn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
updatebtn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
ProName
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
CHmibtn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox1
.
SuspendLayout
();
this
.
SuspendLayout
();
//
// groupBox1
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
localstr
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label2
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
runbtn
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
chosenbtn
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
updatebtn
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label1
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
ProName
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
CHmibtn
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
12
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
434
,
169
);
this
.
groupBox1
.
TabIndex
=
0
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"程序更新"
;
//
// localstr
//
this
.
localstr
.
AutoSize
=
true
;
this
.
localstr
.
Location
=
new
System
.
Drawing
.
Point
(
53
,
69
);
this
.
localstr
.
Name
=
"localstr"
;
this
.
localstr
.
Size
=
new
System
.
Drawing
.
Size
(
17
,
12
);
this
.
localstr
.
TabIndex
=
7
;
this
.
localstr
.
Text
=
"空"
;
//
// label2
//
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
69
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
41
,
12
);
this
.
label2
.
TabIndex
=
6
;
this
.
label2
.
Text
=
"目录:"
;
//
// runbtn
//
this
.
runbtn
.
Location
=
new
System
.
Drawing
.
Point
(
154
,
131
);
this
.
runbtn
.
Name
=
"runbtn"
;
this
.
runbtn
.
Size
=
new
System
.
Drawing
.
Size
(
127
,
23
);
this
.
runbtn
.
TabIndex
=
5
;
this
.
runbtn
.
Text
=
"运行HMI程序"
;
this
.
runbtn
.
UseVisualStyleBackColor
=
true
;
this
.
runbtn
.
Click
+=
new
System
.
EventHandler
(
this
.
runbtn_Click
);
//
// chosenbtn
//
this
.
chosenbtn
.
Location
=
new
System
.
Drawing
.
Point
(
215
,
94
);
this
.
chosenbtn
.
Name
=
"chosenbtn"
;
this
.
chosenbtn
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
chosenbtn
.
TabIndex
=
4
;
this
.
chosenbtn
.
Text
=
"选择"
;
this
.
chosenbtn
.
UseVisualStyleBackColor
=
true
;
this
.
chosenbtn
.
Click
+=
new
System
.
EventHandler
(
this
.
chosenbtn_Click
);
//
// updatebtn
//
this
.
updatebtn
.
Location
=
new
System
.
Drawing
.
Point
(
317
,
95
);
this
.
updatebtn
.
Name
=
"updatebtn"
;
this
.
updatebtn
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
updatebtn
.
TabIndex
=
3
;
this
.
updatebtn
.
Text
=
"更新"
;
this
.
updatebtn
.
UseVisualStyleBackColor
=
true
;
this
.
updatebtn
.
Click
+=
new
System
.
EventHandler
(
this
.
updatebtn_Click
);
//
// label1
//
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
100
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
41
,
12
);
this
.
label1
.
TabIndex
=
2
;
this
.
label1
.
Text
=
"程序:"
;
//
// ProName
//
this
.
ProName
.
Enabled
=
false
;
this
.
ProName
.
Location
=
new
System
.
Drawing
.
Point
(
53
,
96
);
this
.
ProName
.
Name
=
"ProName"
;
this
.
ProName
.
Size
=
new
System
.
Drawing
.
Size
(
141
,
21
);
this
.
ProName
.
TabIndex
=
1
;
this
.
ProName
.
Text
=
"GcDevice.exe"
;
//
// CHmibtn
//
this
.
CHmibtn
.
Location
=
new
System
.
Drawing
.
Point
(
154
,
30
);
this
.
CHmibtn
.
Name
=
"CHmibtn"
;
this
.
CHmibtn
.
Size
=
new
System
.
Drawing
.
Size
(
127
,
23
);
this
.
CHmibtn
.
TabIndex
=
0
;
this
.
CHmibtn
.
Text
=
"关闭HMI程序"
;
this
.
CHmibtn
.
UseVisualStyleBackColor
=
true
;
this
.
CHmibtn
.
Click
+=
new
System
.
EventHandler
(
this
.
CHmibtn_Click
);
//
// UpdateTest
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
458
,
193
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Name
=
"UpdateTest"
;
this
.
Text
=
"更新测试"
;
this
.
TopMost
=
true
;
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
}
#
endregion
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
Button
CHmibtn
;
private
System
.
Windows
.
Forms
.
Label
label1
;
private
System
.
Windows
.
Forms
.
TextBox
ProName
;
private
System
.
Windows
.
Forms
.
Button
updatebtn
;
private
System
.
Windows
.
Forms
.
Button
chosenbtn
;
private
System
.
Windows
.
Forms
.
Button
runbtn
;
private
System
.
Windows
.
Forms
.
Label
label2
;
private
System
.
Windows
.
Forms
.
Label
localstr
;
}
}
\ No newline at end of file
GcDevicePc/UpdateTest.cs
deleted
100644 → 0
View file @
5e1bfd33
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Windows.Forms
;
using
System.IO
;
namespace
GcDevicePc
{
public
partial
class
UpdateTest
:
Form
{
public
UpdateTest
()
{
InitializeComponent
();
//this.updatebtn.Enabled = false;
//this.runbtn.Enabled = false;
}
private
string
updateexe
=
null
;
private
string
localpath
=
null
;
//private string ip = "192.168.1.57";
//private ushort port = 911;
private
void
CHmibtn_Click
(
object
sender
,
EventArgs
e
)
{
if
(
globaldata
.
connection_ip
!=
null
&&
globaldata
.
connection_ip
!=
""
)
{
int
ret
;
FileServerClient
singlesend
=
new
FileServerClient
();
singlesend
.
WtClientInit
(
globaldata
.
connection_ip
,
globaldata
.
fileserverport
);
// singlesend.WtClientInit(ip, port);
ret
=
singlesend
.
WtHMICloseRro
(
"WtMainProc"
);
singlesend
.
WtClientClose
();
this
.
runbtn
.
Enabled
=
true
;
}
}
private
void
updatebtn_Click
(
object
sender
,
EventArgs
e
)
{
int
ret
;
if
(
globaldata
.
connection_ip
!=
null
&&
globaldata
.
connection_ip
!=
""
)
{
FileServerClient
singlesend
=
new
FileServerClient
();
singlesend
.
WtClientInit
(
globaldata
.
connection_ip
,
globaldata
.
fileserverport
);
//singlesend.WtClientInit(ip, port);
ret
=
singlesend
.
WtClientCopytoServer
(
this
.
updateexe
,
this
.
localpath
,
globaldata
.
remoteFolder
);
if
(
ret
==
0
)
{
MessageBox
.
Show
(
"发送成功"
);
}
singlesend
.
WtClientClose
();
}
}
private
void
runbtn_Click
(
object
sender
,
EventArgs
e
)
{
int
ret
;
if
(
globaldata
.
connection_ip
!=
null
&&
globaldata
.
connection_ip
!=
""
)
{
FileServerClient
singlesend
=
new
FileServerClient
();
singlesend
.
WtClientInit
(
globaldata
.
connection_ip
,
globaldata
.
fileserverport
);
// singlesend.WtClientInit(ip, port);
ret
=
singlesend
.
WtHMIRunPro
(
"GcDevice.exe"
,
globaldata
.
exeremoteFolder
);
singlesend
.
WtClientClose
();
}
}
private
void
chosenbtn_Click
(
object
sender
,
EventArgs
e
)
{
string
file
;
OpenFileDialog
fileDlg
=
new
OpenFileDialog
();
fileDlg
.
Multiselect
=
false
;
fileDlg
.
InitialDirectory
=
Application
.
StartupPath
+
"\\仪器方法"
;
fileDlg
.
Title
=
"请选择方法文件"
;
fileDlg
.
Filter
=
"更新程序(*.*)|*.*"
;
if
(
fileDlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
file
=
fileDlg
.
FileName
;
this
.
updateexe
=
file
.
Substring
(
file
.
LastIndexOf
(
"\\"
)
+
1
);
this
.
localpath
=
file
;
// Path.GetDirectoryName(file);
this
.
localstr
.
Text
=
this
.
localpath
;
this
.
ProName
.
Text
=
this
.
updateexe
;
this
.
updatebtn
.
Enabled
=
true
;
}
}
}
}
GcDevicePc/UpdateTest.resx
deleted
100644 → 0
View file @
5e1bfd33
This diff is collapsed.
Click to expand it.
GcDevicePc/UserConfig.Designer.cs
View file @
05093bee
...
@@ -485,6 +485,7 @@
...
@@ -485,6 +485,7 @@
this
.
Controls
.
Add
(
this
.
groupBox3
);
this
.
Controls
.
Add
(
this
.
groupBox3
);
this
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
FormBorderStyle
=
System
.
Windows
.
Forms
.
FormBorderStyle
.
FixedSingle
;
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Name
=
"UserConfig"
;
this
.
Name
=
"UserConfig"
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
...
...
GcDevicePc/WaitForm.Designer.cs
View file @
05093bee
...
@@ -57,6 +57,7 @@
...
@@ -57,6 +57,7 @@
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
339
,
98
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
339
,
98
);
this
.
Controls
.
Add
(
this
.
button1
);
this
.
Controls
.
Add
(
this
.
button1
);
this
.
Controls
.
Add
(
this
.
progressBar1
);
this
.
Controls
.
Add
(
this
.
progressBar1
);
this
.
FormBorderStyle
=
System
.
Windows
.
Forms
.
FormBorderStyle
.
FixedSingle
;
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Name
=
"WaitForm"
;
this
.
Name
=
"WaitForm"
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
...
...
GcDevicePc/auxtool.Designer.cs
View file @
05093bee
...
@@ -372,7 +372,9 @@
...
@@ -372,7 +372,9 @@
this
.
Controls
.
Add
(
this
.
groupBox3
);
this
.
Controls
.
Add
(
this
.
groupBox3
);
this
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
FormBorderStyle
=
System
.
Windows
.
Forms
.
FormBorderStyle
.
FixedSingle
;
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
MaximizeBox
=
false
;
this
.
Name
=
"auxtool"
;
this
.
Name
=
"auxtool"
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
Text
=
"辅助工具"
;
this
.
Text
=
"辅助工具"
;
...
...
GcDevicePc/auxtool.cs
View file @
05093bee
...
@@ -188,7 +188,6 @@ namespace GcDevicePc
...
@@ -188,7 +188,6 @@ namespace GcDevicePc
private
void
updatebtn_Click
(
object
sender
,
EventArgs
e
)
private
void
updatebtn_Click
(
object
sender
,
EventArgs
e
)
{
{
// int ret;
if
(
HmiIP
!=
null
)
if
(
HmiIP
!=
null
)
{
{
this
.
CHmibtn
.
Enabled
=
false
;
this
.
CHmibtn
.
Enabled
=
false
;
...
@@ -200,19 +199,6 @@ namespace GcDevicePc
...
@@ -200,19 +199,6 @@ namespace GcDevicePc
Thread
fThread
=
new
Thread
(
new
ThreadStart
(
SleepT
));
Thread
fThread
=
new
Thread
(
new
ThreadStart
(
SleepT
));
fThread
.
IsBackground
=
true
;
fThread
.
IsBackground
=
true
;
fThread
.
Start
();
fThread
.
Start
();
//FileServerClient singlesend = new FileServerClient();
//singlesend.WtClientInit(HmiIP, HmiPort);
//ret = singlesend.WtClientCopytoServer(this.updateexe, this.localpath, "\\Hard Disk\\");
//if (ret == 1)
//{
// MessageBox.Show("更新成功");
//}
//singlesend.WtClientClose();
}
}
}
}
...
...
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