コード例 #1
0
 static public Showroom GetShowroom()
 {
     if (showroom == null)
     {
         showroom = new Showroom();
     }
     return(showroom);
 }
コード例 #2
0
ファイル: DAO.cs プロジェクト: awdrallyracer/Kursovaia
        public void Load()
        {
            using (Stream stream = File.OpenRead(filePath))
            {
                var      serializer = new BinaryFormatter();
                Showroom st         = (Showroom)serializer.Deserialize(stream);
                Copy(st.Clients, showroom.Clients);
                Copy(st.Cars, showroom.Cars);
                Copy(st.Orders, showroom.Orders);
                //Copy(st.Supplies, store.Supplies);
            }

            void Copy <T>(List <T> from, List <T> to)
            {
                to.Clear();
                to.AddRange(from);
            }
        }
コード例 #3
0
 public DAO(Showroom showroom)
 {
     this.showroom = showroom;
 }