コード例 #1
0
        public AddNewItemPage()
        {
            this.InitializeComponent();
            this.incomesList = App.user.incomesList;
            var viewTitleBar = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView().TitleBar;

            viewTitleBar.BackgroundColor       = Windows.UI.Colors.LightGray;
            viewTitleBar.ButtonBackgroundColor = Windows.UI.Colors.LightGray;
            NavigationCacheMode = NavigationCacheMode.Enabled;
            date.Date           = DateTimeOffset.Now;
            //Initialize selector
            selector.Items.Add("支出");
            selector.Items.Add("收入");
            selector.SelectedValue = "支出";

            //Initialize dic
            dic = new Dictionary <string, Models.kind>();
            dic.Add("餐饮", Models.kind.food);
            dic.Add("交通", Models.kind.traffic);
            dic.Add("购物", Models.kind.shopping);
            dic.Add("医疗", Models.kind.medical);
            dic.Add("旅行", Models.kind.travel);
            dic.Add("娱乐", Models.kind.entertainment);
            dic.Add("社交", Models.kind.contact);
            dic.Add("投资", Models.kind.investment);
            dic.Add("教育", Models.kind.education);
            dic.Add("其他", Models.kind.other);
            dic.Add("奖金", Models.kind.bonus);
            dic.Add("工资", Models.kind.salary);
            dic.Add("理财", Models.kind.financial);
            dic.Add("福利", Models.kind.welfare);
            dic.Add("其他收入", Models.kind.otherincome);
        }
コード例 #2
0
ファイル: User.cs プロジェクト: ModernOSs/UWP-Project
        // 加入其它list类

        public User(string username, string password)
        {
            this.username = username;
            this.password = password;
            // 后期加入“数据包”
            // 测试数据
            incomesList = new IncomesList();
            goalsList   = new GoalsList();
            incomesList.addIncome(kind.food, "火锅", 120.5, new DateTime(2016, 5, 3), "支出");
            incomesList.addIncome(kind.entertainment, "唱K", 30, new DateTime(2016, 5, 3), "支出");
        }
コード例 #3
0
        public Details()
        {
            this.InitializeComponent();
            this.Loaded        += MainPage_Loaded;
            this.incomesList    = App.user.incomesList;
            NavigationCacheMode = NavigationCacheMode.Enabled;
            var viewTitleBar = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView().TitleBar;

            viewTitleBar.BackgroundColor       = Windows.UI.Colors.LightGray;
            viewTitleBar.ButtonBackgroundColor = Windows.UI.Colors.LightGray;
        }