Load() 공개 메소드

public Load ( string file ) : void
file string
리턴 void
예제 #1
0
        public TelemetryViewer()
        {
            InitializeComponent();

            // Trackmap
            cTrackMap      = new ucCoordinateMap(this);
            cTrackMap.Dock = DockStyle.Fill;
            this.GraphSplit.Panel1.Controls.Add(cTrackMap);

            // Plotter
            cPlotter = new Plotter {
                Dock = DockStyle.Fill
            };
            cPlotter.Drawn           += cPlotter_Drawn;
            cPlotter.MouseWheel      += cPlotter_Scroll;
            cPlotter.timeline.Scroll += cPlotter_TimelineScroll;

            // Plotter configuration
            _PlotterConfiguration = new PlotterConfigurations();
            _PlotterConfiguration.Load("ChartSetup.txt"); // TODO: Make this independant of configuration files.
            _PlotterConfiguration.Configure(cPlotter);

            this.GraphSplit.Panel2.Controls.Add(cPlotter);

            // Loading.
            _mTelemetryLoading.Tick += new EventHandler(_mTelemetryLoading_Tick);
            _mTelemetryLoading.Start();

            this.FormClosing += new FormClosingEventHandler(TelemetryViewer_FormClosing);
        }
예제 #2
0
        private double _timeScaleOffset = 0; // % of the lap offseted.

        #endregion Fields

        #region Constructors

        public TelemetryViewer()
        {
            InitializeComponent();

            // Trackmap
            cTrackMap = new ucCoordinateMap(this);
            cTrackMap.Dock = DockStyle.Fill;
            this.GraphSplit.Panel1.Controls.Add(cTrackMap);

            // Plotter
            cPlotter = new Plotter { Dock = DockStyle.Fill };
            cPlotter.Drawn += cPlotter_Drawn;
            cPlotter.MouseWheel += cPlotter_Scroll;
            cPlotter.timeline.Scroll += cPlotter_TimelineScroll;

            // Plotter configuration
            _PlotterConfiguration = new PlotterConfigurations();
            _PlotterConfiguration.Load("ChartSetup.txt"); // TODO: Make this independant of configuration files.
            _PlotterConfiguration.Configure(cPlotter);

            this.GraphSplit.Panel2.Controls.Add(cPlotter);

            // Loading.
            _mTelemetryLoading.Tick += new EventHandler(_mTelemetryLoading_Tick);
            _mTelemetryLoading.Start();

            this.FormClosing += new FormClosingEventHandler(TelemetryViewer_FormClosing);
        }
예제 #3
0
        private double _timeScaleOffset = 0; // % of the lap offseted.

        #endregion Fields

        #region Constructors

        public MainForm()
        {
            this.FormClosing += new FormClosingEventHandler(_FormClosing);
            InitializeComponent();

            // TRACK MAP
            cTrackMap = new TrackMap {Dock = DockStyle.Fill};
            this.cSidePanelSplit.Panel1.Controls.Add(cTrackMap);

            // TRACKS LIST
            cTracks = new VisualListDetails(false) { Size = new Size(1, 120), Dock = DockStyle.Bottom };
            cTracks.Columns.Add("track", "Track", 200);
            cTracks.MultiSelect = false;
            cTracks.ItemSelectionChanged += cTracks_ItemSelectionChanged;
            this.cSidePanelSplit.Panel2.Controls.Add(cTracks);

            // SESSIONS LIST
            cSessions = new VisualListDetails(false) { Size = new Size(1, 120), Dock = DockStyle.Bottom };
            cSessions.Columns.Add("session", "Session", 150);
            cSessions.Columns.Add("date", "Date", 100);
            cSessions.Columns.Add("iter", "#", 100);
            cSessions.MultiSelect = false;
            cSessions.ItemSelectionChanged += new ListViewItemSelectionChangedEventHandler(cSessions_ItemSelectionChanged);
            this.cSidePanelSplit.Panel2.Controls.Add(cSessions);

            // LAPS LIST
            cLaps = new VisualListDetails(false) { Size = new Size(1, 120), Dock = DockStyle.Bottom };
            cLaps.Columns.Add("lap", "Lap #");
            cLaps.Columns.Add("time", "Time");
            cLaps.Columns.Add("file", "file",1);
            cLaps.ItemSelectionChanged += LapsList_Changed;
            this.cSidePanelSplit.Panel2.Controls.Add(cLaps);

            // Plotter
            cPlotter = new Plotter {Dock = DockStyle.Fill};
            cPlotter.Drawn += cPlotter_Drawn;
            cPlotter.MouseWheel += cPlotter_Scroll;
            cPlotter.timeline.Scroll += cPlotter_TimelineScroll;

            // Plotter configuration
            _PlotterConfiguration = new PlotterConfigurations();
            _PlotterConfiguration.Load("ChartSetup.txt");
            _PlotterConfiguration.Configure(cPlotter);

            cScreenSplit.Panel2.Controls.Add(cPlotter);

            // Select files
            try
            {
                List<string> files =
                    Directory.GetFiles(LogsMap).ToList();
                List<string> tracks = new List<string>();
                foreach (string log in files)
                {
                    string track = log.Substring(0, log.IndexOf("+"));
                    int slash = track.IndexOf("Logs");
                    track = track.Substring(slash + 5);
                    if (tracks.Contains(track) == false)
                        tracks.Add(track);

                }
                foreach (string track in tracks)
                {
                    cTracks.Items.Add(new ListViewItem(track));
                }
            }catch(Exception ex)
            {
                MessageBox.Show(ex.Message);
                MessageBox.Show(ex.StackTrace);
            }
        }
예제 #4
0
        public MainForm()
        {
            this.FormClosing += new FormClosingEventHandler(_FormClosing);
            InitializeComponent();


            // TRACK MAP
            cTrackMap = new TrackMap {
                Dock = DockStyle.Fill
            };
            this.cSidePanelSplit.Panel1.Controls.Add(cTrackMap);

            // TRACKS LIST
            cTracks = new VisualListDetails(false)
            {
                Size = new Size(1, 120), Dock = DockStyle.Bottom
            };
            cTracks.Columns.Add("track", "Track", 200);
            cTracks.MultiSelect           = false;
            cTracks.ItemSelectionChanged += cTracks_ItemSelectionChanged;
            this.cSidePanelSplit.Panel2.Controls.Add(cTracks);

            // SESSIONS LIST
            cSessions = new VisualListDetails(false)
            {
                Size = new Size(1, 120), Dock = DockStyle.Bottom
            };
            cSessions.Columns.Add("session", "Session", 150);
            cSessions.Columns.Add("date", "Date", 100);
            cSessions.Columns.Add("iter", "#", 100);
            cSessions.MultiSelect           = false;
            cSessions.ItemSelectionChanged += new ListViewItemSelectionChangedEventHandler(cSessions_ItemSelectionChanged);
            this.cSidePanelSplit.Panel2.Controls.Add(cSessions);

            // LAPS LIST
            cLaps = new VisualListDetails(false)
            {
                Size = new Size(1, 120), Dock = DockStyle.Bottom
            };
            cLaps.Columns.Add("lap", "Lap #");
            cLaps.Columns.Add("time", "Time");
            cLaps.Columns.Add("file", "file", 1);
            cLaps.ItemSelectionChanged += LapsList_Changed;
            this.cSidePanelSplit.Panel2.Controls.Add(cLaps);

            // Plotter
            cPlotter = new Plotter {
                Dock = DockStyle.Fill
            };
            cPlotter.Drawn           += cPlotter_Drawn;
            cPlotter.MouseWheel      += cPlotter_Scroll;
            cPlotter.timeline.Scroll += cPlotter_TimelineScroll;

            // Plotter configuration
            _PlotterConfiguration = new PlotterConfigurations();
            _PlotterConfiguration.Load("ChartSetup.txt");
            _PlotterConfiguration.Configure(cPlotter);


            cScreenSplit.Panel2.Controls.Add(cPlotter);

            // Select files
            try
            {
                List <string> files =
                    Directory.GetFiles(LogsMap).ToList();
                List <string> tracks = new List <string>();
                foreach (string log in files)
                {
                    string track = log.Substring(0, log.IndexOf("+"));
                    int    slash = track.IndexOf("Logs");
                    track = track.Substring(slash + 5);
                    if (tracks.Contains(track) == false)
                    {
                        tracks.Add(track);
                    }
                }
                foreach (string track in tracks)
                {
                    cTracks.Items.Add(new ListViewItem(track));
                }
            }catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                MessageBox.Show(ex.StackTrace);
            }
        }