Exemplo n.º 1
0
        public ServersForm(ISelectionService selectionService, NeuronCollection neurons)
        {
            InitializeComponent();

            this.selectionService = selectionService;
            this.selectionService.SelectionChanged += this.SelectionService_SelectionChanged;
            this.neurons = neurons;
        }
Exemplo n.º 2
0
        public CortexGraphViewModel(NeuronCollection neurons, ICortexGraphClient cortexGraphClient)
        {
            this.AvatarUri         = string.Empty;
            this.neurons           = neurons;
            this.cortexGraphClient = cortexGraphClient;

            this.ReloadCommand = ReactiveCommand.Create(this.Reload, this.WhenAnyValue(vm => vm.AvatarUri).Select(s => !string.IsNullOrEmpty(s)));
        }
Exemplo n.º 3
0
        public SpikeTargetsForm(ISelectionService selectionService, ISpikeService spikeService, NeuronCollection neurons)
        {
            InitializeComponent();

            this.selectionService      = selectionService;
            this.spikeService          = spikeService;
            this.spikeService.Added   += this.SpikeService_Added;
            this.spikeService.Removed += this.SpikeService_Removed;
            this.neurons = neurons;
        }
Exemplo n.º 4
0
        public ResultMarkersForm(ISelectionService selectionService, IResultMarkerService resultMarkersService, NeuronCollection neurons)
        {
            InitializeComponent();

            this.selectionService                  = selectionService;
            this.resultMarkersService              = resultMarkersService;
            this.resultMarkersService.Initialized += this.ResultMarkersService_Initialized;
            this.resultMarkersService.Updated     += this.ResultMarkersService_Updated;
            this.resultMarkersService.Added       += this.ResultMarkersService_Added;
            this.resultMarkersService.Removed     += this.ResultMarkersService_Removed;
            this.neurons = neurons;
        }
Exemplo n.º 5
0
        public CortexGraphViewModel(NeuronCollection neurons, INotificationLogClient notificationLogClient, IRepository <works.ei8.Cortex.Graph.Domain.Model.Neuron> neuronRepository, ISpikeTargetListService spikeTargetListService, IResultMarkerService resultMarkerService)
        {
            this.AvatarUri              = Properties.Settings.Default.AvatarUri;
            this.neurons                = neurons;
            this.notificationLogClient  = notificationLogClient;
            this.neuronRepository       = (INeuronRepository)neuronRepository;
            this.spikeTargetListService = spikeTargetListService;
            this.resultMarkerService    = resultMarkerService;

            this.ReloadCommand = ReactiveCommand.Create(this.Reload, this.WhenAnyValue(vm => vm.AvatarUri).Select(s => !string.IsNullOrEmpty(s)));
            this.RenderCommand = ReactiveCommand.Create(this.Render, this.WhenAnyValue(vm => vm.AvatarUri).Select(s => !string.IsNullOrEmpty(s)));
        }
Exemplo n.º 6
0
    void Start()
    {
        synapses         = new List <Synapse>();
        neuronCollection = GameObject.FindObjectOfType <NeuronCollection> ();

        instrument  = GetComponent <Instrument> ();
        audioSource = GetComponent <AudioSource> ();

        pulsar = Instantiate(pulsarPrefab, transform.position, Quaternion.identity);
        pulsar.transform.parent = transform;

        if (!NA.isClient())
        {
            foreach (GameObject g in neuronCollection.Nodes())
            {
                float d = Vector3.Distance(g.transform.position, transform.position);
                if (d < distanceThreshold && g != this.gameObject)
                {
                    Synapse s = new Synapse(this, g.GetComponent <Neuron>(), 0.2f);
                    synapses.Add(s);
                }
            }
        }
    }
Exemplo n.º 7
0
        private static string GetTriggersWithChargeString(IEnumerable <TriggerInfo> triggers, NeuronCollection neurons)
        {
            string result = string.Join(
                string.Empty,
                triggers.Select(et => (et.Effect == NeurotransmitterEffect.Excite ? "+" : "-") + (neurons.Contains(et.PresynapticId) ? neurons[et.PresynapticId].Data : string.Empty))
                );

            return(result);
        }
Exemplo n.º 8
0
 public SpikeResultsService(NeuronCollection neurons)
 {
     logger.Info("Initializing log...");
     this.neurons = neurons;
 }
Exemplo n.º 9
0
 public SpikeService(NeuronCollection neurons)
 {
     this.neurons = neurons;
 }
Exemplo n.º 10
0
 public InMemoryNeuronRepository(NeuronCollection neurons)
 {
     this.cache   = new Dictionary <Guid, Neuron>();
     this.neurons = neurons;
 }
Exemplo n.º 11
0
 public TreeModel(NeuronCollection neurons)
 {
     this.neurons = neurons;
 }