Exemple #1
0
 static AppSetting()
 {
     string configPath = Path.GetTempPath();
     _fileName = Path.Combine(configPath, "ScutSM", "setting.ini");
     _setting = new AppSetting();
     LoadConfig();
 }
Exemple #2
0
 public SettingForm(SettingTabType tabType, Action<string> errorOut)
 {
     _setting = AppSetting.Current;
     _errorOut = errorOut;
     InitializeComponent();
     if (_setting.Entity.IsScript)
     {
         radioEntityPath.Checked = true;
     }
     else
     {
         radioEntityAsmPath.Checked = true;
     }
     LoadConfig();
     this.tabControl1.SelectTab((int)tabType);
 }
Exemple #3
0
 private static void LoadConfig()
 {
     try
     {
         if (File.Exists(_fileName))
         {
             string data = File.ReadAllText(_fileName, Encoding.UTF8);
             if (!string.IsNullOrEmpty(data))
             {
                 _setting = JsonUtils.Deserialize<AppSetting>(data);
             }
             LoadAssembly();
         }
     }
     catch (Exception ex)
     {
     }
 }