Ejemplo n.º 1
0
        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);
            }
        }
        public override void Save(SettingsStorage settings)
        {
            settings.SetValue("GridSettings", MdControl.Save());
            settings.SetValue("BuySellSettings", BuySellPanel.Save());

            base.Save(settings);
        }
Ejemplo n.º 3
0
        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());
        }
        public override void Load(SettingsStorage settings)
        {
            MdControl.Load(settings.GetValue <SettingsStorage>("GridSettings"));

            var buySellSettings = settings.GetValue <SettingsStorage>("BuySellSettings");

            if (buySellSettings != null)
            {
                BuySellPanel.Load(buySellSettings);
            }

            base.Load(settings);
        }