Example #1
0
 public void Register(AnalyticsController cont)
 {
     Controller = cont;
     Controller.FileOpenedEvent += new AnalyticsController.FileOpened(Controller_FileOpenedEvent);
     Controller.FileClosedEvent += new AnalyticsController.FileClosed(Controller_FileClosedEvent);
     Controller.GraphCreatedEvent += new AnalyticsController.GraphCreated(Controller_GraphCreatedEvent);
 }
Example #2
0
 public void Register(AnalyticsController cont)
 {
     //if (type == ExplorerType.Graph) { InitializeGraphExplorer(); }
     Controller = cont;
     //Controller.FileOpenedEvent += new AnalyticsController.FileOpened(FileOpenedEvent);
     //Controller.FileClosedEvent += new AnalyticsController.FileClosed(FileClosedEvent);
     Controller.GraphCreatedEvent += new AnalyticsController.GraphCreated(GraphCreatedEvent);
 }
Example #3
0
 public void Register(AnalyticsController cont,ExplorerType type)
 {
     Type = type;
     this.Text = type.ToString()+" Explorer";
     if (type == ExplorerType.Graph) { InitializeGraphExplorer(); }
     Controller = cont;
     Controller.FileOpenedEvent += new AnalyticsController.FileOpened(FileOpenedEvent);
     Controller.FileClosedEvent += new AnalyticsController.FileClosed(FileClosedEvent);
     //Controller.GraphCreatedEvent += new AnalyticsController.GraphCreated(GraphCreatedEvent);
 }
Example #4
0
 bool GraphCreatedEvent(AnalyticsController aC, GraphEventArgs e)
 {
     //e.CreatedGraph.Show(dockPanel1, DockState.Document);
     e.CreatedGraph.Show(dockPanel1);
     DockList.Add(e.CreatedGraph);
     //if (e.GraphType == GraphType.TwoD)
     //{
     //    UpdateGraph ug = new UpdateGraph();
     //    ug.DockTo(e.CreatedGraph.PanelPane.DockPanel, DockStyle.Bottom);
     //    ug.Show();
     //    ug.DockStateChanged += new EventHandler(UpdateGraphMainView_DockStateChanged);
     //}
     e.CreatedGraph.DockStateChanged += new EventHandler(CreatedGraph_DockStateChanged);
     return false;
 }
Example #5
0
        bool FileOpenedEvent(AnalyticsController aC, FileOpenEventArgs e)
        {
            dockPanel1.SuspendLayout(true);
            //if (rmsDockPanel == null)
            //{
            //    rmsDockPanel = new DockPanel();
            //    rmsDockPanel.Dock = DockStyle.Fill;
            //    rmsDockPanel.Show();
            //    if (rmsDockForm == null)
            //    {
            //        rmsDockForm = new Form();
            //        this.Controls.Add(rmsDockPanel);
            //        rmsDockForm.Controls.Add(rmsDockPanel);
            //        rmsDockPanel.Dock = DockStyle.Fill;
            //        rmsDockForm.Show();
            //    }
            //}

            graphsToolStripMenuItem.Enabled = true;
            tsmiAccelGraphs.Enabled = true;
            tsmiMagGraphs.Enabled = true;
            tsmiPowerGraphs.Enabled = true;
            tsmiVelocGraphs.Enabled = true;
            //e.FreqGraphDock.HideOnClose = true;

            if (e.RMSDock != null)
            {
                e.RMSDock.DockPanel = dockPanel1;
                if (e.RMSDock.DockPanel.DocumentStyle == DocumentStyle.DockingMdi)
                {
                    e.RMSDock.MdiParent = this;
                    //e.RMSDock.Show(dockPanel1, new Rectangle(98,133,200,383));
                }
                else
                {
                    //e.RMSDock.Show(dockPanel1, new Rectangle(98,133,200,383));
                }
                e.RMSDock.DockState = DockState.DockRight;
                e.RMSDock.Dock = DockStyle.None;
                //e.RMSDock.DockTo(rmsFP.Pane, DockStyle.Fill, 1);
                if (docks < 4)
                {
                    rmsDocs[docks] = e.RMSDock;
                    switch (docks)
                    {
                        case 0:
                            e.RMSDock.DockTo(rmsDocs[docks].Pane, DockStyle.Fill, 1);
                            break;
                        case 1:
                            e.RMSDock.DockTo(rmsDocs[0].Pane, DockStyle.Right, 1);
                            break;
                        case 2:
                            e.RMSDock.DockTo(rmsDocs[0].Pane, DockStyle.Bottom, 1);
                            break;
                        case 3:
                            e.RMSDock.DockTo(rmsDocs[1].Pane, DockStyle.Bottom, 1);
                            break;
                    }
                }
                else
                {
                    e.RMSDock.DockTo(rmsDocs[docks % 4].Pane, DockStyle.Fill, 1);
                }
                docks++;
            }

            if (e.RMSCDock != null && !e.RMSCDock.Visible)
            {
                e.RMSCDock.DockPanel = dockPanel1;
                if (e.RMSCDock.DockPanel.DocumentStyle == DocumentStyle.DockingMdi)
                {
                    e.RMSCDock.MdiParent = this;
                    e.RMSCDock.DockState = DockState.DockRight;
                    e.RMSCDock.Dock = DockStyle.None;
                }
            }

            e.FreqGraphDock.DockPanel = dockPanel1;
            if (e.FreqGraphDock.DockPanel.DocumentStyle == DocumentStyle.SystemMdi)
            {
                e.FreqGraphDock.MdiParent = this;
                e.FreqGraphDock.Show();
            }
            else
            {
                e.FreqGraphDock.Show(dockPanel1);
            }
            //e.FreqGraphDock.Show(this.dockPanel1, DockState.Document);
            e.FreqGraphDock.DockStateChanged += new EventHandler(FreqGraphDock_DockStateChanged);
            DockList.Add(e.FreqGraphDock);
            //e.TimeGraphDock.HideOnClose = true;
            e.TimeGraphDock.DockPanel = dockPanel1;
            if (e.TimeGraphDock.DockPanel.DocumentStyle == DocumentStyle.SystemMdi)
            {
                e.TimeGraphDock.MdiParent = this;
                e.TimeGraphDock.Show();
            }
            else
            {
                e.TimeGraphDock.Show();
            }
            //e.TimeGraphDock.Show(this.dockPanel1, DockState.Document);
            e.TimeGraphDock.DockStateChanged += new EventHandler(TimeGraphDock_DockStateChanged);
            DockList.Add(e.TimeGraphDock);
            DockList.Add(e.ThreeDFreqDock);
            DockList.Add(e.ThreeDTimeDock);

            //e.ThreeDTimeDock.Show(this.dockPanel1, DockState.Document);
            //e.ThreeDTimeDock.DockStateChanged += new EventHandler(ThreeDTimeDock_DockStateChanged);
            //e.ThreeDFreqDock.Show(this.dockPanel1, DockState.Document);
            //e.ThreeDFreqDock.DockStateChanged += new EventHandler(ThreeDFreqDock_DockStateChanged);

            dockPanel1.ResumeLayout(true,true);
            return false;
        }
Example #6
0
 bool FileClosedEvent(AnalyticsController aC, EventArgs e)
 {
     throw new NotImplementedException();
 }
Example #7
0
 public void Register(AnalyticsController cont)
 {
     Controller = cont;
     Controller.FileOpenedEvent += new AnalyticsController.FileOpened(FileOpenedEvent);
     Controller.FileClosedEvent += new AnalyticsController.FileClosed(FileClosedEvent);
     Controller.GraphCreatedEvent += new AnalyticsController.GraphCreated(GraphCreatedEvent);
     Controller.UpdateGraphMainView.DockStateChanged += new EventHandler(UpdateGraphMainView_DockStateChanged);
 }
Example #8
0
 bool GraphCreatedEvent(AnalyticsController aC, GraphEventArgs e)
 {
     GraphListComboBox.Items.Add(e.CreatedGraph.Text);
     e.CreatedGraph.ControlRemoved += new ControlEventHandler(CreatedGraph_ControlRemoved);
     return false;
 }
Example #9
0
 bool Controller_GraphCreatedEvent(AnalyticsController aC, GraphEventArgs e)
 {
     return false;
     //throw new NotImplementedException();
 }
Example #10
0
 bool Controller_FileOpenedEvent(AnalyticsController aC, FileOpenEventArgs e)
 {
     return false;
     //throw new NotImplementedException();
 }
Example #11
0
 bool FileOpenedEvent(AnalyticsController aC, FileOpenEventArgs e)
 {
     //GraphListComboBox.Items.Add(Controller.OpenedFile.FileName);
     AddFile(Controller.OpenedFile);
     return false;
 }
Example #12
0
 bool FileClosedEvent(AnalyticsController aC, EventArgs e)
 {
     Remove(Controller.ClosedFile);
     return false;
 }
        public USBThreadClass(AnalyticsController controller)
        {
            Controller = controller;
            rawAccelData = new List<Byte>();
            parsedData = new List<Int16>();

            //TEST
            for (int i = 0; i < 4800; i++)
            {
                short y = (short)(Math.Sin(i * Math.PI / 15.0) * 16.0);
                parsedData.Add(y);
            }
        }
 public GraphUpdaterThreadClass(AnalyticsController controller)
 {
     Controller = controller;
 }