Пример #1
0
 public LoadOscDataForm(AsynchSerialPort AsynchSerialPort, string Titl, ScopeConfig ScopeConfig, int LoadOscNum, AppTexts AppTexts)
 {
     InitializeComponent();
     serialPort       = AsynchSerialPort;
     this.Text        = Titl;
     this.scopeConfig = ScopeConfig;
     loadOscNum       = LoadOscNum;
     InitLoadOscillAsynch();
     button1.Text = AppTexts.ParameterName(27);
 }
Пример #2
0
        public ScopeSetupForm(ScopeConfig NewScopeConfig, AsynchSerialPort AsynchSerialPort)
        {
            InitializeComponent();
            ScopeConfig = NewScopeConfig;
            serialPort  = AsynchSerialPort;

            InitPossiblePanel();
            InitChannelCount();
            InitScopeCount();
            InitOscilFreq();
            InitHystory();
            InitCurrentParams();
        }
        public ScopeFile(string FileName, List <ushort[]> DownloadedData, ScopeConfig ScopeConfig, string OscTitl)
        {
            scopeConfig    = ScopeConfig;
            downloadedData = DownloadedData;
            fileName       = FileName;
            oscTitl        = OscTitl;

            backgroundWorker = new BackgroundWorker();
            backgroundWorker.WorkerReportsProgress      = true;
            backgroundWorker.WorkerSupportsCancellation = true;
            backgroundWorker.DoWork             += backgroundWorker_DoWork;
            backgroundWorker.RunWorkerCompleted += backgroundWorker_RunWorkerCompleted;
            backgroundWorker.RunWorkerAsync(null);
        }
        public ScopeConfigLoader(AsynchSerialPort AsynchSerialPort)
        {
            serialPort  = AsynchSerialPort;
            scopeConfig = new ScopeConfig();

            if (serialPort == null)
            {
                throw new Exception("Invalid serial port!");
            }

            if (!serialPort.IsOpen)
            {
                throw new Exception("Serial port not open!");
            }

            StartLoading();
        }
        public ScopeStatusesLoader(AsynchSerialPort AsynchSerialPort, ScopeConfig ScopeConfig)
        {
            serialPort = AsynchSerialPort;

            if (serialPort == null)
            {
                throw new Exception("Invalid serial port!");
            }

            if (!serialPort.IsOpen)
            {
                throw new Exception("Serial port not open!");
            }

            scopeConfig = ScopeConfig;
            StartLoading();
        }
Пример #6
0
        public ScopeLoader(AsynchSerialPort AsynchSerialPort, ScopeConfig ScopeConfig, int LoadOscNum, RequestPriority RequestPriority)
        {
            serialPort      = AsynchSerialPort;
            requestPriority = RequestPriority;
            if (serialPort == null)
            {
                throw new Exception("Invalid serial port!");
            }

            if (!serialPort.IsOpen)
            {
                throw new Exception("Serial port not open!");
            }

            loadOscNum  = LoadOscNum;
            scopeConfig = ScopeConfig;
            StartLoading();
        }
Пример #7
0
        void scopeConfigLoader_OnLoadingComplete(bool LoadingOk)
        {
            if (LoadingOk)
            {
                scopeConfig = scopeConfigLoader.ScopeConfig;

                //  MessageBox.Show(scopeConfig.ScopeCount.ToString());
                InitButtons(scopeConfig.ScopeCount);
                configLoaded = true;
                timer1_Tick(this, EventArgs.Empty);
            }
            else
            {
                if (this.Visible)
                {
                    LoadConfig();
                }
            }
        }