Example #1
0
 void ClientConnectionInfoClicked(object sender, RoutedEventArgs e)
 {
     if (Keyboard.IsKeyDown(Key.LeftCtrl))
     {
         if (!ACRoot.SRoot.Environment.User.IsSuperuser)
         {
             return;
         }
         WCFClientManager channelManager = ACRoot.SRoot.ACUrlCommand("?\\Communications\\WCFClientManager") as WCFClientManager;
         if (channelManager != null)
         {
             channelManager.BroadcastShutdownAllClients();
         }
     }
     else
     {
         if (DockingManager == null)
         {
             return;
         }
         ACComponent channelManager = (ACComponent)ACRoot.SRoot.ACUrlCommand("?\\Communications\\WCFClientManager");
         if (channelManager != null)
         {
             DockingManager.ShowDialog(channelManager, "ConnectionInfo", "", false);
         }
     }
 }
Example #2
0
        static void formTesting(string arg = null)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            IClientConnectionManager manager  = new WCFClientManager();
            MainMenuForm             mainForm = new MainMenuForm();

            mainForm.Text = arg ?? "Form";
            ConnectToServerForm connectForm = new ConnectToServerForm();

            manager.FeedbackWriter = mainForm;
            MainMenuController controller = new MainMenuController(manager,
                                                                   mainForm, connectForm);

            controller.MyMatchFormController = new GraphicMatchController();
            controller.PlayerName            = arg;
            controller.start();
            //controller.setCurrentForm("Dispute");

            Application.Run((MainMenuForm)controller.MyView);
        }