Beispiel #1
0
 private void btnMaster_Click(object sender, EventArgs e)
 {
     List<Form> SubForms = new List<Form>();
     //Action<Form, Form> AddForm = (v, f) => { v = f; SubForms.Add(v); };
     Action<Picasso.MakeForm, Picasso.AssignForm> NewForm =
         (Construct, AssignToVar) =>
         {
             Form f = Construct();
             SubForms.Add(f);
             this.AddOwnedForm(f);
             f.Owner = this;
             AssignToVar(f);
         };
     M = new Master(ImgPath, NewForm, this);
     //int ChildrenCount;
     Watch = new Stopwatch();
     Action A = M.GenerateChildren;
     System.Threading.Tasks.Task T = new System.Threading.Tasks.Task(A);
     //System.Threading.Thread Th = new System.Threading.Thread(new System.Threading.ThreadStart(A));
     Watch.Start();
     T.Start();
 }
Beispiel #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="ImageFile"></param>
 public Master(string ImageFile)
 {
     //Child.sMaster = this;
     Master.sMaster = this;
     // Copy image to a set, standard location
     // Generate a log file there
     ID = GetID;
     mDirPath = DATASUBDIR + "PicProj " + ID + @"\";
     Directory.CreateDirectory(mDirPath);
     Image.FromFile(ImageFile).Save(mImagePath = mDirPath + "image.bmp", System.Drawing.Imaging.ImageFormat.Bmp);
     mLogPath = mDirPath + "log.txt";
     mLogger = new LogWriter(mLogPath, true);
     mBaseImage = (Bitmap)Bitmap.FromFile(mImagePath);
     //mLeftover = (Bitmap)mBaseImage.Clone();
 }
Beispiel #3
0
 private void DisplayMaster(Master.RenderState State)
 {
     ToDisplay = M.Render(Master.RenderState.FullOverlay);
     picDisplay.Image = ToDisplay;
 }