void Awake() { go = GameObject.Find("Pathfinder"); grid = go.GetComponent <CustomGrid>(); animator = GetComponentInChildren <Animator>(); gunController = GetComponent <GunController>(); }
public void ClonedStructShouldBeIdentical() { var original = new CustomGrid(Color.Red); var clone = original.Clone(); Assert.That(clone, Is.EqualTo(original)); }
/// <summary> /// Prevents a default instance of the <see cref="Mouse" /> class from being created. /// </summary> private Mouse() { Log.Info("Mouse is initializing"); Chroma.InitInstance(); _custom = Custom.Create(); _customGrid = CustomGrid.Create(); }
void Start() { grid = GameObject.FindObjectOfType <CustomGrid>(); calculateMyGridCoordinate(); newPos = transform.position; myRot = transform.rotation; }
public override void BindControls() { CustomGrid.Bind(ParentDetailPageObject.ScreenId); DropDownList_CustomDischargeReferrals_Referral.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes; DropDownList_CustomDischargeReferrals_Referral.FillDropDownDropGlobalCodes(); DropDownList_CustomDocumentDischarges_ReferralDischarge.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes; DropDownList_CustomDocumentDischarges_ReferralDischarge.FillDropDownDropGlobalCodes(); DataSet ds = new DataSet(); SqlParameter[] _objectSqlParmeters; int ClientID = SHS.BaseLayer.BaseCommonFunctions.ApplicationInfo.Client.ClientId; _objectSqlParmeters = new SqlParameter[1]; _objectSqlParmeters[0] = new SqlParameter("@clientId", ClientID); //ds=SqlHelper.ExecuteDataset(Connection.ConnectionString,CommandType.StoredProcedure,'',_objectSqlParmeters); ds = SqlHelper.ExecuteDataset(Connection.ConnectionString, CommandType.StoredProcedure, "csp_GetClientEnrolledPrograms", _objectSqlParmeters); DropDownList_CustomDischargeReferrals_Program.DataSource = ds.Tables[0]; DropDownList_CustomDischargeReferrals_Program.DataValueField = "ProgramId"; DropDownList_CustomDischargeReferrals_Program.DataTextField = "ProgramName"; DropDownList_CustomDischargeReferrals_Program.DataBind(); DropDownList_CustomDischargeReferrals_Program.Items.Insert(0, new ListItem("", "-1")); //Bind_Filter_ReferralSubType(); }
/// <summary> /// <Author>Mohit Madaan</Author> /// <Description>This function is used to bind Server side Controls (Like Dropdowns and Custom Grid)</Description> /// <CreatedDate>September 11,2009</CreatedDate> /// </summary> public override void BindControls() { CustomGrid.Bind(ParentDetailPageObject.ScreenId); CustomICDGrid.Bind(ParentDetailPageObject.ScreenId); using (DataView DataViewGlobalCodes = BaseCommonFunctions.FillDropDown("DIAGNOSISSEVERITY", true, "", "", false)) { //DropDownList_DiagnosesIAndII_Severity.DataTextField = "CodeName"; //DropDownList_DiagnosesIAndII_Severity.DataValueField = "GlobalCodeID"; //DropDownList_DiagnosesIAndII_Severity.DataSource = DataViewGlobalCodes; //DropDownList_DiagnosesIAndII_Severity.DataBind(); } using (DataView DataViewGlobalCodes = BaseCommonFunctions.FillDropDown("DxRemissionType", true, "", "", false)) { DropDownList_DiagnosesIAndII_Remission.DataTextField = "CodeName"; DropDownList_DiagnosesIAndII_Remission.DataValueField = "GlobalCodeID"; DropDownList_DiagnosesIAndII_Remission.DataSource = DataViewGlobalCodes; DropDownList_DiagnosesIAndII_Remission.DataBind(); DropDownList_DiagnosesIAndII_Remission.Items.Insert(0, new ListItem("", "")); } using (DataView DataViewGlobalCodes = BaseCommonFunctions.FillDropDown("DIAGNOSISTYPE", true, "", "", false)) { DataViewGlobalCodes.Sort = "SortOrder asc"; DropDownList_DiagnosesIAndII_DiagnosisType.DataTextField = "CodeName"; DropDownList_DiagnosesIAndII_DiagnosisType.DataValueField = "GlobalCodeID"; DropDownList_DiagnosesIAndII_DiagnosisType.DataSource = DataViewGlobalCodes; DropDownList_DiagnosesIAndII_DiagnosisType.DataBind(); DropDownList_DiagnosesIAndII_DiagnosisType.Items.Insert(0, new ListItem("", "0")); } //DropDownList_DiagnosesIAndII_Remission.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes; }
public PathNode(CustomGrid <PathNode> grid, int x, int z) { this.grid = grid; this.x = x; this.z = z; isWalkable = true; }
private void Start() { grid = floor.GetComponent <CustomGrid>(); map = grid.getMapClone(); sizeMapX = grid.getSizeMapX(); sizeMapZ = grid.getSizeMapZ(); }
public override void BindControls() { DropDownList_CustomDocumentTransfers_ReceivingStaff.Attributes.Add("onchange", "BindProgramDropDown();"); DropDownList_CustomDocumentTransfers_ReceivingProgram.Attributes.Add("onchange", "SetValue();"); DropDownList_CustomDocumentTransfers_TransferStatus.Attributes.Add("onchange", "ShowHide();"); Bind_Control_Expires(); CustomGrid.Bind(ParentDetailPageObject.ScreenId); }
//public GameObject gold_coin; void Start() { controller = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController>(); customGrid = controller.gameObject.GetComponent <CustomGrid>(); InvokeRepeating("findPath", 0f, 1f); //enemy_main = GetComponent<Animator>(); controller.enemySpawnHistory.Add(new EnemySpawnData(Time.frameCount, prefabSetIndex, transform.position)); }
public void ShouldSetCorrectColorWithIndexer() { var effect = CustomGrid.Create(); effect[5, 5] = Color.red; Assert.AreEqual(Color.red, effect[5, 5]); }
public void ShouldSetCorrectColorWithLedIndexer() { var effect = CustomGrid.Create(); effect[GridLed.Logo] = Color.Red; Assert.AreEqual(Color.Red, effect[GridLed.Logo]); }
public void ClonedStructShouldBeIndependent() { var original = new CustomGrid(Color.Red); var clone = original.Clone(); clone.Set(Color.Blue); Assert.That(clone, Is.Not.EqualTo(original)); }
public void ShouldNotEqualDifferentEffect() { var a = new CustomGrid(Color.Red); var b = new CustomGrid(Color.Blue); Assert.False(a == b); Assert.True(a != b); Assert.False(a.Equals(b)); Assert.AreNotEqual(a, b); }
public void ShouldNotEqual1DArrayWithInvalidSize() { var grid = CustomGrid.Create(); var arr = new Color[2]; Assert.False(grid == arr); Assert.True(grid != arr); Assert.False(grid.Equals(arr)); Assert.AreNotEqual(grid, arr); }
public void ShouldEqualIdenticalEffect() { var a = new CustomGrid(Color.Red); var b = new CustomGrid(Color.Red); Assert.True(a == b); Assert.False(a != b); Assert.True(a.Equals(b)); Assert.AreEqual(a, b); }
public void ShouldNotEqualArbitraryObject() { var effect = CustomGrid.Create(); var obj = new object(); Assert.False(effect == obj); Assert.True(effect != obj); Assert.False(effect.Equals(obj)); Assert.AreNotEqual(effect, obj); }
public void ShouldNotEqualArrayWithInvalidRowCount() { var effect = CustomGrid.Create(); var array = new Color[1][]; Assert.False(effect == array); Assert.True(effect != array); Assert.False(effect.Equals(array)); Assert.AreNotEqual(effect, array); }
/// <summary> /// Create keyboard custom grid effects. /// </summary> /// <param name="effects">Grid layout of the keyboard. Size is 6 rows by 22 columns.</param> /// <returns>A <see cref="Guid" /> for the created effect.</returns> /// <seealso cref="Razer.NativeMethods.CreateKeyboardCustomGridEffects" /> internal static Guid CreateKeyboardCustomGridEffects(CustomGrid effects) { var guid = Guid.Empty; var result = NativeMethods.CreateKeyboardCustomGridEffects(effects, ref guid); if (!result) { throw new NativeCallException("CreateKeyboardCustomGridEffects", result); } return(guid); }
public void ShouldCreateWithAllBlackColors() { var effect = CustomGrid.Create(); for (var row = 0; row < Constants.MaxRows; row++) { for (var column = 0; column < Constants.MaxColumns; column++) { Assert.AreEqual(Color.Black, effect[row, column]); } } }
internal void openForm(Panel Dest, CustomGrid myGrid) { splRight.Panel2.Controls.Clear(); Dest.Controls.Clear(); myGrid.TopLevel = false; myGrid.ShowInTaskbar = false; myGrid.ControlBox = false; myGrid.Text = ""; myGrid.FormBorderStyle = FormBorderStyle.None; Dest.Controls.Add(myGrid); myGrid.Show(); }
public void ShouldConstructFromColor() { var effect = new CustomGrid(Color.Red); for (var row = 0; row < Constants.MaxRows; row++) { for (var column = 0; column < Constants.MaxColumns; column++) { Assert.AreEqual(Color.Red, effect[row, column]); } } }
void Start() { InvokeRepeating("UpdateTarget", 1f, 0.5f); //0f, 0.01f gameController = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController>(); customGrid = gameController.GetComponent <CustomGrid>(); snap = gameObject.GetComponent <Snap>(); isDead = false; IsSelected = GetComponent <isSelected>(); currentNode = customGrid.nodes[customGrid.gridIndexFromPos(transform.position.x, transform.position.z)].GetComponent <Node>(); lastNode = currentNode; currentNode.isOccupied = true; snap.SnapToGrid(); }
public void ShouldConstructFrom1DArray() { var arr = new Color[Constants.MaxGridLeds]; arr[2] = Color.Pink; arr[4] = Color.Red; arr[8] = Color.Blue; var grid = new CustomGrid(arr); for (var index = 0; index < Constants.MaxGridLeds; index++) Assert.That(grid[index], Is.EqualTo(arr[index])); }
public void ShouldNotEqualArrayWithInvalidColumnCount() { var effect = CustomGrid.Create(); var array = new Color[Constants.MaxRows][]; array[0] = new Color[1]; Assert.False(effect == array); Assert.True(effect != array); Assert.False(effect.Equals(array)); Assert.AreNotEqual(effect, array); }
void Start() { grid = CustomGrid.instance; moveTargets = new List <Vector2>(); pushTargets = new List <Vector2>(); MPRangeCells = new List <Vector2>(); x = (int)transform.position.x; y = (int)transform.position.z; orientation = (int)transform.eulerAngles.y; doMove = false; }
void Awake() { instance = this; UI = canvas.GetComponent <UI_Manager>(); customGrid = gameObject.GetComponent <CustomGrid>(); // print(customGrid); selection.SetActive(false); wallPreview = GameObject.Instantiate(wallPreviewPrefab, transform.position, Quaternion.Euler(0, 0, 0)); wallPreview.SetActive(false); if (timelinePath != "") { ReadStringToTimeline(timelinePath); } }
public void ShouldSetCorrectColorWithSet() { var effect = CustomGrid.Create(); effect.Set(Color.Red); for (var row = 0; row < Constants.MaxRows; row++) { for (var column = 0; column < Constants.MaxColumns; column++) { Assert.AreEqual(Color.Red, effect[row, column]); } } }
// Use this for initialization void Awake() { //set game manager's editor level GameManager.Instance.EditorController = this; GameManager.Instance.IsLevelEditor = true; //create main grid grid = new CustomGrid(); grid.Initialize(GetComponent <LineRenderer>()); //create previous and next grids previousGrid = new CustomGrid(); nextGrid = new CustomGrid(); }
public void ShouldClearToBlack() { var effect = CustomGrid.Create(); effect.Set(Color.Red); effect.Clear(); for (var row = 0; row < Constants.MaxRows; row++) { for (var column = 0; column < Constants.MaxColumns; column++) { Assert.AreEqual(Color.Black, effect[row, column]); } } }
public void ShouldConstructFrom1DArray() { var arr = new Color[Constants.MaxGridLeds]; arr[2] = Color.Pink; arr[4] = Color.Red; arr[8] = Color.Blue; var grid = new CustomGrid(arr); for (var index = 0; index < Constants.MaxGridLeds; index++) { Assert.That(grid[index], Is.EqualTo(arr[index])); } }
void Awake() { rt = (RectTransform)transform; if (GetComponent<UnityEngine.UI.GridLayoutGroup>()) { g = GetComponent<UnityEngine.UI.GridLayoutGroup>(); g.cellSize = new Vector2(rt.rect.width, g.cellSize.y); spacing = g.spacing; cellSize = g.cellSize; } if (GetComponent<CustomGrid>()) { c = GetComponent<CustomGrid>(); if (!onlySetContainerHeight) c.ObjSize = new Vector2(rt.rect.width, c.ObjSize.y); cellSize = c.ObjSize; spacing = c.maxSpacing; } }
public void ShouldNotEqualDifferent2DArray() { var effect = new CustomGrid(Color.Red); var array = new Color[Constants.MaxRows][]; for (var row = 0; row < Constants.MaxRows; row++) { array[row] = new Color[Constants.MaxColumns]; for (var column = 0; column < Constants.MaxColumns; column++) array[row][column] = Color.Blue; } Assert.False(effect == array); Assert.True(effect != array); Assert.False(effect.Equals(array)); Assert.AreNotEqual(effect, array); }
public void ShouldConstructFromColor() { var effect = new CustomGrid(Color.Red); for (var row = 0; row < Constants.MaxRows; row++) { for (var column = 0; column < Constants.MaxColumns; column++) Assert.AreEqual(Color.Red, effect[row, column]); } }
public void ShouldNotEqualDifferent1DArray() { var grid = new CustomGrid(Color.Pink); var arr = new Color[Constants.MaxGridLeds]; for (var index = 0; index < Constants.MaxGridLeds; index++) arr[index] = Color.Red; Assert.False(grid == arr); Assert.True(grid != arr); Assert.False(grid.Equals(arr)); Assert.AreNotEqual(grid, arr); }
public static void InitWrapContents(CustomGrid grid, List<ItemInfo> itemInfos, int countPerGroup, int curMaxCount) { if (itemInfos == null) return; var list = new List<List<ItemInfo>>(); var rows = Mathf.CeilToInt((float)itemInfos.Count / countPerGroup); var curLimitRows = Mathf.CeilToInt((float)curMaxCount / countPerGroup); for (var i = 0; i < rows; i++) { var infosContainer = new List<ItemInfo>(); for (var j = 0; j < countPerGroup; j++) { if (i * countPerGroup + j < itemInfos.Count) { infosContainer.Add(itemInfos[i * countPerGroup + j]); } } list.Add(infosContainer); } grid.Init(list, curLimitRows); }
/// <summary> /// Sets a custom grid effect on the mouse. /// </summary> /// <param name="effect">An instance of the <see cref="CustomGrid" /> struct.</param> public void SetGrid(CustomGrid effect) { SetGuid(NativeWrapper.CreateMouseEffect(effect)); }
public void ShouldEqualIdentical1DArray() { var grid = new CustomGrid(Color.Red); var arr = new Color[Constants.MaxGridLeds]; // Populate the 1D array for (var index = 0; index < Constants.MaxGridLeds; index++) arr[index] = Color.Red; Assert.True(grid == arr); Assert.False(grid != arr); Assert.True(grid.Equals(arr)); Assert.AreEqual(grid, arr); }
void Awake() { grid = GetComponentInChildren<CustomGrid>(); label = transform.FindChild("back/back/Label").GetComponent<UILabel>(); }
public void ShouldConstructFrom2DArray() { var colors = new Color[Constants.MaxRows][]; for (var row = 0; row < Constants.MaxRows; row++) colors[row] = new Color[Constants.MaxColumns]; colors[1][2] = Color.Red; colors[0][4] = Color.Blue; colors[3][1] = Color.Green; var effect = new CustomGrid(colors); for (var row = 0; row < Constants.MaxRows; row++) { for (var column = 0; column < Constants.MaxColumns; column++) Assert.AreEqual(colors[row][column], effect[row, column]); } }
public static void InitWrapContents(CustomGrid grid, List<HeroInfo> heroInfos, int countPerGroup, int curMaxCount) { if(heroInfos == null) { return; } var data = new List<List<long>>(); var rows = Mathf.CeilToInt((float)heroInfos.Count / countPerGroup); var curLimitRow = Mathf.CeilToInt((float)curMaxCount / countPerGroup); for (var i = 0; i < rows; i++) { var list = new List<long>(); for (var j = 0; j < countPerGroup; j++) { if (i * countPerGroup + j < heroInfos.Count) { list.Add(heroInfos[i * countPerGroup + j].Uuid); } } data.Add(list); } grid.Init(data, curLimitRow); }