Esempio n. 1
0
 /* bring the main frame back to active state and update reference
  * to frame for data input */
 public void activateMain(bool isNull, bool netRefresh)
 {
     if (isNull)
     {
         input = null;
     }
     main.refresh(this, netRefresh);
     main.Enabled = true;
 }
Esempio n. 2
0
 /* called when new network is created */
 public void refresh(SignalFilter filter, bool netRefresh)
 {
     if (netRefresh) /* network has changed */
     {
         this.filter = filter;
         netSize     = filter.getValue(SignalFilter.SIZE);
         stepsNr     = filter.getValue(SignalFilter.STEPS);
         step        = 20f / (float)(netSize - 1);
         /* setup display data */
         prepareDisplayData(CLEAN_AND_NOISY);
     }
     input = filter.getInput();
 }
Esempio n. 3
0
        /* constructor */
        public SignalFilter()
        {
            /* display main frame, freeze it and show dialog
             * for data input */
            main = new MainFrame(this);
            main.Show();
            main.Enabled = false;

            input = new InputFrame(this);
            input.Show();
            input.Activate();

            maxNoise = 0.0;
            maxClean = 0.0;
            minClean = 0.0;
        }
Esempio n. 4
0
        /* opening dialog for data input */
        private void configToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (simInProgress) /* simulation is running */
            {
                MessageBox.Show("Please stop already running simulation",
                                "Unable to reset",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Stop);
                return;
            }

            /* freeze main frame and show dialog for data input */
            this.Enabled = false;
            if (input == null)
            {
                input = new InputFrame(filter);
            }
            input.Show();
            return;
        }