entity.MetaEditor2.Ident.BaseField_Leave C# (CSharp) Method

BaseField_Leave() public method

public BaseField_Leave ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        public override void BaseField_Leave(object sender, EventArgs e)
        {
            System.IO.BinaryWriter bw = new System.IO.BinaryWriter(meta.MS);
            if (((WinMetaEditor)this.ParentForm).checkSelectionInCurrentTag())
                bw.BaseStream.Position = this.offsetInMap - meta.offset;
            this.tagType = this.cbTagType.Text;
            this.tagName = this.cbTagIdent.Text;
            if (this.tagType == "")
                this.tagType = "null";
            this.tagIndex = map.Functions.ForMeta.FindByNameAndTagType(this.tagType, this.tagName);
            if (this.tagIndex != -1)
                this.identInt32 = map.MetaInfo.Ident[this.tagIndex];
            else
                this.identInt32 = -1;
            if (this.doesHaveTagType == true)
            {
                if (this.tagType != "null")
                {
                    List<char> tempList = new List<char>(0);
                    tempList.AddRange(this.tagType.ToCharArray(0, 4));
                    tempList.TrimExcess();
                    tempList.Reverse();
                    char[] tempchar = tempList.ToArray();
                    bw.Write(tempchar);
                }
                else
                {
                    bw.Write((int)-1);
                }
            }
            bw.Write(this.identInt32);
        }