#region 编辑视频点入口程序
/// <summary>
/// 编辑视频点入口程序
/// </summary>
/// <Coder>:2012-05-31</Coder>
/// <Modifier></Modifier>
private void EditMonitorPoint()
{
gra = objCurrentMap.Layers["FEATURELAYERMONITOR"] as GraphicsLayer;
for (int i = 0; i < gra.Graphics.Count(); i++)
{
//objEditgraphic = gra.Graphics[i];
gra.Graphics[i].MouseLeftButtonDown += new MouseButtonEventHandler(MonitorButtonClick_MouseLeftButtonDown);
}
}
#endregion
#region 编辑视频点信息事件
/// <summary>
/// 编辑视频点信息事件
/// </summary>
/// <Coder>:2012-05-17</Coder>
/// <Modifier></Modifier>
void MonitorButtonClick_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
try
{
MapService.MonitorModel objEditMonitor = new MapService.MonitorModel();
//存储编辑视频点
Graphic objEditgraphic = sender as Graphic;
objEditMonitor.MonitorName=objEditgraphic.Attributes["MonitorName"].ToString();
objEditMonitor.MonitorId = int.Parse(objEditgraphic.Attributes["MonitorId"].ToString());
objEditMonitor.Address = objEditgraphic.Attributes["Address"].ToString();
objEditMonitor.GroupId = int.Parse(objEditgraphic.Attributes["GroupId"].ToString());
objEditMonitor.Memo = objEditgraphic.Attributes["Memo"].ToString();
objEditMonitor.MonitorCode = objEditgraphic.Attributes["MonitorCode"].ToString();
objEditMonitor.MonitorGuid = objEditgraphic.Attributes["MonitorGuid"].ToString();
objEditMonitor.MonitorIp = objEditgraphic.Attributes["MonitorIp"].ToString();
objEditMonitor.MonitorUrl = objEditgraphic.Attributes["MonitorUrl"].ToString();
objEditMonitor.X = objEditgraphic.Attributes["X"].ToString();
objEditMonitor.Y = objEditgraphic.Attributes["Y"].ToString();
// 弹出新增的视频点的输入框
MonitorEditInfo WinMonitorEdit = new MonitorEditInfo(objEditMonitor);
WinMonitorEdit.FlwinIdentify.IsOpen = true;
// 设置显示的位置
WinMonitorEdit.FlwinIdentify.InitialLeft = 100;
WinMonitorEdit.FlwinIdentify.InitialTop = 130;
// 添加该弹出框
objCurrentPage.LayoutRoot.Children.Add(WinMonitorEdit);
for (int i = 0; i < gra.Graphics.Count(); i++)
{
//objEditgraphic = gra.Graphics[i];
gra.Graphics[i].MouseLeftButtonDown -= new MouseButtonEventHandler(MonitorButtonClick_MouseLeftButtonDown);
}
}
catch (Exception ex)
{
}
}
#endregion