Ejemplo n.º 1
0
        public static GraphWindowProperties Get_CycleGraphicSetup(CANStreamCycle oCycle)
        {
            GraphWindowProperties oGraphProps = new GraphWindowProperties();

            if (!(oCycle.oCanNodesMap == null))
            {
                oGraphProps.GraphLayoutMode = GraphicWindowLayoutModes.Parallel;

                foreach (CANMessage oMsg in oCycle.oCanNodesMap.Messages)
                {
                    if (oMsg.RxTx == CanMsgRxTx.Tx)
                    {
                        foreach (CANParameter oParam in oMsg.Parameters)
                        {
                            oGraphProps.Create_Serie(oParam.Name);

                            GraphSerieProperties oSerieProps = oGraphProps.Get_SerieByName(oParam.Name);

                            if (!(oSerieProps == null))
                            {
                                oSerieProps.YAxis.AxisTitleVisible = true;
                            }
                        }
                    }
                }

                return(oGraphProps);
            }

            return(null);
        }
Ejemplo n.º 2
0
        public CS_DataViewerPage()
        {
            Name  = "";
            KeyId = -1;

            GraphicProperties = new GraphWindowProperties();
        }
Ejemplo n.º 3
0
        private void OpenViewerPage()
        {
            if (Dlg_OpenViewerPage.ShowDialog().Equals(DialogResult.OK))
            {
                GraphWindowProperties oProps = new GraphWindowProperties();

                if (oProps.Open_Properties(Dlg_OpenViewerPage.FileName))
                {
                    NewViewerPage(-1, "", oProps);
                }
                else
                {
                    MessageBox.Show("Data viewer page file reading error !", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
            }
        }
Ejemplo n.º 4
0
        private void NewViewerPage(int PageIndex, string PageName, GraphWindowProperties WaveProps)
        {
            TabPage NewPage = new TabPage();

            if (PageName.Equals(""))
            {
                PageName = "Page " + Tab_Viewers.TabPages.Count.ToString();
            }
            NewPage.Text = PageName;
            NewPage.Tag  = NextViewerPageKeyId;
            NextViewerPageKeyId++;

            Ctrl_WaveForm oWaveDisp = new Ctrl_WaveForm();

            //oWaveDisp.Set_OpenFileVisible(false);
            oWaveDisp.OpenFileVisible = false;
            if (!(WaveProps == null))
            {
                oWaveDisp.Properties = WaveProps;
            }
            oWaveDisp.Left   = 0;
            oWaveDisp.Top    = 0;
            oWaveDisp.Width  = NewPage.Width;
            oWaveDisp.Height = NewPage.Height;
            oWaveDisp.Anchor = (AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom);

            NewPage.Controls.Add(oWaveDisp);

            if (PageIndex == -1)
            {
                PageIndex = Tab_Viewers.TabPages.Count - 1;
            }
            Tab_Viewers.TabPages.Insert(PageIndex, NewPage);
            Tab_Viewers.SelectedTab = NewPage;

            if (!(oConcatData == null))
            {
                oWaveDisp.Set_DataFile(oConcatData);
                oWaveDisp.Refresh_Graphic();
            }

            ViewerBook.bModified = true;
        }
Ejemplo n.º 5
0
        public MainForm()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

                        #if DEBUG
            GraphWindowProperties oProperties = new GraphWindowProperties();
            oProperties.Open_Properties(Application.StartupPath + "\\GraphConfigTest_Overlay.xgw");

            GW_DataFile oData = new GW_DataFile();
            //oData.Load_DataFile(Application.StartupPath + "\\DataTest.csv");	//FR: Decimal separator ','
            oData.Load_DataFile(Application.StartupPath + "\\DataTest2.csv");                   //US: Decimal separator '.'

            this.ctrl_WaveForm1.Properties = oProperties;
            this.ctrl_WaveForm1.Set_DataFile(oData);
                        #endif
        }