예제 #1
0
        private void genBListBNList()
        {
            Save.Save save = new Save.Save();
            ////using (FileStream fs=new FileStream("d:\\temp.txt",FileMode.Create))
            ////{
            ////}
            //Serializer_Deserializer_Database.Biare.Binare s;
            //using (StreamWriter sw = new StreamWriter(Save.SaveSetting.Default.phat, false))
            //{
            //    sw.Write(Save.SaveSetting.Default.SaveObject);
            //}
            //if (new FileInfo(Save.SaveSetting.Default.phat).Length != 0)
            //{
            //    s = new Serializer_Deserializer_Database.Biare.Binare();
            //    save = (Save.Save)s.DeSerialize(Save.SaveSetting.Default.phat);
            //}
            save = _mw.save;

            if (save != null)
            {
                for (int i = 0; i < save._bike.Count; i++)
                {
                    _bnList.Add(save._bike[i].name);
                    _bList.Add(save._bike[i]);
                }
            }
            //lade
        }
예제 #2
0
        public Editor(MainWindow mw)
        {
            _mw = mw;//-----------------------------------------------------------------------------------------------------------------------------
            save = mw.save;

            InitializeComponent();
        }
예제 #3
0
        public Editor(MainWindow mw)
        {
            _mw = mw;//-----------------------------------------------------------------------------------------------------------------------------
            save = mw.save;

            InitializeComponent();
        }
예제 #4
0
 private void load()
 {
     if (!File.Exists(Save.SaveSetting.Default.path))
     {
         save = new Save.Save();
         return;
     }
     try
     {
         FileStream fs = new FileStream(Save.SaveSetting.Default.path,FileMode.Open);
         XmlSerializer s = new XmlSerializer(typeof(Save.Save));
         save = (Save.Save)s.Deserialize(fs);
         fs.Close();
     }
     catch (Exception ex)
     {
     }
 }
예제 #5
0
 private void load()
 {
     if (!File.Exists(Save.SaveSetting.Default.path))
     {
         save = new Save.Save();
         return;
     }
     try
     {
         FileStream    fs = new FileStream(Save.SaveSetting.Default.path, FileMode.Open);
         XmlSerializer s  = new XmlSerializer(typeof(Save.Save));
         save = (Save.Save)s.Deserialize(fs);
         fs.Close();
     }
     catch (Exception ex)
     {
     }
 }
예제 #6
0
        private void genBListBNList()
        {
            Save.Save save = new Save.Save();
            ////using (FileStream fs=new FileStream("d:\\temp.txt",FileMode.Create))
            ////{
            ////}
            //Serializer_Deserializer_Database.Biare.Binare s;
            //using (StreamWriter sw = new StreamWriter(Save.SaveSetting.Default.phat, false))
            //{
            //    sw.Write(Save.SaveSetting.Default.SaveObject);
            //}
            //if (new FileInfo(Save.SaveSetting.Default.phat).Length != 0)
            //{
            //    s = new Serializer_Deserializer_Database.Biare.Binare();
            //    save = (Save.Save)s.DeSerialize(Save.SaveSetting.Default.phat);
            //}
            save = _mw.save;

            if (save != null)
            {
                for (int i = 0; i < save._bike.Count; i++)
                {
                    _bnList.Add(save._bike[i].name);
                    _bList.Add(save._bike[i]);
                }
            }
            //lade
        }