private bool CheckUserAuth()
 {
     if (JiraUserAuth == null)
     {
         if (JiraUserAuthUtil.IsJiraAuthExists())
         {
             JiraUserAuth = JiraUserAuthUtil.ReadJiraUserAuthInfo();
         }
         else
         {
             JiraUserAuthUtil.CreateJiraUserAuthFile();
             var permissonUser = new FormPermissonUser();
             if (permissonUser.ShowDialog() == DialogResult.OK)
             {
                 JiraUserAuth = permissonUser.JiraUserAuth;
                 JiraUserAuthUtil.WriteJiraUserAuthInfo(JiraUserAuth);
                 if (JiraOperator == null)
                 {
                     JiraOperator = new JiraOperator(JiraUserAuth)
                     {
                         BaseJiraUrl = BaseJiraUrl
                     };
                 }
             }
         }
         return(JiraUserAuth != null &&
                !String.IsNullOrWhiteSpace(JiraUserAuth.User) &&
                !String.IsNullOrWhiteSpace(JiraUserAuth.Password));
     }
     return(true);
 }
 public void OnUserAuthSetting(Office.IRibbonControl control)
 {
     if (m_FormPermissonUser != null && m_FormPermissonUser.Visible)
     {
         return;
     }
     if (JiraUserAuth == null)
     {
         CheckUserAuth();
     }
     else
     {
         m_FormPermissonUser = new FormPermissonUser(JiraUserAuth);
         if (m_FormPermissonUser.ShowDialog() == DialogResult.OK)
         {
             JiraUserAuth = m_FormPermissonUser.JiraUserAuth;
             JiraUserAuthUtil.WriteJiraUserAuthInfo(JiraUserAuth);
         }
     }
 }