/// <summary> /// Attempts to detect if there is a SharePoint v3 site at the URL provided by user /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnCheckSharepointV3Web_Click(object sender, EventArgs e) { lblSLKSiteInitStatus.Text = String.Empty; btnCheckSharepointV3Web.Enabled = false; SharePointV3 site = new SharePointV3(); string result; if (site.TestSharePointV3Site(tbSLKWeb.Text, out result)) { lblSLKSiteInitStatus.Text = TextResources.WebConnectionSuccessful; } else { lblSLKSiteInitStatus.Text = TextResources.WebConnectionError + result; } btnCheckSharepointV3Web.Enabled = true; }
/// <summary> /// attempts to verify validity of the SharePoint V3 library path. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnCheckSLKDocLib_Click(object sender, EventArgs e) { lblSLKDocLibStatus.Text = String.Empty; btnCheckSLKDocLib.Enabled = false; SharePointV3 site = new SharePointV3(); string result; if (site.TestSharePointV3Site(tbDocLibWeb.Text, out result)) { if (site.TestSharePointDocLibrary(tbDocLibWeb.Text, tbDocLibName.Text, out result)) { lblSLKDocLibStatus.Text += TextResources.WebConnectionSuccessful; } else { lblSLKDocLibStatus.Text += TextResources.DocLibraryTestError + result; } } else { lblSLKDocLibStatus.Text += TextResources.WebConnectionError + result; } btnCheckSLKDocLib.Enabled = true; }