예제 #1
0
 public MNMenuItem(MNDocument d)
 {
     Document     = d;
     ImageName    = "";
     Text         = "";
     ActionScript = "";
 }
예제 #2
0
        public MNDocument LoadFull()
        {
            string     file = FilePath;
            MNDocument doc  = new MNDocument();

            doc.Book = this;

            file = file.Replace(".smb", ".smd");
            using (BinaryReader br = new BinaryReader(File.OpenRead(file)))
            {
                RSFileReader reader = new RSFileReader(br);
                try
                {
                    doc.Data.Load(reader);
                }
                catch
                {
                }
            }

            file = file.Replace(".smd", ".sme");
            if (File.Exists(file))
            {
                using (BinaryReader br = new BinaryReader(File.OpenRead(file)))
                {
                    RSFileReader reader = new RSFileReader(br);
                    try
                    {
                        doc.DefaultLanguage.Load(reader, true);
                    }
                    catch
                    {
                    }
                }
            }

            file = file.Replace(".sme", ".sms");
            if (File.Exists(file))
            {
                using (BinaryReader br = new BinaryReader(File.OpenRead(file)))
                {
                    RSFileReader reader = new RSFileReader(br);
                    try
                    {
                        doc.Data.LoadStatus(reader);
                    }
                    catch
                    {
                    }
                }
            }

            return(doc);
        }
예제 #3
0
        public void Load(MNDocument document, RSFileReader br)
        {
            Document = document;
            byte b;

            while ((b = br.ReadByte()) != 0)
            {
                switch (b)
                {
                case 10:
                    ImageName = br.ReadString();
                    break;

                case 11:
                    Text = br.ReadString();
                    break;

                case 12:
                    ActionScript = br.ReadString();
                    break;
                }
            }
        }
예제 #4
0
파일: MNMenu.cs 프로젝트: gopa810/Rambha
        public void Load(MNDocument document, RSFileReader br)
        {
            byte b;

            while ((b = br.ReadByte()) != 0)
            {
                switch (b)
                {
                case 10:
                    APIName = br.ReadString();
                    break;

                case 11:
                    UserTitle = br.ReadString();
                    break;

                case 20:
                    MNMenuItem mi = new MNMenuItem(document);
                    mi.Load(document, br);
                    Items.Add(mi);
                    break;
                }
            }
        }
예제 #5
0
 public MNBookData(MNDocument doc)
 {
     p_document = doc;
 }
예제 #6
0
 public MNLazyImage(MNLazyImage li)
 {
     Document = li.Document;
     Image    = li.Image;
     image_id = Image.Id;
 }
예제 #7
0
 public MNLazyImage(MNDocument doc)
 {
     Document = doc;
 }
예제 #8
0
 public static void CreateNewDocument()
 {
     CurrentDocument = new MNDocument();
     CurrentPage     = null;
 }
예제 #9
0
 public SMMemoryGameCard(MNDocument doc)
 {
     Image = new MNLazyImage(doc);
 }