Example #1
0
        private void btnGenerate_Click(object sender, EventArgs e)
        {
            Thread        worker;
            FileGenerator fg = new FileGenerator();

            //reset all displays
            pbrMain.Value       = 0;
            lblTask1.Visible    = false;
            lblTask2.Visible    = false;
            lblTask3.Visible    = false;
            btnGenerate.Enabled = false;
            fg.CreateFiles(null);

            //worker = new Thread(new ParameterizedThreadStart(fg.CreateFiles));
            //worker.Start(this);

            //try
            //{
            //    while (worker.IsAlive)
            //    {
            //        Thread.Sleep(100);
            //        renderStage();
            //    }
            //}
            //catch (Exception ex)
            //{
            //    MessageBox.Show(this, ex.Message, "Fatal Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            //}

            //MessageBox.Show(this, "Files generated successfully!", "File Generation Completed!", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Example #2
0
 static void Main(string[] args)
 {
     if (args.Length == 0)
     {
         Console.WriteLine("Generate basic code files.");
     }
     else if (args[0][0] == '/')
     {
         Console.WriteLine("There is no flags.");
     }
     else
     {
         var ctx = new NameContext(args);
         var fg  = new FileGenerator(ctx);
         fg.CreateFolder();
         fg.CreateFiles();
     }
 }