winform 窗体关闭枚举类

            switch (e.CloseReason)
            {
                case CloseReason.None:
                    break;
                case CloseReason.WindowsShutDown:
                    break;
                case CloseReason.MdiFormClosing:
                    break;
                case CloseReason.UserClosing:
                    break;
                case CloseReason.TaskManagerClosing:
                    break;
                case CloseReason.FormOwnerClosing:
                    break;
                case CloseReason.ApplicationExitCall:
                    break;
            }

 

  public enum CloseReason
  {
    None,
    WindowsShutDown,
    MdiFormClosing,
    UserClosing,
    TaskManagerClosing,
    FormOwnerClosing,
    ApplicationExitCall,
  }

 

posted @ 2018-05-28 19:05  芝麻学问  阅读(213)  评论(0编辑  收藏  举报