コード例 #1
0
        public TaskIconViewModel()
        {
            settingsLogic = new SettingsLogic();
            historyLogic  = new HistoryLogic();
            wordLogic     = new WordLogic();

            InitLearner();
            InitDynamic();

            LoadCommands();
        }
コード例 #2
0
        public void changeItemDeletedById(int id, bool deleted)
        {
            var  item    = connection.Item.Where(x => x.id_item == id).FirstOrDefault();
            Item itemOld = (Item)item.Clone();

            item.deleted     = deleted;
            item.modify_date = DateTime.Now;
            connection.SubmitChanges();

            var hisotry = new HistoryLogic();

            hisotry.addItem(item, itemOld);
            hisotry.save();
        }
コード例 #3
0
        public string GetHistory(string identifier)
        {
            var obj    = new HistoryLogic(_context);
            var header = obj.SelectSchemaHeaderSync();
            var data   = obj.SelectSpecificdata(identifier);

            Task.WaitAll(data);

            var result = new TableFormatter {
                Header = header, Body = data.Result
            };

            return(Tools.ConvertToJSON(result));
        }
コード例 #4
0
 public UsersController(SupplyChainContext context,
                        UserManager <ApplicationUser> userManager,
                        SignInManager <ApplicationUser> signInManager,
                        RoleManager <ApplicationRole> roleManager,
                        ILogger <UsersController> logger)
     : base(context)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _rolesManager  = roleManager;
     _logger        = logger;
     _setting       = new SettingLogic(context);
     _history       = new HistoryLogic(context);
 }
コード例 #5
0
ファイル: MainViewModel.cs プロジェクト: binhnd10/EDictionary
		private void LoadLogic()
		{
			settingsLogic = new SettingsLogic();

			wordLogic = new WordLogic();
			WordList = wordLogic.WordList;

			historyLogic = new HistoryLogic();
			history = historyLogic.LoadHistory<string>();

			Word word;
			if (history.Count > 0)
				word = wordLogic.Search(history.Current);
			else
				word = wordLogic.Search(WordList.FirstOrDefault());

			if (word != null)
				ShowDefinition(word);

			NotifyHistoryChange();
		}