Exemplo n.º 1
0
 public void Load()
 {
     NavigationItems.Clear();
     foreach (var item in _friendLookupProvider.GetLookup())
     {
         NavigationItems.Add(new NavigationItemViewModel(
                                 item.Id, item.DisplayValue, _eventAggregator));
     }
 }
Exemplo n.º 2
0
 public void Load()
 {
     NavigationItems.Clear();
     foreach (var unitConfigLookupItem in _unitConfigLookupProvider.GetLookup())
     {
         NavigationItems.Add(
             new NavigationItemViewModel(
                 unitConfigLookupItem.Id,
                 unitConfigLookupItem.DisplayValue,
                 _eventAggregator));
     }
 }
Exemplo n.º 3
0
        public void Load(int?friendId = null)
        {
            FriendGroupLookup = _friendGroupLookupProvider.GetLookup();

            Friend = friendId.HasValue
          ? _friendDataProvider.GetFriendById(friendId.Value)
          : new Friend {
                Address = new Address(), Emails = new List <FriendEmail>()
            };

            InvalidateCommands();
        }
        public void Load()
        {
            //_timer = new System.Timers.Timer(IntervaloContador);
            //_timer.Elapsed += _timer_Elapsed1;
            //_timer.Enabled = true;

            NavigationItems.Clear();

            foreach (var menuFuncionariosItem in _funcionarioLookupProvider.GetLookup())
            {
                NavigationItems.Add(
                    new MenuItemFuncionariosViewModel(
                        menuFuncionariosItem.Id,
                        menuFuncionariosItem.DisplayValue,
                        menuFuncionariosItem.Rosa,
                        menuFuncionariosItem.Vermelho,
                        menuFuncionariosItem.Azul,
                        _eventAggregator));
            }
        }
Exemplo n.º 5
0
        public void Load(int?friendId = null)
        {
            FriendGroupLookup = _friendGroupLookupProvider.GetLookup();

            Friend friend = friendId.HasValue
                ? _friendDataProvider.GetFriendById(friendId.Value)
                : new Friend {
                Address = new Address(), Emails = new List <FriendEmail>()
            };

            Friend = new FriendWrapper(friend);
            Friend.PropertyChanged += (s, e) =>
            {
                if (e.PropertyName == nameof(Friend.IsChanged) || e.PropertyName == nameof(Friend.IsValid))
                {
                    InvalidateCommands();
                }
            };

            InvalidateCommands();
        }
        public void Load(int?unitConfigId = null)
        {
            FriendGroupLookup = _friendGroupLookupProvider.GetLookup();

            var unitConfig = unitConfigId.HasValue
          ? _unitConfigDataProvider.GetUnitConfigById(unitConfigId.Value)
          : new UnitConfig {
                Address = new Address(), Emails = new List <FriendEmail>(), EquipConfigs = new List <EquipConfig>()
            };

            UnitConfig = new UnitConfigWrapper(unitConfig);
            UnitConfig.PropertyChanged += (s, e) =>
            {
                if (e.PropertyName == nameof(UnitConfig.IsChanged) ||
                    e.PropertyName == nameof(UnitConfig.IsValid))
                {
                    InvalidateCommands();
                }
            };

            InvalidateCommands();
        }
 public override Schema GetSchema()
 => Schema.Create(this.Name, "Database Connection")
 .WithText("name", Validator.Required(), Validator.Pattern(@"^\S+$"))
 .WithText("comments")
 .WithSelect("dbProvider", "Database Provider", lookupProvider.GetLookup().ToOptions(), Validator.Required())
 .WithTextArea("connectionString", 3, Validator.Required());