public NavigationWindow(EnviadorComandos enviador, RecebedorStatus recebedor)
 {
     InitializeComponent();
     this.enviador                  = enviador;
     this.recebedor                 = recebedor;
     this.Closing                  += new System.ComponentModel.CancelEventHandler(NavigationWindow_Closing);
     lblErro.Visibility             = Visibility.Hidden;
     this.cmbMapNames.ItemsSource   = goalsNames.Keys;
     this.cmbMapNames.SelectedIndex = 0;
 }
示例#2
0
        public PositionConfigurator(EnviadorComandos enviador)
        {
            InitializeComponent();
            this.enviador = enviador;

            clearLabels();

            this.cmbMapas.ItemsSource   = goalsNames.Keys;
            this.cmbMapas.SelectedIndex = 0;


            string      sCurrentCulture = System.Threading.Thread.CurrentThread.CurrentCulture.Name;
            CultureInfo ci = new CultureInfo(sCurrentCulture);

            ci.NumberFormat.NumberDecimalSeparator = ".";
            System.Threading.Thread.CurrentThread.CurrentCulture = ci;
        }
示例#3
0
        public SauronController()
        {
            InitializeComponent();
            images                       = new Image[] { null, image1, image2, image3, image4, image5 };
            names                        = new string[] { null, "Posição", "Parada", "Navegação", "Congelamento", "Continua" };
            this.enviador                = new EnviadorComandos(ipManager);
            this.recebedor               = new RecebedorStatus(ipManager);
            this.navigationMonitor       = new NavigationWindow(enviador, recebedor);
            this.recebedor.ReceiveAction = navigationMonitor.DispatchStatus;
            this.ipManager.AddListener(ip => this.txtIpSauron.Content = ip.ToString());

            this.Closing += new System.ComponentModel.CancelEventHandler(SauronController_Closing);

            this.image1.MouseMove += new MouseEventHandler(image1_MouseMove);
            this.image2.MouseMove += new MouseEventHandler(image2_MouseMove);
            this.image3.MouseMove += new MouseEventHandler(image3_MouseMove);
            this.image4.MouseMove += new MouseEventHandler(image4_MouseMove);
            this.image5.MouseMove += new MouseEventHandler(image5_MouseMove);

            timePassing          = new System.Timers.Timer();
            timePassing.Elapsed += new ElapsedEventHandler(LeaveEvent);
            timePassing.Interval = 10;
            timePassing.Start();
        }
示例#4
0
 public NavigationCommand(EnviadorComandos enviador, string goal, Dispatcher dispatcher)
 {
     this.goal       = goal;
     this.enviador   = enviador;
     this.dispatcher = dispatcher;
 }