コード例 #1
0
        /// <summary>
        /// Creates Mathematical Model parameters config file if it doesn't exist, and updates Mathematical Model parameters with the values from config file
        /// </summary>
        public void TreatMMParametersFile()
        {
            /// Creates Mathematical Model parameters config file with default content if it doesn't exist
            string filePath = ConfigFileInit(path, ConfigFileMMParameters.Filename, ConfigFileMMParameters.DefaultContent());

            /// Reads each lines from config file
            ConfigFileMMParameters.ReadFile(filePath);
        }
コード例 #2
0
        /// <summary>
        /// Opens specified configuration configFileType file
        /// </summary>
        /// <param name="configFileType"></param>
        public void OpenConfigFile(ConfigFileType configFileType)
        {
            string filePath;

            switch (configFileType)
            {
            case ConfigFileType.MMParameters:
                filePath = ConfigFileInit(path, ConfigFileMMParameters.Filename, ConfigFileMMParameters.DefaultContent());
                break;

            case ConfigFileType.Devices:
                filePath = ConfigFileInit(path, ConfigFileDevices.Filename, ConfigFileDevices.DefaultContent());
                break;

            case ConfigFileType.Notes:
                filePath = ConfigFileInit(path, ConfigFileNotes.Filename, ConfigFileNotes.DefaultContent());
                break;

            case ConfigFileType.MySQL:
                filePath = ConfigFileInit(path, ConfigFileMySQL.Filename, ConfigFileMySQL.DefaultContent());
                break;

            case ConfigFileType.EPCDatasets:
                filePath = ConfigFileInit(path, ConfigFileEPCs.Filename, ConfigFileEPCs.DefaultContent());
                break;

            case ConfigFileType.Log:

                string date = DateTime.Now.ToShortDateString().Replace('/', '-');

                filePath = Path.Combine(logsPath, String.Format("{0}.log", date));

                break;

            default:
                return;
            }

            /// Open file
            Process.Start(filePath);
        }