private void Initialize() { _isAddMode = true; _database = new DailyAccountDB(); TypeList = new List <ItemType>(); TypeList.Add(ItemType.Kakao); TypeList.Add(ItemType.Samsung); TypeList.Add(ItemType.Hana); TypeList.Add(ItemType.Hyundai); TypeList.Add(ItemType.Cash); TypeList.Add(ItemType.Income); SelectedType = TypeList[0]; ItemCollection = new ObservableCollection <DailyModel>(); GraphItemCollection = new ObservableCollection <GraphModel>(); GraphDataCollection = new SeriesCollection(); TotalIncome = 0; TotalOutgo = 0; TotalAmount = 0; TotalOutgoToolTip = string.Format("삼성: {0:n0}\n카카오: {1:n0}\n하나: {2:n0}\n현대: {3:n0}\n현금: {4:n0}", 0, 0, 0, 0, 0); TotalAmountToolTip = string.Format("삼성: {0:n0}\n카카오: {1:n0}\n하나: {2:n0}\n현대: {3:n0}\n현금: {4:n0}\n\n수입: {5:n0}", 0, 0, 0, 0, 0, 0); _week = 0; _selectedDate = DateTime.Today.AddDays(_week * 7); IsShowGraph = false; MondayDate = DateHelper.ToStringDate(DateHelper.GetMondayOfWeek(_selectedDate)); SundayDate = DateHelper.ToStringDate(DateHelper.GetSundayOfWeek(_selectedDate)); Refresh(); _refreshClick = new RelayCommand((param) => Refresh(), true); _prevWeekClick = new RelayCommand((param) => PrevWeek(), true); _nextWeekClick = new RelayCommand((param) => NextWeek(), true); _deleteClick = new RelayCommand((param) => Delete(), true); _addUpdateClick = new RelayCommand((param) => AddUpdate(), true); _printClick = new RelayCommand((param) => Print(), true); _clearClick = new RelayCommand((param) => Clear(), true); _graphToggleClick = new RelayCommand((param) => GraphToggle(), true); }
private void Initialize() { _database = new DailyAccountDB(); _consumeList = new ObservableCollection <KeyValuePair <string, int> >(); _categoryList = new List <AnalyzeCategoryModel>(); }