Пример #1
0
 public Form1()
 {
     InitializeComponent();
     try
     {
         LoadJson();
         LoadSetting();
     }
     catch
     {
     }
     if (listCongViec == null)
     {
         listCongViec = new List <Work>();
     }
     if (appsetting == null)
     {
         appsetting = new Appsetting();
         appsetting.indexComboboxValue = 0;
         appsetting.isAutoStart        = true;
         appsetting.noty          = true;
         appsetting.numerricValue = 1;
     }
     LoadMatrix();
 }
Пример #2
0
        private void LoadSetting()
        {
            if (!File.Exists(Application.StartupPath + "/data/config.json"))
            {
                return;
            }
            string data = File.ReadAllText(Application.StartupPath + "/data/config.json");

            appsetting = JsonConvert.DeserializeObject <Appsetting>(data);
        }