Beispiel #1
0
 private void Form_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (Simulation3D.IsActive)
     {
         Simulation3D.End();
     }
 }
Beispiel #2
0
        /// <summary>
        /// Prepare UI to load a new configuration.
        /// </summary>
        private void CleanUp()
        {
            this.buttonInitHTM.Enabled = true;
            this.EnableSteeringButtons(false);
            this.menuView3DSimulation.Enabled  = false;
            this.menuProjectProperties.Enabled = true;

            if (Simulation3D.IsActive)
            {
                Simulation3D.End();
            }
        }
Beispiel #3
0
        /// <summary>
        /// Open visualisation of HTM-Network 1: spatial and temporal pooling
        /// </summary>
        private void menuView3DSimulation_Click(object sender, EventArgs e)
        {
            Simulation3D.Start();

            //this worked
            //Simulation3D.SimEngineStarted += WatchGridForm.engine_Started;

            //this doesnt work - Engine is null at this point
            //Simulation3D.Engine.SelectionChangedEvent += WatchGridForm.SimSelectionChanged_Handler;

            //wire Engine events
            Simulation3D.EngineStarted  += WatchForm.Instance.Handler_SimEngineStarted;
            Simulation3D.EngineShutdown += WatchForm.Instance.Handler_SimEngineShutdown;
        }
Beispiel #4
0
        private void buttonStopHTM_Click(object sender, EventArgs e)
        {
            //this._dialogResult = MessageBox.Show ( "If you proceed, current simulation (learning) will stop!\r\n"
            //									 + "You will be able to save and start a new simulation.", "Warning", MessageBoxButtons.OKCancel);
            this.DialogResult = System.Windows.Forms.DialogResult.OK;

            if (this._dialogResult == DialogResult.OK)
            {
                // Set flag initialization off
                this.SimulationInitialized = false;

                // Disable relevant buttons to reset
                this.EnableSteeringButtons(false);
                this.menuProjectProperties.Enabled = true;
                this.buttonInitHTM.Enabled         = true;
                this.menuView3DSimulation.Enabled  = false;
                Simulation3D.End();
            }
        }