Example #1
0
        /// <summary>
        /// The constructor.
        /// Gets it's components.
        /// </summary>
        /// <param name="controllersPanelVM"></param>
        /// <param name="connectionPanelVM"></param>
        /// <param name="errorsPanelVM"></param>
        public UserMainPanel(IControllersPanelVM controllersPanelVM, IConnectionPanelVM connectionPanelVM, IErrorsPanelMessager errorsPanelVM)
        {
            InitializeComponent();
            // Add the controllers panel.
            ControllersPanel controllersp = new ControllersPanel(controllersPanelVM);

            controllersp.MouseUpOccurredReleaseJoystick +=
                delegate(object sender, MouseButtonEventArgs e)
            {
                this.HandleJoystickMouseUp(sender, e);
            };
            this.RegisterName("controllersPanel", controllersp);
            mainUserPanel.Children.Add(controllersp);
            Grid.SetRow(controllersp, 0);

            // Add the connections panel.
            ConnectionPanel connectionp = new ConnectionPanel(connectionPanelVM);

            connectionp.MouseUpOccurredReleaseJoystick +=
                delegate(object sender, MouseButtonEventArgs e)
            {
                this.HandleJoystickMouseUp(sender, e);
            };
            mainUserPanel.Children.Add(connectionp);
            Grid.SetRow(connectionp, 1);

            // Add the errors panel.
            ErrorsPanel errorsPanel = new ErrorsPanel(errorsPanelVM);

            mainUserPanel.Children.Add(errorsPanel);
            Grid.SetRow(errorsPanel, 2);
        }
Example #2
0
 private void Instance_Error(object sender, ErrorEventArgs e)
 {
     if (_Messages == null)
     {
         _Messages = new ArrayList();
     }
     _Messages.Add(e.Message);
     ErrorMessages.DataSource = _Messages;
     ErrorMessages.DataBind();
     //this.Visible = true;
     ErrorMessages.Visible = true;
     ErrorsPanel.Update();
 }