Exemple #1
0
        public PageCanBuy(Window2 parentWindow)
        {
            _parentWin = parentWindow;
            InitializeComponent();

            List <double> pricelist = GameSql.instance.GetPrice(_parentWin.gid);
            DateTime      gissue    = GameSql.instance.GetGameIssue(_parentWin.gid);

            if (gissue > DateTime.Now)
            {
                Label_GameName.Content         = "尚未发售:" + GameSql.instance.GetGameName(_parentWin.gid);
                Label_text.Content             = "发售日期" + gissue.ToLongDateString();
                Label_selling_value.Visibility = Visibility.Hidden;
                beforesell.Text       = "\n";
                aftersell.Text        = "¥" + pricelist[0].ToString("0.00");
                Button_buy.Visibility = Visibility.Hidden;
            }
            else
            {
                Label_GameName.Content = "购买" + GameSql.instance.GetGameName(_parentWin.gid);
                if (GameSql.instance.GetDiscountStatus(_parentWin.gid))
                {
                    DateTime discontend = GameSql.instance.GetDiscountEndTime(_parentWin.gid);
                    Label_text.Content          = "特别价格!" + discontend.ToLongDateString() + "截止";
                    Label_selling_value.Content = string.Format("-{0}%", (int)pricelist[2]);
                    beforesell.Text             = "¥" + pricelist[0].ToString("0.00") + "\n";
                    aftersell.Text = "¥" + pricelist[1].ToString("0.00");
                    buyprice       = pricelist[1];
                }
                else
                {
                    Label_text.Content             = "";
                    Label_selling_value.Visibility = Visibility.Hidden;
                    beforesell.Text = "\n";
                    aftersell.Text  = "¥" + pricelist[0].ToString("0.00");
                    buyprice        = pricelist[0];
                }
            }
        }
Exemple #2
0
 public PageDeInfo(Window2 parentWindow)
 {
     _parentWin = parentWindow;
     InitializeComponent();
     Changecontent();
 }
Exemple #3
0
 public PageReview(Window2 ParentWindow)
 {
     _parentWin = ParentWindow;
     InitializeComponent();
     SetContent();
 }