Exemplo n.º 1
0
        private void OnFocusedRowChanged(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
        {
            var row = e.NewRow;

            if (row == null)
            {
                // TODO(crhodes): Perhaps clear the series datasources

                seriesInstance_SpaceAvailable.DataSource = null;
                seriesInstance_Size.DataSource           = null;
                seriesInstance_IndexSpace.DataSource     = null;
                seriesInstance_DataSpace.DataSource      = null;

                return;
            }

            var row2   = (SQLInformation.Data.ApplicationDataSet.InstancesRow)((DataRowView)row).Row;
            var instID = row2.ID;

            var chartSource = EyeOnLife.Common.ApplicationDataSet.InstanceInfo
                              .Where(inst => inst.Instance_ID == instID)
                              .Select(i => new
            {
                SnapShotDate    = i.SnapShotDate,
                IndexSpaceUsage = i.Total_IndexSpaceUsage / 1024.0,
                DataSpaceUsage  = i.Total_DataSpaceUsage / 1024.0,
                SpaceAvailable  = i.Total_SpaceAvailable / 1024.0,
                Size            = i.Total_Size
            });

            try
            {
                System.Diagnostics.Debug.WriteLine(((XYDiagram2D)cht_Instance.Diagram).Panes.Count);
                seriesInstance_SpaceAvailable.DataSource = chartSource;
                seriesInstance_Size.DataSource           = chartSource;
                seriesInstance_IndexSpace.DataSource     = chartSource;
                seriesInstance_DataSpace.DataSource      = chartSource;
            }
            catch (Exception ex)
            {
            }
        }
        void View_FocusedRowChanged(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
        {
            int lineid = 0;

            if (chkLine.IsChecked.HasValue)
            {
                if (chkLine.IsChecked.Value)
                {
                    lineid = 0;
                }
                else
                {
                    lineid = 1;
                }
            }
            //string name = griddetail.View.FocusedRowData.CellData[0].Value.ToString();
            if (e.NewRow == null)
            {
                return;
            }
            Station s = e.NewRow as Station; //line.Stations.SingleOrDefault(x => x.Name == name);

            if (s != null)
            {
                DataCenter.Instance.UpdateEquipmentDetailCenter(s.StaGUID, GetSelectChk(), lineid);

                griddetail.ItemsSource = s.Equipments;

                MonitorDataModel.Instance().CurrentStation = s;
                if (s.Name.Contains("广济南路"))
                {
                    WindowManager.Instance.ShowEquipmentRight();
                }
                else
                {
                    WindowManager.Instance.CloseEquipmentRight();
                }
            }
        }
        private void OnFocusedRowChanged(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
        {
            var row  = e.NewRow;
            var row2 = (SQLInformation.Data.ApplicationDataSet.DatabaseInfoRow)((DataRowView)row).Row;
            var dbID = row2.Database_ID;

            var chartSource = EyeOnLife.Common.ApplicationDataSet.DatabaseInfo
                              .Where(di => di.Database_ID == dbID)
                              .Select(i => new {
                SnapShotDate    = i.SnapShotDate,
                IndexSpaceUsage = i.IndexSpaceUsage / 1024.0,
                DataSpaceUsage  = i.DataSpaceUsage / 1024.0,
                SpaceAvailable  = i.SpaceAvailable / 1024.0,
                Size            = i.Size
            });

            series1.DataSource  = chartSource;
            series1a.DataSource = chartSource;
            series1b.DataSource = chartSource;
            try
            {
                XYDiagram2D.SetSeriesAxisY(series1b, ((XYDiagram2D)chart1.Diagram).SecondaryAxesY[0]);
            }
            catch (Exception ex)
            {
            }

            series2.DataSource  = chartSource;
            series2a.DataSource = chartSource;
            series2b.DataSource = chartSource;
            series2c.DataSource = chartSource;

            series3.DataSource  = chartSource;
            series3a.DataSource = chartSource;
            series3b.DataSource = chartSource;
            series3c.DataSource = chartSource;
        }
Exemplo n.º 4
0
 private void tblView_FocusedRowChanged(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
 {
 }