Example #1
0
    /// <summary>
    ///
    /// </summary>
    public virtual void DeactivateAllSubmenus()
    {
        SelectorMenu.Instance.gameObject.SetActive(true);
        if (RenameDialog.Visible)
        {
            RenameDialog.Cancel();
        }
        TransformMenu.Instance.Hide();
        RobotSteppingMenu.Instance.Hide();

        MainSettingsMenu.Instance.Hide();
        ActionObjectMenu.Instance.Hide();

        FavoritesButtons.SetActive(false);
        HomeButtons.SetActive(false);
        UtilityButtons.SetActive(false);
        AddButtons.SetActive(false);
        RobotButtons.SetActive(false);

        FavoritesButton.GetComponent <Image>().enabled = false;
        RobotButton.GetComponent <Image>().enabled     = false;
        AddButton.GetComponent <Image>().enabled       = false;
        UtilityButton.GetComponent <Image>().enabled   = false;
        HomeButton.GetComponent <Image>().enabled      = false;

        MainSettingsButton.GetComponent <Image>().enabled  = false;
        MoveButton.GetComponent <Image>().enabled          = false;
        MoveButton2.GetComponent <Image>().enabled         = false;
        OpenMenuButton.GetComponent <Image>().enabled      = false;
        RobotSelectorButton.GetComponent <Image>().enabled = false;
        RobotSteppingButton.GetComponent <Image>().enabled = false;
        RobotSelector.Close(false);
    }
Example #2
0
    // Use this for initialization
    void Start()
    {
        GameObject connectGObj = GameObject.Find("ConnectToUrbandSharedInstance");

        connectToDevice = connectGObj.GetComponent <ConnectToUrbandSharedInstance> ();
        addButtons      = GameObject.Find("List").GetComponent <AddButtons> ();
        Initialize();
    }
Example #3
0
        private void AddVisualButton()
        {
            var visCommand = CreateCommand(AddVisualsToDrawing, Observable.Start(() => Error?.Visuals?.Any() == true));
            var visButton  = new ErrorAddButton
            {
                Name    = "Отрисовка",
                Tooltip = "Добавить визуализацию ошибки в чертеж.",
                Click   = visCommand
            };

            AddButtons.Add(visButton);
        }
Example #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ModuleKey  = "010101";
        ModuleName = "日常办公-通知通告";
        Response.Cache.SetExpires(DateTime.Now);
        Response.Cache.SetCacheability(HttpCacheability.Public);
        Response.Cache.SetValidUntilExpires(true);
        AddButtons.Add(btnadd);
        EditButtons.Add(btnedit);
        DeleteButtons.Add(btndelete);
        //FinishButtons.Add(btnfinish);
        //ApproveButtons.Add(btnapprove);
        //PublishButtons.Add(btnpublish);

        if (!IsPostBack)
        {
            DDL_Year.Items.FindByValue(DateTime.Today.Year.ToString("0000")).Selected = true;
            DDL_Month.Items.FindByValue("").Selected = true;

            if (GridView1.Attributes["SortExpression"] == null)
            {
                ViewState["SortExpression"] = "chgdate";
                ViewState["SortDirection"]  = "DESC";
            }
            currentPage = 1;
            GridBind();
            HF_CurUnitCode.Value = _user.UnitCode;
            GetLatestNews();
        }
        else//接收HF和session
        {
            try
            {
                total       = Int32.Parse(HF_total.Value);
                currentPage = Int32.Parse(HF_currentPage.Value);
                GridSource  = (DataTable)Session["GridSource"];
            }
            catch
            {
                currentPage = 1;
                GridBind();//根据情况修改
            }
        }
    }
Example #5
0
    public void SetActiveSubmenu(LeftMenuSelection which, bool active = true)
    {
        DeactivateAllSubmenus();
        CurrentSubmenuOpened = which;
        if (!active)
        {
            return;
        }
        switch (which)
        {
        case LeftMenuSelection.None:
            break;

        case LeftMenuSelection.Favorites:
            FavoritesButtons.SetActive(active);
            FavoritesButton.GetComponent <Image>().enabled = active;
            break;

        case LeftMenuSelection.Add:
            AddButtons.SetActive(active);
            AddButton.GetComponent <Image>().enabled = active;
            break;

        case LeftMenuSelection.Utility:
            UtilityButtons.SetActive(active);
            UtilityButton.GetComponent <Image>().enabled = active;
            break;

        case LeftMenuSelection.Home:
            HomeButtons.SetActive(active);
            HomeButton.GetComponent <Image>().enabled = active;
            UpdateBuildAndSaveBtns();
            break;

        case LeftMenuSelection.Robot:
            RobotButtons.SetActive(active);
            RobotButton.GetComponent <Image>().enabled = active;
            break;
        }
    }
Example #6
0
 private bool HasVisualButton()
 {
     return(AddButtons.Any(b => b.Name == "Отрисовка"));
 }
Example #7
0
    // Use this for initialization
    void Start()
    {
        foreach (string n in names)
        {
            int i = names.IndexOf(n);

            keywords.Add(n, () =>
            {
                AddButtons.setToggle(sys[i]);
            }
                         );
        }

        /*
         * keywords.Add("Open", () =>
         * {
         *  var focusObject = GazeGestureManager.Instance.FocusedObject;
         *  if (focusObject != null)
         *  {
         *      focusObject.SendMessage("OnOpen");
         *  }
         * });
         *
         * keywords.Add("Close", () =>
         * {
         *  var focusObject = GazeGestureManager.Instance.FocusedObject;
         *  if (focusObject != null)
         *  {
         *      focusObject.SendMessage("OnClose");
         *  }
         * });
         *
         * //controls the width of opening
         * keywords.Add("A Quarter Open", () =>
         * {
         *  var focusObject = GazeGestureManager.Instance.FocusedObject;
         *  if (focusObject != null)
         *  {
         *      focusObject.SendMessage("OnQuarter");
         *  }
         * });
         *
         * keywords.Add("Half Open", () =>
         * {
         *  var focusObject = GazeGestureManager.Instance.FocusedObject;
         *  if (focusObject != null)
         *  {
         *      focusObject.SendMessage("OnHalf");
         *  }
         * });
         *
         * keywords.Add("Three Quarters Open", () =>
         * {
         *  var focusObject = GazeGestureManager.Instance.FocusedObject;
         *  if (focusObject != null)
         *  {
         *      focusObject.SendMessage("OnThreeQuarters");
         *  }
         * });
         * }
         */


        /*
         * keywords.Add("Dashboard", () =>
         * {
         *  var UIobj = TriggerUI.TriggerObj;
         *  UIobj.SendMessage("OnDashboard");
         * });
         *
         * keywords.Add("Hide", () =>
         * {
         *  var UIobj = TriggerUI.TriggerObj;
         *  UIobj.SendMessage("OnHide");
         *
         *  var UIpop = GameObject.Find("UIpop");
         *  UIpop.SendMessage("OnHide");
         *
         *  //var UIpopout = UIPop.TriggerObj;
         *  //UIpopout.SendMessage("OnHide");
         * });
         *
         *
         * keywords.Add("Heat Map", () =>
         * {
         *  var floor = GameObject.Find("Quad");
         *  floor.GetComponent<HeatMap>().OnHeatMap(true);
         * });
         *
         * keywords.Add("Heat Map Off", () =>
         * {
         *  var floor = GameObject.Find("Quad");
         *  floor.GetComponent<HeatMap>().OnHeatMap(false);
         * });
         *
         * keywords.Add("Air Flow", () =>
         * {
         *  //Camera.main.SendMessage("OnCFDToggle");
         *  Camera.main.GetComponent<CSV3DMainArray>().showCFD = true;
         * });
         *
         * keywords.Add("Air Flow Off", () =>
         * {
         *  //Camera.main.SendMessage("OnCFDToggle");
         *  Camera.main.GetComponent<CSV3DMainArray>().showCFD = false;
         * });
         */

        keywordRecognizer = new KeywordRecognizer(keywords.Keys.ToArray());

        keywordRecognizer.OnPhraseRecognized += KeywordRecognizer_OnPhraseRecognized;
        keywordRecognizer.Start();
    }
Example #8
0
 public void SetSize4x4()
 {
     AddButtons.SetSize(4, 4);
 }
Example #9
0
 public void SetSize2x4()
 {
     AddButtons.SetSize(2, 4);
 }
Example #10
0
 public void SetSize2x2()
 {
     AddButtons.SetSize(2, 2);
 }