示例#1
0
        public void ReadFile(string filePath)
        {
            //string filePath = @"D:\Ifrit1.dat";
            Stream          fStream   = new FileStream(filePath, FileMode.Open, FileAccess.ReadWrite);
            BinaryFormatter binFormat = new BinaryFormatter();
            SkillFile       newFile   = null;

            try
            {
                newFile = (SkillFile)binFormat.Deserialize(fStream);
            }
            catch
            {
            }

            if (newFile == null)
            {
                //alert
                return;
            }
            newFile.ResetUid(fileUid++);
            newFile.RefreshNodes();
            allFiles.Add(newFile);
            currFile = newFile;
        }
示例#2
0
        public void NewFile()
        {
            currFile = new SkillFile(fileUid++);

            allFiles.Add(currFile);
        }