public void SetMap(PredefinedTypes.Map map) { if (_mMainForm != null && _mMainForm.IsLoaded) { _mMainForm.Map = map; } }
public void SetGameinfo(PredefinedTypes.Gameinformation gameinfo) { if (_mMainForm != null && _mMainForm.IsLoaded) { _mMainForm.Gameinfo = gameinfo; } }
public static void SetWindowStyle(IntPtr handle, PredefinedTypes.CustomWindowStyles wndStyle) { if (wndStyle.Equals(PredefinedTypes.CustomWindowStyles.Clickable)) { var initial = InteropCalls.GetWindowLong(handle, (Int32)InteropCalls.Gwl.ExStyle); InteropCalls.SetWindowLong(handle, (Int32)InteropCalls.Gwl.ExStyle, (IntPtr)(initial & ~(Int32)InteropCalls.Ws.ExTransparent)); } else if (wndStyle.Equals(PredefinedTypes.CustomWindowStyles.NotClickable)) { var initial = InteropCalls.GetWindowLong(handle, (Int32)InteropCalls.Gwl.ExStyle); InteropCalls.SetWindowLong(handle, (Int32)InteropCalls.Gwl.ExStyle, (IntPtr)(initial | (Int32)InteropCalls.Ws.ExTransparent)); } }
public void SetSelection(PredefinedTypes.LSelection selection) { //Nope }
public void SetPlayers(PredefinedTypes.PList players) { if (_mainWindows != null) _mainWindows.Players = players; }
public void SetMap(PredefinedTypes.Map map) { //Nope }
public void SetGameinfo(PredefinedTypes.Gameinformation gameinfo) { if (_mainWindows != null) _mainWindows.Gameinfo = gameinfo; }
public void SetGameinfo(PredefinedTypes.Gameinformation gameinfo) { if (_pData != null) _pData.Gameinfo = gameinfo; }
public void SetPlayers(PredefinedTypes.PList players) { _frmExternal.Players = players; }
public void SetSelection(PredefinedTypes.LSelection selection) { if (_mMainForm != null && _mMainForm.IsLoaded) { _mMainForm.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); }
private void AddPlayerData(int startIndex, int endIndex, PredefinedTypes.PList list, ListBox lstBx) { for (var index = startIndex; index < endIndex; index++) { var p = list[index]; if (p.NameLength <= 3 || p.Type.Equals(PredefinedTypes.PlayerType.Hostile)) continue; var cl = Color.FromArgb(p.Color.A, p.Color.R, p.Color.G, p.Color.B); var iPlayerCountLenght = Players.Count.ToString(CultureInfo.InvariantCulture).Length; var strResult = "[" + index + "]"; for (var i = 0; i <= iPlayerCountLenght - index.ToString(CultureInfo.InvariantCulture).Length; i++) strResult += " "; strResult += p.Name; lstBx.Items.Add(new ListBoxItem2(strResult, Brushes.Black, new SolidColorBrush(cl))); } }
public void SetSelection(PredefinedTypes.LSelection selection) { if (_pData != null) _pData.Selections = selection; }
public void SetPlayers(PredefinedTypes.PList players) { if (_pData != null) _pData.Players = players; }
public void SetMap(PredefinedTypes.Map map) { if (_pData != null) _pData.Map = map; }
public void SetGameinfo(PredefinedTypes.Gameinformation gameinfo) { _frmExternal.Gameinfo = gameinfo; }
public void SetMap(PredefinedTypes.Map map) { _frmExternal.Map = map; }
public void SetPlayers(PredefinedTypes.PList players) { if (_mMainForm != null && _mMainForm.IsLoaded) { _mMainForm.Players = players; } }
public void SetSelection(PredefinedTypes.LSelection selection) { _frmExternal.Selection = selection; }
private void CommandCenter(ref List<Keys> keys, PredefinedTypes.Unit unit, PredefinedTypes.Unit oldUnit, Keys scvKey, float buildNextScvAt) { if (unit.ProdNumberOfQueuedUnits <= 0) { keys.Add(scvKey); } else if (unit.ProdNumberOfQueuedUnits == 1) { if (unit.ProdProcess[0] >= buildNextScvAt) keys.Add(scvKey); } }