常用代码

  try
            {


                DialogResult AuthenticationDialog = MessageBox.Show("您是否要退出软件?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information); 
                switch (AuthenticationDialog)
                {
                    case System.Windows.Forms.DialogResult.Yes:
                        e.Cancel = false;
                        this.notifyIcon1.Dispose();
                        break;
                    default:
                        e.Cancel = true;
                        break;

                }
            }
            catch
            {
                e.Cancel = true;
            }
dgv.RowsDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;居中

 

  this.BeginInvoke((MethodInvoker)delegate()
                {
                    UserInfo _UserInfo = new UserInfo();
                    _UserInfo.Show();
                });

 

posted on 2016-01-12 12:44  HOT SUMMER  阅读(285)  评论(0编辑  收藏  举报

导航