예제 #1
0
파일: MainForm.cs 프로젝트: kudzmi/Karibusa
 private void previewWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     List<object> args = e.Argument as List<object>;
     ImageMaker im = new ImageMaker((string) args[0], choosedFont, (int) args[1], (int) args[2]);
     toolStripStatusLabel.Text = Properties.Resources.StatusLoadingFile;
     im.loadFromFile(128);
     e.Result = im.DrawPreview(Color.Black, Color.White);
 }
예제 #2
0
파일: MainForm.cs 프로젝트: kudzmi/Karibusa
        private void convertWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            List<object> args = e.Argument as List<object>;
            BackgroundWorker worker = sender as BackgroundWorker;
            ImageMaker im = new ImageMaker((string)args[0], choosedFont, (int)args[1], (int)args[2]);
            worker.ReportProgress(0, Properties.Resources.StatusLoadingFile);
            im.loadFromFile();
            worker.ReportProgress(10, Properties.Resources.StatusFileLoaded + " " + Properties.Resources.StatusDrawing);
            string dirPath = args[3] as string;
            if (!dirPath.EndsWith("\\\\"))
            {
                dirPath += "\\\\";
            }
            else if (dirPath.EndsWith("\\"))
            {
                dirPath += "\\";
            }

            im.DrawTotalText(Color.Black, Color.White, dirPath, ".png");
            worker.ReportProgress(100, Properties.Resources.StatusConvertionCompleted);
        }