Ejemplo n.º 1
0
        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;
            }
        }
        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);
        }
Ejemplo n.º 3
0
 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 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();
            }
        }
Ejemplo n.º 5
0
        ///<summary>Creates a new GoogleMapsControl.</summary>
        public GoogleMapControl()
        {
            InitializeComponent();
            UpdateMap();

            tooltipTitle = tooltip.Items.AddTitle("Address");
            tooltipContents = tooltip.Items.Add(AddressString);
            toolTipController.SetSuperTip(this, tooltip);
            toolTipController.SetSuperTip(pictureBox, tooltip);
        }
Ejemplo n.º 6
0
        ///<summary>Creates a new GoogleMapsControl.</summary>
        public GoogleMapControl()
        {
            InitializeComponent();
            UpdateMap();

            tooltipTitle    = tooltip.Items.AddTitle("Address");
            tooltipContents = tooltip.Items.Add(AddressString);
            toolTipController.SetSuperTip(this, tooltip);
            toolTipController.SetSuperTip(pictureBox, tooltip);
        }
Ejemplo n.º 7
0
        ///////////////////////////////////////////////////////////////////////////////////////////////
        // Method(Public)
        ///////////////////////////////////////////////////////////////////////////////////////////////

        #region :: SetSuperToolTip :: ToolTip을 설정합니다.

        /// <summary>
        /// ToolTip을 설정합니다.
        /// </summary>
        /// <param name="title"></param>
        /// <param name="contents"></param>
        public void SetSuperToolTip(string title, string contents)
        {
            SuperToolTip     sTip      = new SuperToolTip();
            ToolTipTitleItem tTitle    = new ToolTipTitleItem();
            ToolTipItem      tContents = new ToolTipItem();

            tTitle.Text          = title;
            tContents.Text       = contents;
            tContents.LeftIndent = 6;
            sTip.Items.Add(tTitle);
            sTip.Items.Add(tContents); CboFrom.SuperTip = sTip;
        }
Ejemplo n.º 8
0
        bool GenerateVoteToolTipCore(SuperToolTip superTip, string titleText, List <CandidateVote> votes, int totalCount, bool allowElecotralInfo = true)
        {
            ToolTipTitleItem title = new ToolTipTitleItem()
            {
                Text = titleText
            };

            superTip.Items.Add(title);
            superTip.Items.AddSeparator();

            if (votes.Count == 0)
            {
                superTip.Items.Add(new ToolTipItem()
                {
                    Text = "No information available yet"
                });
                return(true);
            }
            CandidateVote eWinner = null;

            foreach (var vote in votes.OrderBy(q => q.CandidateType))
            {
                ToolTipItem ti = new ToolTipItem();
                ti.Image = colorizer.GenerateImage(vote.CandidateType);
                ti.Text  = string.Format("{0} <b>{1:p}</b> ({2:n0})", GetNameByType(vote.CandidateType), Helpers.GetPercent(vote.VotesCount, totalCount), vote.VotesCount);
                superTip.Items.Add(ti);

                if (vote.ElectoralVotes > 0)
                {
                    if (eWinner != null)
                    {
                        eWinner = null;
                    }
                    else
                    {
                        eWinner = vote;
                    }
                }
            }

            if (eWinner != null && allowElecotralInfo)
            {
                superTip.Items.AddSeparator();
                ToolTipItem winner = new ToolTipItem();
                winner.Image = colorizer.GenerateImage(eWinner.CandidateType);
                winner.Text  = string.Format("<b>{0}</b> electoral votes going to <b>{1}</b>", eWinner.ElectoralVotes, GetNameByType(eWinner.CandidateType));
                superTip.Items.Add(winner);
            }
            return(true);
        }
Ejemplo n.º 9
0
        private void CheckAddress()
        {
            string title;
            string msg;
            List <AccessoryDecoderConnection> connections = null;
            SuperToolTip     sttInfo  = new SuperToolTip();
            ToolTipTitleItem sttTitle = new ToolTipTitleItem();
            ToolTipItem      sttItem  = new ToolTipItem();

            // Obtain all duplicated addresses
            connections.AddRange(AccessoryDecoderConnection.GetDuplicated());


            if (this.Address <= 0)
            {
                title = "INFORMATION";
                msg   = "Accessory addresses must start at address 1. A connection with address 0 mens that the connection is disabled.";

                sttTitle.Appearance.Image = Properties.Resources.ICO_INFORMATION_16;
            }
            else if (connections.Count > 0)
            {
                title = "WARNING";
                msg   = string.Format("The address {0} is used in other {1} accessory connection(s).", this.Address, connections.Count);

                sttTitle.Appearance.Image = Properties.Resources.ICO_ERROR_16;
            }
            else
            {
                title = "INFORMATION";
                msg   = string.Format("Accessory address is valid. Used only in the current connection.");

                sttTitle.Appearance.Image = Properties.Resources.ICO_INFORMATION_16;
            }

            sttTitle.Appearance.Options.UseImage = true;
            sttTitle.Text      = title;
            sttItem.LeftIndent = 6;
            sttItem.Text       = msg;
            sttInfo.Items.Add(sttTitle);
            sttInfo.Items.Add(sttItem);

            var sea = new ToolTipControllerShowEventArgs();

            sea.SuperTip    = sttInfo;
            sea.ToolTipType = ToolTipType.SuperTip;
            toolTipController.ShowHint(sea, Cursor.Position);
        }
        private void ThongTinChiTietTKB(Label lbl, ToolTipController toolTipController1, string tenMH, int tietBD, int soTiet, string tenGV, string phongHoc, string diaChi, int mode)
        {
            try
            {
                SuperToolTip superToolTip1 = new SuperToolTip();

                ToolTipTitleItem toolTipTitleItem1 = new ToolTipTitleItem();
                toolTipTitleItem1.Appearance.Image            = global::QuanLyDaoTao.Properties.Resources.non_32;
                toolTipTitleItem1.Appearance.Options.UseImage = true;
                toolTipTitleItem1.Image = global::QuanLyDaoTao.Properties.Resources.non_32;
                toolTipTitleItem1.Text  = "Thông tin chi tiết thời khóa biểu";

                ToolTipItem toolTipItem1 = new ToolTipItem();
                toolTipItem1.LeftIndent = 6;
                toolTipItem1.Text      += "Tên môn học: " + tenMH;
                toolTipItem1.Text      += "\nTiết bắt đầu: " + (tietBD + 1).ToString();
                toolTipItem1.Text      += "\nSố tiết: " + soTiet.ToString();
                toolTipItem1.Text      += "\nGiảng viên: " + tenGV;
                toolTipItem1.Text      += "\nPhòng học: " + phongHoc;
                toolTipItem1.Text      += "\nĐịa chỉ: " + diaChi;
                if (mode == 1)
                {
                    toolTipItem1.Text += "\nTrạng thái: Đã dạy";
                }
                else
                {
                    toolTipItem1.Text += "\nTrạng thái: Chưa/không dạy";
                }

                ToolTipTitleItem toolTipTitleItem2 = new ToolTipTitleItem();
                toolTipTitleItem2.LeftIndent = 6;
                toolTipTitleItem2.Text       = "Hệ thống quản lý đào tạo";
                superToolTip1.Items.Add(toolTipTitleItem1);
                superToolTip1.Items.Add(toolTipItem1);

                ToolTipSeparatorItem toolTipSeparatorItem1 = new ToolTipSeparatorItem();
                superToolTip1.Items.Add(toolTipSeparatorItem1);
                superToolTip1.Items.Add(toolTipTitleItem2);

                toolTipController1.SetSuperTip(lbl, superToolTip1);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 11
0
        private void makeAppList()
        {
            this.apps  = new Dictionary <string, string>();
            this.items = new List <TileBarItem>();
            String    execute    = String.Format("EXEC XSHEET.[dbo].[sp_CheckAPPList] N'{0}', N'{1}'", UserDomain, UserName);
            DataTable dt         = DBUtil.getDataTable("MAIN", execute, "", null, null);
            int       colorindex = 0;

            foreach (DataRow row in dt.Rows)
            {
                apps.Add(row[0].ToString().ToUpper(), row[3].ToString());
                TileBarItem item = new TileBarItem();
                item.AppearanceItem.Normal.BackColor            = ItemColorList.colorList[colorindex];
                item.AppearanceItem.Normal.Options.UseBackColor = true;
                item.DropDownOptions.BeakColor = System.Drawing.Color.Empty;
                TileItemElement tileitem = new TileItemElement();
                tileitem.Text = row[1].ToString();
                item.Elements.Add(tileitem);
                item.Id       = 6 + colorindex;
                item.ItemSize = DevExpress.XtraBars.Navigation.TileBarItemSize.Medium;
                ToolTipTitleItem tooltiptitle = new ToolTipTitleItem();
                tooltiptitle.Text = row[0].ToString();
                ToolTipItem tooltip = new ToolTipItem();
                tooltip.LeftIndent = 6 + colorindex;
                tooltip.Text       = row[1].ToString();
                SuperToolTip supertooltip = new SuperToolTip();
                supertooltip.Items.Add(tooltiptitle);
                supertooltip.Items.Add(tooltip);
                item.SuperTip = supertooltip;

                item.Tag = row[0].ToString();
                colorindex++;
                if (colorindex >= 4)
                {
                    colorindex = 0;
                }
                items.Add(item);
            }
        }
Ejemplo n.º 12
0
        private void ThongTinChiTietTKB(Label lbl, ToolTipController toolTipController1, string tenMH, int tietBD, int soTiet, string lop, string maGV, string tenGV, string maMH)
        {
            try
            {
                SuperToolTip superToolTip1 = new SuperToolTip();

                ToolTipTitleItem toolTipTitleItem1 = new ToolTipTitleItem();
                toolTipTitleItem1.Appearance.Image            = global::QuanLyDaoTao.Properties.Resources.non_32;
                toolTipTitleItem1.Appearance.Options.UseImage = true;
                toolTipTitleItem1.Image = global::QuanLyDaoTao.Properties.Resources.non_32;
                toolTipTitleItem1.Text  = "Thông tin chi tiết thời khóa biểu";

                ToolTipItem toolTipItem1 = new ToolTipItem();
                toolTipItem1.LeftIndent = 6;
                toolTipItem1.Text      += "Giảng viên: " + maGV + " - " + tenGV;
                toolTipItem1.Text      += "\nMôn học: " + maMH + " - " + tenMH;
                toolTipItem1.Text      += "\nTiết bắt đầu: " + (tietBD + 1).ToString();
                toolTipItem1.Text      += "\nSố tiết: " + soTiet.ToString();
                toolTipItem1.Text      += "\nLớp: " + lop;

                ToolTipTitleItem toolTipTitleItem2 = new ToolTipTitleItem();
                toolTipTitleItem2.LeftIndent = 6;
                toolTipTitleItem2.Text       = "Hệ thống quản lý đào tạo";
                superToolTip1.Items.Add(toolTipTitleItem1);
                superToolTip1.Items.Add(toolTipItem1);

                ToolTipSeparatorItem toolTipSeparatorItem1 = new ToolTipSeparatorItem();
                superToolTip1.Items.Add(toolTipSeparatorItem1);
                superToolTip1.Items.Add(toolTipTitleItem2);

                toolTipController1.SetSuperTip(lbl, superToolTip1);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        private SuperToolTip GetToolTipInfo(CalendarHitInfo chi)
        {
            SuperToolTip sTooltip1        = new SuperToolTip();
            AppointmentBaseCollection abc = schedulerStorage2.GetAppointments(chi.HitDate, chi.HitDate.AddDays(1));

            ToolTipTitleItem titleItem1 = new ToolTipTitleItem();
            //titleItem1.Text = "Date: " + date;
            // Create a tooltip item that represents the SuperTooltip's contents.
            ToolTipItem item1 = new ToolTipItem();

            item1.Image = Image.FromFile("untitled.bmp"); //SchedulerTooltip.Properties.Resources.untitled;

            // Add the tooltip items to the SuperTooltip.
            sTooltip1.Items.Add(titleItem1);
            sTooltip1.Items.Add(item1);

            foreach (Appointment apt in abc)
            {
                titleItem1.Text += apt.Subject + " ";
                item1.Text      += String.Format("({0}-{1})\n", apt.Start, apt.End);
            }

            return(sTooltip1);
        }
Ejemplo n.º 14
0
        /// <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;
        }
Ejemplo n.º 15
0
        /// <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;
        }
Ejemplo n.º 16
0
        private void InitializeComponent()
        {
            this.components = new Container();
            ComponentResourceManager manager = new ComponentResourceManager(typeof(XucBaseReportControls));
            SuperToolTip             tip     = new SuperToolTip();
            ToolTipItem      item            = new ToolTipItem();
            SuperToolTip     tip2            = new SuperToolTip();
            ToolTipTitleItem item2           = new ToolTipTitleItem();
            ToolTipItem      item3           = new ToolTipItem();

            this.imageCollection2 = new DevExpress.Utils.ImageCollection(this.components);
            this.plButton         = new PanelControl();
            this.plReportControl  = new PanelControl();
            this.printControl     = new PrintControl();
            this.printingSystem   = new PrintingSystem(this.components);
            this.plTop            = new PanelControl();
            this.bm   = new BarManager(this.components);
            this.bar1 = new Bar();
            this.barDockControlTop    = new BarDockControl();
            this.barDockControlBottom = new BarDockControl();
            this.barDockControlLeft   = new BarDockControl();
            this.barDockControlRight  = new BarDockControl();
            this.btnPreviewForm       = new BarButtonItem();
            this.bbiDesign            = new BarButtonItem();
            this.ac = new AlertControl(this.components);
            this.imageCollection2.BeginInit();
            this.plButton.BeginInit();
            this.plReportControl.BeginInit();
            this.plReportControl.SuspendLayout();
            ((ISupportInitialize)this.printingSystem).BeginInit();
            this.plTop.BeginInit();
            this.bm.BeginInit();
            base.SuspendLayout();
            this.imageCollection2.ImageStream = (ImageCollectionStreamer)manager.GetObject("imageCollection2.ImageStream");
            this.plButton.Dock     = DockStyle.Bottom;
            this.plButton.Location = new Point(0, 0x1fc);
            this.plButton.Name     = "plButton";
            this.plButton.Size     = new Size(0x39d, 0x1c);
            this.plButton.TabIndex = 80;
            this.plButton.Visible  = false;
            this.plReportControl.Controls.Add(this.printControl);
            this.plReportControl.Dock              = DockStyle.Fill;
            this.plReportControl.Location          = new Point(0, 60);
            this.plReportControl.Name              = "plReportControl";
            this.plReportControl.Size              = new Size(0x39d, 0x1c0);
            this.plReportControl.TabIndex          = 0x51;
            this.printControl.BackColor            = Color.Empty;
            this.printControl.Dock                 = DockStyle.Fill;
            this.printControl.ForeColor            = Color.Empty;
            this.printControl.IsMetric             = false;
            this.printControl.Location             = new Point(2, 2);
            this.printControl.Name                 = "printControl";
            this.printControl.PageBorderVisibility = PageBorderVisibility.AllWithoutSelection;
            this.printControl.PrintingSystem       = this.printingSystem;
            this.printControl.Size                 = new Size(0x399, 0x1bc);
            this.printControl.TabIndex             = 2;
            this.printControl.TabStop              = false;
            this.printControl.TooltipFont          = new Font("Tahoma", 8.25f);
            this.plTop.Dock            = DockStyle.Top;
            this.plTop.Location        = new Point(0, 0x18);
            this.plTop.Name            = "plTop";
            this.plTop.Size            = new Size(0x39d, 0x24);
            this.plTop.TabIndex        = 0x4f;
            this.plTop.Visible         = false;
            this.bm.AutoSaveInRegistry = true;
            this.bm.Bars.AddRange(new Bar[] { this.bar1 });
            this.bm.DockControls.Add(this.barDockControlTop);
            this.bm.DockControls.Add(this.barDockControlBottom);
            this.bm.DockControls.Add(this.barDockControlLeft);
            this.bm.DockControls.Add(this.barDockControlRight);
            this.bm.Form   = this;
            this.bm.Images = this.imageCollection2;
            this.bm.Items.AddRange(new BarItem[] { this.btnPreviewForm, this.bbiDesign });
            this.bm.LargeImages         = this.imageCollection2;
            this.bm.MaxItemId           = 2;
            this.bm.RegistryPath        = @"HKEY_CURRENT_USER\Software\Perfect Software\Perfect Stock Management";
            this.bar1.BarName           = "Custom 2";
            this.bar1.DockCol           = 0;
            this.bar1.DockRow           = 0;
            this.bar1.DockStyle         = BarDockStyle.Top;
            this.bar1.Text              = "Custom 2";
            this.bar1.Visible           = false;
            this.btnPreviewForm.Caption = "T\x00e1ch Ra";
            this.btnPreviewForm.Glyph   = (Image)manager.GetObject("btnPreviewForm.Glyph");
            this.btnPreviewForm.Id      = 0;
            this.btnPreviewForm.Name    = "btnPreviewForm";
            item.Text = "Chức năng n\x00e0y gi\x00fap bạn t\x00e1ch b\x00e1o c\x00e1o đang xem ra một cửa sổ kh\x00e1c.";
            tip.Items.Add(item);
            this.btnPreviewForm.SuperTip   = tip;
            this.btnPreviewForm.ItemClick += new ItemClickEventHandler(this.BtnPreviewFormItemClick);
            this.bbiDesign.Caption         = "Thiết Kế";
            this.bbiDesign.Id              = 1;
            this.bbiDesign.ImageIndex      = 5;
            this.bbiDesign.Name            = "bbiDesign";
            item2.Text       = "Thiết Kế";
            item3.LeftIndent = 6;
            item3.Text       = "Đ\x00e2y l\x00e0 chức năng gi\x00fap ch\x00fang ta tự thiết kế lại trang b\x00e1o c\x00e1o hiện tại, bạn c\x00f3 thể lưu lại v\x00e0 bạn c\x00f3 thể sử dụng b\x00e1o c\x00e1o cho c\x00f4ng việc sau n\x00e0y. ";
            tip2.Items.Add(item2);
            tip2.Items.Add(item3);
            this.bbiDesign.SuperTip                = tip2;
            this.bbiDesign.ItemClick              += new ItemClickEventHandler(this.BbiDesignItemClick);
            this.ac.AllowHtmlText                  = true;
            this.ac.AppearanceText.Font            = new Font("Tahoma", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.ac.AppearanceText.Options.UseFont = true;
            this.ac.AutoFormDelay                  = 0x1388;
            this.ac.FormLocation     = AlertFormLocation.TopLeft;
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode       = AutoScaleMode.Font;
            base.Controls.Add(this.plReportControl);
            base.Controls.Add(this.plButton);
            base.Controls.Add(this.plTop);
            base.Controls.Add(this.barDockControlLeft);
            base.Controls.Add(this.barDockControlRight);
            base.Controls.Add(this.barDockControlBottom);
            base.Controls.Add(this.barDockControlTop);
            base.Name = "XucBaseReportControls";
            base.Size = new Size(0x39d, 0x218);
            this.imageCollection2.EndInit();
            this.plButton.EndInit();
            this.plReportControl.EndInit();
            this.plReportControl.ResumeLayout(false);
            ((ISupportInitialize)this.printingSystem).EndInit();
            this.plTop.EndInit();
            this.bm.EndInit();
            base.ResumeLayout(false);
        }
Ejemplo n.º 17
0
        /// <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);
        }
Ejemplo n.º 18
0
        /// <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;
        }
Ejemplo n.º 19
0
        public void InitLightMapProjectToolBar()
        {
            barManager.Form = this;
            barManager.BeginUpdate();


            #region Create GeoSearch bar

            var geoSearchBar = new Bar(barManager, "GeoSearch");
            geoSearchBar.OptionsBar.AllowDelete             = false;
            geoSearchBar.OptionsBar.AllowQuickCustomization = false;
            geoSearchBar.OptionsBar.DisableClose            = true;
            geoSearchBar.OptionsBar.DisableCustomization    = true;
            geoSearchBar.DockStyle           = BarDockStyle.Top;
            geoSearchBar.CanDockStyle        = BarCanDockStyle.Top;
            geoSearchBar.OptionsBar.BarState = BarState.Expanded;
            geoSearchBar.Visible             = true;
            geoSearchBar.DockRow             = 0;
            geoSearchBar.DockCol             = 3;
            geoSearchBar.ApplyDockRowCol();

            //create MapSelectorTool
            var beGeoSearch = new RepositoryItemButtonEdit();
            //beGeoSearch.Buttons[0].ToolTip = "Search for administrative unit";
            beGeoSearch.Buttons[0].Kind    = ButtonPredefines.Glyph;
            beGeoSearch.Buttons[0].Caption = "Search";

            var toolTipTitle = new ToolTipTitleItem();
            toolTipTitle.Text = EidssMessages.GetForCurrentLang("gis_Geosearch_Tooltip", "Search for administrative unit");
            //"Search for administrative unit";
            var superToolTip = new SuperToolTip();
            superToolTip.Items.Add(toolTipTitle);

            var beiGeoSearch = new BarEditItem(barManager, beGeoSearch)
            {
                SmallWithoutTextWidth = 130,
                SmallWithTextWidth    = 130,
                Width    = 130,
                SuperTip = superToolTip
            };


            m_GeoSearch = new GeoSearch {
                MapControl = m_mapImage, ControlForVisualize = beiGeoSearch
            };

            geoSearchBar.AddItem(beiGeoSearch);
            beiGeoSearch.Visibility = BarItemVisibility.Always;

            beGeoSearch.ButtonClick += beGeoSearch_ButtonClick;


            #endregion

            //create map projects bar
            var mapsBar = new Bar(barManager, "MapProjects");
            mapsBar.OptionsBar.AllowDelete             = false;
            mapsBar.OptionsBar.AllowQuickCustomization = false;
            mapsBar.OptionsBar.DisableClose            = true;
            mapsBar.OptionsBar.DisableCustomization    = true;

            mapsBar.DockStyle           = BarDockStyle.Top;
            mapsBar.CanDockStyle        = BarCanDockStyle.Top;
            mapsBar.OptionsBar.BarState = BarState.Expanded;
            mapsBar.Visible             = true;
            mapsBar.DockRow             = 0;
            mapsBar.DockCol             = 0;
            mapsBar.ApplyDockRowCol();

            //create ExportImage Tool
            var mbb   = new MapBarButton();
            var mTool = new MtExportAsImage {
                MapImage = m_mapImage
            };
            mbb.MapTool = mTool;
            mapsBar.AddItem(mbb);

            //create Admin filter Tool
            mbb = new MapBarButton();
            var mTool1 = new MtAdminMask()
            {
                MapImage = m_mapImage
            };
            mbb.MapTool = mTool1;
            mapsBar.AddItem(mbb);

            //create MapSelectorTool
            var cmb = new RepositoryItemComboBox();
            var bei = new BarEditItem(barManager, cmb);
            bei.SmallWithoutTextWidth = 118;
            bei.SmallWithTextWidth    = 118;
            bei.Width = 118;

            if (m_MapSelector != null)
            {
                m_MapSelector.Dispose();
            }
            m_MapSelector = new MapSelector {
                MapControl = m_mapImage, ControlForVisualize = bei, Content = m_MapContent
            };
            m_MapSelector.MapChanging += m_MapSelector_MapChanging;

            mapsBar.AddItem(bei);

            barManager.EndUpdate();
        }
Ejemplo n.º 20
0
        //设置控件的Hint提示信息
        public static SuperToolTip SetSuperToolTip(object aControl, string hintInfo, string hintCaption = "", HintType hintType = HintType.htNone,
                                                   string footerInfo = "", Image titleImage = null, Image contentImage = null, Image footerImage = null)
        {
            var toolTipProp = aControl.GetType().GetProperty(nameof(BaseControl.SuperTip));

            if (toolTipProp == null)
            {
                return(null);
            }

            //if ((!(aControl is System.ComponentModel.Component)) && (!(aControl is DevExpress.XtraEditors.Controls.EditorButton)))
            //{
            //    return null;
            //}
            SuperToolTip superTip = new SuperToolTip();

            superTip.MaxWidth = 250;

            ToolTipTitleItem titleItem   = null;              //标题
            ToolTipItem      contentItem = new ToolTipItem(); //内容

            contentItem.AllowHtmlText = DefaultBoolean.True;
            ToolTipItem footerItem = null; //页脚

            Icon InfoIcon = null;

            switch (hintType)
            {
            case HintType.htInfo:
                InfoIcon = SystemIcons.Information;
                break;

            case HintType.htAsk:
                InfoIcon = SystemIcons.Question;
                break;

            case HintType.htWarn:
                InfoIcon = SystemIcons.Warning;
                break;

            case HintType.htErr:
                InfoIcon = SystemIcons.Error;
                break;

            default:
                break;
            }

            if (!string.IsNullOrEmpty(hintCaption))
            {
                titleItem      = new ToolTipTitleItem();
                titleItem.Text = hintCaption;
                if (titleImage != null)
                {
                    titleItem.Appearance.Options.UseImage = true;
                    titleItem.ImageToTextDistance         = 4;
                    titleItem.Appearance.Image            = titleImage;
                }
            }

            contentItem.Font = new Font(PubFontFamily, 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
            contentItem.Text = hintInfo;
            if (InfoIcon != null)
            {
                contentItem.Appearance.Options.UseImage = true;
                contentItem.ImageToTextDistance         = 4;
                if (titleItem != null)
                {
                    titleItem.Appearance.Image = GetSmailSizeIcon(InfoIcon, 16, 16).ToBitmap();
                }
            }
            if (contentImage != null)
            {
                contentItem.Appearance.Options.UseImage = true;
                contentItem.ImageToTextDistance         = 4;
                contentItem.Appearance.Image            = contentImage;
            }

            if (!string.IsNullOrEmpty(footerInfo))
            {
                footerItem = new ToolTipItem();
                footerItem.AllowHtmlText = DefaultBoolean.True;
                footerItem.Text          = footerInfo;
                footerItem.Appearance.Options.UseImage = true;
                footerItem.ImageToTextDistance         = 4;
                footerItem.Appearance.Image            = footerImage;
                footerItem.Font = new Font(PubFontFamily, 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
            }

            if (titleItem != null)
            {
                superTip.Items.Add(titleItem);
            }
            superTip.Items.Add(contentItem);
            if (footerItem != null)
            {
                superTip.Items.AddSeparator();
                superTip.Items.Add(footerItem);
            }
            if (aControl is BaseControl)
            {
                BaseControl ctrl = aControl as BaseControl;
                ctrl.ToolTipController = new DevExpress.Utils.ToolTipController();
                ctrl.ToolTipController.AutoPopDelay = 5000 + hintInfo.Length * 300;;
                ctrl.SuperTip = superTip;
            }
            else
            {
                toolTipProp.SetValue(aControl, superTip, null);
            }


            return(superTip);
        }
Ejemplo n.º 21
0
        private void toolTipController1_BeforeShow(object sender, DevExpress.Utils.ToolTipControllerShowEventArgs e)
        {
            try
            {
                if (toolTipController1.ActiveObject is AppointmentViewInfo)
                {
                    Appointment apt  = ((AppointmentViewInfo)toolTipController1.ActiveObject).Appointment;
                    Assignment  ass  = apt.GetSourceObject(schedulerStorage1) as Assignment;
                    IBooking    book = ass.Booking;

                    string op = "";
                    if (book.Operator != null)
                    {
                        op = book.Operator.Descrizione;
                    }

                    float acconto = 0;
                    float saldo   = 0;
                    float totale  = 0;

                    if (book.Confirmed)
                    {
                        acconto = book.Payment.Accont;
                        saldo   = book.Payment.RestOfPayment;
                        totale  = book.Payment.Total;
                    }


                    e.ToolTipType = ToolTipType.SuperTip;

                    SuperToolTip     stt        = new SuperToolTip();
                    ToolTipTitleItem ttiTitle   = new ToolTipTitleItem();
                    ToolTipItem      ttiBody    = new ToolTipItem();
                    ToolTipItem      ttiFooter  = new ToolTipItem();
                    ToolTipItem      ttiFooter1 = new ToolTipItem();

                    ttiTitle.Text = "Dati prenotazione";

                    ttiBody.AllowHtmlText = DefaultBoolean.True;
                    ttiBody.Text          = string.Format("<b>Data:</b> {0} \n<b>Oggetto:</b> {1} \n<b>Tipo prenotazione:</b> {2}\n<b>Operatore:</b> {3}\n<b>Note:</b> {4} \n",
                                                          book.Date.ToShortDateString(), book.Notes, book.BookingType.Descrizione, op, book.Notes1);
                    ttiBody.Image = SelectImage(ass);

                    ttiFooter.Text          = "Pagamento";
                    ttiFooter.AllowHtmlText = DefaultBoolean.True;
                    ttiFooter.Image         = Properties.Resources.wallet_16;


                    ttiFooter.Text = string.Format("<b>Acconto:</b> {0} \n<b>Saldo versato (da versare):</b> {1}({2})\n<b>Totale:</b> {3}",
                                                   acconto.ToString("c2"), saldo.ToString("c2"), (totale - acconto).ToString("c2"), totale.ToString("c2"));
                    //ttiFooter.Appearance.BackColor = Color.Red;
                    ttiFooter.Appearance.ForeColor = Color.FromArgb(0x66, 0x99, 0xFF);


                    ttiFooter1.Text          = "Assegnazione camera";
                    ttiFooter1.AllowHtmlText = DefaultBoolean.True;
                    ttiFooter1.Image         = Properties.Resources.label_16;


                    ttiFooter1.Text = string.Format("<b>Chek in:</b> {0} \n<b>Check out:</b> {1}\n<b>Letti:</b> {2}\n<b>Note:</b> {3}",
                                                    ass.StartDate.ToShortDateString(), ass.EndDate.ToShortDateString(), ass.BedType.Descrizione, ass.Notes);
                    //ttiFooter.Appearance.BackColor = Color.Red;
                    ttiFooter1.Appearance.ForeColor = Color.FromArgb(0x66, 0x99, 0x66);

                    stt.Items.Add(ttiTitle);
                    stt.Items.AddSeparator();
                    stt.Items.Add(ttiBody);
                    stt.Items.AddSeparator();
                    stt.Items.Add(ttiFooter);
                    stt.Items.AddSeparator();
                    stt.Items.Add(ttiFooter1);

                    e.SuperTip = stt;
                }
            }
            catch (Exception)
            {
            }
        }