• 大小: 660KB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2021-05-08
  • 语言: C#
  • 标签:

资源简介

c#影院售票系统(含数据库) 运行正确 调试通过

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;

namespace MyCinema
{
    public class Cinema
    {
        public Cinema()
        {
            seats = new Dictionary();
            soldTickets = new List();
            schedule = new Schedule();
        }
        //座位集合
        private Dictionary seats = new Dictionary();

        public Dictionary Seats
        {
            get { return seats; }
            set { seats = value; }
        }
        //播放列表
        private Schedule schedule;

        public Schedule Schedule
        {
            get { return schedule; }
            set { schedule = value; }
        }
        //已售票集合
        private List soldTickets;

        public List SoldTickets
        {
            get { return soldTickets; }
            set { soldTickets = value; }
        }

        public void ShowSeat(string scheduleTime)
        {
            foreach (Seat var in seats.Values)
            {
                var.Color = Color.Yellow;
            }
            foreach (Ticket var in soldTickets)
            {
                
                foreach (Seat var1 in seats.Values)
                {
                    if (var.ScheduleItem.Time == scheduleTime && var.Seat.SeatNum == var1.SeatNum)
                    {
                        var1.Color = var.Seat.Color;
                    }
                }
            }
        }
        public void Save()
        {
            FileStream fs = new FileStream(“soldTickets.bin“ FileMode.Open);
            BinaryFormatter bf = new BinaryFormatter();
            this.soldTickets = (List)bf.Deserialize(fs);
            fs.Close();

        }
        public void Load()
        {
            try
            {
                FileStream fs = new FileStream(“soldTickets.bin“ FileMode.Open);
                BinaryFormatter bf = new BinaryFormatter();
                this.SoldTickets = (List)bf.Deserialize(fs);
                fs.Close();
            }
            catch (Exception ex)
            {
                ex.ToString();
                soldTickets = new List();
            }
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      61440  2009-07-13 14:31  影院售票系统7\MyCinema\bin\Debug\AxInterop.WMPLib.dll

     文件     571883  2007-11-14 09:17  影院售票系统7\MyCinema\bin\Debug\bone.jpg

     文件      11983  2007-11-14 09:17  影院售票系统7\MyCinema\bin\Debug\gongfu.jpg

     文件     331776  2009-07-17 17:27  影院售票系统7\MyCinema\bin\Debug\Interop.WMPLib.dll

     文件       7680  2009-07-13 14:29  影院售票系统7\MyCinema\bin\Debug\Interop.WMPNSSCDS.dll

     文件     516096  2009-07-15 15:33  影院售票系统7\MyCinema\bin\Debug\IrisSkin2.dll

     文件      15899  2009-07-15 15:33  影院售票系统7\MyCinema\bin\Debug\MP10.ssk

     文件      45056  2009-07-18 10:52  影院售票系统7\MyCinema\bin\Debug\MyCinema.exe

     文件      79360  2009-07-18 10:52  影院售票系统7\MyCinema\bin\Debug\MyCinema.pdb

     文件       5632  2005-11-11 22:25  影院售票系统7\MyCinema\bin\Debug\MyCinema.vshost.exe

     文件        893  2007-11-14 15:35  影院售票系统7\MyCinema\bin\Debug\ShowList.xml

     文件          0  2009-07-18 00:35  影院售票系统7\MyCinema\bin\Debug\soldTickets

     文件       1138  2009-07-17 13:30  影院售票系统7\MyCinema\bin\Debug\soldTickets.bin

     文件      11405  2007-11-14 09:17  影院售票系统7\MyCinema\bin\Debug\spiderman3.jpg

     文件      31993  2006-07-11 00:45  影院售票系统7\MyCinema\bin\Debug\vista1_green.ssk

     文件      14679  2006-07-20 18:40  影院售票系统7\MyCinema\bin\Debug\Vista2_color2.ssk

     文件       2418  2009-07-18 00:51  影院售票系统7\MyCinema\Cinema.cs

     文件       1508  2009-07-13 14:31  影院售票系统7\MyCinema\FreeTicket.cs

     文件      11513  2009-07-18 10:52  影院售票系统7\MyCinema\MainForm.cs

     文件      36516  2009-07-18 10:52  影院售票系统7\MyCinema\MainForm.Designer.cs

     文件       6587  2009-07-18 10:52  影院售票系统7\MyCinema\MainForm.resx

     文件       1751  2009-07-16 11:07  影院售票系统7\MyCinema\Movie.cs

     文件       4999  2009-07-18 10:38  影院售票系统7\MyCinema\MyCinema.csproj

     文件      61440  2009-07-13 14:31  影院售票系统7\MyCinema\obj\Debug\AxInterop.WMPLib.dll

     文件     331776  2009-07-17 17:27  影院售票系统7\MyCinema\obj\Debug\Interop.WMPLib.dll

     文件       7680  2009-07-13 14:29  影院售票系统7\MyCinema\obj\Debug\Interop.WMPNSSCDS.dll

     文件        845  2009-07-18 10:52  影院售票系统7\MyCinema\obj\Debug\MyCinema.csproj.GenerateResource.Cache

     文件        601  2009-07-17 17:27  影院售票系统7\MyCinema\obj\Debug\MyCinema.csproj.ResolveComReference.cache

     文件      45056  2009-07-18 10:52  影院售票系统7\MyCinema\obj\Debug\MyCinema.exe

     文件        180  2009-07-18 10:52  影院售票系统7\MyCinema\obj\Debug\MyCinema.MainForm.resources

............此处省略32个文件信息

评论

共有 条评论

相关资源