Esempio n. 1
0
        private void MainPanelCargarClick(object sender, RoutedEventArgs e)
        {
            //MessageBox.Show("Cargar");
            // Open document
            string filename = flowControls.LoadFileName;

            _exp2Class = _fileSaver.DeSerializeExp2(filename);
            _exp2Class.EnviaDatos();
            flowControls.DataContext    = _exp2Class;
            xpControlsPanel.DataContext = _exp2Class.GetProtocolo(0);
            RefreshTree();
            _exp2Class.ResetSignal = true;
        }
Esempio n. 2
0
        public NewXP2()
        {
            InitializeComponent();

            _exp2Class.Started = false;

            for (int i = 0; i < _exp2Class.NumberOfProtocols; i++)
            {
                ProtocoloExp2 p = _exp2Class.GetProtocolo(i);
                p.IsActive = false;
                p.Invertir = (i % 2 == 0);
                p.EnNegro  = false;

                p.ActiveAnim  = ProtocoloExp2.AnimOptions.DerechoRecto;
                p.ActiveIllum = ProtocoloExp2.IllumOptions.Random;
                p.AutoAnim    = false;

                p.CyclesNextProtocol = 1;
                p.TimeNextProtocol   = 10f;
                p.PrioridadCiclos    = true;
                p.CiclosEntrePulso   = 0;

                p.TimeToShowTarget     = 1.0f;
                p.TimeToStartAnimation = 1.5f;
                p.TimeToEndAnimation   = 3.0f;
                p.ExtraWaitingTime     = 4.0f;

                p.DistanceBwnTargets   = 50.0f;
                p.ShouldLightenOnTouch = true;
                p.TimeToLightenTarget  = 1.2f;
                p.TimeToStopLighten    = 2.5f;
            }

            _tvProtocolos             = tvProtocolosControl.TreeViewProtocolos;
            _listaData                = GetData();
            _tvProtocolos.ItemsSource = _listaData;


            flowControls.DataContext    = _exp2Class;
            xpControlsPanel.DataContext = _exp2Class.GetProtocolo(0);


            _dispatcherTimer.Tick    += DispatcherTimerTick;
            _dispatcherTimer.Interval = new TimeSpan(0, 0, 0, 0, 1);
            _dispatcherTimer.Start();


            _sm = SocketManager.Instance;
            _sm.CreateReceivingSocket(IPAddress.Any, 5001);

            for (int i = 0; i < nProtocolos; i++)
            {
                copyFromCombo.Items.Add("Protocolo " + (i + 1));
            }
            copyFromCombo.SelectedIndex = 0;
        }
Esempio n. 3
0
        public XP2()
        {
            InitializeComponent();

            _exp2Class.Started = false;

            for (int i = 0; i < _exp2Class.NumberOfProtocols; i++)
            {
                var p = _exp2Class.GetProtocolo(i);
                p.IsActive             = false;
                p.Invertir             = (i % 2 == 0);
                p.CyclesNextProtocol   = 10;
                p.TimeNextProtocol     = 10f;
                p.EnNegro              = false;
                p.ActiveAnim           = ProtocoloExp2.AnimOptions.DerechoRecto;
                p.ActiveIllum          = ProtocoloExp2.IllumOptions.Random;
                p.AutoAnim             = false;
                p.EnNegro              = false;
                p.CiclosEntrePulso     = 0;
                p.TimeToShowTarget     = 1.0f;
                p.TimeToStartAnimation = 1.0f;
                p.TimeToEndAnimation   = 2.0f;
                p.ExtraWaitingTime     = 3.0f;
            }

            _listaData = GetData();
            tvProtocolos.ItemsSource = _listaData;

            _dispatcherTimer.Tick    += DispatcherTimerTick;
            _dispatcherTimer.Interval = new TimeSpan(0, 0, 0, 0, 1);
            _dispatcherTimer.Start();

            stackPanel4.DataContext = _exp2Class;
            wpanel.DataContext      = _exp2Class.GetProtocolo(0);

            _sm = SocketManager.Instance;
            _sm.CreateReceivingSocket(IPAddress.Any, 5002);
        }