void IPersistable.Load(SettingsStorage storage) { var securityId = storage.GetValue <string>("SecurityId"); if (securityId != null) { SecurityPicker.SelectedSecurity = SecurityProvider.LookupById(securityId); } var asksGridSettings = storage.GetValue <SettingsStorage>("SecurityAsksGrid"); if (asksGridSettings != null) { SecurityAsksGrid.Load(asksGridSettings); } var bidsGridSettings = storage.GetValue <SettingsStorage>("SecurityBidsGrid"); if (bidsGridSettings != null) { SecurityBidsGrid.Load(bidsGridSettings); } var buySellSettings = storage.GetValue <SettingsStorage>("BuySellSettings"); if (buySellSettings != null) { BuySellPanel.Load(buySellSettings); } }
void IPersistable.Save(SettingsStorage storage) { storage.SetValue("SecurityId", SecurityPicker.SelectedSecurity != null ? SecurityPicker.SelectedSecurity.Id : null); storage.SetValue("SecurityAsksGrid", SecurityAsksGrid.Save()); storage.SetValue("SecurityBidsGrid", SecurityBidsGrid.Save()); storage.SetValue("BuySellSettings", BuySellPanel.Save()); }