Beispiel #1
0
        public virtual void Save(SerializationWriter SW)
        {
            SW.WriteType(this);


            SW.WriteStartElement("ForumMessage");
            SW.WriteVersion(0);

            SW.Write("Author", Author);
            SW.Write("Create", Create);
            SW.Write("Message", Message);

            SW.WriteStartElement("Forums");
            SW.Write("Length", Responses.Length);
            for (int i = 0; i < Responses.Length; i++)
            {
                if (Responses[i] != null)
                {
                    Responses[i].Save(SW);
                }
            }
            SW.WriteEndElement();


            SW.WriteEndElement();
        }
Beispiel #2
0
 public virtual void Save(SerializationWriter SW)
 {
     SW.WriteStartElement("Channel");
     SW.WriteVersion(0);
     SW.Write("Name", Name);
     SW.WriteEndElement();
 }
Beispiel #3
0
        //public override void OnTick() { base.OnTick(); if (AI != null)AI.OnTick(this); }



        //public virtual bool OnUsePower(Power power, Entity target) { return power.OnUse(this, target); }
        //public virtual bool OnUsePower(Power power, int x, int y, int z) { return power.OnUse(this, x, y, z); }


        public override void Save(SerializationWriter SW)
        {
            base.Save(SW);
            SW.WriteStartElement("PlayerMobile");
            SW.WriteVersion(0);

            SW.WriteEndElement();
        }
Beispiel #4
0
        public override void Save(SerializationWriter SW)
        {
            base.Save(SW);
            SW.WriteStartElement("Forum");
            SW.WriteVersion(0);

            SW.Write("Title", Title);

            SW.WriteEndElement();
        }
Beispiel #5
0
        public virtual void Save(SerializationWriter SW)
        {
            SW.WriteStartElement("EntityList");
            SW.WriteVersion(0);

            SW.Write("Length", Entitys.Length);
            for (int i = 0; i < Entitys.Length; i++)
            {
                Entitys[i].Save(SW);
            }

            SW.WriteEndElement();
        }
Beispiel #6
0
        public override void Save(SerializationWriter SW)
        {
            base.Save(SW);
            SW.WriteStartElement("Mobile");
            SW.WriteVersion(0);

            //if (AI == null) SW.Write("AI", "");
            //else SW.Write("AI", AI.GetType().ToString());
            SW.Write("Body_Stand", Body_Stand);
            SW.Write("Body_Move", Body_Move);
            SW.Write("Body_Jump", Body_Jump);

            SW.WriteEndElement();
        }
Beispiel #7
0
 public virtual void Save(SerializationWriter SW)
 {
     SW.WriteStartElement("Translator");
     SW.WriteVersion(0);
     SW.Write("Name", Name);
     SW.Write("Culture", Culture);
     SW.Write("Length", Translates.Length);
     for (int i = 0; i < Translates.Length; i++)
     {
         if (Translates[i] != null)
         {
             SW.Write("Key", Translates[i].Key);
             SW.Write("Text", Translates[i].Text);
         }
     }
     SW.WriteEndElement();
 }
Beispiel #8
0
        //public static Channel Load(string path)
        //{
        //    if (!File.Exists(path + @"Channel" + Info.extension)) return null;
        //    SerializationReader SR = new SerializationReader(path + @"Channel" + Info.extension);
        //    SR.Read();
        //    SR.ReadDeclaration();
        //    SR.ReadStartElement();
        //    Channel channel = new Channel();
        //    channel.Load(SR);
        //    SR.Close();

        //    channel.Appearances = Info.LoadFileAppearances(path + @"Appearances" + Info.extension);

        //    if (!Directory.Exists(path + @"\Channel\"))
        //        Directory.CreateDirectory(path + @"\Channel\");
        //    DirectoryInfo dir = new DirectoryInfo(path + @"/Channel");
        //    foreach (FileInfo file in dir.GetFiles())
        //    {
        //        WebTVJSON webjson = LoadFileWebTVJSON(file.FullName);
        //        //channel.Add(webjson);
        //    }

        //    channel.ForumList.Load(path + @"/Forum");

        //    return channel;
        //}



        public static void SaveFileWebTVJSON(WebTVJSON webtvjson, string path)
        {
            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }
            //path += webtvjson.Hourly.Title + Info.extension;
            SerializationWriter SW = new SerializationWriter(path);

            SW.Start("Info");
            SW.WriteStartElement("WebTVJSON");
            SW.WriteVersion(0);

            //SW.Write("Title", webtvjson.Hourly.Title);
            //SW.Write("VideoPlayer", webtvjson.Media.VideoPlayer);
            //SW.Write("Source", webtvjson.Media.Source);
            //SW.Write("Duration", webtvjson.Media.Duration);
            //SW.Write("StartSeconds", webtvjson.Media.StartSeconds);
            //SW.Write("Quality", webtvjson.Media.Quality);
            //SW.Write("Category", webtvjson.Hourly.Category);
            //SW.Write("Subcategory", webtvjson.Hourly.Subcategory);
            //SW.Write("Like", webtvjson.Note.Like);
            //SW.Write("Dislike", webtvjson.Note.Dislike);
            //SW.Write("NumberView", webtvjson.Note.NumberView);
            //SW.Write("Description", webtvjson.Hourly.Description);
            //SW.Write("ImageUrl", webtvjson.Hourly.ImageUrl);
            //SW.Write("BackGroundUrl", webtvjson.Hourly.BackGroundUrl);
            //SW.Write("WebSite", webtvjson.Social.WebSite);
            //SW.Write("Youtube", webtvjson.Social.Youtube);
            //SW.Write("Facebook", webtvjson.Social.Facebook);
            //SW.Write("Twitter", webtvjson.Social.Twitter);
            //SW.Write("Google", webtvjson.Social.Google);
            //SW.Write("Dailymotion", webtvjson.Social.Dailymotion);
            //SW.Write("Vimeo", webtvjson.Social.Vimeo);
            //SW.Write("Email", webtvjson.Social.Email);


            SW.WriteEndElement();
            SW.End();
        }
Beispiel #9
0
 public virtual void Save(SerializationWriter SW)
 {
     SW.WriteType(this);
     SW.WriteStartElement("Container");
     SW.WriteVersion(0);
     SW.Write("Name", Name);
     SW.Write("Owner", Owner);
     SW.Write("NbrX", NbrX);
     SW.Write("NbrY", NbrY);
     for (int i = 0; i < NbrX * NbrY; i++)
     {
         if (Entitys[i] == null)
         {
             SW.WriteEmpty();
         }
         else
         {
             Entitys[i].Save(SW);
         }
     }
     SW.WriteEndElement();
 }
Beispiel #10
0
        public virtual void Save(SerializationWriter SW)
        {
            SW.WriteType(this);
            SW.WriteStartElement("Cube");
            SW.WriteVersion(0);

            SW.Write("X", X);
            SW.Write("Y", Y);
            SW.Write("Z", Z);

            SW.Write("Climb", Climb);
            SW.Write("Cross", Cross);
            SW.Write("See", See);
            SW.Write("Attack", Attack);

            SW.Write("Floors_Speed", Floors_Speed);
            SW.Write("Volumes_Speed", Volumes_Speed);

            SW.Write("Floors", Floors);
            SW.Write("Volumes", Volumes);

            SW.WriteEndElement();
        }