Пример #1
0
 public InsertPriceViewModel(IGlobalConfigurations globalConf)
 {
     _GlobalConfig   = globalConf;
     _PriceRgx       = new Regex(@"^(\d+([\.\,]\d+)?)\s*([kmb])$", RegexOptions.IgnoreCase);
     CmdGetMapleItem = new AsyncCommand(() => GetMapleItem(), (o) => true);
     _Sold           = false;
     _Source         = "SHOP";
     SourceChoices   = new ObservableCollection <string>()
     {
         "OWL",
         "SHOP",
         "SOLD"
     };
     _SelectedEvents = new ObservableCollection <Event>();
     _EventChoices   = new ObservableCollection <Event>()
     {
         new Event()
         {
             name = "Anniversary"
         },
         new Event()
         {
             name = "Haloween"
         },
         new Event()
         {
             name = "Christmas"
         }
     };
 }
Пример #2
0
        public GetItemViewModel(IGlobalConfigurations globalConf)
        {
            _GlobalConf            = globalConf;
            CmdUpdateResearchTimer = new RelayCommand(() => UpdateSearchTimer(), () => true);
            CmdAcceptSelection     = new RelayCommand(() => AcceptSelection(), () => SelectedItem != null);
            CmdCancelSelection     = new RelayCommand(() => CancelSelection(), () => true);


            SearchFilter = "";

            _SearchTimer = new Timer(250)
            {
                AutoReset = false,
                Enabled   = false
            };
            _SearchTimer.Elapsed += SearchTimer_Elapsed;
            _AllItems             = new List <Item>();
            ExecuteSearch();
        }
Пример #3
0
 public MainWindowViewModel(IGlobalConfigurations globalConf)
 {
     _GlobalConf    = globalConf;
     _CmdSelectItem = new AsyncCommand(() => SelectMapleItem(), (o) => true);
 }