Пример #1
0
        private void App_Startup(object sender, StartupEventArgs e)
        {
            WindowStart windowStart = new WindowStart();

            Application.Current.MainWindow = windowStart;
            windowStart.Show();
        }
Пример #2
0
        private void App_Startup(object sender, StartupEventArgs e)
        {
            WindowStart windowStart = new WindowStart();

            Application.Current.MainWindow = windowStart;

            XmlDocument doc = new XmlDocument();

            doc.Load("../CopyConfig.xml");
            string appCopy = doc.SelectSingleNode("AppConfig").InnerText;

            ManagerPlant.copyManager.AppCopy = appCopy;

            doc = new XmlDocument();
            doc.Load("Config/AppConfig.xml");
            XmlNode xValue = doc.SelectSingleNode("App/DeviationValue/XDeviationValue");
            double  xMin   = Convert.ToDouble(xValue.InnerText.Split(',')[0]);
            double  xMax   = Convert.ToDouble(xValue.InnerText.Split(',')[1]);

            ManagerPlant.copyManager.xValueMin = xMin;
            ManagerPlant.copyManager.xValueMax = xMax;

            XmlNode yValue = doc.SelectSingleNode("App/DeviationValue/YDeviationValue");
            double  yMin   = Convert.ToDouble(yValue.InnerText.Split(',')[0]);
            double  yMax   = Convert.ToDouble(yValue.InnerText.Split(',')[1]);

            ManagerPlant.copyManager.yValueMin = yMin;
            ManagerPlant.copyManager.yValueMax = yMax;

            XmlNode zValue = doc.SelectSingleNode("App/DeviationValue/ZDeviationValue");
            double  zMin   = Convert.ToDouble(zValue.InnerText.Split(',')[0]);
            double  zMax   = Convert.ToDouble(zValue.InnerText.Split(',')[1]);

            ManagerPlant.copyManager.zValueMin = zMin;
            ManagerPlant.copyManager.zValueMax = zMax;
            windowStart.Show();
        }