Esempio n. 1
0
        private void Rectinsidemarklists_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            rectinsidemarklists.IsReadOnly = true;
            ShowDatas data = ((DataGrid)sender).SelectedItem as ShowDatas;

            if (data == null)
            {
                return;
            }
            if (data.Type == "管线")
            {
                ParentWindow.lineprop.Visibility = Visibility.Visible;
                ParentWindow.lineframe.Refresh();
                MainWindow.lineda = dbOpera.Instance.getData("line_attribute_t", "*", "名称='" + data.Name + "'");
                if (MainWindow.lineda.Rows.Count == 0)
                {
                    return;
                }
                LineProperty.TextSearch();
                ParentWindow.lineframe.Content = LineProperty;
            }
            else
            {
                MapMark.dt = signcheck(data.Type, data.Id);
                ParentWindow.deframe.Refresh();
                ParentWindow.deprop.Visibility = Visibility.Visible;
                deviceproperty.TextSearch();
                ParentWindow.deframe.Content = deviceproperty;
            }
        }
Esempio n. 2
0
        private void Lackwarming_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            ShowDatas data = ((DataGrid)sender).SelectedItem as ShowDatas;

            if (data == null)
            {
                return;
            }
            if (data.Type == "管线")
            {
                //ParentWindow.lineprop.Visibility = Visibility.Visible;
                //ParentWindow.lineframe.Refresh();
                //MainWindow.lineda = dbOpera.Instance.getData("line_attribute_t", "*", "名称='" + data.Name + "'");
                //if (MainWindow.lineda.Rows.Count == 0) return;
                //LineProperty.TextSearch();
                //ParentWindow.lineframe.Content = LineProperty;
            }
            else
            {
                MapMark.dt = PipProp.signcheck(data.Type, data.Id);
                double lat = System.Convert.ToDouble(MapMark.dt.Rows[0]["纬度"]);
                double lng = System.Convert.ToDouble(MapMark.dt.Rows[0]["经度"]);
                parentWindow.mapcontrol.setCenter(lat, lng);
                ParentWindow.deframe.Refresh();
                ParentWindow.deprop.Visibility = Visibility.Visible;
                parentWindow.deframe.Refresh();
                try
                {
                    if (MapMark.dt.Rows[0]["类型"] != null)
                    {
                        ultimates.TextSearch();
                        ParentWindow.deframe.Content = ultimates;
                    }
                }
                catch
                {
                    deviceproperty.TextSearch();
                    ParentWindow.deframe.Content = deviceproperty;
                }
            }
        }