示例#1
0
        private void FileLoader_DoWork(object sender, DoWorkEventArgs e)
        {
            FileLoadingParams fileLoadingParams = (FileLoadingParams)e.Argument;

            timer.Start();
            GrayBitmap img = new GrayBitmap();
            string     segmentationPoints;

            using (Stream file = fileLoadingParams.FileStream)
                img.Load(file, out segmentationPoints, new ProgressCallback(FileLoader.ReportProgress));
            timer.Stop();

            e.Result = new FileLoadingResult(img, segmentationPoints);
        }
示例#2
0
文件: frmMain.cs 项目: jrasm91/cs312
        private void FileLoader_DoWork(object sender, DoWorkEventArgs e)
        {
            FileLoadingParams fileLoadingParams = (FileLoadingParams)e.Argument;

            timer.Start();
            GrayBitmap img = new GrayBitmap();
            string segmentationPoints;
            using (Stream file = fileLoadingParams.FileStream)
                img.Load(file, out segmentationPoints, new ProgressCallback(FileLoader.ReportProgress));
            timer.Stop();

            e.Result = new FileLoadingResult(img, segmentationPoints);
        }