Ejemplo n.º 1
0
        private bool RefreshStockButton()
        {
            bool result = false;

            try
            {
                stockToolbar = StockToolbar.Instance;
                if (stockToolbar != null)
                {
                    result = true;
                    stockToolbar.ButtonNeeded = true;
                    stockToolbar.CreateButton();

                    if (!stockToolbar.ButtonNeeded)
                    {
                        result           = false;
                        windowPos.height = 20;
                        lostToStaging    = true;
                    }
                }
            }
            catch (Exception ex)
            {
                print("Proximity - RefreshStockButton(): " + ex.Message);
            }
            return(result);
        }
Ejemplo n.º 2
0
        private bool RefreshStockButton()
        {
            bool result = false;

            //print("@@@RefreshStockButton");

            if (useStockToolBar)
            {
                //print("@@@RefreshStockButton, using stock tb");
                StockToolbar stb = (StockToolbar)StockToolbar.FindObjectOfType(typeof(StockToolbar));
                if (stb != null)
                {
                    //print("@@@RefreshStockButton, got stock tb");
                    result           = true;
                    stb.ButtonNeeded = true;
                    stb.CreateButton();
                    //print("@@@RefreshStockButton: stb.CreateButton() called, result " + stb.ButtonNeeded.ToString());
                    if (!stb.ButtonNeeded)
                    {
                        result           = false;
                        windowPos.height = 20;
                        lostToStaging    = true;
                        //print("@@@RefreshStockButton, set lostToStaging = true");
                    }
                }
            }

            return(result);
        }