Beispiel #1
0
 public CosumeDetailPanel(List <TicketPrintObject> tickets, MovieObject movie, MoviePlanObject moviePlan)
 {
     InitializeComponent();
     this.lists     = tickets;
     this.movieInfo = movie;
     this.moviePlan = moviePlan;
     this.InitMovieInfo();
 }
        public ConfirmPayPwdPanel(List <TicketPrintObject> tickets, MovieObject movie, MoviePlanObject moviePlan, RoomPlanObject roomPlan, DateTime dt)
        {
            InitializeComponent();
            this.lists = tickets;

            this.movieInfo = movie;
            this.roomPlan  = roomPlan;
            this.moviePlan = moviePlan;
            this.dt        = dt;
        }
Beispiel #3
0
 public MovieSeatSelectorPanel(RoomPlanObject roomPlan, MovieObject movie, MoviePlanObject moviePlan, DateTime dt)
 {
     InitializeComponent();
     this.roomPlan  = roomPlan;
     this.movie     = movie;
     this.dt        = dt;
     this.moviePlan = moviePlan;
     CheckForIllegalCrossThreadCalls = false;
     this.SetOperationTime(60);
 }
 public WaitTicketPrintPanel(List <TicketPrintObject> tickets, MovieObject movie, MoviePlanObject moviePlan)
 {
     InitializeComponent();
     CheckForIllegalCrossThreadCalls = false;
     this.AutoScroll = true;
     this.lists      = tickets;
     this.SetSepartor(false);
     this.movieInfo = movie;
     this.moviePlan = moviePlan;
     this.InitMovieInfo();
 }
        private void ThreadGetPlan()
        {
            this.lbProcessHint.Visible = true;
            this.processPanel1.Visible = true;
            this.processPanel1.StartProcess();


            SystemConfig    config = FT.Commons.Cache.StaticCacheManager.GetConfig <SystemConfig>();
            MoviePlanObject plan   = HiPiaoCache.GetMoviePlanVii(config.Province, config.City, movie.Id, config.CinemaId, planDt);

            this.SetMoviePlan(plan);
            this.processPanel1.StopProcess();
            this.lbProcessHint.Visible = false;
            this.processPanel1.Visible = false;
            this.loaded = true;
        }
Beispiel #6
0
        public UserPayCheckPanel(List <TicketPrintObject> tickets, MovieObject movie, MoviePlanObject moviePlan, RoomPlanObject roomPlan, DateTime dt)
        {
            InitializeComponent();
            this.SetSepartor(false);

            this.lists     = tickets;
            this.movieInfo = movie;
            this.moviePlan = moviePlan;
            this.roomPlan  = roomPlan;
            this.dt        = dt;
            if (tickets != null)
            {
                TicketPrintObject ticket = tickets[0];
                this.picAdImage.Image = movieInfo.AdImage;
                //ticket.MovieName = "假如真的是爱情有天意的话";
                if (ticket.MovieName.Length > 9)
                {
                    this.lbMovieName.Text     = ticket.MovieName.Substring(0, 9) + "\n" + ticket.MovieName.Substring(9);
                    this.lbMovieInfo.Location = new Point(this.lbMovieName.Location.X, this.lbMovieName.Location.Y + this.lbMovieName.Height + 2);
                }
                else
                {
                    this.lbMovieName.Text = ticket.MovieName;
                }
                this.lbMovieInfo.Text = string.Format(this.lbMovieInfo.Text, moviePlan.Type, moviePlan.Language, movieInfo.TotalMinutes);
                //DateTime  playDate=Convert.ToDateTime(ticket.PlayDate);
                // DateTime playDate = movie.PlayTime;
                DateTime playDate = dt;
                this.lbDate.Text = playDate.ToString("MM月dd日") + " " + DateTimeHelper.GetChineseXq(playDate);
                WinFormHelper.LocationAfter(this.lbDate, this.lbDateHint);

                this.lbTime.Text = ticket.PlayTime;
                WinFormHelper.LocationAfter(this.lbDateHint, this.lbTime);
                WinFormHelper.LocationAfter(this.lbTime, this.lbTimeHint);

                this.lbRoom.Text = ticket.RoomName;
                WinFormHelper.LocationAfter(this.lbTimeHint, this.lbRoom);

                //this.lbRoom.Location = new Point(this.lbTimeHint.Location.X + this.lbTimeHint.Width, this.lbTimeHint.Location.Y);

                int    num  = 6;
                string seat = string.Empty;
                for (int i = 0; i < lists.Count; i++)
                {
                    if (i != 0 && i % num == 0)
                    {
                        // seat += "\n座位:"
                        seat += "\n          ";
                    }
                    seat += lists[i].Seat + " ";
                }
                this.lbSeats.Text       = string.Format(this.lbSeats.Text, seat);
                this.lbTicketPrice.Text = ticket.Price.ToString();
                WinFormHelper.LocationAfter(this.lbTicketPrice, this.lbTicketPriceHint);
                this.lbTicketCount.Text = this.lists.Count.ToString();
                WinFormHelper.LocationAfter(this.lbTicketPriceHint, this.lbTicketCount);
                WinFormHelper.LocationAfter(this.lbTicketCount, this.lbTicketCountHint);
                this.lbTicketTotalPrice.Text = (ticket.Price * this.lists.Count).ToString();
                WinFormHelper.LocationAfter(this.lbTicketTotalPrice, this.lbTicketTotalPriceHint);
            }
            this.SetOperationTime(30);
        }
        private void SetMoviePlan(MoviePlanObject plan)
        {
            this.moviePlan = plan;
            for (int i = this.panelContent.Controls.Count - 1; i >= 0; i--)
            {
                Control ctr = this.panelContent.Controls[i];
                if (ctr.Name == "picNoPlanHint")
                {
                    WindowFormDelegate.RemoveControlFrom(this.panelContent, ctr);
                }
                else if (ctr is RoomPlanShowPanel)
                {
                    //
                    //this.panelContent.Controls.Remove(ctr);
                    WindowFormDelegate.RemoveControlFrom(this.panelContent, ctr);
                }
                //this.picNoPlanHint.Visible = false;
            }
            if (plan == null)
            {
                // 274, 257
                PictureBox pic = new PictureBox();
                pic.Name            = "picNoPlanHint";
                pic.BackgroundImage = Properties.Resources.BuyTick_No_Plan;
                pic.Width           = 745;
                pic.Height          = 374;
                pic.Location        = new Point(274, 257);
                //this.panelContent.Controls.Clear();
                WindowFormDelegate.AddControlTo(this.panelContent, pic);
                // this.panelContent.Controls.Add(pic);
                //this..Visible = true;
                return;
            }
            if (movie.OtherName.Length > 0)
            {
                this.lbOtherName.Visible = false;
            }
            else
            {
                this.lbOtherName.Visible = true;
                if (plan.Type.Length > 0)
                {
                    this.lbOtherName.Text = movie.OtherName + "(" + plan.Type + ")";
                }
            }
            this.lbLanguage.Text      = string.Format("语言:{0}", plan.Language);
            this.lbLanguage.ForeColor = Color.FromArgb(85, 85, 85);
            List <RoomPlanObject> lists = plan.RoomPlans;

            if (lists != null && lists.Count > 0)
            {
                //this.panelContent.Controls.Clear();
                int  x            = 57;
                int  y            = 274;
                int  linecount    = 5;
                int  picWid       = 195;
                int  picHeight    = 88;
                int  colSep       = 14;
                int  rowSep       = 14;
                int  controlCount = 0;
                bool isToday      = this.planDt.Day == System.DateTime.Now.Day;
                int  hourNow      = System.DateTime.Now.Hour;
                int  minuteNow    = System.DateTime.Now.Minute + 5;

                for (int i = 0; i < lists.Count; i++)
                {
                    try
                    {
                        string   tttt   = lists[i].Playtime;
                        string[] times  = tttt.Split(':');
                        int      hour   = Convert.ToInt32(times[0]);
                        int      minute = Convert.ToInt32(times[1]);
                        if (isToday && (hour == hourNow && minute < minuteNow))
                        {
                            continue;
                        }
                    }
                    catch (Exception ex)
                    {
                        GlobalTools.Log(ex);
                    }
                    RoomPlanShowPanel pc = new RoomPlanShowPanel(lists[i]);
                    pc.AutoScaleMode = AutoScaleMode.None;
                    pc.Width         = picWid;
                    pc.Height        = picHeight;
                    pc.Tag           = lists[i];
                    pc.Location      = new Point(x + (controlCount % linecount) * (picWid + colSep), y + (controlCount / linecount) * (picHeight + rowSep));
                    pc.Click        += new EventHandler(pc_Click);

                    //this.panelContent.Controls.Add(pc);
                    WindowFormDelegate.AddControlTo(this.panelContent, pc);
                    controlCount++;
                }
            }
        }