private void LoadToken() { if (File.Exists(userFilePath)) { string json = string.Empty; using (StreamReader sr = new StreamReader(userFilePath)) { json = sr.ReadToEnd(); } try { switter = JsonConvert.DeserializeObject <Switter>(json); } catch (Exception e) { App.SendException("Load Switter Error", ""); } if (switter == null) { switter = new Dalsae.FileManager.Switter(); } ChangeAccount(switter.selectAccount); } }
public void ClearAccountData() { switter = new Switter(); SaveSwitter(); }