private void ButtonUnloadBot_Click(object sender, RoutedEventArgs e)
        {
            ButtonBot bpl = (ButtonBot)sender;
            long      id  = bpl.Id;

            bpl.BotOperations.UnloadBot(id);
        }
        private void ButtonLoadBot_Click(object sender, RoutedEventArgs e)
        {
            ButtonBot bpl = (ButtonBot)sender;
            long      id  = bpl.Id;

            //bpl.Plaza2Connector.UnloadBot(id);
            this.DealingServer.LoadBot(id);
            OnLoadBot(this, id);
        }
        private void ManualControl_Click(object sender, RoutedEventArgs e)
        {
            ButtonBot bpl = (ButtonBot)sender;
            long      id  = bpl.Id;
            //bpl.Plaza2Connector.UnloadBot(id);


            WindowManualTrading wm = new WindowManualTrading(id, this.DealingServer);

            wm.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            wm.ShowDialog();
        }
        private void BotPosButton_Click(object sender, RoutedEventArgs e)
        {
            ButtonBot bpl = (ButtonBot)sender;

            try
            {
                WindowPosLog winPosLog = new WindowPosLog();

                foreach (CBotBase bb in bpl.BotOperations.ListBots)
                {
                    if (bb.BotId == bpl.Id && bb.GUIBot != null)
                    {
                        winPosLog.PosLogGrid.PosLog.ItemsSource = bb.GUIBot.PosLog;
                        winPosLog.ShowDialog();
                    }
                }
            }
            catch (Exception ee)
            {
                bpl.BotOperations.Error("Button_Click", ee);
            }
        }