public OutputSnapshotControl()
		{
			InitializeComponent();
			Dock = DockStyle.Fill;

			HelpToolTip = new SuperTooltipInfo("HELP", "", "Help me understand how to use the Advertising Snapshot slide", null, null, eTooltipColor.Gray);

			BusinessObjects.Instance.ScheduleManager.SettingsSaved += (sender, e) => Controller.Instance.FormMain.BeginInvoke((MethodInvoker)delegate()
			{
				if (sender != this)
					UpdateOutput(e.QuickSave);
			});
			BusinessObjects.Instance.ThemeManager.ThemesChanged += (o, e) =>
			{
				InitThemeSelector();
				Controller.Instance.SnapshotThemeBar.RecalcLayout();
				Controller.Instance.SnapshotPanel.PerformLayout();
			};
			var buttonInfos = new List<ButtonInfo>
			{
				new ButtonInfo { 
					Logo = Resources.SnapshotBasicInfo, 
					Tooltip = "Open Basic Info", 
					Action = () => { xtraTabControlOptions.SelectedTabPage = xtraTabPageSlideInfo; } 
				}, 
				new ButtonInfo { 
					Logo = Resources.SnapshotSlideOptions, 
					Tooltip = "Open Slide Options", 
					Action = () => { xtraTabControlOptions.SelectedTabPage = xtraTabPagePrint; } 
				}
			};
			retractableBar.AddButtons(buttonInfos);
			retractableBar.StateChanged += retractableBar_StateChanged;
		}
		protected void LoadThemes(SlideType slideType)
		{
			var themes = SettingsManager.Instance.ThemeManager.GetThemes(slideType);
			FormMain.Instance.HideThemeButtons();
			ThemeButton.Visible = true;
			FormThemeSelector.Link(
				ThemeButton,
				themes,
				(SettingsManager.Instance.GetSelectedTheme(slideType) ?? new Theme(null)).Name,
				SettingsManager.Instance,
				(theme, applyForAllSlideTypes) =>
				{
					SettingsManager.Instance.SetSelectedTheme(slideType, theme.Name, applyForAllSlideTypes);
					SettingsManager.Instance.SaveSettings();
				}
			);
			if (!themes.Any())
			{
				var selectorToolTip = new SuperTooltipInfo("Important Info", "", "Click to get more info why output is disabled", null, null, eTooltipColor.Gray);
				FormMain.Instance.buttonItemPowerPoint.Visible = false;
				FormMain.Instance.ribbonBarPowerPoint.Text = "Important Info";
				FormMain.Instance.superTooltip.SetSuperTooltip(FormMain.Instance.buttonItemHomeThemeCleanslate, selectorToolTip);
			}
			else
			{
				FormMain.Instance.buttonItemPowerPoint.Visible = true;
				var selectorToolTip = new SuperTooltipInfo("Slide Theme", "", "Select the PowerPoint Slide theme you want to use for this schedule", null, null, eTooltipColor.Gray);
				FormMain.Instance.superTooltip.SetSuperTooltip(FormMain.Instance.buttonItemHomeThemeCleanslate, selectorToolTip);
			}
			FormMain.Instance.ribbonBarPowerPoint.RecalcLayout();
			FormMain.Instance.ribbonPanelHome.PerformLayout();
		}
		public OutputBasicOverviewControl()
		{
			InitializeComponent();
			Dock = DockStyle.Fill;
			HelpToolTip = new SuperTooltipInfo("HELP", "", "Learn more about the Basic Overview Slide", null, null, eTooltipColor.Gray);
			BusinessObjects.Instance.ScheduleManager.SettingsSaved += (sender, e) => Controller.Instance.FormMain.BeginInvoke((MethodInvoker)delegate()
			{
				if (sender != this)
					UpdateOutput(e.QuickSave);
			});
			BusinessObjects.Instance.ThemeManager.ThemesChanged += (o, e) =>
			{
				InitThemeSelector();
				Controller.Instance.BasicOverviewThemeBar.RecalcLayout();
				Controller.Instance.BasicOverviewPanel.PerformLayout();
			};
		}
		public OutputMultiGridControl()
		{
			InitializeComponent();
			Dock = DockStyle.Fill;
			AllowToSave = true;

			textEditHeader.Hide();
			textEditHeader.Parent = gridControlPublication;

			ColumnsColumns = new ColumnsControl(this);
			AdNotes = new AdNotesControl(this);

			SlideBullets = new SlideBulletsControl(this);
			SlideBullets.checkEditColumnInches.Visible = false;
			SlideBullets.checkEditDimensions.Visible = false;
			SlideBullets.checkEditPageSize.Visible = false;
			SlideBullets.checkEditPercentOfPage.Visible = false;
			SlideBullets.checkEditDelivery.Visible = false;
			SlideBullets.checkEditReadership.Visible = false;

			SlideHeader = new SlideHeaderControl(this);
			SlideHeader.checkEditPublicationName.Visible = false;
			SlideHeader.checkEditLogo1.Visible = false;

			HelpToolTip = new SuperTooltipInfo("HELP", "", "Learn more about the Logo Grid", null, null, eTooltipColor.Gray);

			BusinessObjects.Instance.ScheduleManager.SettingsSaved += (sender, e) => Controller.Instance.FormMain.BeginInvoke((MethodInvoker)delegate()
			{
				if (sender != this)
					UpdateOutput(e.QuickSave);
			});
			BusinessObjects.Instance.ThemeManager.ThemesChanged += (o, e) =>
			{
				InitThemeSelector();
				Controller.Instance.MultiGridThemeBar.RecalcLayout();
				Controller.Instance.MultiGridPanel.PerformLayout();
			};
		}
		public OutputDetailedGridControl()
		{
			InitializeComponent();
			Dock = DockStyle.Fill;

			ColumnsColumns = new ColumnsControl(this);
			AdNotes = new AdNotesControl(this);
			SlideBullets = new SlideBulletsControl(this);
			SlideHeader = new SlideHeaderControl(this);
			SlideHeader.checkEditLogo1.Text = "Publication Logo";

			HelpToolTip = new SuperTooltipInfo("HELP", "", "Help me understand how to use the Detailed Grid", null, null, eTooltipColor.Gray);
			BusinessObjects.Instance.ScheduleManager.SettingsSaved += (sender, e) => Controller.Instance.FormMain.BeginInvoke((MethodInvoker)delegate()
			{
				if (sender != this)
					UpdateOutput(e.QuickSave);
			});
			BusinessObjects.Instance.ThemeManager.ThemesChanged += (o, e) =>
			{
				InitThemeSelector();
				Controller.Instance.DetailedGridThemeBar.RecalcLayout();
				Controller.Instance.DetailedGridPanel.PerformLayout();
			};
		}
Exemple #6
0
        /// <summary>
        /// Shows tooltip at specified screen coordinates.
        /// </summary>
        /// <param name="x">X coordinate</param>
        /// <param name="y">Y coordinate</param>
        /// <param name="enforceScreenPosition">Indicates whether to enforce the screen position of tooltip if tooltip falls out of screen bounds.</param>
        public void ShowTooltip(SuperTooltipInfo info, int x, int y, bool enforceScreenPosition)
        {
            UpdateWithSuperTooltipInfo(info);
            if (info.CustomSize.Width > ElementStyleLayout.HorizontalStyleWhiteSpace(GetStyle()) + 4 && info.CustomSize.Height == 0)
                this.Size = GetFixedWidthSize(info.CustomSize.Width);
            else if (info.CustomSize.IsEmpty || info.CustomSize.Width < ElementStyleLayout.HorizontalStyleWhiteSpace(GetStyle()) + 4 ||
                info.CustomSize.Height < ElementStyleLayout.VerticalStyleWhiteSpace(GetStyle()) + 4)
            {
                this.RecalcSize();
                if (m_MaximumWidth > 0 && this.Size.Width > m_MaximumWidth)
                {
                    // Enforce maximum width
                    this.Size = GetFixedWidthSize(m_MaximumWidth);
                }
            }
            else
                this.Size = info.CustomSize;

            bool setLocation = true;

            if (enforceScreenPosition)
            {
                Point mousePosition = Control.MousePosition;
                ScreenInformation screen = BarFunctions.ScreenFromPoint(mousePosition);
                if (screen != null)
                {
                    Rectangle r = new Rectangle(x, y, this.Width, this.Height);
                    System.Drawing.Size layoutArea = screen.WorkingArea.Size;
                    layoutArea.Width -= (int)(layoutArea.Width * .2f);

                    if (r.Right > screen.WorkingArea.Right)
                        r.X=r.X - (r.Right - screen.WorkingArea.Right);
                    if (r.Bottom > screen.Bounds.Bottom)
                        r.Y = screen.Bounds.Bottom - r.Height;

                    if (r.Contains(System.Windows.Forms.Control.MousePosition.X, System.Windows.Forms.Control.MousePosition.Y))
                    {
                        // We have to move it out of mouse position
                        if (r.Height + System.Windows.Forms.Control.MousePosition.Y + 1 <= screen.WorkingArea.Height)
                            r.Y = System.Windows.Forms.Control.MousePosition.Y + SystemInformation.CursorSize.Height;
                        else
                            r.Y = System.Windows.Forms.Control.MousePosition.Y - r.Height - SystemInformation.CursorSize.Height;
                    }

                    this.Bounds = r;
                    setLocation = false;
                }
            }

            if (!this.IsHandleCreated)
                this.CreateControl();

            Point p = Point.Empty;
            if (setLocation)
            {
                p = new Point(x, y);
                this.Location = p;
            }
            else
                p = this.Location;

            if (NativeFunctions.ShowDropShadow)
            {
                if (m_DropShadow == null)
                {
                    m_DropShadow = new PopupShadow(NativeFunctions.AlphaBlendingSupported);
                    m_DropShadow.CreateControl();
                }
                m_DropShadow.Hide();
            }
            if (NativeFunctions.ShowDropShadow && Environment.OSVersion.Version.Major >= 5 && !NativeFunctions.IsTerminalSession())
            {
                NativeFunctions.AnimateWindow(this.Handle, BarFunctions.ANIMATION_INTERVAL, NativeFunctions.AW_BLEND);
            }
            else
                NativeFunctions.SetWindowPos(this.Handle, new IntPtr(NativeFunctions.HWND_TOP), 0, 0, 0, 0, NativeFunctions.SWP_SHOWWINDOW | NativeFunctions.SWP_NOSIZE | NativeFunctions.SWP_NOACTIVATE | NativeFunctions.SWP_NOMOVE);
            if (m_DropShadow != null)
            {
                NativeFunctions.SetWindowPos(m_DropShadow.Handle, this.Handle, p.X + 3, p.Y + 3, this.Width, this.Height, NativeFunctions.SWP_SHOWWINDOW | NativeFunctions.SWP_NOACTIVATE);
                m_DropShadow.UpdateShadow();
            }
        }
Exemple #7
0
 private void AttachErrorTooltip(SuperTooltip tooltip, Exception valueException, object value)
 {
     SuperTooltipInfo info = new SuperTooltipInfo();
     info.HeaderText = this.Text;
     string s = GetErrorString();
     bool showTooltip = false;
     if (valueException is InvalidPropertyValueException && !string.IsNullOrEmpty(valueException.Message))
     {
         s = valueException.Message;
         showTooltip = true;
     }
     else if (valueException != null)
     {
         if (!s.EndsWith(" ")) s += " ";
         s += valueException.Message;
     }
     info.BodyText = s;
     AdvPropertyGrid grid = AdvPropertyGrid;
     if (grid != null)
     {
         grid.InvokePrepareErrorSuperTooltip(info, GetPropertyName(), valueException, value);
     }
     tooltip.SetSuperTooltip(this, info);
     if (showTooltip)
     {
         // Show tooltip below the node
         Rectangle r = this.Cells[0].Bounds;
         AdvTree.AdvTree tree = this.TreeControl;
         if (tree != null)
             r.Location = tree.PointToScreen(r.Location);
         tooltip.ShowTooltip(this, new Point(r.Right - 18, r.Bottom));
     }
     _ErrorTooltipAttached = true;
 }
Exemple #8
0
 internal void SetHelpTooltip(SuperTooltip superTooltip)
 {
     string description = GetDescriptionAttributeValue();
     if (string.IsNullOrEmpty(description))
         superTooltip.SetSuperTooltip(this, null);
     else
     {
         SuperTooltipInfo info = new SuperTooltipInfo(this.Text, "", description, null, null, eTooltipColor.System, true, false, Size.Empty);
         superTooltip.SetSuperTooltip(this, info);
     }
 }
		private void UpdateOutputButtonsAccordingThemeStatus()
		{
			var themesExisted = BusinessObjects.Instance.ThemeManager.GetThemes(SlideType.None).Any();
			if (!themesExisted)
			{
				var selectorToolTip = new SuperTooltipInfo("Important Info", "", "Click to get more info why output is disabled", null, null, eTooltipColor.Gray);

				DigitalProductPowerPoint.Visible = false;
				(DigitalProductPowerPoint.ContainerControl as RibbonBar).Text = "Important Info";
				(DigitalProductEmail.ContainerControl as RibbonBar).Visible = false;
				(DigitalProductPreview.ContainerControl as RibbonBar).Visible = false;
				Supertip.SetSuperTooltip(DigitalProductTheme, selectorToolTip);
				DigitalProductTheme.Click -= OnThemeClick;
				DigitalProductTheme.Click += OnThemeClick;

				DigitalPackagePowerPoint.Visible = false;
				(DigitalPackagePowerPoint.ContainerControl as RibbonBar).Text = "Important Info";
				(DigitalPackageEmail.ContainerControl as RibbonBar).Visible = false;
				(DigitalPackagePreview.ContainerControl as RibbonBar).Visible = false;
				Supertip.SetSuperTooltip(DigitalPackageTheme, selectorToolTip);
				DigitalPackageTheme.Click -= OnThemeClick;
				DigitalPackageTheme.Click += OnThemeClick;

				BasicOverviewPowerPoint.Visible = false;
				(BasicOverviewPowerPoint.ContainerControl as RibbonBar).Text = "Important Info";
				(BasicOverviewEmail.ContainerControl as RibbonBar).Visible = false;
				(BasicOverviewPreview.ContainerControl as RibbonBar).Visible = false;
				Supertip.SetSuperTooltip(BasicOverviewTheme, selectorToolTip);
				BasicOverviewTheme.Click -= OnThemeClick;
				BasicOverviewTheme.Click += OnThemeClick;

				MultiSummaryPowerPoint.Visible = false;
				(MultiSummaryPowerPoint.ContainerControl as RibbonBar).Text = "Important Info";
				(MultiSummaryEmail.ContainerControl as RibbonBar).Visible = false;
				(MultiSummaryPreview.ContainerControl as RibbonBar).Visible = false;
				Supertip.SetSuperTooltip(MultiSummaryTheme, selectorToolTip);
				MultiSummaryTheme.Click -= OnThemeClick;
				MultiSummaryTheme.Click += OnThemeClick;

				SnapshotPowerPoint.Visible = false;
				(SnapshotPowerPoint.ContainerControl as RibbonBar).Text = "Important Info";
				(SnapshotEmail.ContainerControl as RibbonBar).Visible = false;
				(SnapshotPreview.ContainerControl as RibbonBar).Visible = false;
				Supertip.SetSuperTooltip(SnapshotTheme, selectorToolTip);
				SnapshotTheme.Click -= OnThemeClick;
				SnapshotTheme.Click += OnThemeClick;

				AdPlanPowerPoint.Visible = false;
				(AdPlanPowerPoint.ContainerControl as RibbonBar).Text = "Important Info";
				(AdPlanEmail.ContainerControl as RibbonBar).Visible = false;
				(AdPlanPreview.ContainerControl as RibbonBar).Visible = false;
				Supertip.SetSuperTooltip(AdPlanTheme, selectorToolTip);
				AdPlanTheme.Click -= OnThemeClick;
				AdPlanTheme.Click += OnThemeClick;

				DetailedGridPowerPoint.Visible = false;
				(DetailedGridPowerPoint.ContainerControl as RibbonBar).Text = "Important Info";
				(DetailedGridEmail.ContainerControl as RibbonBar).Visible = false;
				(DetailedGridPreview.ContainerControl as RibbonBar).Visible = false;
				Supertip.SetSuperTooltip(DetailedGridTheme, selectorToolTip);
				DetailedGridTheme.Click -= OnThemeClick;
				DetailedGridTheme.Click += OnThemeClick;

				MultiGridPowerPoint.Visible = false;
				(MultiGridPowerPoint.ContainerControl as RibbonBar).Text = "Important Info";
				(MultiGridEmail.ContainerControl as RibbonBar).Visible = false;
				(MultiGridPreview.ContainerControl as RibbonBar).Visible = false;
				Supertip.SetSuperTooltip(MultiGridTheme, selectorToolTip);
				MultiGridTheme.Click -= OnThemeClick;
				MultiGridTheme.Click += OnThemeClick;

				SummaryLightPowerPoint.Visible = false;
				(SummaryLightPowerPoint.ContainerControl as RibbonBar).Text = "Important Info";
				(SummaryLightEmail.ContainerControl as RibbonBar).Visible = false;
				(SummaryLightPreview.ContainerControl as RibbonBar).Visible = false;
				Supertip.SetSuperTooltip(SummaryLightTheme, selectorToolTip);
				SummaryLightTheme.Click -= OnThemeClick;
				SummaryLightTheme.Click += OnThemeClick;

				SummaryFullPowerPoint.Visible = false;
				(SummaryFullPowerPoint.ContainerControl as RibbonBar).Text = "Important Info";
				(SummaryFullEmail.ContainerControl as RibbonBar).Visible = false;
				(SummaryFullPreview.ContainerControl as RibbonBar).Visible = false;
				Supertip.SetSuperTooltip(SummaryFullTheme, selectorToolTip);
				SummaryFullTheme.Click -= OnThemeClick;
				SummaryFullTheme.Click += OnThemeClick;
			}
			else
			{
				DigitalProductPowerPoint.Visible = true;
				(DigitalProductEmail.ContainerControl as RibbonBar).Visible = true;
				(DigitalProductPreview.ContainerControl as RibbonBar).Visible = true;
				DigitalProductTheme.Click -= OnThemeClick;

				DigitalPackagePowerPoint.Visible = true;
				(DigitalPackageEmail.ContainerControl as RibbonBar).Visible = true;
				(DigitalPackagePreview.ContainerControl as RibbonBar).Visible = true;
				DigitalPackageTheme.Click -= OnThemeClick;

				BasicOverviewPowerPoint.Visible = true;
				(BasicOverviewEmail.ContainerControl as RibbonBar).Visible = true;
				(BasicOverviewPreview.ContainerControl as RibbonBar).Visible = true;
				BasicOverviewTheme.Click -= OnThemeClick;

				MultiSummaryPowerPoint.Visible = true;
				(MultiSummaryEmail.ContainerControl as RibbonBar).Visible = true;
				(MultiSummaryPreview.ContainerControl as RibbonBar).Visible = true;
				MultiSummaryTheme.Click -= OnThemeClick;

				SnapshotPowerPoint.Visible = true;
				(SnapshotEmail.ContainerControl as RibbonBar).Visible = true;
				(SnapshotPreview.ContainerControl as RibbonBar).Visible = true;
				SnapshotTheme.Click -= OnThemeClick;

				AdPlanPowerPoint.Visible = true;
				(AdPlanEmail.ContainerControl as RibbonBar).Visible = true;
				(AdPlanPreview.ContainerControl as RibbonBar).Visible = true;
				AdPlanTheme.Click -= OnThemeClick;

				DetailedGridPowerPoint.Visible = true;
				(DetailedGridEmail.ContainerControl as RibbonBar).Visible = true;
				(DetailedGridPreview.ContainerControl as RibbonBar).Visible = true;
				DetailedGridTheme.Click -= OnThemeClick;

				MultiGridPowerPoint.Visible = true;
				(MultiGridEmail.ContainerControl as RibbonBar).Visible = true;
				(MultiGridPreview.ContainerControl as RibbonBar).Visible = true;
				MultiGridTheme.Click -= OnThemeClick;

				SummaryLightPowerPoint.Visible = true;
				(SummaryLightEmail.ContainerControl as RibbonBar).Visible = true;
				(SummaryLightPreview.ContainerControl as RibbonBar).Visible = true;
				SummaryLightTheme.Click -= OnThemeClick;

				SummaryFullPowerPoint.Visible = true;
				(SummaryFullEmail.ContainerControl as RibbonBar).Visible = true;
				(SummaryFullPreview.ContainerControl as RibbonBar).Visible = true;
				SummaryFullTheme.Click -= OnThemeClick;

				var selectorToolTip = new SuperTooltipInfo("Slide Theme", "", "Select the PowerPoint Slide theme you want to use for this schedule", null, null, eTooltipColor.Gray);
				Supertip.SetSuperTooltip(DigitalProductTheme, selectorToolTip);
				Supertip.SetSuperTooltip(DigitalPackageTheme, selectorToolTip);
				Supertip.SetSuperTooltip(BasicOverviewTheme, selectorToolTip);
				Supertip.SetSuperTooltip(MultiSummaryTheme, selectorToolTip);
				Supertip.SetSuperTooltip(SnapshotTheme, selectorToolTip);
				Supertip.SetSuperTooltip(AdPlanTheme, selectorToolTip);
				Supertip.SetSuperTooltip(DetailedGridTheme, selectorToolTip);
				Supertip.SetSuperTooltip(MultiGridTheme, selectorToolTip);
				Supertip.SetSuperTooltip(SummaryLightTheme, selectorToolTip);
				Supertip.SetSuperTooltip(SummaryFullTheme, selectorToolTip);
			}
		}
Exemple #10
0
 private void OnTooltipChanged(SuperTooltipInfo oldValue, SuperTooltipInfo newValue)
 {
     OnPropertyChanged(new PropertyChangedEventArgs("Tooltip"));
 }
 private void SetToolTip(IComponent methodNode, string description)
 {
     var info = new SuperTooltipInfo
                 {
                     BodyText = description,
                 };
     superTooltip.SetSuperTooltip(methodNode, info);
 }
Exemple #12
0
		/// <summary>
		/// Associates SuperTooltipInfo with given component.
		/// </summary>
		/// <param name="c">Reference to supported component.</param>
		/// <param name="info">Instance of SuperTooltipInfo class. If null is passed the SuperTooltip is detached from the given component.</param>
        public void SetSuperTooltip(IComponent c, SuperTooltipInfo info)
        {
            if (info != null)
            {
                if (info.BodyText == null) info.BodyText = "";
                if (info.FooterText == null) info.FooterText = "";
            }

            if (m_SuperTooltipInfo.Contains(c))
            {
                if (info == null)
                    this.RemoveSuperTooltipInfo(c);
                else
                    m_SuperTooltipInfo[c]=info;
            }
            else if (info != null)
            {
                this.AddSuperTooltipInfo(c, info);
            }
#if (FRAMEWORK20)
            if (c is MaskedTextBoxAdv && !this.DesignMode)
                SetSuperTooltip(((MaskedTextBoxAdv)c).MaskedTextBox, info);
            else if (c is TextBoxDropDown)
                SetSuperTooltip(((TextBoxDropDown)c).TextBox, info);
            else if (c is ExpandablePanel)
                SetSuperTooltip(((ExpandablePanel)c).TitlePanel, info);
#endif
        }
Exemple #13
0
 /// <summary>
 /// Initializes a new instance of the PropertyErrorTooltipEventArgs class.
 /// </summary>
 /// <param name="tooltipInfo">SuperTooltipInfo for error tooltip</param>
 /// <param name="propertyName">Property that caused error</param>
 /// <param name="exception">Exception that was raised when property was set</param>
 /// <param name="value">Value that caused the error.</param>
 public PropertyErrorTooltipEventArgs(SuperTooltipInfo tooltipInfo, string propertyName, Exception exception, object value)
 {
     TooltipInfo = tooltipInfo;
     PropertyName = propertyName;
     Exception = exception;
     Value = value;
 }
Exemple #14
0
        public void HighlightError(int lineNum, int characterPosition, string message, int switchOffset,
								   string functionName, List<ParamInfo> parameters, bool isWarning)
        {
            ShowErrors();
            FunctionInfo function = Project.Instance.FindFunction(functionName, parameters);

            if (tabStrip1.InvokeRequired)
            {
                CrossThreadHelper.SetCrossThreadProperty(tabStrip1, "Height", ClientSize.Height - tabStrip1.Top - 200);
            }
            else
            {
                tabStrip1.Height = ClientSize.Height - tabStrip1.Top - 200;
            }
            ListViewItem lvi;

            if (lineNum >= 0)
            {
                SyntaxEditor syntaxEditor1 = null;
                ucFunction currentPage = GetCurrentlyDisplayedFunctionPage();

                if (currentPage != null && currentPage.CurrentFunction == function)
                {
                    foreach (Control ctl in tabStrip1.SelectedTab.AttachedControl.Controls)
                    {
                        if (ctl.GetType() == typeof(ucFunction))
                        {
                            syntaxEditor1 = ((ucFunction)ctl).syntaxEditor1;
                            break;
                        }
                    }
                    MarkErrorWord(syntaxEditor1, lineNum, characterPosition, message);
                }
                lvi = new ListViewItem(new[] { functionName, message, lineNum.ToString(), characterPosition.ToString() });
                lvi.Tag = function;
                lvi.StateImageIndex = lvi.ImageIndex = isWarning ? 1 : 0;

                if (listErrors.InvokeRequired)
                {
                    CrossThreadHelper.CallCrossThreadMethod(listErrors.Items, "Add", new object[] { lvi });
                }
                else
                {
                    listErrors.Items.Add(lvi);
                }
            }
            else
            {
                if (lineNum == 0)
                {
                    lvi = new ListViewItem(new[] { functionName, message, "Func Header", "" });
                }
                else
                {
                    lvi = new ListViewItem(new[] { functionName, message, "", "" });
                }
                lvi.StateImageIndex = lvi.ImageIndex = isWarning ? 1 : 0;
                lvi.Tag = function;
                listErrors.Items.Add(lvi);
                SuperTooltipInfo sti = new SuperTooltipInfo(functionName, null, message, null, null, eTooltipColor.Office2003);
            }
        }
		public void Release()
		{
			DaySelected = null;
			DayCopied = null;
			DayPasted = null;
			DayCloned = null;
			DayDataDeleted = null;
			DataChanged = null;

			SelectionStateRequested = null;
			DayMouseMove = null;

			NoteAdded = null;
			NotePasted = null;

			ImageCopied = null;
			ImagePasted = null;
			ImageDeleted = null;

			_tooltip = null;
			Day = null;
		}
Exemple #16
0
        private void listErrors_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            string footer = "";

            if (e.Item.SubItems.Count > 2)
            {
                footer = string.Format("Line {0}, column {1}", e.Item.SubItems[2].Text, e.Item.SubItems[3].Text);
            }
            var sti = new SuperTooltipInfo(e.Item.Text, footer, e.Item.SubItems[1].Text, imageList32.Images[2], null, eTooltipColor.Office2003);
            SuperTooltipErrors.SetSuperTooltip(listErrors, sti);
            SuperTooltipErrors.ShowTooltip(listErrors, new Point(Cursor.Position.X + 5, Cursor.Position.Y + 15));
        }
Exemple #17
0
        public void PopulateFunctionList()
        {
            try
            {
                superTooltip1 = new SuperTooltip();
                superTooltip1.BeforeTooltipDisplay += superTooltip1_BeforeTooltipDisplay;
                List<string> specialFunctions = Project.Instance.InternalFunctionNames;

                treeFunctions.BeginUpdate();
                treeFunctions.Nodes.Clear();

                foreach (string category in Project.Instance.FunctionCategories)
                {
                    RemoveTabsOfDeletedFunctions();
                    var categoryNode = new Node();
                    categoryNode.Text = " " + (string.IsNullOrEmpty(category) ? "General" : category);
                    bool categoryAdded = false;

                    foreach (FunctionInfo function in Project.Instance.Functions)
                    {
                        if (function.Category != category || specialFunctions.BinarySearch(function.Name) >= 0)
                        {
                            continue;
                        }
                        if (function.IsExtensionMethod)
                            continue;
                        if (!categoryAdded)
                        {
                            categoryNode.Style = treeFunctions.Styles["elementStyleGroup"];
                            treeFunctions.Nodes.Add(categoryNode);
                            categoryAdded = true;
                        }
                        var functionNode = new Node { Text = function.Name, Tag = function };

                        if (!function.IsTemplateFunction)
                        {
                            functionNode.Image = imageListFunctions.Images[0];
                        }
                        else
                        {
                            switch (SyntaxEditorHelper.LanguageEnumFromName(function.TemplateReturnLanguage))
                            {
                                case TemplateContentLanguage.CSharp:
                                    functionNode.Image = imageListFunctions.Images[3];
                                    break;
                                case TemplateContentLanguage.VbDotNet:
                                    functionNode.Image = imageListFunctions.Images[5];
                                    break;
                                case TemplateContentLanguage.Sql:
                                    functionNode.Image = imageListFunctions.Images[0];
                                    break;
                                case TemplateContentLanguage.Html:
                                    functionNode.Image = imageListFunctions.Images[4];
                                    break;
                                case TemplateContentLanguage.Css:
                                    functionNode.Image = imageListFunctions.Images[2];
                                    break;
                                case TemplateContentLanguage.IniFile:
                                    functionNode.Image = imageListFunctions.Images[0];
                                    break;
                                case TemplateContentLanguage.JScript:
                                    functionNode.Image = imageListFunctions.Images[0];
                                    break;
                                case TemplateContentLanguage.Python:
                                    functionNode.Image = imageListFunctions.Images[0];
                                    break;
                                case TemplateContentLanguage.VbScript:
                                    functionNode.Image = imageListFunctions.Images[5];
                                    break;
                                case TemplateContentLanguage.Xml:
                                    functionNode.Image = imageListFunctions.Images[6];
                                    break;
                                case TemplateContentLanguage.PlainText:
                                    functionNode.Image = imageListFunctions.Images[0];
                                    break;
                                default:
                                    functionNode.Image = imageListFunctions.Images[0];
                                    //throw new Exception("This function return type not handled yet in CreateDirectiveXmlToCSharpLanguage: " + function.ReturnType);
                                    break;
                            }
                        }
                        //toolTipForNavBar.SetToolTip(functionNode, string.Format("({1}) {0}", function.Name, function.ReturnType));
                        var sti = new SuperTooltipInfo(function.Name, "", function.Description, functionNode.Image, null, eTooltipColor.Office2003);
                        superTooltip1.SetSuperTooltip(functionNode, sti);
                        categoryNode.Nodes.Add(functionNode);
                    }
                }
                foreach (Node node in treeFunctions.Nodes)
                {
                    node.ExpandAll();
                    node.Expand();
                }
            }
            finally
            {
                treeFunctions.EndUpdate();
            }
        }
Exemple #18
0
 internal void InvokePrepareErrorSuperTooltip(SuperTooltipInfo info, string propertyName, Exception exception, object value)
 {
     OnPrepareErrorSuperTooltip(new PropertyErrorTooltipEventArgs(info, propertyName, exception, value));
 }
Exemple #19
0
 public void UpdateWithSuperTooltipInfo(SuperTooltipInfo info)
 {
     if (info.BodyText == null) info.BodyText = "";
     if (info.FooterText == null) info.FooterText = "";
     m_BodyImage = info.BodyImage;
     this.Text = info.BodyText;
     m_FooterImage = info.FooterImage;
     FooterText = info.FooterText;
     m_FooterVisible = info.FooterVisible;
     HeaderText = info.HeaderText;
     m_HeaderVisible = info.HeaderVisible;
     this.PredefinedColor = info.Color;
 }
Exemple #20
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 public SuperTooltipEventArgs(object source, SuperTooltipInfo info, Point location)
 {
     this.Source = source;
     this.TooltipInfo = info;
     this.Location = location;
 }
Exemple #21
0
 internal void UpdateSuperTooltipSize(SuperTooltipInfo info)
 {
     UpdateWithSuperTooltipInfo(info);
     if (info.CustomSize.Width > ElementStyleLayout.HorizontalStyleWhiteSpace(GetStyle()) + 4 && info.CustomSize.Height == 0)
         this.Size = GetFixedWidthSize(info.CustomSize.Width);
     else if (info.CustomSize.IsEmpty || info.CustomSize.Width < ElementStyleLayout.HorizontalStyleWhiteSpace(GetStyle()) + 4 ||
         info.CustomSize.Height < ElementStyleLayout.VerticalStyleWhiteSpace(GetStyle()) + 4)
     {
         this.RecalcSize();
         if (m_MaximumWidth > 0 && this.Size.Width > m_MaximumWidth)
         {
             // Enforce maximum width
             this.Size = GetFixedWidthSize(m_MaximumWidth);
         }
     }
     else
         this.Size = info.CustomSize;
 }
Exemple #22
0
        private void AddSuperTooltipInfo(IComponent c, SuperTooltipInfo info)
        {
            m_SuperTooltipInfo[c] = info;

            if (c is ISuperTooltipInfoProvider)
            {
                ISuperTooltipInfoProvider ip = c as ISuperTooltipInfoProvider;
                ip.DisplayTooltip += new EventHandler(this.ComponentMouseHover);
                ip.HideTooltip += new EventHandler(ComponentHideTooltip);
            }
            else if (c is ComboBoxItem)
            {
                ComboBoxItem item = c as ComboBoxItem;
                item.MouseHover += new EventHandler(this.ComponentMouseHover);
                item.MouseLeave += new EventHandler(ComponentMouseLeave);
                item.MouseEnter += new EventHandler(ComponentMouseEnter);
                item.MouseDown += new MouseEventHandler(ComponentMouseDown);
                item.ComboBoxEx.MouseHover += new EventHandler(this.ComponentMouseHover);
                item.ComboBoxEx.MouseLeave += new EventHandler(ComponentMouseLeave);
                item.ComboBoxEx.MouseEnter += new EventHandler(ComponentMouseEnter);
                item.ComboBoxEx.MouseDown += new MouseEventHandler(ComponentMouseDown);
            }
            else if (c is TextBoxItem)
            {
                TextBoxItem item = c as TextBoxItem;
                item.MouseHover += new EventHandler(this.ComponentMouseHover);
                item.MouseLeave += new EventHandler(ComponentMouseLeave);
                item.MouseEnter += new EventHandler(ComponentMouseEnter);
                item.MouseDown += new MouseEventHandler(ComponentMouseDown);
                item.TextBox.MouseHover += new EventHandler(this.ComponentMouseHover);
                item.TextBox.MouseLeave += new EventHandler(ComponentMouseLeave);
                item.TextBox.MouseEnter += new EventHandler(ComponentMouseEnter);
                item.TextBox.MouseDown += new MouseEventHandler(ComponentMouseDown);
            }
            else if (c is BaseItem)
            {
                BaseItem item = c as BaseItem;
                item.MouseHover += new EventHandler(this.ComponentMouseHover);
                item.MouseLeave += new EventHandler(ComponentMouseLeave);
                item.MouseEnter += new EventHandler(ComponentMouseEnter);
                item.MouseDown += new MouseEventHandler(ComponentMouseDown);
            }
            else if (c is RibbonBar)
            {
                RibbonBar bar = c as RibbonBar;
                bar.DialogLauncherMouseHover += new EventHandler(this.ComponentMouseHover);
                bar.DialogLauncherMouseEnter += new EventHandler(ComponentMouseEnter);
                bar.DialogLauncherMouseLeave += new EventHandler(ComponentMouseLeave);
                bar.DialogLauncherMouseDown += new MouseEventHandler(ComponentMouseDown);
            }
            else if (c is Control)
            {
                Control ctrl = c as Control;
                ctrl.MouseHover += new EventHandler(this.ComponentMouseHover);
                ctrl.MouseLeave += new EventHandler(ComponentMouseLeave);
                ctrl.MouseDown += new MouseEventHandler(ComponentMouseDown);
                ctrl.MouseEnter += new EventHandler(ComponentMouseEnter);
            }
#if (FRAMEWORK20)
            else if (c is ToolStripButton)
            {
                ToolStripButton item = c as ToolStripButton;
                item.MouseHover += new EventHandler(this.ComponentMouseHover);
                item.MouseLeave += new EventHandler(ComponentMouseLeave);
                item.MouseEnter += new EventHandler(ComponentMouseEnter);
                item.MouseDown += new MouseEventHandler(ComponentMouseDown);
                item.AutoToolTip = false;
                item.ToolTipText = "";
            }
#endif
            else if (c is AdvTree.Node || IsTreeGXType(c.GetType()))
            {
                Type nodeType = c.GetType();
                EventInfo ei = nodeType.GetEvent("NodeMouseHover");
                if (ei != null)
                {
                    Delegate handler = Delegate.CreateDelegate(typeof(EventHandler),
                    this, "ComponentMouseHover");
                    ei.AddEventHandler(c, handler);
                }

                ei = nodeType.GetEvent("NodeMouseLeave");
                if (ei != null)
                {
                    Delegate handler = Delegate.CreateDelegate(typeof(EventHandler),
                    this, "ComponentMouseLeave");
                    ei.AddEventHandler(c, handler);
                }

                ei = nodeType.GetEvent("NodeMouseEnter");
                if (ei != null)
                {
                    Delegate handler = Delegate.CreateDelegate(typeof(EventHandler),
                    this, "ComponentMouseEnter");
                    ei.AddEventHandler(c, handler);
                }

                ei = nodeType.GetEvent("NodeMouseDown");
                if (ei != null)
                {
                    Delegate handler = Delegate.CreateDelegate(typeof(MouseEventHandler),
                    this, "ComponentMouseDown");
                    ei.AddEventHandler(c, handler);
                }
            }
            else if (c is TabItem)
            {
                TabItem tab = c as TabItem;
                tab.MouseHover += new EventHandler(this.ComponentMouseHover);
                tab.MouseLeave += new EventHandler(ComponentMouseLeave);
                tab.MouseEnter += new EventHandler(ComponentMouseEnter);
                tab.MouseDown += new MouseEventHandler(ComponentMouseDown);
            }
        }
		public void ConfigureThemeButtons()
		{
			if (!BusinessObjects.Instance.ThemeManager.GetThemes(SlideType.None).Any())
			{
				var selectorToolTip = new SuperTooltipInfo("Important Info", "", "Click to get more info why output is disabled", null, null, eTooltipColor.Gray);

				ProgramSchedulePowerPoint.Visible = false;
				((RibbonBar)ProgramSchedulePowerPoint.ContainerControl).Text = "Important Info";
				((RibbonBar)ProgramScheduleEmail.ContainerControl).Visible = false;
				((RibbonBar)ProgramSchedulePreview.ContainerControl).Visible = false;
				Supertip.SetSuperTooltip(ProgramScheduleTheme, selectorToolTip);
				ProgramScheduleTheme.Click -= OnThemeClick;
				ProgramScheduleTheme.Click += OnThemeClick;

				DigitalProductPowerPoint.Visible = false;
				((RibbonBar)DigitalProductPowerPoint.ContainerControl).Text = "Important Info";
				((RibbonBar)DigitalProductEmail.ContainerControl).Visible = false;
				((RibbonBar)DigitalProductPreview.ContainerControl).Visible = false;
				Supertip.SetSuperTooltip(DigitalProductTheme, selectorToolTip);
				DigitalProductTheme.Click -= OnThemeClick;
				DigitalProductTheme.Click += OnThemeClick;

				SnapshotPowerPoint.Visible = false;
				((RibbonBar)SnapshotPowerPoint.ContainerControl).Text = "Important Info";
				((RibbonBar)SnapshotEmail.ContainerControl).Visible = false;
				((RibbonBar)SnapshotPreview.ContainerControl).Visible = false;
				Supertip.SetSuperTooltip(SnapshotTheme, selectorToolTip);
				SnapshotTheme.Click -= OnThemeClick;
				SnapshotTheme.Click += OnThemeClick;

				OptionsPowerPoint.Visible = false;
				((RibbonBar)OptionsPowerPoint.ContainerControl).Text = "Important Info";
				((RibbonBar)OptionsEmail.ContainerControl).Visible = false;
				((RibbonBar)OptionsPreview.ContainerControl).Visible = false;
				Supertip.SetSuperTooltip(OptionsTheme, selectorToolTip);
				OptionsTheme.Click -= OnThemeClick;
				OptionsTheme.Click += OnThemeClick;

				SolutionsPowerPoint.Visible = false;
				((RibbonBar)SolutionsPowerPoint.ContainerControl).Text = "Important Info";
				((RibbonBar)SolutionsEmail.ContainerControl).Visible = false;
				((RibbonBar)SolutionsPreview.ContainerControl).Visible = false;
				Supertip.SetSuperTooltip(SolutionsTheme, selectorToolTip);
				SolutionsTheme.Click -= OnThemeClick;
				SolutionsTheme.Click += OnThemeClick;
			}
			else
			{
				ProgramSchedulePowerPoint.Visible = true;
				((RibbonBar)ProgramScheduleEmail.ContainerControl).Visible = true;
				((RibbonBar)ProgramSchedulePreview.ContainerControl).Visible = true;
				ProgramScheduleTheme.Click -= OnThemeClick;

				DigitalProductPowerPoint.Visible = true;
				((RibbonBar)DigitalProductEmail.ContainerControl).Visible = true;
				((RibbonBar)DigitalProductPreview.ContainerControl).Visible = true;
				DigitalProductTheme.Click -= OnThemeClick;

				SnapshotPowerPoint.Visible = true;
				((RibbonBar)SnapshotEmail.ContainerControl).Visible = true;
				((RibbonBar)SnapshotPreview.ContainerControl).Visible = true;
				SnapshotTheme.Click -= OnThemeClick;

				OptionsPowerPoint.Visible = true;
				((RibbonBar)OptionsEmail.ContainerControl).Visible = true;
				((RibbonBar)OptionsPreview.ContainerControl).Visible = true;
				OptionsTheme.Click -= OnThemeClick;

				SolutionsPowerPoint.Visible = true;
				((RibbonBar)SolutionsEmail.ContainerControl).Visible = true;
				((RibbonBar)SolutionsPreview.ContainerControl).Visible = true;
				SolutionsTheme.Click -= OnThemeClick;

				var selectorToolTip = new SuperTooltipInfo("Slide Theme", "", "Select the PowerPoint Slide theme you want to use for this schedule", null, null, eTooltipColor.Gray);
				Supertip.SetSuperTooltip(ProgramScheduleTheme, selectorToolTip);
				Supertip.SetSuperTooltip(DigitalProductTheme, selectorToolTip);
				Supertip.SetSuperTooltip(SnapshotTheme, selectorToolTip);
				Supertip.SetSuperTooltip(OptionsTheme, selectorToolTip);
				Supertip.SetSuperTooltip(SolutionsTheme, selectorToolTip);
			}
		}