Example #1
0
        private void LoadBatchOptions()
        {
            try
            {
                string appDirectory = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Solibri Batch Manager");
                if (!Directory.Exists(appDirectory))
                {
                    Directory.CreateDirectory(appDirectory);
                }
                batchOptionFile = System.IO.Path.Combine(appDirectory, batchOptionFile);

                if (!File.Exists(batchOptionFile))
                {
                    BatchOptions options = new BatchOptions();
                    options.WriteDefault();
                    SettingUtils.WriteSettings(batchOptionFile, options);
                    settings.Options = options;
                }
                else
                {
                    settings.Options = SettingUtils.ReadSettings(batchOptionFile);
                }
            }
            catch (Exception ex)
            {
                string message = ex.Message;
            }
        }