protected override void OnAuthorReq(object param) { AuthorizationRequest = true; MySetting.Save(); BitMexREST = new RESTBitMexSigned(Settings.APIKey, Settings.APISecret, Settings.RealWork); BitMexREST.PropertyChanged += BitMexREST_PropertyChanged; BitMexREST.OnAllPropertyChanged(); bitMexWebSocket = new WebSocketBitMexSigned(Settings.APIKey, Settings.APISecret, Settings.RealWork); bitMexWebSocket.PropertyChanged += BitMexWebSocket_PropertyChangedAsync; bitMexWebSocket.OnAllPropertyChanged(); }
public static void Main(string[] args) { var settings = new MySetting(); Console.WriteLine(settings.Stack); // Default value settings.Stack = "Not Overflowing"; // Assign new value settings.Save(); // Persist the setting's changes var settings2 = new MySetting(); // ReLoad persisted values Console.WriteLine(settings2.Stack); var settings3 = new MySetting(); // Reset values back to their defaults settings3.Reset(); Console.WriteLine(settings3.Stack); }