示例#1
0
        private string SetEntityInfo()
        {
            entity_spawner es = new entity_spawner(null, soundPlayer, true);

            if (es.ShowDialog() == DialogResult.OK)
            {
                if (es.EntityNBT[0].Trim() != "")
                {
                    return(es.EntityNBT[0].Trim());
                }
            }
            return(null);
        }
示例#2
0
 public static void Modify(object sender,EventArgs e)
 {
     Control this_obj = sender as Control;
     SoundPlayer soundPlayer = new SoundPlayer(Application.StartupPath + "\\MainFormClickSounds\\button_click.wav");
     TreeView Root = Cbhk_form.register;
     entity_spawner es = new entity_spawner(null,soundPlayer,true);
     if(es.ShowDialog() == DialogResult.OK)
     {
         NBT = es.EntityNBT[0];
         EntityType = es.EntityId[0];
         if (NBT.Trim() != "")
             this_obj.Tag = NBT;
         else
             this_obj.Tag = null;
         if (EntityType.Trim() != "")
             this_obj.Name = EntityType.Replace(":",".");
     }
 }
示例#3
0
        //实体生成器
        public void EntitySpawner(Form obj, SoundPlayer click_sound)
        {
            entity_spawner Entity = new entity_spawner(obj, click_sound);

            Entity.Show();
        }