public MoviePlanSelectorPanel(MovieObject movie) { InitializeComponent(); this.movie = movie; this.dt = System.DateTime.Now; CheckForIllegalCrossThreadCalls = false; }
public CosumeDetailPanel(List<TicketPrintObject> tickets, MovieObject movie, MoviePlanObject moviePlan) { InitializeComponent(); this.lists = tickets; this.movieInfo = movie; this.moviePlan = moviePlan; this.InitMovieInfo(); }
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 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; }
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(); }
public static void GetUserBuyRecordDetail(BuyRecordObject obj) { string xmlOrderDetail = string.Empty; xmlOrderDetail = hiPiaoSrv.QueryUserBuyRecordDetail(obj.User, obj.OrderId); XmlDocument docOrderDetail = new XmlDocument(); docOrderDetail.LoadXml(xmlOrderDetail); XmlNode detailNode = docOrderDetail.SelectSingleNode("//return"); obj.BuyTime = DateTime.Parse(docOrderDetail.SelectSingleNode("//buytime").InnerText); obj.ConnectMobile = docOrderDetail.SelectSingleNode("//phonenum").InnerText; //obj.TotalPrice = Int32.Parse(docOrderDetail.SelectSingleNode("//summoney").InnerText); obj.ValidCode = docOrderDetail.SelectSingleNode("//hipiaonumber").InnerText; TicketObject ticket = null; MovieObject movie = null; CinemaObject cinema = null; SeatObject seat = null; RoomObject room = null; int count = Int32.Parse(docOrderDetail.SelectSingleNode("//ticketnum").InnerText); cinema = new CinemaObject(); cinema.Name = docOrderDetail.SelectSingleNode("//cinemaname").InnerText; seat = new SeatObject(); seat.SeatId = docOrderDetail.SelectSingleNode("//cinemaseat").InnerText; room = new RoomObject(); room.Name = docOrderDetail.SelectSingleNode("//cinemahall").InnerText; seat.Room = room; room.Cinema = cinema; string tmp = docOrderDetail.SelectSingleNode("//onemoney").InnerText; tmp = tmp.Substring(1, tmp.IndexOf("元*") - 1); //cinemaseat onemoney double price = double.Parse(tmp); movie = new MovieObject(); movie.Name = docOrderDetail.SelectSingleNode("//pixname").InnerText; DateTime buyTime = DateTime.Parse(docOrderDetail.SelectSingleNode("//buytime").InnerText); DateTime playTime = DateTime.Parse(docOrderDetail.SelectSingleNode("//playtime").InnerText); for (int j = 0; j < count; j++) { ticket = new TicketObject(); ticket.BuyTime = buyTime; ticket.Price = (int)price; ticket.PlayTime = playTime; ticket.Movie = movie; ticket.Seat = seat; obj.Tickets.Add(ticket); } }
public static List <MovieObject> RefreshHotMovie(string province, string city) { List <MovieObject> lists = new List <MovieObject>(); string xml = hiPiaoSrv.GetHotMovie(province, city); XmlDocument doc = new XmlDocument(); doc.LoadXml(xml); MovieObject obj = null; XmlNodeList objsNode = doc.SelectNodes("//movieInfo"); string picurl = string.Empty; string downdir = HotMoviePath + "\\" + province + "\\" + city; for (int i = 0; i < objsNode.Count; i++) { obj = new MovieObject(); obj.Name = objsNode[i].Attributes["chname"].Value; obj.BelongArea = objsNode[i].Attributes["country"].Value; obj.Director = objsNode[i].Attributes["director"].Value; obj.OtherName = objsNode[i].Attributes["enname"].Value; obj.ShowDate = Convert.ToDateTime(objsNode[i].Attributes["fshowtime"].Value); obj.MainActors = objsNode[i].Attributes["leadrole"].Value; if (objsNode[i].Attributes["pixlength"].Value.Length > 0) { obj.TotalMinutes = Convert.ToInt32(objsNode[i].Attributes["pixlength"].Value.Replace("分钟", "")); } else { obj.TotalMinutes = 0; } obj.Id = objsNode[i].Attributes["pixnumber"].Value; obj.Type = objsNode[i].Attributes["pixtype"].Value; picurl = objsNode[i].Attributes["picurl"].Value; obj.AdImagePath = DownLoad(picurl, downdir + "\\" + obj.Name.Replace("?", "") + "\\" + obj.Id + "\\adimage", "shortimg.jpg"); if (obj.AdImagePath.Length > 0) { obj.AdImage = Image.FromFile(obj.AdImagePath); } //picurl="http://img.hipiao.com/hipiao15/film/201208/174732921950207b3c903e3.jpg" pixlength="89" pixnumber="05110035" //pixtype obj.Introduction = objsNode[i].Attributes["intro"].Value; lists.Add(obj); } hotMovie = lists; return(lists); }
public MovieObject MockMovie() { MovieObject movie = new MovieObject(); movie.Name = "龙门飞甲"; movie.PlayTime = Convert.ToDateTime("2011-5-10"); movie.TotalMinutes = 50; movie.OtherName = "影片别名"; movie.ScreenWriter = "张三、李四"; movie.StarGrade = 1; movie.Type = "喜剧片"; movie.Language = "中文(大陆)"; movie.Introduction = "此段是简要介绍"; movie.Id = "123"; movie.MainActors = "老谋子"; movie.ShowDate = Convert.ToDateTime("2011-7-10"); return(movie); }
public MoviePlanSelectorPanel(MovieObject movie,DateTime dt) { InitializeComponent(); this.movie = movie; this.dt = dt; this.btnToday.Image = Properties.Resources.BuyTicket_Select_Day_Two; this.btnTomorrow.Image = Properties.Resources.BuyTicket_Select_Day_Two; this.btnThreeDay.Image = Properties.Resources.BuyTicket_Select_Day_Two; TimeSpan ts=dt.Subtract(System.DateTime.Now.AddHours(-1)); if (ts.Days == 0) { btnToday.Image = Properties.Resources.BuyTicket_Select_Day_Today; } else if (ts.Days ==1) { btnTomorrow.Image = Properties.Resources.BuyTicket_Select_Day_Today; } else { btnThreeDay.Image = Properties.Resources.BuyTicket_Select_Day_Today; } CheckForIllegalCrossThreadCalls = false; }
public TicketObject BuyTicket(UserObject user, CinemaObject cinema, MovieObject movie, DateTime playTime) { throw new NotImplementedException(); }
public MovieObject MockMovie() { MovieObject movie = new MovieObject(); movie.Name = "龙门飞甲"; movie.PlayTime = Convert.ToDateTime("2011-5-10"); movie.TotalMinutes = 50; movie.OtherName = "影片别名"; movie.ScreenWriter = "张三、李四"; movie.StarGrade = 1; movie.Type = "喜剧片"; movie.Language = "中文(大陆)"; movie.Introduction = "此段是简要介绍"; movie.Id = "123"; movie.MainActors = "老谋子"; movie.ShowDate = Convert.ToDateTime("2011-7-10"); return movie; }
public static List<MovieObject> RefreshHotMovie(string province,string city) { List<MovieObject> lists = new List<MovieObject>(); string xml=hiPiaoSrv.GetHotMovie(province, city); XmlDocument doc = new XmlDocument(); doc.LoadXml(xml); MovieObject obj = null; XmlNodeList objsNode = doc.SelectNodes("//movieInfo"); string picurl=string.Empty; string downdir = HotMoviePath+"\\"+province+"\\"+city; for (int i = 0; i < objsNode.Count; i++) { obj = new MovieObject(); obj.Name=objsNode[i].Attributes["chname"].Value; obj.BelongArea = objsNode[i].Attributes["country"].Value; obj.Director = objsNode[i].Attributes["director"].Value; obj.OtherName = objsNode[i].Attributes["enname"].Value; obj.ShowDate = Convert.ToDateTime(objsNode[i].Attributes["fshowtime"].Value); obj.MainActors = objsNode[i].Attributes["leadrole"].Value; if (objsNode[i].Attributes["pixlength"].Value.Length > 0) obj.TotalMinutes = Convert.ToInt32(objsNode[i].Attributes["pixlength"].Value.Replace("分钟", "")); else obj.TotalMinutes = 0; obj.Id = objsNode[i].Attributes["pixnumber"].Value; obj.Type = objsNode[i].Attributes["pixtype"].Value; picurl=objsNode[i].Attributes["picurl"].Value; obj.AdImagePath = DownLoad(picurl, downdir + "\\" + obj.Name.Replace("?", "") + "\\" + obj.Id + "\\adimage", "shortimg.jpg"); if(obj.AdImagePath.Length>0) obj.AdImage = Image.FromFile(obj.AdImagePath); //picurl="http://img.hipiao.com/hipiao15/film/201208/174732921950207b3c903e3.jpg" pixlength="89" pixnumber="05110035" //pixtype obj.Introduction = objsNode[i].Attributes["intro"].Value; lists.Add(obj); } hotMovie = lists; return lists; }
public static void GetUserBuyRecordDetail(BuyRecordObject obj) { string xmlOrderDetail = string.Empty; xmlOrderDetail = hiPiaoSrv.QueryUserBuyRecordDetail(obj.User,obj.OrderId); XmlDocument docOrderDetail = new XmlDocument(); docOrderDetail.LoadXml(xmlOrderDetail); XmlNode detailNode = docOrderDetail.SelectSingleNode("//return"); obj.BuyTime = DateTime.Parse(docOrderDetail.SelectSingleNode("//buytime").InnerText); obj.ConnectMobile = docOrderDetail.SelectSingleNode("//phonenum").InnerText; //obj.TotalPrice = Int32.Parse(docOrderDetail.SelectSingleNode("//summoney").InnerText); obj.ValidCode = docOrderDetail.SelectSingleNode("//hipiaonumber").InnerText; TicketObject ticket = null; MovieObject movie = null; CinemaObject cinema = null; SeatObject seat = null; RoomObject room = null; int count = Int32.Parse(docOrderDetail.SelectSingleNode("//ticketnum").InnerText); cinema = new CinemaObject(); cinema.Name = docOrderDetail.SelectSingleNode("//cinemaname").InnerText; seat = new SeatObject(); seat.SeatId = docOrderDetail.SelectSingleNode("//cinemaseat").InnerText; room = new RoomObject(); room.Name = docOrderDetail.SelectSingleNode("//cinemahall").InnerText; seat.Room = room; room.Cinema = cinema; string tmp = docOrderDetail.SelectSingleNode("//onemoney").InnerText; tmp = tmp.Substring(1, tmp.IndexOf("元*") - 1); //cinemaseat onemoney double price = double.Parse(tmp); movie = new MovieObject(); movie.Name = docOrderDetail.SelectSingleNode("//pixname").InnerText; DateTime buyTime = DateTime.Parse(docOrderDetail.SelectSingleNode("//buytime").InnerText); DateTime playTime=DateTime.Parse(docOrderDetail.SelectSingleNode("//playtime").InnerText); for (int j = 0; j < count; j++) { ticket = new TicketObject(); ticket.BuyTime =buyTime ; ticket.Price = (int)price; ticket.PlayTime = playTime; ticket.Movie = movie; ticket.Seat = seat; obj.Tickets.Add(ticket); } }
/// <summary> /// 定时刷新影片显示内容 /// </summary> public static void RefreshMovieShowList() { lock (synObj) { MovieShowList.Clear(); DirectoryInfo dir = new DirectoryInfo("MovieShows"); if (dir != null) { FileInfo[] files = dir.GetFiles(); MovieObject movie = null; Image img = null; for (int i = 0; i < files.Length; i++) { img = Image.FromFile(files[i].FullName); movie = new MovieObject(); movie.AdImage = (Image)img.Clone(); movie.Name = files[i].Name; MovieShowList.Add(movie); } } } //FileInfo }
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); }