public void CloseOptionDialog()
 {
     if (painterOptionDialog != null)
     {
         painterOptionDialog.Close();
         painterOptionDialog = null;
     }
 }
        /// <summary>
        /// 显示Painter默认的设置对话框
        /// </summary>
        /// <returns>DialogResult</returns>
        public void ShowOptionDialog(Update updata)
        {
            if (painterOptionDialog == null)
            {
                painterOptionDialog             = new LayersOptionDialog(this, updata);
                painterOptionDialog.FormClosed += SetDlgNull;
            }

            painterOptionDialog.Show();
            painterOptionDialog.Activate();
        }
 void SetDlgNull(object sender, FormClosedEventArgs e)
 {
     painterOptionDialog = null;
 }