Ejemplo n.º 1
0
        /// <summary>
        /// Removes a name from the collection using the specified index.
        /// </summary>
        /// <param name="index"></param>
        private void RemoveNameAt(int index)
        {
            names[index] = null;

            UpdateListBox();

            PositionInput.Clear();
        }
Ejemplo n.º 2
0
        private void OnValidate()
        {
            if (HeightInputType.Type == null)
            {
                HeightInput = null;
            }
            else if (HeightInput == null || HeightInput.GetType() != HeightInputType.Type)
            {
                HeightInput = Activator.CreateInstance(HeightInputType) as HeightInput;
            }

            if (DimensionsInputType.Type == null)
            {
                DimensionsInput = null;
            }
            else if (DimensionsInput == null || DimensionsInput.GetType() != DimensionsInputType.Type)
            {
                DimensionsInput = Activator.CreateInstance(DimensionsInputType) as DimensionsInput;
            }

            if (GrassMapInputType.Type == null)
            {
                GrassMapInput = null;
            }
            else if (GrassMapInput == null || GrassMapInput.GetType() != GrassMapInputType.Type)
            {
                GrassMapInput = Activator.CreateInstance(GrassMapInputType) as GrassMapInput;
            }

            if (NormalInputType.Type == null)
            {
                NormalInput = null;
            }
            else if (NormalInput == null || NormalInput.GetType() != NormalInputType.Type)
            {
                NormalInput = Activator.CreateInstance(NormalInputType) as NormalInput;
            }

            if (PositionInputType.Type == null)
            {
                PositionInput = null;
            }
            else if (PositionInput == null || PositionInput.GetType() != PositionInputType.Type)
            {
                PositionInput = Activator.CreateInstance(PositionInputType) as PositionInput;
            }

            if (PatchContainerType.Type == null)
            {
                PatchContainer = null;
            }
            else if (PatchContainer == null || PatchContainer.GetType() != PatchContainerType.Type)
            {
                PatchContainer = Activator.CreateInstance(PatchContainerType) as PatchContainer;
            }
        }
Ejemplo n.º 3
0
 private void Start()
 {
     _positionInput = GetComponent <PositionInput>();
     this.score     = 0;
     _scored        = false;
     _ownPieces     = new List <Piece>();
     UpdateScore(score);
     UpdateScoreColor(Color.gray);
     HandleMovement();
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Fills all fields with dummy data.
        /// <para>Does not fill &lt;End of work&gt;, checks &lt;To present&gt;.</para>
        /// </summary>
        public void FillAllFields()
        {
            //fill start of work
            SelectElement se = new SelectElement(StartOfWorkDropdown_Month);

            se.SelectByIndex(3);
            se = new SelectElement(StartOfWorkDropdown_Year);
            se.SelectByIndex(3);

            //make it present
            CheckBox.Click();

            //fill organization
            OrganizationInput.Clear();
            OrganizationInput.SendKeys("TestOrganization");

            //fill position
            PositionInput.Clear();
            PositionInput.SendKeys("TestOrganization");

            //fill Responsibilities
            ResponsibilitiesInput.Clear();
            ResponsibilitiesInput.SendKeys("TestOrganization");
        }