private void ShowHint(DevExpress.XtraTab.IXtraTabPage page) { ToolTipControlInfo toolTip = new ToolTipControlInfo(); toolTip.ToolTipType = ToolTipType.SuperTip; toolTip.Interval = 500; toolTip.Object = page; SuperToolTip superTip = new SuperToolTip(); toolTip.SuperTip = superTip; superTip.Items.AddTitle(page.Text); superTip.Items.AddSeparator(); ToolTipItem item1 = new ToolTipItem(); var child = (page as XtraMdiTabPage).MdiChild; item1.Image = ThumbnailHelper.FormToBitmap(child, new Size((int)(child.Size.Width * 0.6), (int)(child.Size.Height * 0.6))); superTip.Items.Add(item1); ToolTipController.DefaultController.ShowHint(toolTip); }
private void ToolTipController_BeforeShow(object sender, ToolTipControllerShowEventArgs e) { ToolTipController controller = sender as ToolTipController; AppointmentViewInfo aptViewInfo = controller.ActiveObject as AppointmentViewInfo; if (aptViewInfo == null) { return; } if (toolTipController.ToolTipType == ToolTipType.SuperTip) { var selectedObject = e.SelectedObject as TimeLineAppointmentViewInfo; var appointment = selectedObject.Appointment; SuperToolTip SuperTip = new SuperToolTip(); SuperToolTipSetupArgs args = new SuperToolTipSetupArgs(); var font = new Font("Tahoma", 10); args.Title.Text = appointment.Start.ToString("g") + " - " + appointment.End.ToString("g"); args.Title.Font = font; args.Contents.Text = aptViewInfo.DisplayText + Environment.NewLine + aptViewInfo.Description + Environment.NewLine + "Кол-во:" + appointment.CustomFields["PassengersCount"]?.ToString(); args.Contents.Font = font; args.Contents.Image = Properties.Resources.info_32x32; args.ShowFooterSeparator = true; args.Footer.Font = font; args.Footer.Text = appointment.CustomFields["TripTypeName"]?.ToString(); SuperTip.Setup(args); e.SuperTip = SuperTip; } }
private static SuperToolTip addFormulaToolTip(FormulaBuilderDTO formula, SuperToolTip toolTip, string title) { if (formula == null || formula.FormulaType != ObjectTypes.ExplicitFormula) { return(toolTip); } toolTip.Items.AddSeparator(); toolTip.WithTitle(title); toolTip.WithText(formula.FormulaString); toolTip.Items.AddSeparator(); toolTip.WithTitle(AppConstants.Captions.References); var sb = new StringBuilder(); foreach (var objectPath in formula.ObjectPaths) { sb.AppendLine($"<I>{objectPath.Alias}</I> is defined as: {objectPath.Path}"); } toolTip.WithText(sb.ToString()); return(toolTip); }
private void toolTipController1_BeforeShow(object sender, ToolTipControllerShowEventArgs e) { TreeMapItem item = e.SelectedObject as TreeMapItem; if (item == null) { return; } if (item.IsGroup) { return; } SuperToolTip superTip = new SuperToolTip { AllowHtmlText = DefaultBoolean.True }; superTip.Items.Add(new ToolTipTitleItem { Text = String.Format("{0} statistics", item.Label) }); superTip.Items.Add(new ToolTipSeparatorItem()); superTip.Items.Add(new ToolTipItem { Text = String.Format("<b>GDP (2014):</b> {0:C1} trillions", item.Value) }); e.SuperTip = superTip; }
public ToolTipControlInfo ToolTipControlInfoFor(object objectWithToolTip, SuperToolTip superToolTip) { return(new ToolTipControlInfo(objectWithToolTip, string.Empty) { SuperTip = superToolTip, ToolTipType = ToolTipType.SuperTip }); }
void gridTooltipController_BeforeShow(object sender, ToolTipControllerShowEventArgs e) { ListVoteResults lr = e.SelectedObject as ListVoteResults; if (lr == null) { return; } SuperToolTip superTip = new SuperToolTip() { MaxWidth = 350, AllowHtmlText = DefaultBoolean.True }; e.AutoHide = false; e.ToolTipType = ToolTipType.SuperTip; e.Show = false; if (IsCountyMode && !string.IsNullOrEmpty(lr.CountyFIPS)) { e.Show = GenerateCountyToolTip(CountyInfo.GetCounty(lr.CountyFIPS), superTip); } if (!IsCountyMode) { e.Show = GenerateStateToolTip(StateInfo.GetState(lr.State), superTip); } e.SuperTip = superTip; }
private void addFormulaToolTipTo(SuperToolTip toolTip, IParameterDTO parameterDTO) { if (parameterDTO.FormulaType != FormulaType.Rate) { return; } var formula = parameterDTO.Parameter.Formula as ExplicitFormula; if (formula == null) { return; } toolTip.Items.AddSeparator(); toolTip.WithTitle(PKSimConstants.Information.Formula); toolTip.WithText(formula.FormulaString); toolTip.Items.AddSeparator(); toolTip.WithTitle(PKSimConstants.Information.ObjectReferences); var sb = new StringBuilder(); foreach (var objectPath in formula.ObjectPaths) { sb.AppendLine(string.Format("<I>{0}</I> is defined as: {1}", objectPath.Alias, displayObjectPathFrom(objectPath))); } toolTip.WithText(sb.ToString()); }
void mapTooltipController_BeforeShow(object sender, ToolTipControllerShowEventArgs e) { if (!(e.SelectedObject is MapPath)) { return; } var mapPath = (MapPath)e.SelectedObject; SuperToolTip superTip = new SuperToolTip() { MaxWidth = 350, AllowHtmlText = DefaultBoolean.True }; e.AutoHide = false; e.ToolTipType = ToolTipType.SuperTip; if (IsCountyMode) { if (!GenerateCountyToolTip(CountyFromMapAttribute(mapPath.Attributes), superTip)) { e.Show = false; } } else { if (!GenerateStateToolTip(StateFromMapAttribute(mapPath.Attributes), superTip)) { e.Show = false; } } e.SuperTip = superTip; }
/// <summary> /// Set tool tip for button /// </summary> protected virtual void SupperTip() { //Set Supper Tip Clear Button if (ViewMode == CommonData.Mode.View) { args.Title.Text = "F4"; } else { args.Title.Text = "F5"; } sTooltip.Setup(args); btnClear.SuperTip = sTooltip; //Set Supper Tip SaveAndNext Button sTooltip = new SuperToolTip(); args = new SuperToolTipSetupArgs(); if (ViewMode == CommonData.Mode.View) { args.Title.Text = "→"; } else { args.Title.Text = "F12"; } sTooltip.Setup(args); btnSaveAndNext.SuperTip = sTooltip; }
private void MainFormLoad(object sender, EventArgs e) { // https://www.devexpress.com/Support/Center/Question/Details/Q504181 // https://documentation.devexpress.com/#WindowsForms/CustomDocument4874 // https://documentation.devexpress.com/#WindowsForms/CustomDocument15721 // Access the controller that manages tooltips for all controls: ToolTipController defaultTooltipController = DevExpress.Utils.ToolTipController.DefaultController; // Create and customize a SuperToolTip: SuperToolTip sTooltip = new SuperToolTip(); SuperToolTipSetupArgs args = new SuperToolTipSetupArgs(); args.Title.Text = "Header"; args.Contents.Text = "This tooltip contains a hyperlink. Visit the <href=http://help.devexpress.com>DevExpress Knowledge Center</href> to learn more."; args.ShowFooterSeparator = true; args.Footer.Text = "Footer"; sTooltip.Setup(args); // Enable HTML Text Formatting for the created SuperToolTip: sTooltip.AllowHtmlText = DefaultBoolean.True; //..or enable this feature for all tooltips: //defaultTooltipController.AllowHtmlText = true; // Respond to clicking hyperlinks in tooltips: defaultTooltipController.HyperlinkClick += defaultTooltipController_HyperlinkClick; // Assign a SuperToolTip to the button: memoEdit1.SuperTip = sTooltip; }
public SuperToolTip AddSubItemTo(SuperToolTip toolTip, string title, string text) { toolTip.Items.AddSeparator(); toolTip.WithTitle(title); toolTip.WithText(text); return(toolTip); }
string GetTextToDisplay(string fullText) { //记住原文本值 f_FullText = fullText; string displayText = fullText; int maxW = this.MaximumSize.Width; if (maxW > 0) { Graphics graphics = this.CreateGraphics(); int? imgW = this.Image?.Width; int fulltxtW = graphics.MeasureString(fullText, this.Font).ToSize().Width; if (fulltxtW + imgW > maxW) { for (int i = 0; i < fullText.Length; i++) { string txt = fullText.Substring(0, i + 1); int txtW = graphics.MeasureString(txt, this.Font).ToSize().Width; if (txtW + imgW > maxW - 20) { displayText = txt + ".."; SuperToolTip superTip = new SuperToolTip(); superTip.Items.Add(fullText); this.SuperTip = superTip; break; } } } } return(displayText); }
public static SuperToolTip CreateToolTips(string name, string info, string picPath) { var superToolTip1 = new SuperToolTip { AllowHtmlText = DefaultBoolean.True }; var toolTipTitleItem1 = new ToolTipTitleItem(); var toolTipItem1 = new ToolTipItem(); toolTipTitleItem1.Text = name; if (!string.IsNullOrEmpty(picPath)) { if (File.Exists(Environment.CurrentDirectory + picPath)) { toolTipItem1.Appearance.Image = Image.FromFile(Environment.CurrentDirectory + picPath); } toolTipItem1.Appearance.Options.UseImage = true; if (File.Exists(Environment.CurrentDirectory + picPath)) { toolTipItem1.Image = Image.FromFile(Environment.CurrentDirectory + picPath); } } toolTipItem1.LeftIndent = 6; toolTipItem1.Text = info; superToolTip1.Items.Add(toolTipTitleItem1); superToolTip1.Items.Add(toolTipItem1); return(superToolTip1); }
/// <summary> /// Authorization for form /// </summary> //protected virtual void SetAuthorityControlOnlyThis() //{ // //Set authorization for Print // ST_StockTransactionMasterDto currentDto = (ST_StockTransactionMasterDto)this.CurrentDto; // if (currentDto != null) // { // //Set authorization for Print // if (this.IsWarehouseAuthority(currentDto.WarehouseCode, CommonData.OperId.Print) == CommonData.IsAuthority.Deny) // { // this.btnPrintSheet.Enabled = false; // } // //Set authorization for Cancel // if (this.IsWarehouseAuthority(currentDto.WarehouseCode, CommonData.OperId.Cancel) == CommonData.IsAuthority.Deny) // { // this.btnCancel.Enabled = false; // } // //Set authorization for ViewPrice // if (this.IsWarehouseAuthority(currentDto.WarehouseCode, CommonData.OperId.ViewPrice) == CommonData.IsAuthority.Deny) // { // this.ctrlDetail.ShowUnitPrice = false; // this.ctrlDetail.ShowAmount = false; // this.ctrlDetail1.ShowUnitPrice = false; // this.ctrlDetail1.ShowAmount = false; // } // } //} #endregion /// <summary> /// Set tool tip for button /// </summary> private void SupperTip() { SuperToolTip sTooltip; SuperToolTipSetupArgs args; //Set Supper Tip PrintDeliverySheet Button sTooltip = new SuperToolTip(); args = new SuperToolTipSetupArgs(); args.Title.Text = "F10"; sTooltip.Setup(args); btnPrintSheet.SuperTip = sTooltip; //Set Supper Tip Inventory Button sTooltip = new SuperToolTip(); args = new SuperToolTipSetupArgs(); args.Title.Text = "Ctr + F"; sTooltip.Setup(args); btnInventory.SuperTip = sTooltip; //Set Supper Tip Cancel Button sTooltip = new SuperToolTip(); args = new SuperToolTipSetupArgs(); args.Title.Text = "F7"; sTooltip.Setup(args); btnCancel.SuperTip = sTooltip; }
/// <summary> /// Adds tooltips to the parameter controls based on BaseParameter.Description property. /// </summary> public static void AddTooltips(this SuperToolTip tooltip, IEnumerable <BaseParameter> parameters) { foreach (var p in parameters) { if (string.IsNullOrWhiteSpace(p.Description) || p.Control == null) { continue; } var info = new ToolTipInfo { BackColor = Color.White }; info.Header.Text = p.DisplayName; info.Body.Text = p.Description; // Syncfusion doesn't take into account header to determine the width of tooltip, // so let's add some padding const int minTextLength = 75; if (p.Description.Length < minTextLength) { info.Body.Text += new string(' ', minTextLength - p.Description.Length); } tooltip.SetToolTip(p.Control.ToolTipControl, info); } }
void DefaultController_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e) { NavBarControl navBar = e.SelectedControl as NavBarControl; if (navBar != null) { NavBarHitInfo hi = navBar.CalcHitInfo(e.ControlMousePosition); if (hi.InLink) { SuperToolTip superTip = new SuperToolTip(); SuperToolTipSetupArgs args = new SuperToolTipSetupArgs(); args.Title.Text = hi.Link.Caption; superTip.Setup(args); e.Info.SuperTip = superTip; } else if (hi.InGroup) { SuperToolTip superTip = GetSuperTipByGroup(hi.Group); { if (e.Info == null) { e.Info = new ToolTipControlInfo(e.SelectedControl, ""); } e.Info.ToolTipType = ToolTipType.SuperTip; e.Info.SuperTip = superTip; } } } }
private void defaultToolTipController1_DefaultController_GetActiveObjectInfo(object sender, DevExpress.Utils.ToolTipControllerGetActiveObjectInfoEventArgs e) { GridControl gridControl = e.SelectedControl as GridControl; if (gridControl == null) { return; } GridView view = gridControl.GetViewAt(e.ControlMousePosition) as GridView; if (view == null) { return; } GridHitInfo hi = view.CalcHitInfo(e.ControlMousePosition); SuperToolTip toolTip = GetToolTipByHitInfo(view, hi); if (toolTip == null) { return; } e.Info = new ToolTipControlInfo(); e.Info.Object = hi.Column; e.SelectedObject = hi.Column; e.Info.SuperTip = toolTip; e.Info.ToolTipType = ToolTipType.SuperTip; e.Info.ToolTipPosition = Control.MousePosition; e.Info.ImmediateToolTip = true; }
private void toolTipController1_BeforeShow(object sender, ToolTipControllerShowEventArgs e) { ToolTipController controller = sender as ToolTipController; AppointmentViewInfo aptViewInfo = controller.ActiveObject as AppointmentViewInfo; if (aptViewInfo == null) { return; } if (toolTipController1.ToolTipType == ToolTipType.Standard) { e.IconType = ToolTipIconType.Information; e.ToolTip = aptViewInfo.Description; } if (toolTipController1.ToolTipType == ToolTipType.SuperTip) { SuperToolTip SuperTip = new SuperToolTip(); SuperToolTipSetupArgs args = new SuperToolTipSetupArgs(); args.Title.Text = "Info"; args.Title.Font = new Font("Times New Roman", 14); args.Contents.Text = aptViewInfo.Description; //args.Contents.Image = resImage; args.ShowFooterSeparator = true; args.Footer.Font = new Font("Comic Sans MS", 8); args.Footer.Text = "SuperTip"; SuperTip.Setup(args); e.SuperTip = SuperTip; } }
public ColumnMappingView(IImageListRetriever imageListRetriever) { _imageListRetriever = imageListRetriever; InitializeComponent(); _gridViewBinder = new GridViewBinder <ColumnMappingDTO>(columnMappingGridView); columnMappingGridView.OptionsView.ShowGroupPanel = false; columnMappingGridView.OptionsMenu.EnableColumnMenu = false; columnMappingGridView.MultiSelect = false; columnMappingGridView.CellValueChanged += (o, e) => OnEvent(_presenter.ValidateMapping); columnMappingGridView.OptionsView.ShowButtonMode = ShowButtonModeEnum.ShowOnlyInEditor; columnMappingGridView.OptionsBehavior.EditorShowMode = EditorShowMode.MouseDown; columnMappingGridView.OptionsCustomization.AllowSort = false; columnMappingGridView.OptionsCustomization.AllowFilter = false; columnMappingGrid.ToolTipController = new ToolTipController().Initialize(imageListRetriever); columnMappingGrid.ToolTipController.GetActiveObjectInfo += (o, e) => OnEvent(onGetActiveObjectInfo, o, e); var unitInformationTip = new SuperToolTip(); unitInformationTip.Items.Add(Captions.Importer.UnitInformationDescription); initializeButton(_repositoryMappingPopupContainerEdit, _mappingPopupControl, closeUpMapping); initializeButton(_repositoryMetaDataPopupContainerEdit, _metaDataPopupControl, closeUpMetaData); _disabledPopupContainerEdit.Enabled = false; _disabledPopupContainerEdit.QueryDisplayText += (o, e) => OnEvent(() => e.DisplayText = " "); }
private void toolTipController1_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e) { if (e.SelectedControl != gridControl1) { return; } ToolTipControlInfo info = null; SuperToolTip sTooltip1 = new SuperToolTip(); try { GridView view = gridControl1.GetViewAt(e.ControlMousePosition) as GridView; if (view == null) { return; } GridHitInfo hi = view.CalcHitInfo(e.ControlMousePosition); if (hi.HitTest == GridHitTest.RowIndicator) { info = new ToolTipControlInfo(GridHitTest.RowIndicator.ToString() + hi.RowHandle.ToString(), "Row Handle: " + hi.RowHandle.ToString()); ToolTipTitleItem titleItem1 = new ToolTipTitleItem(); Image im = view.GetRowCellValue(hi.RowHandle, "Picture") as Image; ToolTipItem item1 = new ToolTipItem(); item1.Image = im; sTooltip1.Items.Add(item1); } info = new ToolTipControlInfo(hi.HitTest, ""); info.SuperTip = sTooltip1; } finally { e.Info = info; } }
private void ParseTooltips() { if (this.codon != null && this.codon.Properties.Contains("tooltip")) { SuperToolTip superToolTip = new SuperToolTip(); ToolTipItem toolTipItem = new ToolTipItem(); ToolTipTitleItem toolTipTitleItem = new ToolTipTitleItem(); string text = StringParser.Parse(this.codon.Properties["tooltip"]); if (text.Contains(":")) { toolTipTitleItem.Text = text.Split(new char[] { ':' })[0]; toolTipItem.Text = text.Split(new char[] { ':' })[1]; } else { toolTipItem.Text = text; } superToolTip.Items.Add(toolTipTitleItem); superToolTip.Items.Add(toolTipItem); this.SuperTip = superToolTip; } }
private void addItemToToolTip(SuperToolTip superTip, string itemToAdd) { if (string.IsNullOrEmpty(itemToAdd)) { return; } superTip.Items.Add(itemToAdd); }
private static void NoNewUpdate(FoundReleases foundReleases) { ImageStatus = Resources.accept24; InvokeVersionUpdateChanged(new EventArgs()); UpdateTip = new SuperToolTip(); UpdateTip.Items.AddTitle("You are using the latest build of YANFOE."); UpdateTip.Items.Add("Current build: " + foundReleases.BuildNumber); UpdateLink = string.Empty; }
private SuperToolTip generateToolTipControlInfo(int index) { var superToolTip = new SuperToolTip(); var tooltip = _presenter.ToolTipDescriptionFor(index); superToolTip.Items.AddTitle(tooltip.Title); superToolTip.Items.Add(tooltip.Description); return(superToolTip); }
private static SuperToolTip addImageToToolTip(Image tooltipImage, SuperToolTip tooltip) { var toolTipItem = new ToolTipItem { Image = tooltipImage }; tooltip.Items.Add(toolTipItem); return(tooltip); }
public static SuperToolTip CreateSuperTip(string title = null, string body = null) { var retVal = new SuperToolTip(); if (!String.IsNullOrEmpty(title)) retVal.Items.AddTitle(title); if (!String.IsNullOrEmpty(body)) retVal.Items.Add(body); return retVal; }
public static void Init(SuperToolTip toolTipManager) { Logger.Current.Trace("In ToolTipHelper.Init()"); if (toolTipManager == null) { throw new ArgumentNullException("toolTipManager"); } _toolTipManager = toolTipManager; }
private static void UsingUnreleasedVersion(FoundReleases foundReleases) { ImageStatus = Resources.warning24; InvokeVersionUpdateChanged(new EventArgs()); UpdateTip = new SuperToolTip(); UpdateTip.Items.AddTitle(string.Format("You are using an unofficial build of YANFOE ({0}).", YANFOE.Settings.ConstSettings.Application.ApplicationBuild)); UpdateTip.Items.Add(string.Format("Double click to download build {0}", foundReleases.BuildNumber)); UpdateLink = string.Format("https://github.com/yanfoe/YANFOE.v2/downloads/YANFOE.v{0}.{1}-{2}.Build.{3}.zip", foundReleases.Major, foundReleases.Minor, foundReleases.Milestone, foundReleases.BuildNumber); }
public static void UpdateAvailable(FoundReleases foundReleases) { ImageStatus = Resources.new24; InvokeVersionUpdateChanged(new EventArgs()); UpdateTip = new SuperToolTip(); UpdateTip.Items.AddTitle("New Update Available!"); UpdateTip.Items.Add("Double click to download the latest release build."); UpdateLink = string.Format("https://github.com/yanfoe/YANFOE.v2/downloads/YANFOE.v{0}.{1}-{2}.Build.{3}.zip", foundReleases.Major, foundReleases.Minor, foundReleases.Milestone, foundReleases.BuildNumber); }
private void TextEditDocLocation_EditValueChanged(object sender, EventArgs e) { var obj = sender as BaseEdit; var superToolTip1 = new SuperToolTip(); var toolTipItem1 = new ToolTipItem(); toolTipItem1.Text = obj.Text; superToolTip1.Items.Add(toolTipItem1); obj.SuperTip = superToolTip1; }
private static void CheckForUpdateFailed() { ImageStatus = Resources.delete32; InvokeVersionUpdateChanged(new EventArgs()); UpdateTip = new SuperToolTip(); UpdateTip.Items.AddTitle("Update Search Failed."); UpdateTip.Items.Add("Double click to manually check for update"); UpdateLink = "https://github.com/yanfoe/YANFOE.v2/downloads"; }
private void toolTipController1_BeforeShow(object sender, DevExpress.Utils.ToolTipControllerShowEventArgs e) { if (toolTipController1.ActiveObject is AppointmentViewInfo) { Appointment apt = ((AppointmentViewInfo)toolTipController1.ActiveObject).Appointment; e.ToolTipType = ToolTipType.SuperTip; SuperToolTip stt = new SuperToolTip(); ToolTipTitleItem ttiTitle = new ToolTipTitleItem(); ToolTipItem ttiBody = new ToolTipItem(); ToolTipItem ttiFooter = new ToolTipItem(); ttiTitle.Text = "Appointment"; ttiBody.Text = string.Format("Subject: {0} \nDescription: {1}\nPrice: {2}", apt.Subject, apt.Description, apt.CustomFields["cfPrice"]); ttiBody.Image = SystemIcons.Information.ToBitmap(); ttiFooter.AllowHtmlText = DefaultBoolean.True; ttiFooter.Text = "<b>www.devexpress.com</b>"; ttiFooter.Appearance.BackColor = Color.Red; ttiFooter.Appearance.ForeColor = Color.Blue; ttiFooter.LeftIndent = 30; stt.Items.Add(ttiTitle); stt.Items.AddSeparator(); stt.Items.Add(ttiBody); stt.Items.AddSeparator(); stt.Items.Add(ttiFooter); e.SuperTip = stt; } if (toolTipController1.ActiveObject is ResourceHeader) { Resource res = ((ResourceHeader)toolTipController1.ActiveObject).Resource; e.ToolTipType = ToolTipType.Standard; e.Rounded = true; e.Title = "Resource"; e.ToolTip = res.Caption; } if (toolTipController1.ActiveObject is DayHeader || toolTipController1.ActiveObject is TimeScaleHeader) { TimeInterval interval = ((SchedulerHeader)toolTipController1.ActiveObject).Interval; e.ToolTipType = ToolTipType.Standard; e.IconType = ToolTipIconType.Exclamation; e.ShowBeak = true; e.Title = "TimeInterval"; e.ToolTip = interval.ToString(); } }
private void addValueDescriptionToolTip(SuperToolTip toolTip, IParameterDTO parameterDTO) { if (string.IsNullOrEmpty(parameterDTO.ValueDescription)) { return; } toolTip.Items.AddSeparator(); toolTip.WithTitle(PKSimConstants.UI.ValueDescription); toolTip.WithText(parameterDTO.ValueDescription); }
public object open(object param) { if (staticItem == null) { staticItem = new BarStaticItem(); staticItem.Glyph = FWImageDic.WARN_IMAGE16; toolTip = new ToolTipItem(); SuperToolTip superToltip = new SuperToolTip(); superToltip.Items.Add(toolTip); staticItem.SuperTip = superToltip; ribStaBar.ItemLinks.Add(staticItem); staticItem.Alignment = BarItemLinkAlignment.Right; } else { //PHUOCNC Index = 3 ribStaBar.ItemLinks[3].Visible = true; } return "NOTHING"; }
public static void _setTooTip(BaseControl control, String header, String htmlText, String footer) { SuperToolTip superToolTip = new SuperToolTip(); ToolTipItem toolTipItem = new ToolTipItem(); toolTipItem.Text = htmlText; toolTipItem.AllowHtmlText = DefaultBoolean.True; if (header != null) { superToolTip.Items.AddTitle(header); } superToolTip.Items.Add(toolTipItem); if (footer != null) { superToolTip.Items.AddSeparator(); superToolTip.Items.AddTitle(footer); } superToolTip.AllowHtmlText = DefaultBoolean.True; control.SuperTip = superToolTip; }
/// <summary> /// Get episode super tip. /// </summary> /// <param name="episode"> /// The episode. /// </param> /// <returns> /// Return episode super tool tip /// </returns> public static SuperToolTip GetEpisodeSuperTip(Episode episode) { if (episode == null) { return new SuperToolTip(); } var superTip = new SuperToolTip(); superTip.Items.AddTitle(episode.EpisodeName); if (!string.IsNullOrEmpty(episode.EpisodeScreenshotUrl)) { string url = GetImageUrl(episode.EpisodeScreenshotUrl); string urlCache = WebCache.GetPathFromUrl(url, Section.Tv); if (File.Exists(urlCache) && !Downloader.Downloading.Contains(url)) { try { Image episodePathImage = ImageHandler.LoadImage(urlCache); var smallBanner = new ToolTipTitleItem { Image = ImageHandler.ResizeImage(episodePathImage, 150, 90) }; superTip.Items.Add(smallBanner); } catch { Log.WriteToLog(LogSeverity.Error, 0, "Could not load banner", urlCache); } } } return superTip; }
/// <summary> /// Get season super tip. /// </summary> /// <param name="season"> /// The season. /// </param> /// <returns> /// The season super tip. /// </returns> public static SuperToolTip GetSeasonSuperTip(Season season) { if (season == null) { return new SuperToolTip(); } var superTip = new SuperToolTip { AllowHtmlText = DefaultBoolean.True }; superTip.Items.AddTitle(string.Format("Season {0}", season.SeasonNumber)); foreach (Episode episode in season.Episodes) { var tip = new ToolTipItem(); string found = File.Exists(episode.FilePath.FileNameAndPath) ? "<color=206,244,208>File Exists</color>" : "<b><color=244,206,206>File Does Not Exist</color></b>"; tip.Text = string.Format("<b>{0}</b>:{1} - {2}", episode.EpisodeNumber, episode.EpisodeName, found); superTip.Items.Add(tip); } return superTip; }
public ZoomComboBox() : base() { tip = new SuperToolTip(); tip.UseFading = SuperToolTip.FadingType.System; }
/// <summary> /// Get series super tip. /// </summary> /// <param name="seriesguid"> /// The series guid. /// </param> /// <returns> /// Series super tip. /// </returns> public static SuperToolTip GetSeriesSuperTip(string seriesguid) { Series series = GetSeriesFromGuid(seriesguid); var superTip = new SuperToolTip { AllowHtmlText = DefaultBoolean.True }; superTip.Items.AddTitle(series.SeriesName); var smallBanner = new ToolTipTitleItem { Image = series.SmallBanner }; var smallPoster = new ToolTipTitleItem { Image = series.SmallPoster }; var smallFanart = new ToolTipTitleItem { Image = series.SmallFanart }; var sb = new StringBuilder(); sb.Append("<b>Total Seasons</b>: " + series.Seasons.Count + Environment.NewLine); sb.Append("<b>Total Episodes</b>: " + GetTotalEpisodes(series) + Environment.NewLine); sb.Append("<b>Total Missing Episodes</b>: " + GetTotalEpisodes(series, true) + Environment.NewLine); smallPoster.Text = sb.ToString(); superTip.Items.Add(smallBanner); superTip.Items.Add(smallPoster); superTip.Items.Add(smallFanart); return superTip; }
void gi_MouseEnter(ucGalleryItemImg ucgi) { this.sToolTip = new SuperToolTip(); Image img = Image.FromFile(ucgi.Tag.ToString()); Image imgs = img.GetThumbnailImage(400, 273, null, IntPtr.Zero); SuperToolTipSetupArgs args = new SuperToolTipSetupArgs(); args.Contents.Image = imgs; this.sToolTip.Setup(args); ucgi.TitleLabel.SuperTip = this.sToolTip; }
public PresentationDiagramControllerBase() { tip = new SuperToolTip(); tip.MaxWidth = 350; ShowHints = true; }
/// <summary> /// Gets the super tip for the movie /// </summary> /// <returns> /// A supertip object /// </returns> public SuperToolTip GetMovieSuperTip() { var superTip = new SuperToolTip { AllowHtmlText = DefaultBoolean.True }; string yearValue; if (string.IsNullOrEmpty(this.Year.ToString())) { yearValue = " (No year found)"; } else { yearValue = " (" + this.year + ")"; } superTip.Items.AddTitle(this.Title + yearValue); var item = new ToolTipTitleItem { Image = this.SmallPoster }; var sb = new StringBuilder(); if (item.Image == null) { sb.Append("<b>No Poster Found</b>" + Environment.NewLine); } sb.Append(Environment.NewLine); if (!string.IsNullOrEmpty(this.ImdbId)) { sb.Append("<b>Imdb ID:</b> " + this.ImdbId + Environment.NewLine); } if (!string.IsNullOrEmpty(this.TmdbId)) { sb.Append("<b>Tmdb ID:</b> " + this.TmdbId + Environment.NewLine); } sb.Append(Environment.NewLine); if (this.ChangedText) { sb.Append("<b>Text</b> not saved." + Environment.NewLine); } if (this.ChangedPoster) { sb.Append("<b>Poster</b> not saved." + Environment.NewLine); } if (this.ChangedPoster) { sb.Append("<b>Fanart</b> not saved." + Environment.NewLine); } List<string> sets = MovieSetManager.GetSetsContainingMovie(this); if (sets.Count > 0) { sb.Append(Environment.NewLine + "<b>In the following sets:</b>" + Environment.NewLine); foreach (string set in sets) { sb.Append(set + Environment.NewLine); } } item.Text = sb.ToString(); superTip.Items.Add(item); if (this.smallFanart != null) { superTip.Items.Add(new ToolTipTitleItem { Image = this.smallFanart }); } else { superTip.Items.Add("<b>No Fanart Found</b>"); } return superTip; }
public void buttonItemSalesStrategyDelivery_CheckedChanged(object sender, EventArgs e) { gridColumnDailyDelivery.Visible = buttonXPrintProductDelivery.Checked; gridColumnSundayDelivery.Visible = buttonXPrintProductDelivery.Checked; if (!buttonXPrintProductReadership.Checked && !buttonXPrintProductDelivery.Checked) gridColumnName.RowCount = 2; else gridColumnName.RowCount = 1; var tooltip = new SuperToolTip(); tooltip.Items.Add(new ToolTipItem() { Text = buttonXPrintProductDelivery.Checked ? "Hide Delivery" : "Show Delivery" }); toolTipControllerButtons.SetSuperTip(buttonXPrintProductDelivery, tooltip); if (_allowToSave) { SettingsNotSaved = true; } }
public void buttonItemSalesStrategyLogo_CheckedChanged(object sender, EventArgs e) { gridBandLogo.Visible = buttonXPrintProductLogo.Checked; var tooltip = new SuperToolTip(); tooltip.Items.Add(new ToolTipItem() { Text = buttonXPrintProductLogo.Checked ? "Hide Logo" : "Show Logo" }); toolTipControllerButtons.SetSuperTip(buttonXPrintProductLogo, tooltip); if (_allowToSave) { SettingsNotSaved = true; } }
public static void UpdateAvailable(FoundReleases foundReleases) { ImageStatus = Resources.new24; InvokeVersionUpdateChanged(new EventArgs()); UpdateTip = new SuperToolTip(); UpdateTip.Items.AddTitle("New Update Available!"); UpdateTip.Items.Add("Double click to download the latest release build."); UpdateLink = string.Format("https://github.com/yanfoe/YANFOE.v2/downloads/YANFOE.v{0}.{1}-{2}.Build.{3}.zip", foundReleases.Major, foundReleases.Minor, foundReleases.Milestone, foundReleases.BuildNumber); }
private void InitializeComponent() { Syncfusion.Windows.Forms.Tools.TreeNodeAdvStyleInfo treeNodeAdvStyleInfo1 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdvStyleInfo(); this.superToolTip1 = new Syncfusion.Windows.Forms.Tools.SuperToolTip(null); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); this.SuspendLayout(); // // superToolTip1 // this.superToolTip1.UseFading = Syncfusion.Windows.Forms.Tools.SuperToolTip.FadingType.System; // // DisplayTreeView // treeNodeAdvStyleInfo1.EnsureDefaultOptionedChild = true; this.BaseStylePairs.AddRange(new Syncfusion.Windows.Forms.Tools.StyleNamePair[] { new Syncfusion.Windows.Forms.Tools.StyleNamePair("Standard", treeNodeAdvStyleInfo1)}); // // // this.HelpTextControl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.HelpTextControl.Location = new System.Drawing.Point(0, 0); this.HelpTextControl.Name = "helpText"; this.HelpTextControl.Size = new System.Drawing.Size(49, 15); this.HelpTextControl.TabIndex = 0; this.HelpTextControl.Text = "help text"; // // // this.ToolTipControl.BackColor = System.Drawing.SystemColors.Info; this.ToolTipControl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.ToolTipControl.Location = new System.Drawing.Point(0, 0); this.ToolTipControl.Name = "toolTip"; this.ToolTipControl.Size = new System.Drawing.Size(41, 15); this.ToolTipControl.TabIndex = 1; this.ToolTipControl.Text = "toolTip"; ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); }
/// <summary> /// Handles the GetActiveObjectInfo event of the toolTipController1 control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DevExpress.Utils.ToolTipControllerGetActiveObjectInfoEventArgs"/> instance containing the event data.</param> private void toolTipController1_GetActiveObjectInfo( object sender, ToolTipControllerGetActiveObjectInfoEventArgs e) { if (e.SelectedControl == this.grdEpisode) { var hi = this.grdViewEpisodes.CalcHitInfo(e.ControlMousePosition); if (hi.InRowCell) { var episode = this.grdViewEpisodes.GetRow(hi.RowHandle) as Episode; var superTip = new SuperToolTip(); superTip.Items.AddTitle(episode.CurrentFilenameAndPath); e.Info = new ToolTipControlInfo(hi + " " + hi.Column.Name + " " + hi.RowHandle, string.Empty) { SuperTip = superTip }; } } }
private static void CheckForUpdateFailed() { ImageStatus = Resources.delete32; InvokeVersionUpdateChanged(new EventArgs()); UpdateTip = new SuperToolTip(); UpdateTip.Items.AddTitle("Update Search Failed."); UpdateTip.Items.Add("Double click to manually check for update"); UpdateLink = "https://github.com/yanfoe/YANFOE.v2/downloads"; }
/// <summary> /// The generate picture gallery. /// </summary> public static void GeneratePictureGallery() { galleryGroup.Items.Clear(); foreach (var series in tvDatabase) { if (series.Value.SmallBanner == null && !string.IsNullOrEmpty(series.Value.SeriesBannerPath)) { if (File.Exists(series.Value.SeriesBannerPath)) { Image banner = ImageHandler.LoadImage(series.Value.SeriesBannerPath); series.Value.SmallBanner = ImageHandler.ResizeImage(banner, 300, 55); } } if (series.Value.SmallBanner != null) { var superTip = new SuperToolTip { AllowHtmlText = DefaultBoolean.True }; superTip.Items.AddTitle( string.Format("{0} ({1})", series.Value.SeriesName, series.Value.FirstAired.Value.Year)); var galleryItem = new GalleryItem(series.Value.SmallBanner, series.Value.SeriesName, string.Empty) { Tag = series.Value.Guid, SuperTip = superTip }; if (!galleryGroup.Items.Contains(galleryItem)) { galleryGroup.Items.Add(galleryItem); } } } InvokeGalleryChanged(new EventArgs()); }
private static void UsingUnreleasedVersion(FoundReleases foundReleases) { ImageStatus = Resources.warning24; InvokeVersionUpdateChanged(new EventArgs()); UpdateTip = new SuperToolTip(); UpdateTip.Items.AddTitle(string.Format("You are using an unofficial build of YANFOE ({0}).", YANFOE.Settings.ConstSettings.Application.ApplicationBuild)); UpdateTip.Items.Add(string.Format("Double click to download build {0}", foundReleases.BuildNumber)); UpdateLink = string.Format("https://github.com/yanfoe/YANFOE.v2/downloads/YANFOE.v{0}.{1}-{2}.Build.{3}.zip", foundReleases.Major, foundReleases.Minor, foundReleases.Milestone, foundReleases.BuildNumber); }
public void buttonItemSalesStrategyAbbreviation_CheckedChanged(object sender, EventArgs e) { gridBandAbbreviation.Visible = buttonXPrintProductCode.Checked; var tooltip = new SuperToolTip(); tooltip.Items.Add(new ToolTipItem() { Text = buttonXPrintProductCode.Checked ? "Hide Publication Code" : "Show Publication Code" }); toolTipControllerButtons.SetSuperTip(buttonXPrintProductCode, tooltip); if (_allowToSave) { SettingsNotSaved = true; } }
private void slidesListView_ItemHover(object sender, ItemHoverEventArgs e) { toolTipController.HideHint(); var slideMaster = e.Item?.Tag as SlideMaster; if (String.IsNullOrEmpty(slideMaster?.ToolTipHeader) || String.IsNullOrEmpty(slideMaster.ToolTipBody)) return; var toolTipParameters = new ToolTipControllerShowEventArgs(); var superTip = new SuperToolTip(); var toolTipSetupArgs = new SuperToolTipSetupArgs(); toolTipSetupArgs.AllowHtmlText = DefaultBoolean.True; toolTipSetupArgs.Title.Text = String.Format("<b>{0}</b>", slideMaster.ToolTipHeader); toolTipSetupArgs.Title.Font = new Font("Arial", 10); toolTipSetupArgs.Contents.Font = new Font("Arial", 9); toolTipSetupArgs.Contents.Text = String.Format("<color=gray>{0}</color>", slideMaster.ToolTipBody); superTip.Setup(toolTipSetupArgs); toolTipParameters.SuperTip = superTip; toolTipController.ShowHint(toolTipParameters, MousePosition); }
private static void NoNewUpdate(FoundReleases foundReleases) { ImageStatus = Resources.accept24; InvokeVersionUpdateChanged(new EventArgs()); UpdateTip = new SuperToolTip(); UpdateTip.Items.AddTitle("You are using the latest build of YANFOE."); UpdateTip.Items.Add("Current build: " + foundReleases.BuildNumber); UpdateLink = string.Empty; }
private static SuperToolTip createToolTip(string file) { var result = new SuperToolTip { MaxWidth = 400 }; result.Items.Add( new ToolTipTitleItem { Text = ZlpPathHelper.GetFileNameFromFilePath(file.TrimEnd()) }); result.Items.Add( new ToolTipItem { Text = file }); return result; }
public ChartSetupForm(BusinessGraphicsSourceDesign source) { InitializeComponent(); // Устанавливаем размер документа, чтобы не было лишнего пустого поля. diagram1.Model.DocumentSize.Width = source.Chart.Width; diagram1.Model.DocumentSize.Height = source.Chart.Height; this.source = source; if (String.IsNullOrEmpty(source.DiagramStyle)) source.DiagramStyle = defaultName; if (String.IsNullOrEmpty(source.SubDiagramStyle)) source.SubDiagramStyle = defaultName; source.LoadStyles(); this.DiagramStyleData = source.DiagramStyleData; this.DiagramStyle = source.DiagramStyle; this.SubDiagramStyleData = source.SubDiagramStyleData; this.SubDiagramStyle = source.SubDiagramStyle; if (source.DiagramStyle != defaultName && source.DiagramStyleData==null) this.DiagramStyleData = this.GetStyleData(source.DiagramStyle); if (source.SubDiagramStyle != defaultName && source.SubDiagramStyleData == null) this.SubDiagramStyleData = this.GetStyleData(source.SubDiagramStyle); this.tabControlAdv1.SelectedIndexChanged += new System.EventHandler(this.tabControlAdv1_SelectedIndexChanged); ReloadStyleList(); styleComboBox.SelectedItem = DiagramStyle; source.InitializeChart(true); this.chart1 = source.Chart; LoadStyle(); RefreshChart(); this.FormClosing += new FormClosingEventHandler(ChartSetupForm_FormClosing); styleComboBox.SelectedValueChanged += new EventHandler(styleComboBox_SelectedValueChanged); saveButton.Enabled = styleComboBox.SelectedValue.ToString() != defaultName; removeButton.Enabled = styleComboBox.SelectedValue.ToString() != defaultName; if (!source.AllowSubDiagram) { this.tabControlAdv1.TabPages[1].Hide(); } else { this.tabControlAdv1.TabPages[1].Show(); } zoomCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown; zoomCombo.Items.AddRange(Percent.CreateList()); zoomCombo.Text = "100%"; tip = new SuperToolTip(); tip.UseFading = SuperToolTip.FadingType.System; }