public listcordWindow showListCordWindow(HCEX.CampaignSave obj1, HCEX.TagGroup obj2) { listcordWindow msgListCord = new listcordWindow(obj1, obj2); msgListCord.Owner = this; msgListCord.ShowDialog(); return(msgListCord); }
public listcordWindow(HCEX.CampaignSave _hcex, HCEX.TagGroup group) { this.InitializeComponent(); lblTitle.Text = "COPY COORDINATES"; lblSubInfo.Text = "Select an object to copy coordinates from"; GID = 0; foreach (HCEX.GameObject obj in _hcex.Objects) { if (obj.TagGroup == group && obj != null) { ListBoxItem lbi = new ListBoxItem(); string posData = " -- [X: {0} - Y: {1} - Z: {2}]"; lbi.Content = obj.Index.Value.ToString("X") + string.Format(posData, obj.Position.X.ToString(), obj.Position.Y.ToString(), obj.Position.Z.ToString()); lbi.Tag = obj; listObjects.Items.Add(lbi); } } }