Exemplo n.º 1
0
 public void Save()
 {
     if (!Directory.Exists(new FileInfo(Main.AppSettingsSavePath).Directory.FullName))
     {
         Directory.CreateDirectory(new FileInfo(Main.AppSettingsSavePath).Directory.FullName);
     }
     File.WriteAllText(Main.AppSettingsSavePath, JsonParser.Serialize(JsonParser.FromValue(Main.AppSettings)));
 }
Exemplo n.º 2
0
        private void saveFiltersBtn_Click(object sender, EventArgs e)
        {
            SaveFileDialog save = new SaveFileDialog();

            save.Filter     = @"Filter list file|*.flt";
            save.FileName   = $"{openedFile.Name}.flt";
            save.Title      = "Save filter list as...";
            save.DefaultExt = ".flt";
            if (save.ShowDialog() == DialogResult.OK)
            {
                File.WriteAllText(save.FileName, JsonParser.Serialize(JsonParser.FromValue(Filters)));
            }
        }
Exemplo n.º 3
0
 private void setDefaultListBtn_Click(object sender, EventArgs e)
 {
     Main.AppSettings.DefaultFilterList = Main.Filters.Count > 0 ? JsonParser.Serialize(JsonParser.FromValue(Main.Filters)) : "";
 }