public void SetSelection(PredefinedTypes.LSelection selection) { if (_pData != null) { _pData.Selections = selection; } }
/* get the selections */ public void SetSelection(PredefinedTypes.LSelection selection) { if (_mMainForm != null && _mMainForm.IsLoaded) { _mMainForm.Selection = selection; } }
public void SetSelection(PredefinedTypes.LSelection selection) { _frmExternal.Selection = selection; }
private void AddSelectionData(int startIndex, int endIndex, PredefinedTypes.LSelection list, ListBox lstBx) { if (list == null || list.Count <= 0) { return; } var lUnitNames = new List <String>(); for (var index = startIndex; index < endIndex; index++) { var u = list[index].Unit; //var cl = Color.FromArgb(p.Color.A, p.Color.R, p.Color.G, p.Color.B); #region Add ' ' to line the unitnames up [between [INDEX] UNITNAME] var iUnitCountLenght = list.Count.ToString(CultureInfo.InvariantCulture).Length; var strResult = "[" + index + "]"; for (var i = 0; i <= iUnitCountLenght - index.ToString(CultureInfo.InvariantCulture).Length; i++) { strResult += " "; } strResult += u.Name; #endregion lUnitNames.Add(strResult); //LstUnit.Items.Add(new ListBoxItem2(strResult, Brushes.Black, new SolidColorBrush(cl))); } var tmpUnitNames = new List <String>(); for (var i = 0; i < list.Count; i++) { tmpUnitNames.Add(list[i].Unit.Name); } /* Sort the string- lenght - short to long */ tmpUnitNames.Sort((x, y) => (x.Length.CompareTo(y.Length))); var iMinLenght = tmpUnitNames[0].Length; var iMaxLenght = tmpUnitNames[tmpUnitNames.Count - 1].Length + 2 + list.Count.ToString(CultureInfo.InvariantCulture).Length; for (int index = 0; index < lUnitNames.Count; index++) { var s = lUnitNames[index]; for (var i = 0; i <= iMaxLenght - s.Length; i++) { lUnitNames[index] += " "; } lUnitNames[index] += " Owner: " + Players[list[index + startIndex].Unit.Owner].Name; } foreach (var s in lUnitNames) { lstBx.Items.Add(s); } }
public void SetSelection(PredefinedTypes.LSelection selection) { //Nope }
public void SetSelection(PredefinedTypes.LSelection selection) { _rRenderer.Selection = selection; }