Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            generateMainBody            = new GenerateMainBody();
            cvERepo.currentNumberOfDocs = cvERepo.MaxNumberOfDocs;
            var mainBodies = new List <MainBody>();

            for (int i = 0; i < 30; i++)
            {
                if (!DataFromApi.IsApiOnline())
                {
                    break;
                }
                var mainbody = new MainBody {
                    Name = generateMainBody.Get()
                };
                if (!mainBodies.Any(m => m.Name == mainbody.Name))
                {
                    cvERepo.sendData(new MainBody {
                        Name = generateMainBody.Get()
                    }, Options.Create);
                    mainBodies.Add(mainbody);
                }
            }
            MessageBox.Show("Done!");
        }
Example #2
0
 private void Run()
 {
     generateMainBody                   = new GenerateMainBody();
     cvERepo.currentNumberOfDocs        = (int)numericDoc.Value;
     generateMainBody.YearsOfExperience = (int)numericYearExp.Value;
     desiredDomains   = selectedDomains.Text.LineToArray();
     finalText.Text   = generateMainBody.Get(desiredDomains);
     desiredDomains   = null;
     generateMainBody = null;
 }