Пример #1
0
        private void comboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ExcelTable excel = this.comboBox.SelectedItem as ExcelTable;

            List <CEntityName> all_entity = null;

            if (excel != null)
            {
                all_entity = App.Instance.Sqlite.SelectAllEntitiesAndErr(excel.Signal);
                //初始化绘图面板
                NewImageForm.Instance().EntityData = null;
                NewImageForm.Instance().Text       = "";

                //添加测斜详情的逻辑
                if (excel.Signal.Trim().Equals("CX"))
                {
                    detail.Visibility = Visibility.Visible;
                }
                else
                {
                    detail.Visibility = Visibility.Hidden;
                }
            }
            this.dataGrid.ItemsSource   = all_entity;
            this.startTime.SelectedDate = null;
            this.startBox.Text          = "";
            this.endTime.SelectedDate   = null;
            this.endBox.Text            = "";
        }
Пример #2
0
 public static NewImageForm Instance()
 {
     if (_form == null || _form.IsDisposed)
     {
         _form = new NewImageForm();
         App.Instance.FatherImageForm = _form;
     }
     return(_form);
 }
Пример #3
0
        private void dataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            CEntityName selectedItem = this.dataGrid.SelectedItem as CEntityName;

            if (selectedItem == null)
            {
                //NewImageForm.Instance().EntityData = null;
                return;
            }
            DateTime?start = this.startTime.SelectedDate as DateTime?;
            DateTime?end   = this.endTime.SelectedDate as DateTime?;

            NewImageForm.Instance().EntityData = App.Instance.Sqlite.SelectDrawEntityData(selectedItem.EntityName, start, end);
            NewImageForm.Instance().Text       = (this.comboBox.SelectedItem as ExcelTable) == null? "测点" + selectedItem.EntityName + "的测量数据":(this.comboBox.SelectedItem as ExcelTable).CurrentFile + ": 测点" + selectedItem.EntityName + "的测量数据";
            if (!NewImageForm.Instance().Visible)
            {
                NewImageForm.Instance().Show();
            }
            if (!string.IsNullOrWhiteSpace(selectedItem.EntityName))
            {
                App.Instance.SelectedNoInfoEntity = selectedItem.EntityName;
            }
        }
Пример #4
0
 private void detail_MouseDown(object sender, MouseButtonEventArgs e)
 {
     NewImageForm.Instance().Child.Show();
 }