예제 #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            this.FixedSingle();
            appSetting = (AppSetting)propertyGrid1.SelectedObject;
            appSetting.SaveSelf(appSetting);
            LogForm.Info(appSetting.ToJson());

            var c  = 0;
            var x5 = 0;

            for (int i = 1; i <= 10; i++)
            {
                c  += i * i;
                x5 += i * 5;
                LogForm.Successful($"**:{c}  +%=:{x5}");
            }

            var res = RetryHelper.RetryOnAny <string>(times: 0, () =>
            {
                return(SayHello());
            }, (i, ex) =>
            {
                MessageBox.Show($"出现异常_{i}_{ex.Message}");
            });

            MessageBox.Show(res);
        }