Exemple #1
0
        private void btnReadOldDir_Click(object sender, EventArgs e)
        {
            var gen = new GenerationRass(tBoxOldDirPath.Text);

            // ReSharper disable once SpecifyACultureInStringConversionExplicitly
            lblCntOldFiles.Text = gen.CntOldFiles.ToString();
            // ReSharper disable once SpecifyACultureInStringConversionExplicitly
            lblCntViborka.Text = gen.CntOldViborka.ToString();
        }
Exemple #2
0
        private void btnGener_Click(object sender, EventArgs e)
        {
            var gen = new GenerationRass(tBoxOldDirPath.Text);

            gen.ChangePerc += val =>
            {
                if (InvokeRequired)
                {
                    BeginInvoke(new Global.IntHandler(ChangePrBarVal), val);
                }
                else
                {
                    ChangePrBarVal(val);
                }
            };
            gen.ChangeText += val => MessageBox.Show(val);

            gen.GenerateNewFiles();
        }