Example #1
0
        public GearedPlotWindow()
        {
            InitializeComponent();
            AddLinesToConsole("Welcome User!");
            plotTemplate_    = new PlotDataTemplate();
            AutoFetchConfig_ = new AutoFetchConfig();
            _configManager   = new ConfigurationManager();
            _configManager.Initialize();
            _historyAdapter = new HistoryDataAdapter();
            _historyAdapter.Initialize(_configManager);

            String str = (String)((App)Application.Current).Properties["FilePathArgName"];

            OpenFileName(str);
            SeriesCollection = new SeriesCollection();
            timeStamps_      = new List <DateTime> {
                DateTime.Now
            };
            //Labels = new string[0];
            Step       = 1;
            YFormatter = value => String.Format("{0:0.###}", value);
            XFormatter = delegate(double val)
            {
                if (timeStamps_.Count > 0)
                {
                    DateTime startTimeStamp = timeStamps_.ElementAt(0);
                    DateTime timeStamp;
                    timeStamp = startTimeStamp.AddSeconds(val / 25.0);
                    return(timeStamp.ToString("HH:mm:ss.fff\ndd-MMM-yy"));
                }
                return(val.ToString());
            };
            MyChart.LegendLocation = LegendLocation.Top;
            DataContext            = this;
            FetchTimer_            = new DispatcherTimer();
            UpdateFetcherInterval();
            FetchTimer_.Tick += Fetch_Timer_Tick;
        }
Example #2
0
 public AutoFetchConfigMessageEventArgs(AutoFetchConfig autoFetchAonfig)
 {
     this.AutoFetchConfig_ = autoFetchAonfig;
 }
Example #3
0
 public FetchConfigVM()
 {
     this.autoFetchConfig = new AutoFetchConfig();
 }
Example #4
0
 public void SetAutoFetchConfig(AutoFetchConfig autoFetchConfig)
 {
     fetchConfigVM.AutoFetchConfig = autoFetchConfig;
 }