Example #1
0
        public Fl_termo_window(Modbus modbus_pered, Termo_correction termo_pered, Translation trans)
        {
            modbus = modbus_pered;
            //Termo = termo_pered;
            Points_table = new Points();
            InitializeComponent();

            currentTranslation = trans;
        }
Example #2
0
        private void CheckAppFoldersAndFiles()
        {
            try
            {
                if (!Directory.Exists(appDir))
                {
                    Directory.CreateDirectory(appDir);
                }



                if (!File.Exists(appDir + Properties.Resources.DefSettingsFile))
                {
                    DefaultSettings settings = new DefaultSettings()
                    {
                        Baudrate        = 19200,
                        ModbusID        = 1,
                        Port            = "",
                        DefaultLanguage = Properties.Resources.DefaultLanguage
                    };

                    AppSettings.SaveSettingsToXML <DefaultSettings>(appDir + Properties.Resources.DefSettingsFile, settings);
                }

                if (!File.Exists(appDir + Properties.Resources.ThermoStockFile))
                {
                    Termo_correction thermo = new Termo_correction();

                    AppSettings.SaveSettingsToXML <Termo_correction>(appDir + Properties.Resources.ThermoStockFile, thermo);
                }

                if (!File.Exists(appDir + Properties.Resources.PointsFile))
                {
                    etc.Points points = new etc.Points()
                    {
                    };

                    AppSettings.SaveSettingsToXML <etc.Points>(appDir + Properties.Resources.PointsFile, points);
                }
            }
            catch { }
        }