コード例 #1
0
        /// <summary>At the end of a task, shut down the progress monitor</summary>
        private void StopProgressMonitor()
        {
            timer.Stop();

            /*if(progressMonitor!=null) {
             * progressMonitor.setProgress(progressMonitor.getMaximum());
             * progressMonitor.close();
             * }*/
            progressBar.SetVisible(false);
            if (glassPane != null)
            {
                glassPane.SetVisible(false);
            }
            // restore input to components
            lpThread    = null;
            parseThread = null;
        }
コード例 #2
0
        /// <summary>Loads a serialized parser specified by given path</summary>
        public virtual void LoadParser(string filename)
        {
            if (filename == null)
            {
                return;
            }
            // check if file exists before we start the worker thread and progress monitor
            File file = new File(filename);

            if (file.Exists())
            {
                lpThread = new ParserPanel.LoadParserThread(this, filename);
                lpThread.Start();
                StartProgressMonitor("Loading Parser", ParserLoadTime);
            }
            else
            {
                JOptionPane.ShowMessageDialog(this, "Could not find file " + filename, null, JOptionPane.ErrorMessage);
                SetStatus("Error loading parser");
            }
        }
コード例 #3
0
 public virtual void LoadJarParser(string jarFile, string model)
 {
     lpThread = new ParserPanel.LoadParserThread(this, jarFile, model);
     lpThread.Start();
     StartProgressMonitor("Loading Parser", ParserLoadTime);
 }