예제 #1
0
		private void OnResetClick(object sender, EventArgs e)
		{
			Opacity = 0;
			using (var formWarning = new FormWarning())
			{
				if (formWarning.ShowDialog(this) == DialogResult.OK)
				{
					using (var formProgress = new FormProgress())
					{
						formProgress.Shown += async (o, args) =>
						{
							await Task.Run((Action)ResetHelper.ResetApp);
							formProgress.Close();
						};
						formProgress.ShowDialog(this);
					}
				}
			}
			Close();
		}
예제 #2
0
        private void OnResetClick(object sender, EventArgs e)
        {
            Opacity = 0;
            using (var formWarning = new FormWarning())
            {
                if (formWarning.ShowDialog(this) == DialogResult.OK)
                {
                    using (var formProgress = new FormProgress())
                    {
                        formProgress.Shown += async(o, args) =>
                        {
                            await Task.Run((Action)ResetHelper.ResetApp);

                            formProgress.Close();
                        };
                        formProgress.ShowDialog(this);
                    }
                }
            }
            Close();
        }