Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!B_ARoleAuth.Check(ZLEnum.Auth.shop, "TotalSale"))
     {
         function.WriteErrMsg("没有权限进行此项操作");
     }
     if (!IsPostBack)
     {
         //按支付平台和日为单位统计,必须指定结束日期
         if (!string.IsNullOrEmpty(Request.QueryString["stime"]))
         {
             SDate_T.Text = Request.QueryString["stime"];
             EDate_T.Text = Request.QueryString["etime"];
         }
         else
         {
             SDate_T.Text = STime.ToString("yyyy/MM/dd");
             EDate_T.Text = ETime.ToString("yyyy/MM/dd");
         }
         Years_Li.Text  = rpBll.Html_Date("year", STime.Year.ToString());
         Months_Li.Text = rpBll.Html_Date("month", STime.Month.ToString());
         MyBind();
         Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "Main.aspx'>工作台</a></li><li><a href='ProductManage.aspx'>商城管理</a></li><li><a href='TotalSale.aspx'>按日销售统计</a></li>");
     }
 }
Exemplo n.º 2
0
        public STime GetStime(double v)
        {
            var st = new STime();

            TimeSpan ts = new TimeSpan(0, 0, Convert.ToInt32(v));

            //得到多少分钟
            st.m = ts.Minutes;
            st.s = ts.Seconds;
            return(st);
        }
Exemplo n.º 3
0
        public MainWindow()
        {
            InitializeComponent();

            Loaded += (e, c) =>
            {
                string nrc = File.ReadAllText("ggh.nrc");
                //string nrc = File.ReadAllText("test.txt");
                NRCView.LoadNRC(nrc);
            };

            dt = new DispatcherTimer();

            //dt.Interval = TimeSpan.FromMilliseconds(0.1);//0.1ms瞬间爆炸
            dt.Interval = TimeSpan.FromMilliseconds(1);

            dt.Tick += (e, c) =>
            {
                UpdatePositionTime();
            };
            me.Source = new Uri(@"薛之谦 - 刚刚好.mp3", UriKind.RelativeOrAbsolute);
            //设置为pause时才能达到启动应用后马上加载音乐以获取总时长
            me.LoadedBehavior = MediaState.Pause;
            //加载音乐后获取总时长
            me.MediaOpened += (e, c) =>
            {
                //将总时长转换为秒单位
                sd.Maximum = (me.NaturalDuration.TimeSpan.Minutes * 60) + me.NaturalDuration.TimeSpan.Seconds;
                //重新设置为手动播放模式,否则无法播放音乐
                me.LoadedBehavior = MediaState.Manual;
            };


            //监听slider的鼠标释放事件,即拖动时不调整音乐的进度,拖动后再调整
            sd.PreviewMouseLeftButtonUp += (e, c) =>
            {
                STime st = GetStime(sd.Value);
                me.Position = new TimeSpan(0, st.m, st.s);

                NRCView.ResetPositionTime(me.Position.TotalMilliseconds);
                //UpdatePositionTime();
            };
            //对slider的值变化监听,修改时可实时显示调整的时间
            sd.ValueChanged += (e, c) =>
            {
                STime    st = GetStime(sd.Value);
                TimeSpan ts = new TimeSpan(0, st.m, st.s);
                metime.Text = ts.ToString("mm") + ":" + ts.ToString("ss");
            };
        }
Exemplo n.º 4
0
        public MainWindow()
        {
            InitializeComponent();
            string lrc = "[00:30.580]编曲 : 郑伟\n\n[00:36.580]如果有人在灯塔\n[00:39.870]拨弄她的头发\n[00:41.980]思念刻在墙和瓦\n[00:45.160]\n[00:45.900]如果感情会挣扎\n[00:48.520]没有说的儒雅\n[00:50.960]把挽回的手放下\n[00:53.910]\n[00:54.560]镜子里的人说假话\n[00:58.530]违心的样子你决定了吗\n[01:02.440]\n[01:03.650]装聋或者作哑 要不我先说话\n[01:11.340]\n[01:15.340]我们的爱情 到这刚刚好\n[01:19.810]剩不多也不少 还能忘掉\n[01:24.960]我应该可以 把自己照顾好\n[01:30.510]\n[01:32.840]我们的距离 到这刚刚好\n[01:37.140]不够我们拥抱 就挽回不了\n[01:41.640]\n[01:42.230]用力爱过的人 不该计较\n[01:48.230]\n[01:58.290]是否要逼人弃了甲\n[02:01.610]亮出一条伤疤\n[02:03.770]不堪的根源在哪\n[02:06.610]\n[02:07.520]可是感情会挣扎\n[02:09.820]没有别的办法\n[02:11.920]它劝你不如退下\n[02:15.660]如果分手太复杂\n[02:18.860]\n[02:19.420]流浪的歌手会放下吉他\n[02:24.450]故事要美必须藏着真话\n[02:29.700]\n[02:31.990]我们的爱情 到这刚刚好\n[02:36.150]剩不多也不少 还能忘掉\n[02:41.200]我应该可以 把自己照顾好\n[02:46.740]\n[02:48.750]我们的距离 到这刚刚好\n[02:52.970]不够我们拥抱 就挽回不了\n[02:57.600]\n[02:58.300]用力爱过的人 不该计较\n[03:03.590]\n[03:05.740]我们的爱情到这刚刚好\n[03:09.860]再不争也不吵 不必再煎熬\n[03:14.530]\n[03:15.100]你可以不用 记得我的好\n[03:20.510]\n[03:22.500]我们的流浪到这刚刚好\n[03:26.640]趁我们还没到 天涯海角\n[03:31.720]我也不是非要去那座城堡\n[03:37.810]\n[03:39.370]天空有些暗了暗的刚刚好\n[03:43.610]我难过的样子就没人看到\n[03:48.850]你别太在意我身上的记号\n[03:58.850]\n[04:07.580]制作 : 薛之谦\n[04:08.580]录音 : 郝宇\n[04:09.580]混音 : 郑伟\n";

            //string nrc = File.ReadAllText("test.txt");
            NRCVIEW.LoadNRC(lrc);


            dt = new DispatcherTimer();

            dt.Interval = TimeSpan.FromMilliseconds(1);

            dt.Tick += (e, c) =>
            {
                UpdatePositionTime();
            };
            me.Source = new Uri(@"薛之谦 - 刚刚好.mp3", UriKind.RelativeOrAbsolute);
            //设置为pause时才能达到启动应用后马上加载音乐以获取总时长
            me.LoadedBehavior = MediaState.Pause;
            //加载音乐后获取总时长
            me.MediaOpened += (e, c) =>
            {
                //将总时长转换为秒单位
                sd.Maximum = (me.NaturalDuration.TimeSpan.Minutes * 60) + me.NaturalDuration.TimeSpan.Seconds;
                //重新设置为手动播放模式,否则无法播放音乐
                me.LoadedBehavior = MediaState.Manual;
            };


            //监听slider的鼠标释放事件,即拖动时不调整音乐的进度,拖动后再调整
            sd.PreviewMouseLeftButtonUp += (e, c) =>
            {
                STime st = GetStime(sd.Value);
                me.Position = new TimeSpan(0, st.m, st.s);

                //NRCView.ResetPositionTime(me.Position.TotalMilliseconds);
            };
            //对slider的值变化监听,修改时可实时显示调整的时间
            sd.ValueChanged += (e, c) =>
            {
                STime    st = GetStime(sd.Value);
                TimeSpan ts = new TimeSpan(0, st.m, st.s);
                metime.Text = ts.ToString("mm") + ":" + ts.ToString("ss");
            };
        }
Exemplo n.º 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (!string.IsNullOrEmpty(Request.QueryString["stime"]))
         {
             SDate_T.Text = Request.QueryString["stime"];
             EDate_T.Text = Request.QueryString["etime"];
         }
         else
         {
             SDate_T.Text = STime.ToString("yyyy/MM/dd");
             EDate_T.Text = ETime.ToString("yyyy/MM/dd");
         }
         Years_Li.Text  = rpBll.Html_Date("year", STime.Year.ToString());
         Months_Li.Text = rpBll.Html_Date("month", STime.Month.ToString());
         MyBind();
     }
 }
        private void MyBind()
        {
            DataTable saleDT  = orderBll.Report_SelByDate(Convert.ToDateTime(STime.ToString("yyyy/MM/01")), Convert.ToDateTime(ETime.ToString("yyyy/MM/" + DateTime.DaysInMonth(ETime.Year, ETime.Month))));
            DataTable monthDT = new DataTable();

            monthDT.Columns.Add("date", typeof(string));
            monthDT.Columns.Add("total", typeof(double));
            monthDT.Columns.Add("pay_online", typeof(double));
            monthDT.Columns.Add("pay_purse", typeof(double));

            for (DateTime s = STime; s <= ETime; s = s.AddMonths(1))
            {
                DataRow month = monthDT.NewRow();
                //DateTime sdate = Convert.ToDateTime("{0}/{1}/{2} 00:00:00");
                string sdate = s.ToString("#yyyy/MM/01 00:00:00#"), edate = s.AddMonths(1).ToString("#yyyy/MM/01 00:00:00#");
                saleDT.DefaultView.RowFilter = "PayTime>= " + sdate + " AND PayTime< " + edate;
                month["date"]       = s.ToString("yyyy-MM");
                month["total"]      = 0;
                month["pay_online"] = 0;
                month["pay_purse"]  = 0;
                foreach (DataRow dr in saleDT.DefaultView.ToTable().Rows)
                {
                    month["Total"] = DataConvert.CDouble(month["Total"]) + DataConvert.CDouble(dr["OrdersAmount"]);
                    if (Convert.ToInt32(dr["PayPlatID"]) == 0)
                    {
                        month["pay_purse"] = DataConvert.CDouble(month["pay_purse"]) + DataConvert.CDouble(dr["OrdersAmount"]);
                    }
                    else
                    {
                        month["pay_online"] = DataConvert.CDouble(month["pay_online"]) + DataConvert.CDouble(dr["OrdersAmount"]);
                    }
                }
                monthDT.Rows.Add(month);
            }
            Day_RPT.DataSource = monthDT;
            Day_RPT.DataBind();
            PayOnline_L.Text = DataConvert.CDouble(monthDT.Compute("SUM(pay_online)", "")).ToString("F2");
            PayPurse_L.Text  = DataConvert.CDouble(monthDT.Compute("SUM(pay_purse)", "")).ToString("F2");
            TotalSale_L.Text = DataConvert.CDouble(monthDT.Compute("SUM(total)", "")).ToString("F2");
        }
Exemplo n.º 7
0
        public void doMagic(bool playedToday)
        {
            Game1.player.forceTimePass = true;
            Game1.playSound("stardrop");
            STime time    = STime.CURRENT + (STime.HOUR * 3);
            int   timeInt = (time.hour * 100 + time.minute * 10);

            if (timeInt > 2600)
            {
                timeInt = 2600;
            }

            if (Game1.timeOfDay < 2600)
            {
                Task.Run(() => {
                    try
                    {
                        CcTime.TimeSkip(timeInt.ToString(), false);
                    }
                    catch { }
                });
            }
        }
Exemplo n.º 8
0
 public EventArgsBeforeSleep(STime sleepTime, bool passedOut, ref Response response)
 {
     SleepTime = sleepTime;
     PassedOut = passedOut;
     Response  = response;
 }
Exemplo n.º 9
0
 public static void method2(STime t)
 {
     t.hour = 12;
 }