private void IndicateUnlocked() { _parent.PreLinkEnable(); IndicatedUnfavoredLink(); IsCheckedOutByMe = false; IsCheckedOut = false; DocumentProtection.Protect(_documentCustomProperties); }
/// <summary> /// Enables/disables some controls since it's so similar to a PreLinkEnable state /// </summary> /// <param name="checkedOut"></param> public void IndicateCheckedOutByOther(CheckoutStatus checkedOut) { var lockUserInfo = SitecoreClient.GetFullNameAndEmail(checkedOut.User); if (lockUserInfo.Count == 2) { uxLockUser.Text = lockUserInfo[0]; label1.Text = lockUserInfo[1]; } _articleInformationControl.IsCheckedOutByMe = false; _parent.PreLinkEnable(); IndicatedUnfavoredLink(); uxUnlockButton.Visible = true; uxUnlockButton.Enabled = false; uxLockButton.Visible = false; DocumentProtection.Protect(DocumentCustomProperties); }
private void IndicateUnlocked() { _parent.PreLinkEnable(); IndicatedUnfavoredLink(); uxLockUser.Text = @"N\A"; uxLockStatusLabel.Text = @"Unlocked"; _articleInformationControl.IsCheckedOutByMe = false; _articleInformationControl.IsCheckedOut = false; uxUnlockButton.Visible = false; uxLockButton.Visible = true; uxLockButton.Enabled = true; DocumentProtection.Protect(DocumentCustomProperties); _statusBar.ChangeLockButtonStatus(LockStatus.Unlocked); }
/// <summary> /// Enables/disables some controls since it's so similar to a PreLinkEnable state /// </summary> /// <param name="checkedOut"></param> public void IndicateCheckedOutByOther(PluginModels.CheckoutStatus checkedOut) { //uxLockStatus.BackColor = Color.FromArgb(255, 244, 204, 204); //uxLockUser.Text = FormatUserName(checkedOut.User); IsCheckedOutByMe = false; _parent.PreLinkEnable(); IndicatedUnfavoredLink(); _parent.EnablePreview(); _parent.HideCreationButtons(); //_parent.articleStatusBar1.up _parent.articleStatusBar1.ChangeLockButtonStatus(LockStatus.Locked); //IndicatedUnfavoredLink(); DocumentProtection.Protect(_documentCustomProperties); }
protected void SendWordDocumentToSitecore(Document activeDocument, DocumentCustomProperties documentCustomProperties, string articleNumber, ArticleStruct articleDetails) { string extension = GetExtension(activeDocument); DocumentProtection.Protect(documentCustomProperties); byte[] data = _wordUtils.GetWordBytes(activeDocument); if (data == null) { throw new Exception("Error saving file to disk."); } DocumentProtection.Unprotect(documentCustomProperties); string uploader = SitecoreUser.GetUser().Username; int wordSitecoreVersionNumber = articleDetails.ArticleGuid != Guid.Empty ? this.SendDocumentToSitecoreByGuid(articleDetails.ArticleGuid, data, extension, uploader) : this.SendDocumentToSitecore(articleNumber, data, extension, uploader); documentCustomProperties.WordSitecoreVersionNumber = wordSitecoreVersionNumber; }