//For some reason, ScottPlot doesn't like their graphs being cloned so we have to make the graph all over again...
 public GraphWindow(DataGrabber dgrabber, WpfPlot plt, ConfigGrabber confgg, double xOffsetIN, double yOffsetIN)
 {
     InitializeComponent();
     xOffset     = xOffsetIN;
     yOffset     = yOffsetIN;
     DataContext = this;
     dgrab       = dgrabber;
     confg       = confgg;
     createScatterPlot();
 }
Esempio n. 2
0
        private void btnOpenFile_ClickConfig(object sender, RoutedEventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();

            if (openFileDialog.ShowDialog() == true)
            {
                confg = new ConfigGrabber(openFileDialog.FileName);
                LoadConfig.Content = "Config file loaded! \n(Click to load a different one)";
                xOffset            = confg.xStarterOffset;
                yOffset            = confg.yStarterOffset;
                XOffsetBox.Text    = "" + xOffset;
                YOffsetBox.Text    = "" + yOffset;
            }
        }
Esempio n. 3
0
        public MainWindow()
        {
            InitializeComponent();
            DataContext = this;

            //We try to load in a config file, this should be where the .exe is
            try
            {
                confg = new ConfigGrabber("config.xml");
                LoadConfig.Content = "Config file loaded! \n(Click to load a different one)";
                xOffset            = confg.xStarterOffset;
                yOffset            = confg.yStarterOffset;
                XOffsetBox.Text    = "" + xOffset;
                YOffsetBox.Text    = "" + yOffset;
            }
            catch (FileNotFoundException e)
            {
                LoadConfig.Content = "No config file detected\n(Click here to load)";
            }
        }