/// <summary>
 /// Cancela e desfaz as operações do Wizard.
 /// </summary>
 /// <param name="parameter"></param>
 private void Cancel(object parameter)
 {
     Mouse.OverrideCursor = Cursors.Wait;
     Base_.SetProperties();
     Navigator.WizardNavigationService.Content = null;
     Mouse.OverrideCursor = Cursors.Arrow;
 }
Esempio n. 2
0
 public void ClearRightContainer()
 {
     if (rightContainer_.GetComponentInChildren <BaseBottomUi_>() != null)
     {
         currentSelectedObject = null;
         Destroy(rightContainer_.GetComponentInChildren <BaseBottomUi_>().gameObject);
     }
 }
Esempio n. 3
0
 public void LoadUI(Base_ selectedObject)
 {
     if (!IsAlreadyShown(selectedObject))//Si el objeto no está siendo mostrado aún en la bottom UI...
     {
         ClearRightContainer();
         currentSelectedObject = selectedObject;
         Instantiate(currentSelectedObject.graphics_.ui.bottomUI, rightContainer_.transform);
     }
 }
Esempio n. 4
0
        private void SetProperties()
        {
            SelectionProfChangedCommand = new RelayCommand(SelectionProfChanged);
            SelectionDiscChangedCommand = new RelayCommand(SelectionDiscChanged);
            AddCommand        = new RelayCommand(Add);
            UpdateDateCommand = new RelayCommand(UpdateDate);

            UpdateDate(new object());
            Base_.SetProperties(_zIndex: 2, _wizColumnCancel: 60, _lblColumnCancel: "Cancelar", _wizColumnFinish: 60, _lblColumnFinish: "Salvar");
        }
Esempio n. 5
0
    public bool IsAlreadyShown(Base_ selectedObject)
    {
        bool isAlreadyShown = false;

        if (selectedObject == currentSelectedObject)
        {
            isAlreadyShown = true;
        }
        return(isAlreadyShown);
    }
    public bool IsInVisualDistance(Base_ baseObject)
    {
        bool  isInVisualDistance = false;
        float baseObjectDistance = Vector3.Distance(owner.transform.position, baseObject.transform.position);

        if (baseObjectDistance <= visualDistance)
        {
            isInVisualDistance = true;
        }
        return(isInVisualDistance);
    }
    public bool IsInVisualAngle(Base_ baseObject)
    {
        bool  isInVisualAngle = false;
        float baseObjectAngle = Vector3.Angle(transform.right, baseObject.transform.position - owner.transform.position);

        if (baseObjectAngle <= visualAngle / 2)
        {
            isInVisualAngle = true;
        }
        return(isInVisualAngle);
    }
    public bool IsBaseObject(GameObject gameObject_, out Base_ baseObject)
    {
        bool isBaseObject = false;

        baseObject = null;
        if (gameObject_.GetComponentInParent <Base_>() != null)
        {
            baseObject   = gameObject_.GetComponentInParent <Base_>();
            isBaseObject = true;
        }
        return(isBaseObject);
    }
Esempio n. 9
0
 public bool TryParseToBase(GameObject gameObjectToParse, out Base_ parsedGameObject)
 {
     if (gameObjectToParse.GetComponentInParent <Base_>() != null)
     {
         parsedGameObject = gameObjectToParse.GetComponentInParent <Base_>();
         return(true);
     }
     else
     {
         parsedGameObject = null;
         return(false);
     }
 }
    public bool IsInVisualField(Base_ baseObject)
    {
        bool isInVisualField = false;

        if (IsInVisualAngle(baseObject))
        {
            if (IsInVisualDistance(baseObject))
            {
                isInVisualField = true;
            }
        }
        return(isInVisualField);
    }
Esempio n. 11
0
        public void Save()
        {
            Mouse.OverrideCursor = Cursors.Wait;

            if (Falta.Add(Faltas.ToList()))
            {
            }

            Faltas.ToList().ForEach(f => { ((BoletimDiarioViewModel)GetCurrentPageDataContext()).Faltas.Add(f); });
            ((BoletimDiarioView)GetCurrentPageData()).Faltas.Refresh();

            Base_.SetProperties();
            Navigator.WizardNavigationService.Content = null;
            Mouse.OverrideCursor = Cursors.Arrow;
        }
Esempio n. 12
0
    public void LoadSelectedObjectUI()
    {
        ClearRightContainer();
        GameObject selectedObject = EventSystem.current.currentSelectedGameObject;

        if (selectedObject != null)                                         //Si se hizo click sobre algún objeto
        {
            if (TryParseToBase(selectedObject, out Base_ parsedGameObject)) //Si el objeto es mostrable por la bottom UI
            {
                if (!IsAlreadyShown(parsedGameObject))                      //Si el objeto aún no ha sido cargado en la bottom UI
                {
                    ClearRightContainer();                                  //Limpiar el contenedor derecho de la bottom UI
                    currentSelectedObject = parsedGameObject;               //Asignarlo como el nuevo objeto seleccionado
                    Instantiate(currentSelectedObject.graphics_.ui.bottomUI, rightContainer_.transform);
                }
            }
        }
        else
        {
            ClearRightContainer();
        }
    }
Esempio n. 13
0
 private void SetProperties() => Base_.SetProperties(_zIndex: 2, _wizColumnCancel: 60, _lblColumnCancel: "Cancelar", _wizColumnFinish: 60, _lblColumnFinish: "Salvar");
 private void SetProperties()
 {
     DiaDaSemana = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(Falta.Data.ToString("dddd", new CultureInfo("pt-BR")));
     Base_.SetProperties(_zIndex: 2, _wizColumnCancel: 60, _lblColumnCancel: "Cancelar", _wizColumnFinish: 60, _lblColumnFinish: "Salvar");
 }
Esempio n. 15
0
 public void LoadUI(Ground_ selectedTileGround)
 {
     ClearRightContainer();
     currentSelectedObject = null;
     Instantiate(selectedTileGround.graphics_.ui_.bottomUi, rightContainer_.transform);
 }