public LinkObjectOptions(LibraryObjectLink data)
		{
			InitializeComponent();
			Text = "Link Notes";
			_data = data;

			rbNone.Text = BaseLinkSettings.PredefinedNoteNone;
			rbNew.Text = BaseLinkSettings.PredefinedNoteNew;
			rbSold.Text = BaseLinkSettings.PredefinedNoteSold;
			rbUpdated.Text = BaseLinkSettings.PredefinedNoteUpdated;
			rbSell.Text = BaseLinkSettings.PredefinedNoteSellThis;
			rbAttention.Text = BaseLinkSettings.PredefinedNoteAttention;

			if ((base.CreateGraphics()).DpiX > 96)
			{
				var styleControllerFont = new Font(styleController.Appearance.Font.FontFamily, styleController.Appearance.Font.Size - 2, styleController.Appearance.Font.Style);
				styleController.AppearanceDisabled.Font = styleControllerFont;
				styleController.AppearanceDropDown.Font = styleControllerFont;
				styleController.AppearanceDropDownHeader.Font = styleControllerFont;
				styleController.AppearanceFocused.Font = styleControllerFont;
				styleController.AppearanceReadOnly.Font = styleControllerFont;

				rbAttention.Font = new Font(rbAttention.Font.FontFamily, rbAttention.Font.Size - 2, rbAttention.Font.Style);
				rbCustomNote.Font = new Font(rbCustomNote.Font.FontFamily, rbCustomNote.Font.Size - 2, rbCustomNote.Font.Style);
				rbNew.Font = new Font(rbNew.Font.FontFamily, rbNew.Font.Size - 2, rbNew.Font.Style);
				rbNone.Font = new Font(rbNone.Font.FontFamily, rbNone.Font.Size - 2, rbNone.Font.Style);
				rbSell.Font = new Font(rbSell.Font.FontFamily, rbSell.Font.Size - 2, rbSell.Font.Style);
				rbSold.Font = new Font(rbSold.Font.FontFamily, rbSold.Font.Size - 2, rbSold.Font.Style);
				rbUpdated.Font = new Font(rbUpdated.Font.FontFamily, rbUpdated.Font.Size - 2, rbUpdated.Font.Style);
			}
			textEditCustomNote.Enter += EditorHelper.EditorEnter;
			textEditCustomNote.MouseUp += EditorHelper.EditorMouseUp;
			textEditCustomNote.MouseDown += EditorHelper.EditorMouseUp;
		}
		public PowerPointViewer(LibraryObjectLink link)
		{
			InitializeComponent();
			Dock = DockStyle.Fill;
			Visible = false;

			Link = link;
			if (System.IO.File.Exists(Link.FullPath))
			{
				string tempPath = Path.Combine(RemoteResourceManager.Instance.TempFolder.LocalPath, DateTime.Now.ToString("yyyyMMdd-hmmsstt") + Path.GetExtension(Link.FullPath));
				System.IO.File.Copy(Link.FullPath, tempPath, true);
				_tempCopy = new FileInfo(tempPath);
			}

			pictureBoxPreview.Image = null;
			laSlideNumber.Text = string.Empty;

			_previewData = new PresentationPreviewContainer(PowerPointLink);
			_previewData.GetPreviewImages();

			laFileInfo.Text = "File Added: " + Link.AddDate.ToString("MM/dd/yy");
			comboBoxEditSlides.SelectedIndexChanged -= comboBoxEditSlides_SelectedIndexChanged;
			comboBoxEditSlides.Properties.Items.Clear();
			comboBoxEditSlides.Properties.Items.AddRange(_previewData.Thumbnails);
			if (comboBoxEditSlides.Properties.Items.Count > 0)
				comboBoxEditSlides.SelectedIndex = 0;
			comboBoxEditSlides_SelectedIndexChanged(null, null);
			comboBoxEditSlides.SelectedIndexChanged += comboBoxEditSlides_SelectedIndexChanged;
		}
		public static ILinkViewProcessor Create(LibraryObjectLink link)
		{
			return ObjectIntendHelper.GetObjectInstances(
					typeof(ILinkViewProcessor),
					EntitySettingsResolver.ExtractObjectTypeFromProxy(link.GetType()),
					link)
				.OfType<ILinkViewProcessor>()
				.FirstOrDefault() ?? new CommonFileLinkProcessor((LibraryFileLink)link);
		}
		public FolderViewer(LibraryObjectLink link)
		{
			InitializeComponent();
			Dock = DockStyle.Fill;
			Visible = false;

			Link = link;
			gridControlFiles.DataSource = FolderContent;
		}
		public VideoViewer(LibraryObjectLink link)
		{
			InitializeComponent();
			Dock = DockStyle.Fill;
			Visible = false;

			Link = link;
			axWindowsMediaPlayer1.URL = Link.FullPath;
		}
示例#6
0
		public WebViewer(LibraryObjectLink link)
		{
			InitializeComponent();
			Dock = DockStyle.Fill;
			Visible = false;

			Link = link;
			webBrowser.Navigate(((HyperLink)Link).Url);
		}
		public InactiveLink(LibraryObjectLink link)
		{
			Link = link;
			Name = link.Name;
			FolderName = link.Folder.Name;
			Path = link.FullPath;
			IsDead = false;
			IsExpired = link.ExpirationSettings.IsExpired;
		}
		public static ILinkViewer Create(LibraryObjectLink sourceLink)
		{
			return ObjectIntendHelper.GetObjectInstances(
					typeof(ILinkViewer),
					EntitySettingsResolver.ExtractObjectTypeFromProxy(sourceLink.GetType()),
					sourceLink)
				.OfType<ILinkViewer>()
				.FirstOrDefault() ?? new CommonFileViewer(sourceLink);
		}
示例#9
0
		public PDFViewer(LibraryObjectLink link)
		{
			InitializeComponent();
			Dock = DockStyle.Fill;
			Visible = false;

			Link = link;

			var tempName = Path.Combine(RemoteResourceManager.Instance.TempFolder.LocalPath, Path.GetFileName(Link.FullPath));
			System.IO.File.Copy(Link.FullPath, tempName, true);
			pdfViewerControl.LoadDocument(tempName);
		}
示例#10
0
		public static void PreviewLink(LibraryObjectLink link)
		{
			using (var form = new FormLinkPreview())
			{
				form.Link = link;
				form.ShowDialog(MainController.Instance.MainForm);
			}
			var lastHandle = PreviousPreviewHandles.LastOrDefault();
			RegistryHelper.SalesDepotHandle = new IntPtr(lastHandle);
			PreviousPreviewHandles.Remove(lastHandle);
			RegistryHelper.MaximizeSalesDepot = RegistryHelper.SalesDepotHandle == MainController.Instance.MainForm.Handle;
		}
		public ExpiredDateOptions(LibraryObjectLink data)
		{
			InitializeComponent();
			_data = data;

			dateEditExpirationDate.Properties.NullDate = DateTime.MinValue;
			if ((CreateGraphics()).DpiX > 96)
			{
				laAddDateValue.Font = new Font(laAddDateValue.Font.FontFamily, laAddDateValue.Font.Size - 1, laAddDateValue.Font.Style);
				laExpireddateActions.Font = new Font(laExpireddateActions.Font.FontFamily, laExpireddateActions.Font.Size - 2, laExpireddateActions.Font.Style);
				checkBoxLabelLink.Font = new Font(checkBoxLabelLink.Font.FontFamily, checkBoxLabelLink.Font.Size - 2, checkBoxLabelLink.Font.Style);
				checkBoxEnableExpiredLinks.Font = new Font(checkBoxEnableExpiredLinks.Font.FontFamily, checkBoxEnableExpiredLinks.Font.Size - 2, checkBoxEnableExpiredLinks.Font.Style);
				checkBoxSendEmailWhenDelete.Font = new Font(checkBoxSendEmailWhenDelete.Font.FontFamily, checkBoxSendEmailWhenDelete.Font.Size - 2, checkBoxSendEmailWhenDelete.Font.Style);
			}
		}
示例#12
0
		public WordViewer(LibraryObjectLink link)
		{
			InitializeComponent();
			Dock = DockStyle.Fill;
			Visible = false;

			Link = link;

			using (var wordProcessor = new WordHidden())
			{
				if (!wordProcessor.Connect()) return;
				var g = Guid.NewGuid();
				var newFileName = Path.Combine(RemoteResourceManager.Instance.TempFolder.LocalPath, g + ".html");
				WordSingleton.Instance.ConvertToHtml(Link.FullPath, newFileName);
				webBrowser.Url = new Uri(newFileName);
			}
		}
示例#13
0
		public ExcelViewer(LibraryObjectLink link)
		{
			InitializeComponent();
			Dock = DockStyle.Fill;
			Visible = false;

			Link = link;

			if (ExcelHelper.Instance.Connect())
			{
				var g = Guid.NewGuid();
				var newFileName = Path.Combine(RemoteResourceManager.Instance.TempFolder.LocalPath, g + ".html");
				ExcelHelper.Instance.ConvertToHtml(Link.FullPath, newFileName);
				ExcelHelper.Instance.Disconnect();
				webBrowser.Url = new Uri(newFileName);
			}
		}
		public CommonFileViewer(LibraryObjectLink link)
		{
			InitializeComponent();
			Dock = DockStyle.Fill;
			Visible = false;

			Link = link;

			switch (Link.Type)
			{
				case FileTypes.PowerPoint:
					laMessage.Text = "Double-Click PowerPoint files to preview";
					break;
				default:
					laMessage.Text = "Double-Click File to preview...";
					break;
			}
		}
		public LinkTextOptions(LibraryObjectLink data)
		{
			InitializeComponent();
			Text = "Text Format";
			_data = data;

			buttonEditLinkSpecialFont.ButtonClick += EditorHelper.FontEdit_ButtonClick;
			buttonEditLinkSpecialFont.Click += EditorHelper.FontEdit_Click;

			if ((CreateGraphics()).DpiX > 96)
			{
				var styleControllerFont = new Font(styleController.Appearance.Font.FontFamily, styleController.Appearance.Font.Size - 2, styleController.Appearance.Font.Style);
				styleController.AppearanceDisabled.Font = styleControllerFont;
				styleController.AppearanceDropDown.Font = styleControllerFont;
				styleController.AppearanceDropDownHeader.Font = styleControllerFont;
				styleController.AppearanceFocused.Font = styleControllerFont;
				styleController.AppearanceReadOnly.Font = styleControllerFont;
			}
		}
		public LinkHoverNoteOptions(LibraryObjectLink data)
		{
			InitializeComponent();
			Text = "Hover Note";
			_data = data;

			if ((base.CreateGraphics()).DpiX > 96)
			{
				var styleControllerFont = new Font(styleController.Appearance.Font.FontFamily, styleController.Appearance.Font.Size - 2, styleController.Appearance.Font.Style);
				styleController.AppearanceDisabled.Font = styleControllerFont;
				styleController.AppearanceDropDown.Font = styleControllerFont;
				styleController.AppearanceDropDownHeader.Font = styleControllerFont;
				styleController.AppearanceFocused.Font = styleControllerFont;
				styleController.AppearanceReadOnly.Font = styleControllerFont;
			}
			memoEditNote.Enter += EditorHelper.EditorEnter;
			memoEditNote.MouseUp += EditorHelper.EditorMouseUp;
			memoEditNote.MouseDown += EditorHelper.EditorMouseUp;
		}
示例#17
0
		public static void OpenLink(LibraryObjectLink link, bool specialOptions = false)
		{
			if (specialOptions)
			{
				using (var formViewOptions = new FormLinkSpecialOptions())
				{
					formViewOptions.Text = String.Format(formViewOptions.Text, link.Name);
					formViewOptions.buttonXEmailBin.Enabled = link is LibraryFileLink;
					if (formViewOptions.ShowDialog(MainController.Instance.MainForm) == DialogResult.OK)
					{
						if (formViewOptions.SelectedOption == ViewOptions.EmailBinAdd)
						{
							MainController.Instance.EmailBin.AddLink((LibraryFileLink)link);
						}
					}
				}
			}
			else
				LinkProcessorFactory.Create(link).Open();
		}
		public LinkQuickLinkOptions(LibraryObjectLink data)
		{
			InitializeComponent();
			Text = "Quick Link";
			_data = data;

			checkEditTitleInfo.Text = QuickLinkSettings.PredefinedQuickLinkTitleInfo;
			checkEditTitleHtml5.Text = QuickLinkSettings.PredefinedQuickLinkTitleHtml5;
			checkEditTitleLink.Text = QuickLinkSettings.PredefinedQuickLinkTitleLink;
			checkEditTitleResources.Text = QuickLinkSettings.PredefinedQuickLinkTitleResources;

			if ((base.CreateGraphics()).DpiX > 96)
			{
				var styleControllerFont = new Font(styleController.Appearance.Font.FontFamily, styleController.Appearance.Font.Size - 2, styleController.Appearance.Font.Style);
				styleController.AppearanceDisabled.Font = styleControllerFont;
				styleController.AppearanceDropDown.Font = styleControllerFont;
				styleController.AppearanceDropDownHeader.Font = styleControllerFont;
				styleController.AppearanceFocused.Font = styleControllerFont;
				styleController.AppearanceReadOnly.Font = styleControllerFont;
			}
			textEditUrl.Enter += EditorHelper.EditorEnter;
			textEditUrl.MouseUp += EditorHelper.EditorMouseUp;
			textEditUrl.MouseDown += EditorHelper.EditorMouseUp;
		}
		public LibraryObjectTextFormatLoader(BaseContextMenuEditor editor, LibraryObjectLink targetLink) : base(editor, targetLink) { }
		public HyperLinkProcessor(LibraryObjectLink link)
		{
			_link = link;
		}
		public ExcelSettingsLoader(BaseContextMenuEditor editor, LibraryObjectLink targetLink) : base(editor, targetLink) { }
		private void AddLibraryLinkBundleItem(LibraryObjectLink libraryObjectLink)
		{
			SelectedBundle.AddLibraryLink(libraryObjectLink).AssignDefaultImage();
			LoadBundleItems(SelectedBundle.Settings.Items.Count - 1);
			RaiseDataChanged();
		}