Exemple #1
0
        public void DrawOrderList()
        {
            TimerOrderListRedraw.Stop();

            if (!_agent.IsOrderListOccupied)
            {
                _agent.IsOrderListOccupied = true;

                if (_firstDraw)
                {
                    try
                    {
                        OrderList.SetObjects(_agent.OrderSet.Orders);
                        _firstDraw = false;
                    }
                    catch (Exception e)
                    {
                        Log.WriteLog("Error while trying to draw order list:");
                        Log.WriteLog(e);
                    }
                }
                else
                {
                    try
                    {
                        OrderList.BuildList(true);
                    }
                    catch (Exception e)
                    {
                        Log.WriteLog("Error while trying to redraw order list:");
                        Log.WriteLog(e);
                    }
                }

                _agent.IsOrderListOccupied = false;
            }

            TimerOrderListRedraw.Start();
        }