Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LittleGrayEagle
qplanetosm
提交
d4941068
qplanetosm
项目概览
LittleGrayEagle
/
qplanetosm
与 Fork 源项目一致
Fork自
colorEagleStdio / qplanetosm
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
qplanetosm
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d4941068
编写于
2月 11, 2016
作者:
丁劲犇
😸
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
We will demostrate all activeX functions in C# example project.
上级
351d855f
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
165 addition
and
44 deletion
+165
-44
test_container/lena.png
test_container/lena.png
+0
-0
windows_containers/CSharpContainer/Form1.Designer.cs
windows_containers/CSharpContainer/Form1.Designer.cs
+87
-44
windows_containers/CSharpContainer/Form1.cs
windows_containers/CSharpContainer/Form1.cs
+75
-0
windows_containers/CSharpContainer/Form1.resx
windows_containers/CSharpContainer/Form1.resx
+3
-0
未找到文件。
test_container/lena.png
0 → 100644
浏览文件 @
d4941068
8.6 KB
windows_containers/CSharpContainer/Form1.Designer.cs
浏览文件 @
d4941068
...
@@ -31,18 +31,21 @@
...
@@ -31,18 +31,21 @@
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
CSharpMapContainer
));
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
CSharpMapContainer
));
this
.
tabControl_map
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabControl_map
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabPage_map1
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
tabPage_map1
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
tabPage_map2
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
tabPage_msg
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
axqtaxviewer_planetosm1
=
new
Axqtaxviewer_planetosmLib
.
Axqtaxviewer_planetosm
();
this
.
axqtaxviewer_planetosm1
=
new
Axqtaxviewer_planetosmLib
.
Axqtaxviewer_planetosm
();
this
.
tabPage_map2
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
axqtaxviewer_planetosm2
=
new
Axqtaxviewer_planetosmLib
.
Axqtaxviewer_planetosm
();
this
.
axqtaxviewer_planetosm2
=
new
Axqtaxviewer_planetosmLib
.
Axqtaxviewer_planetosm
();
this
.
tabPage_msg
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
menuStrip1
=
new
System
.
Windows
.
Forms
.
MenuStrip
();
this
.
connectionsToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
getConnectionAddressToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
label_msg
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
listBox_msg
=
new
System
.
Windows
.
Forms
.
ListBox
();
this
.
listBox_msg
=
new
System
.
Windows
.
Forms
.
ListBox
();
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tabControl_map
.
SuspendLayout
();
this
.
tabControl_map
.
SuspendLayout
();
this
.
tabPage_map1
.
SuspendLayout
();
this
.
tabPage_map1
.
SuspendLayout
();
this
.
tabPage_map2
.
SuspendLayout
();
this
.
tabPage_msg
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
axqtaxviewer_planetosm1
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
axqtaxviewer_planetosm1
)).
BeginInit
();
this
.
tabPage_map2
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
axqtaxviewer_planetosm2
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
axqtaxviewer_planetosm2
)).
BeginInit
();
this
.
menuStrip1
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// tabControl_map
// tabControl_map
...
@@ -54,96 +57,133 @@
...
@@ -54,96 +57,133 @@
this
.
tabControl_map
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
tabControl_map
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
tabControl_map
.
Name
=
"tabControl_map"
;
this
.
tabControl_map
.
Name
=
"tabControl_map"
;
this
.
tabControl_map
.
SelectedIndex
=
0
;
this
.
tabControl_map
.
SelectedIndex
=
0
;
this
.
tabControl_map
.
Size
=
new
System
.
Drawing
.
Size
(
804
,
520
);
this
.
tabControl_map
.
Size
=
new
System
.
Drawing
.
Size
(
912
,
562
);
this
.
tabControl_map
.
TabIndex
=
0
;
this
.
tabControl_map
.
TabIndex
=
0
;
//
//
// tabPage_map1
// tabPage_map1
//
//
this
.
tabPage_map1
.
Controls
.
Add
(
this
.
button1
);
this
.
tabPage_map1
.
Controls
.
Add
(
this
.
listBox_msg
);
this
.
tabPage_map1
.
Controls
.
Add
(
this
.
label_msg
);
this
.
tabPage_map1
.
Controls
.
Add
(
this
.
menuStrip1
);
this
.
tabPage_map1
.
Controls
.
Add
(
this
.
axqtaxviewer_planetosm1
);
this
.
tabPage_map1
.
Controls
.
Add
(
this
.
axqtaxviewer_planetosm1
);
this
.
tabPage_map1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
22
);
this
.
tabPage_map1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
22
);
this
.
tabPage_map1
.
Name
=
"tabPage_map1"
;
this
.
tabPage_map1
.
Name
=
"tabPage_map1"
;
this
.
tabPage_map1
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage_map1
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage_map1
.
Size
=
new
System
.
Drawing
.
Size
(
796
,
494
);
this
.
tabPage_map1
.
Size
=
new
System
.
Drawing
.
Size
(
904
,
536
);
this
.
tabPage_map1
.
TabIndex
=
0
;
this
.
tabPage_map1
.
TabIndex
=
0
;
this
.
tabPage_map1
.
Text
=
"Map1"
;
this
.
tabPage_map1
.
Text
=
"Map1"
;
this
.
tabPage_map1
.
UseVisualStyleBackColor
=
true
;
this
.
tabPage_map1
.
UseVisualStyleBackColor
=
true
;
//
//
// axqtaxviewer_planetosm1
//
this
.
axqtaxviewer_planetosm1
.
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
.
axqtaxviewer_planetosm1
.
Enabled
=
true
;
this
.
axqtaxviewer_planetosm1
.
Location
=
new
System
.
Drawing
.
Point
(-
4
,
3
);
this
.
axqtaxviewer_planetosm1
.
Name
=
"axqtaxviewer_planetosm1"
;
this
.
axqtaxviewer_planetosm1
.
OcxState
=
((
System
.
Windows
.
Forms
.
AxHost
.
State
)(
resources
.
GetObject
(
"axqtaxviewer_planetosm1.OcxState"
)));
this
.
axqtaxviewer_planetosm1
.
Size
=
new
System
.
Drawing
.
Size
(
685
,
533
);
this
.
axqtaxviewer_planetosm1
.
TabIndex
=
0
;
this
.
axqtaxviewer_planetosm1
.
evt_Message
+=
new
Axqtaxviewer_planetosmLib
.
Iqtaxviewer_planetosmEvents_evt_MessageEventHandler
(
this
.
axqtaxviewer_planetosm1_evt_Message
);
//
// tabPage_map2
// tabPage_map2
//
//
this
.
tabPage_map2
.
Controls
.
Add
(
this
.
axqtaxviewer_planetosm2
);
this
.
tabPage_map2
.
Controls
.
Add
(
this
.
axqtaxviewer_planetosm2
);
this
.
tabPage_map2
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
22
);
this
.
tabPage_map2
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
22
);
this
.
tabPage_map2
.
Name
=
"tabPage_map2"
;
this
.
tabPage_map2
.
Name
=
"tabPage_map2"
;
this
.
tabPage_map2
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage_map2
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage_map2
.
Size
=
new
System
.
Drawing
.
Size
(
7
96
,
494
);
this
.
tabPage_map2
.
Size
=
new
System
.
Drawing
.
Size
(
7
76
,
511
);
this
.
tabPage_map2
.
TabIndex
=
1
;
this
.
tabPage_map2
.
TabIndex
=
1
;
this
.
tabPage_map2
.
Text
=
"Map2"
;
this
.
tabPage_map2
.
Text
=
"Map2"
;
this
.
tabPage_map2
.
UseVisualStyleBackColor
=
true
;
this
.
tabPage_map2
.
UseVisualStyleBackColor
=
true
;
//
//
// axqtaxviewer_planetosm2
//
this
.
axqtaxviewer_planetosm2
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
axqtaxviewer_planetosm2
.
Enabled
=
true
;
this
.
axqtaxviewer_planetosm2
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
axqtaxviewer_planetosm2
.
Name
=
"axqtaxviewer_planetosm2"
;
this
.
axqtaxviewer_planetosm2
.
OcxState
=
((
System
.
Windows
.
Forms
.
AxHost
.
State
)(
resources
.
GetObject
(
"axqtaxviewer_planetosm2.OcxState"
)));
this
.
axqtaxviewer_planetosm2
.
Size
=
new
System
.
Drawing
.
Size
(
770
,
505
);
this
.
axqtaxviewer_planetosm2
.
TabIndex
=
0
;
this
.
axqtaxviewer_planetosm2
.
evt_Message
+=
new
Axqtaxviewer_planetosmLib
.
Iqtaxviewer_planetosmEvents_evt_MessageEventHandler
(
this
.
axqtaxviewer_planetosm2_evt_Message
);
//
// tabPage_msg
// tabPage_msg
//
//
this
.
tabPage_msg
.
Controls
.
Add
(
this
.
listBox_msg
);
this
.
tabPage_msg
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
22
);
this
.
tabPage_msg
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
22
);
this
.
tabPage_msg
.
Name
=
"tabPage_msg"
;
this
.
tabPage_msg
.
Name
=
"tabPage_msg"
;
this
.
tabPage_msg
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage_msg
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage_msg
.
Size
=
new
System
.
Drawing
.
Size
(
7
96
,
494
);
this
.
tabPage_msg
.
Size
=
new
System
.
Drawing
.
Size
(
7
76
,
536
);
this
.
tabPage_msg
.
TabIndex
=
2
;
this
.
tabPage_msg
.
TabIndex
=
2
;
this
.
tabPage_msg
.
Text
=
"Messages"
;
this
.
tabPage_msg
.
Text
=
"Messages"
;
this
.
tabPage_msg
.
UseVisualStyleBackColor
=
true
;
this
.
tabPage_msg
.
UseVisualStyleBackColor
=
true
;
//
//
//
axqtaxviewer_planetosm
1
//
menuStrip
1
//
//
this
.
axqtaxviewer_planetosm1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
menuStrip1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
None
;
this
.
axqtaxviewer_planetosm1
.
Enabled
=
true
;
this
.
menuStrip1
.
Items
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
this
.
axqtaxviewer_planetosm1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
connectionsToolStripMenuItem
});
this
.
axqtaxviewer_planetosm1
.
Name
=
"axqtaxviewer_planetosm1"
;
this
.
menuStrip1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
axqtaxviewer_planetosm1
.
OcxState
=
((
System
.
Windows
.
Forms
.
AxHost
.
State
)(
resources
.
GetObject
(
"axqtaxviewer_planetosm1.OcxState"
)));
this
.
menuStrip1
.
Name
=
"menuStrip1"
;
this
.
axqtaxviewer_planetosm1
.
Size
=
new
System
.
Drawing
.
Size
(
790
,
488
);
this
.
menuStrip1
.
Size
=
new
System
.
Drawing
.
Size
(
97
,
25
);
this
.
axqtaxviewer_planetosm1
.
TabIndex
=
0
;
this
.
menuStrip1
.
TabIndex
=
1
;
this
.
menuStrip1
.
Text
=
"menuStrip1"
;
//
//
//
axqtaxviewer_planetosm2
//
connectionsToolStripMenuItem
//
//
this
.
axqtaxviewer_planetosm2
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
connectionsToolStripMenuItem
.
DropDownItems
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
this
.
axqtaxviewer_planetosm2
.
Enabled
=
true
;
this
.
getConnectionAddressToolStripMenuItem
});
this
.
axqtaxviewer_planetosm2
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
connectionsToolStripMenuItem
.
Name
=
"connectionsToolStripMenuItem"
;
this
.
axqtaxviewer_planetosm2
.
Name
=
"axqtaxviewer_planetosm2"
;
this
.
connectionsToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
89
,
21
);
this
.
axqtaxviewer_planetosm2
.
OcxState
=
((
System
.
Windows
.
Forms
.
AxHost
.
State
)(
resources
.
GetObject
(
"axqtaxviewer_planetosm2.OcxState"
)));
this
.
connectionsToolStripMenuItem
.
Text
=
"connections"
;
this
.
axqtaxviewer_planetosm2
.
Size
=
new
System
.
Drawing
.
Size
(
790
,
488
);
//
this
.
axqtaxviewer_planetosm2
.
TabIndex
=
0
;
// getConnectionAddressToolStripMenuItem
//
this
.
getConnectionAddressToolStripMenuItem
.
Name
=
"getConnectionAddressToolStripMenuItem"
;
this
.
getConnectionAddressToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
213
,
22
);
this
.
getConnectionAddressToolStripMenuItem
.
Text
=
"get connection address"
;
this
.
getConnectionAddressToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
getConnectionAddressToolStripMenuItem_Click
);
//
// label_msg
//
this
.
label_msg
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
label_msg
.
AutoSize
=
true
;
this
.
label_msg
.
Location
=
new
System
.
Drawing
.
Point
(
1
,
499
);
this
.
label_msg
.
Name
=
"label_msg"
;
this
.
label_msg
.
Size
=
new
System
.
Drawing
.
Size
(
41
,
12
);
this
.
label_msg
.
TabIndex
=
1
;
this
.
label_msg
.
Text
=
"label1"
;
//
//
// listBox_msg
// listBox_msg
//
//
this
.
listBox_msg
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
listBox_msg
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
listBox_msg
.
FormattingEnabled
=
true
;
this
.
listBox_msg
.
FormattingEnabled
=
true
;
this
.
listBox_msg
.
HorizontalScrollbar
=
true
;
this
.
listBox_msg
.
ItemHeight
=
12
;
this
.
listBox_msg
.
ItemHeight
=
12
;
this
.
listBox_msg
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
listBox_msg
.
Location
=
new
System
.
Drawing
.
Point
(
687
,
0
);
this
.
listBox_msg
.
Name
=
"listBox_msg"
;
this
.
listBox_msg
.
Name
=
"listBox_msg"
;
this
.
listBox_msg
.
Size
=
new
System
.
Drawing
.
Size
(
790
,
488
);
this
.
listBox_msg
.
Size
=
new
System
.
Drawing
.
Size
(
217
,
532
);
this
.
listBox_msg
.
TabIndex
=
0
;
this
.
listBox_msg
.
TabIndex
=
1
;
//
// button1
//
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
6
);
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button1
.
TabIndex
=
1
;
this
.
button1
.
Text
=
"button1"
;
this
.
button1
.
UseVisualStyleBackColor
=
true
;
//
//
// CSharpMapContainer
// CSharpMapContainer
//
//
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
(
804
,
520
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
912
,
562
);
this
.
Controls
.
Add
(
this
.
tabControl_map
);
this
.
Controls
.
Add
(
this
.
tabControl_map
);
this
.
MainMenuStrip
=
this
.
menuStrip1
;
this
.
Name
=
"CSharpMapContainer"
;
this
.
Name
=
"CSharpMapContainer"
;
this
.
Text
=
"Map container"
;
this
.
Text
=
"Map container"
;
this
.
tabControl_map
.
ResumeLayout
(
false
);
this
.
tabControl_map
.
ResumeLayout
(
false
);
this
.
tabPage_map1
.
ResumeLayout
(
false
);
this
.
tabPage_map1
.
ResumeLayout
(
false
);
this
.
tabPage_map2
.
ResumeLayout
(
false
);
this
.
tabPage_map1
.
PerformLayout
();
this
.
tabPage_msg
.
ResumeLayout
(
false
);
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
axqtaxviewer_planetosm1
)).
EndInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
axqtaxviewer_planetosm1
)).
EndInit
();
this
.
tabPage_map2
.
ResumeLayout
(
false
);
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
axqtaxviewer_planetosm2
)).
EndInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
axqtaxviewer_planetosm2
)).
EndInit
();
this
.
menuStrip1
.
ResumeLayout
(
false
);
this
.
menuStrip1
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
}
}
...
@@ -154,9 +194,12 @@
...
@@ -154,9 +194,12 @@
private
System
.
Windows
.
Forms
.
TabPage
tabPage_map1
;
private
System
.
Windows
.
Forms
.
TabPage
tabPage_map1
;
private
System
.
Windows
.
Forms
.
TabPage
tabPage_map2
;
private
System
.
Windows
.
Forms
.
TabPage
tabPage_map2
;
private
System
.
Windows
.
Forms
.
TabPage
tabPage_msg
;
private
System
.
Windows
.
Forms
.
TabPage
tabPage_msg
;
private
System
.
Windows
.
Forms
.
Button
button1
;
private
Axqtaxviewer_planetosmLib
.
Axqtaxviewer_planetosm
axqtaxviewer_planetosm1
;
private
Axqtaxviewer_planetosmLib
.
Axqtaxviewer_planetosm
axqtaxviewer_planetosm1
;
private
Axqtaxviewer_planetosmLib
.
Axqtaxviewer_planetosm
axqtaxviewer_planetosm2
;
private
Axqtaxviewer_planetosmLib
.
Axqtaxviewer_planetosm
axqtaxviewer_planetosm2
;
private
System
.
Windows
.
Forms
.
MenuStrip
menuStrip1
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
connectionsToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
getConnectionAddressToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
Label
label_msg
;
private
System
.
Windows
.
Forms
.
ListBox
listBox_msg
;
private
System
.
Windows
.
Forms
.
ListBox
listBox_msg
;
}
}
}
}
...
...
windows_containers/CSharpContainer/Form1.cs
浏览文件 @
d4941068
...
@@ -16,5 +16,80 @@ namespace CSharpContainer
...
@@ -16,5 +16,80 @@ namespace CSharpContainer
{
{
InitializeComponent
();
InitializeComponent
();
}
}
//a common message output method
private
void
messageOutput
(
string
strmsg
,
int
intend
=
0
)
{
string
msg_string
=
new
string
(
' '
,
intend
);
msg_string
+=
strmsg
;
listBox_msg
.
Items
.
Add
(
msg_string
);
while
(
listBox_msg
.
Items
.
Count
>
1024
)
listBox_msg
.
Items
.
RemoveAt
(
0
);
listBox_msg
.
SetSelected
(
listBox_msg
.
Items
.
Count
-
1
,
true
);
}
//a common message output method for paras
private
void
messageOutput
(
Dictionary
<
string
,
string
>
d
,
int
intend
=
0
)
{
string
msg_span
=
new
string
(
' '
,
intend
);
foreach
(
string
k
in
d
.
Keys
)
{
string
v
;
if
(
true
==
d
.
TryGetValue
(
k
,
out
v
)
)
{
string
msg
=
msg_span
+
k
+
"="
+
v
;
listBox_msg
.
Items
.
Add
(
msg
);
}
}
while
(
listBox_msg
.
Items
.
Count
>
1024
)
listBox_msg
.
Items
.
RemoveAt
(
0
);
listBox_msg
.
SetSelected
(
listBox_msg
.
Items
.
Count
-
1
,
true
);
}
//a common method to convert strings to dictionary.
private
Dictionary
<
string
,
string
>
string2dict
(
string
str
)
{
char
[]
spc
=
{
';'
};
Dictionary
<
string
,
string
>
retd
=
new
Dictionary
<
string
,
string
>();
string
[]
prop_pairs
=
str
.
Split
(
spc
);
foreach
(
string
pa
in
prop_pairs
)
{
char
[]
spsub
=
{
'='
};
string
[]
prop_keyv
=
pa
.
Split
(
spsub
);
if
(
prop_keyv
.
Length
>=
2
)
{
if
(
retd
.
ContainsKey
(
prop_keyv
[
0
])
==
false
)
retd
.
Add
(
prop_keyv
[
0
],
prop_keyv
[
1
]);
}
}
return
retd
;
}
//Test get tile layer's remote address. In this example, the layername is "OSM"
private
void
getConnectionAddressToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
messageOutput
(
"osm_get_remote_address:"
);
string
str
=
axqtaxviewer_planetosm1
.
osm_get_remote_address
(
"OSM"
);
messageOutput
(
str
,
4
);
}
private
void
axqtaxviewer_planetosm1_evt_Message
(
object
sender
,
Axqtaxviewer_planetosmLib
.
Iqtaxviewer_planetosmEvents_evt_MessageEvent
e
)
{
if
(
e
.
p0
.
IndexOf
(
"MOUSE_MOVE"
)
>
0
)
label_msg
.
Text
=
e
.
p0
;
else
{
messageOutput
(
"EVT from "
+
sender
.
ToString
()
+
":"
+
e
.
p0
,
0
);
messageOutput
(
string2dict
(
e
.
p0
),
4
);
}
}
private
void
axqtaxviewer_planetosm2_evt_Message
(
object
sender
,
Axqtaxviewer_planetosmLib
.
Iqtaxviewer_planetosmEvents_evt_MessageEvent
e
)
{
if
(
e
.
p0
.
IndexOf
(
"MOUSE_MOVE"
)
>
0
)
label_msg
.
Text
=
e
.
p0
;
else
{
messageOutput
(
"EVT from "
+
sender
.
ToString
()
+
":"
+
e
.
p0
,
0
);
messageOutput
(
string2dict
(
e
.
p0
),
4
);
}
}
}
}
}
}
windows_containers/CSharpContainer/Form1.resx
浏览文件 @
d4941068
...
@@ -117,6 +117,9 @@
...
@@ -117,6 +117,9 @@
<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=
"menuStrip1.TrayLocation"
type=
"System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>
<value>
17, 17
</value>
</metadata>
<data
name=
"axqtaxviewer_planetosm1.OcxState"
mimetype=
"application/x-microsoft.net.object.binary.base64"
>
<data
name=
"axqtaxviewer_planetosm1.OcxState"
mimetype=
"application/x-microsoft.net.object.binary.base64"
>
<value>
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录