示例#1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="node">node to edit</param>
        public ItemForm(XmlNode node)
        {
            InitializeComponent();


            // TileSetNameBox
            TileSetNameBox.BeginUpdate();
            foreach (string name in ResourceManager.GetAssets <TileSet>())
            {
                TileSetNameBox.Items.Add(name);
            }
            TileSetNameBox.EndUpdate();


            TypeBox.BeginUpdate();
            TypeBox.Items.Clear();
            foreach (string name in Enum.GetNames(typeof(ItemType)))
            {
                TypeBox.Items.Add(name);
            }
            TypeBox.EndUpdate();


            Item = new Item();
            Item.Load(node);
        }
示例#2
0
        /// <summary>
        /// Build interface
        /// </summary>
        void BuildInterface()
        {
            TileSetNameBox.BeginUpdate();
            TileSetNameBox.Items.Clear();
            TileSetNameBox.Items.AddRange(ResourceManager.GetAssets <TileSet>().ToArray());
            TileSetNameBox.EndUpdate();


            if (Animation.TileSet != null)
            {
                TileSetNameBox.SelectedItem = Animation.TileSetName;
            }
        }