Exemple #1
0
        private void ExportRomAsync(string path)
        {
            _worker = new BackgroundWorker();
            _worker.WorkerSupportsCancellation = true;

            _worker.DoWork             += new DoWorkEventHandler(ExportRomPayload);
            _worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(FinishedExportRom);

            if (ProgressService.StartDialog("Exporting Rom..."))
            {
                ProgressService.ProgressCancelled += new ProgressService.CancelProgressEvent(CancelExportRom);
            }
            _worker.RunWorkerAsync(path);
        }
Exemple #2
0
        private void SaveProjectAsync(bool newFile, string path)
        {
            _worker = new BackgroundWorker();
            _worker.WorkerSupportsCancellation = true;

            _worker.DoWork             += new DoWorkEventHandler(SaveProjectPayload);
            _worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(FinishedSaveProject);

            if (ProgressService.StartDialog("Saving Project..."))
            {
                ProgressService.ProgressCancelled += new ProgressService.CancelProgressEvent(CancelSaveProject);
            }
            _worker.RunWorkerAsync(new object[] { newFile, path });
        }
Exemple #3
0
        private void ApplyProjectAsync()
        {
            _worker = new BackgroundWorker();
            _worker.WorkerSupportsCancellation = true;

            _worker.DoWork             += new DoWorkEventHandler(ApplyProjectPayload);
            _worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(FinishedApplyProject);

            if (ProgressService.StartDialog("Splicing in Rom data"))
            {
                ProgressService.ProgressCancelled += new ProgressService.CancelProgressEvent(CancelReading);
            }
            _worker.RunWorkerAsync();
        }
        public static void ReadRom()
        {
            _worker = new BackgroundWorker();
            _worker.WorkerSupportsCancellation = true;

            _worker.DoWork             += new DoWorkEventHandler(ReadRomPayload);
            _worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(FinishedReadRom);

            if (ProgressService.StartDialog("Loading up MK64 Rom"))
            {
                ProgressService.ProgressCancelled += new ProgressService.CancelProgressEvent(CancelReading);
            }
            _worker.RunWorkerAsync();
        }
Exemple #5
0
        private void LoadProjectAsync(string fileName)
        {
            _worker = new BackgroundWorker();
            _worker.WorkerSupportsCancellation = true;

            _worker.DoWork             += new DoWorkEventHandler(LoadProjectPayload);
            _worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(FinishedReadProject);

            if (ProgressService.StartDialog("Loading up Rom Project"))
            {
                ProgressService.ProgressCancelled += new ProgressService.CancelProgressEvent(CancelReading);
            }
            _worker.RunWorkerAsync(fileName);

            this.Enabled = false;
        }