/// <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;
        }
        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;
                    }
                }
            }
        }
Exemple #3
0
        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;
        }
Exemple #4
0
        /// <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 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;
            }
        }
Exemple #6
0
        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 Boolean Check(Boolean Show)
        {
            Boolean Check = true;

            if (!Edit_AC.Checked && !String.IsNullOrEmpty(Edit_DeviceNumber.Text))
            {
                if (DeviceNumberId.IsEmpty())
                {
                    Edit_DeviceNumber.ErrorText          = DeviceNumberTooltTip;
                    Edit_DeviceNumber.ErrorIconAlignment = ErrorIconAlignment.MiddleRight;
                    Check = false;
                }
                if (!Check || Show)
                {
                    ToolTip t = new ToolTip();
                    t.ToolTipTitle = DeviceNumber;
                    t.ToolTipIcon  = DeviceNumberId.IsEmpty() ? ToolTipIcon.Error : ToolTipIcon.Info;
                    t.Show(DeviceNumberTooltTip, Edit_DeviceNumber, 3000);
                }
            }
            else
            {
                DeviceNumber                = "";
                DeviceNumberId              = Guid.Empty;
                DeviceNumberTooltTip        = "";
                Edit_DeviceNumber.ErrorText = "";
                WarrantyEndDate             = null;
            }
            for (Int32 i = 0; i < DataList.Count; i++)
            {
                DataList[i].Validate();
            }

            View_Sensors.RefreshData();
            if (DataList.Any(sensor => !sensor.Valid))
            {
                Int32 i = DataList.IndexOf(DataList.First(sensor => !sensor.Valid));
                ToolTipControllerShowEventArgs Args = Controller_ToolTip.CreateShowArgs();
                Args.SelectedControl = Control_Sensors;
                Args.ToolTipType     = ToolTipType.SuperTip;
                Args.SuperTip        = new SuperToolTip();
                SuperToolTipSetupArgs toolTipArgs = new SuperToolTipSetupArgs();
                toolTipArgs.Title.Text    = DataList[i].Sensor ?? "<Пусто>";
                toolTipArgs.Contents.Text = DataList[i].ToolTip;
                Args.SuperTip.Setup(toolTipArgs);
                Args.IconType = DataList[i].Valid ? ToolTipIconType.Information : ToolTipIconType.Error;
                GridRowInfo RowInfo = (View_Sensors.GetViewInfo() as GridViewInfo).GetGridRowInfo(i);
                if (RowInfo.IsNull())
                {
                    Controller_ToolTip.ShowHint(Args, Control_Sensors);
                }
                else
                {
                    Controller_ToolTip.ShowHint(Args, Control_Sensors.GetLocation() + (Size)RowInfo.TotalBounds.Location + RowInfo.TotalBounds.Size);
                }
                return(false);
            }
            return(Check);
        }
Exemple #8
0
        private void LoginInfoUpdate()
        {
            //********************
            //* Declara variáveis
            //********************
            SuperToolTip          oUserLogin = new SuperToolTip();
            SuperToolTipSetupArgs oArgs      = new SuperToolTipSetupArgs();
            string LoginData = string.Empty;

            //***********
            //* Logotipo
            //***********
            oArgs.Title.Image      = UserLogin.LoginInfo.Posto_Logotipo;
            oArgs.Title.ImageAlign = ToolTipImageAlignment.Default;

            //*****************
            //* Dados do posto
            //*****************
            if (UserLogin.LoginInfo.Posto_Nome.Trim() != string.Empty)
            {
                LoginData += "<b>Posto:</b> " + UserLogin.LoginInfo.Posto_Nome;
            }
            if (UserLogin.LoginInfo.Posto_Nome.Trim() != string.Empty && UserLogin.LoginInfo.Posto_Descricao.Trim() != string.Empty)
            {
                LoginData += " (" + UserLogin.LoginInfo.Posto_Descricao + ")\r\n";
            }
            else
            if (LoginData != string.Empty)
            {
                LoginData += "\r\n";
            }

            //*******************
            //* Dados do usuário
            //*******************
            if (UserLogin.LoginInfo.Usuario_Nome.Trim() != string.Empty)
            {
                LoginData += "<b>Usuário:</b> " + UserLogin.LoginInfo.Usuario_Nome;
            }
            if (UserLogin.LoginInfo.Usuario_Nome.Trim() != string.Empty && UserLogin.LoginInfo.Usuario_DescGrupo.Trim() != string.Empty)
            {
                LoginData += " (" + UserLogin.LoginInfo.Usuario_DescGrupo + ")\r\n";
            }
            else
            if (LoginData != string.Empty)
            {
                LoginData += "<b>Usuário:</b> " + UserLogin.LoginInfo.Usuario_ID + "\r\n";
            }

            oArgs.Contents.Text = LoginData;
            oUserLogin.Setup(oArgs);
            oUserLogin.AllowHtmlText = DefaultBoolean.True;
            bbiUser.SuperTip         = oUserLogin;
        }
Exemple #9
0
        public void SuperTipExcel(String titulo, String contenido, String piePagina)
        {
            SuperToolTip          sTooltip = new SuperToolTip();
            SuperToolTipSetupArgs args     = new SuperToolTipSetupArgs();

            args.Title.Text    = titulo;
            args.Contents.Text = contenido;
            args.Footer.Text   = piePagina;

            sTooltip.Setup(args);
            BtnExcel.SuperTip = sTooltip;
        }
Exemple #10
0
        public SuperToolTip CreateToolTip(string content, string title = null, Image image = null)
        {
            // Create an object to initialize the SuperToolTip.
            var superToolTip = CreateToolTip();
            var setupArgs    = new SuperToolTipSetupArgs();

            if (!string.IsNullOrEmpty(title))
            {
                setupArgs.Title.Text = title;
            }

            setupArgs.Contents.Text  = convertHtml(content);
            setupArgs.Contents.Image = image;
            superToolTip.Setup(setupArgs);
            return(superToolTip);
        }
Exemple #11
0
        public SuperToolTip CreateToolTip(string content, string title = null, ApplicationIcon image = null, IWithIcon withIcon = null)
        {
            var imageToUse = image ?? ApplicationIcons.IconFor(withIcon);
            // Create an object to initialize the SuperToolTip.
            var superToolTip = CreateToolTip();
            var setupArgs    = new SuperToolTipSetupArgs();

            if (!string.IsNullOrEmpty(title))
            {
                setupArgs.Title.Text = title;
            }

            setupArgs.Contents.Text = convertHtml(content);
            setupArgs.Contents.ImageOptions.SvgImage     = imageToUse;
            setupArgs.Contents.ImageOptions.SvgImageSize = IconSizes.Size16x16;

            superToolTip.Setup(setupArgs);
            return(superToolTip);
        }
Exemple #12
0
        /// <summary>
        /// init tooltip
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void toolTipController_BeforeShow(object sender, ToolTipControllerShowEventArgs e)
        {
            ToolTipController   controller  = sender as ToolTipController;
            AppointmentViewInfo aptViewInfo = controller.ActiveObject as AppointmentViewInfo;

            if (aptViewInfo == null)
            {
                return;
            }
            toolTipController.ToolTipType = ToolTipType.SuperTip;

            if (toolTipController.ToolTipType == ToolTipType.SuperTip)
            {
                SuperToolTip          SuperTip = new SuperToolTip();
                SuperToolTipSetupArgs args     = new SuperToolTipSetupArgs();
                args.Contents.Text       = aptViewInfo.Description;
                args.ShowFooterSeparator = true;
                args.Footer.Text         = aptViewInfo.Appointment.Start.ToShortTimeString() + " ~ " + aptViewInfo.Appointment.End.ToShortTimeString();//"SuperTip";
                SuperTip.Setup(args);
                e.SuperTip = SuperTip;
            }
        }
 private void Controller_ToolTip_GetActiveObjectInfo(Object sender, ToolTipControllerGetActiveObjectInfoEventArgs e)
 {
     if (e.SelectedControl == Control_Sensors)
     {
         GridHitInfo hitInfo = View_Sensors.CalcHitInfo(e.ControlMousePosition);
         if (hitInfo.RowHandle >= 0 && DataList.Count > 0)
         {
             SuperToolTipSetupArgs toolTipArgs = new SuperToolTipSetupArgs();
             toolTipArgs.Title.Text    = DataList[hitInfo.RowHandle].Sensor;
             toolTipArgs.Contents.Text = DataList[hitInfo.RowHandle].ToolTip;
             if (!String.IsNullOrEmpty(toolTipArgs.Contents.Text))
             {
                 e.Info             = new ToolTipControlInfo();
                 e.Info.Object      = hitInfo.HitTest.ToString() + hitInfo.RowHandle.ToString();
                 e.Info.ToolTipType = ToolTipType.SuperTip;
                 e.Info.SuperTip    = new SuperToolTip();
                 e.Info.SuperTip.Setup(toolTipArgs);
                 e.Info.IconType = DataList[hitInfo.RowHandle].Valid ? ToolTipIconType.Information : ToolTipIconType.Error;
             }
         }
     }
     else if (e.SelectedControl == Edit_DeviceNumber)
     {
         SuperToolTipSetupArgs toolTipArgs = new SuperToolTipSetupArgs();
         toolTipArgs.Title.Text    = DeviceNumber;
         toolTipArgs.Contents.Text = DeviceNumberTooltTip;
         if (!String.IsNullOrEmpty(toolTipArgs.Contents.Text))
         {
             e.Info             = new ToolTipControlInfo();
             e.Info.Object      = Edit_DeviceNumber.ToString();
             e.Info.ToolTipType = ToolTipType.SuperTip;
             e.Info.SuperTip    = new SuperToolTip();
             e.Info.SuperTip.Setup(toolTipArgs);
             e.Info.IconType = DeviceNumberId.IsEmpty() ? ToolTipIconType.Error : ToolTipIconType.Information;
         }
     }
 }
        private void OnListViewItemHover(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);
        }
Exemple #15
0
        /// <summary>
        /// Genera un BarLargeButtonItem
        /// </summary>
        /// <returns>BarLargeButtonItem</returns>
        /// <author>moviedo</author>
        BarLargeButtonItem CreateButtonBase(ButtonBase pButton)
        {
            BarLargeButtonItem    wBarButtonItem    = new BarLargeButtonItem();
            SuperToolTipSetupArgs wToolTipSetupArgs = null;

            if (pButton.Image != null)
            {
                wBarButtonItem.Glyph = Fwk.HelperFunctions.TypeFunctions.ConvertByteArrayToImage(pButton.Image);
            }

            wBarButtonItem.Caption          = pButton.Caption;
            wBarButtonItem.CaptionAlignment = BarItemCaptionAlignment.Bottom;
            wBarButtonItem.Tag  = pButton;
            wBarButtonItem.Hint = pButton.Hint;

            wBarButtonItem.PaintStyle       = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph;
            wBarButtonItem.ItemClick       += new ItemClickEventHandler(barButtonItem_ItemClick);
            wBarButtonItem.SuperTip         = new SuperToolTip();
            wToolTipSetupArgs               = new SuperToolTipSetupArgs();
            wToolTipSetupArgs.Contents.Text = pButton.ToolTipText;
            wBarButtonItem.SuperTip.Setup(wToolTipSetupArgs);

            return(wBarButtonItem);
        }
        /// <summary>
        /// Genera un BarLargeButtonItem
        /// </summary>
        /// <returns>BarLargeButtonItem</returns>
        /// <author>moviedo</author>
        BarLargeButtonItem CreateButtonBase(ButtonBase pButton)
        {
            BarLargeButtonItem wBarButtonItem = new BarLargeButtonItem();
            SuperToolTipSetupArgs wToolTipSetupArgs = null;

            if (pButton.Image != null)
                wBarButtonItem.Glyph = Fwk.HelperFunctions.TypeFunctions.ConvertByteArrayToImage(pButton.Image);

            wBarButtonItem.Caption = pButton.Caption;
            wBarButtonItem.CaptionAlignment = BarItemCaptionAlignment.Bottom;
            wBarButtonItem.Tag = pButton;
            wBarButtonItem.Hint = pButton.Hint;

            wBarButtonItem.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph;
            wBarButtonItem.ItemClick += new ItemClickEventHandler(barButtonItem_ItemClick);
            wBarButtonItem.SuperTip = new SuperToolTip();
            wToolTipSetupArgs = new SuperToolTipSetupArgs();
            wToolTipSetupArgs.Contents.Text = pButton.ToolTipText;
            wBarButtonItem.SuperTip.Setup(wToolTipSetupArgs);

            return wBarButtonItem;
        }
 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;
 }
        protected override void OnViewControlsCreated()
        {
            base.OnViewControlsCreated();

            ListView   listView   = View as ListView;
            DetailView detailView = View as DetailView;

            if (listView != null)
            {
                IObjectSpace os = Application.CreateObjectSpace();
                listView.CollectionSource.CriteriaApplied += (o, e) =>
                {
                    // Предварительная загрузка расписаний докторов
                    var collectionSB = (CollectionSourceBase)o;
                    if (collectionSB.Criteria != null)
                    {
                        var events = new List <DoctorEvent>(os.GetObjects <DoctorEvent>(collectionSB.Criteria[FILTERKEY]));
                        eventsDict = events.ToDictionary(de => de.Oid, de => de);
                    }
                };

                SchedulerListEditor listEditor = ((ListView)View).Editor as SchedulerListEditor;
                if (listEditor != null)
                {
                    SchedulerControl scheduler = listEditor.SchedulerControl;
                    if (scheduler != null)
                    {
                        // Кастомизация надписи в расписании доктора
                        scheduler.InitAppointmentDisplayText += (o, e) =>
                        {
                            Guid guid = (Guid)e.Appointment.Id;
                            if (eventsDict.ContainsKey(guid))
                            {
                                var doctorEvent = eventsDict[guid];
                                e.Text = doctorEvent != null && doctorEvent.Pacient != null ? doctorEvent.Pacient.FullName : string.Empty;
                            }
                        };

                        #region Кастомизация Тултипа расписания доктора

                        // https://documentation.devexpress.com/WindowsForms/118551/Controls-and-Libraries/Scheduler/Visual-Elements/Scheduler-Control/Appointment-Flyout
                        scheduler.OptionsView.ToolTipVisibility = ToolTipVisibility.Always;
                        scheduler.OptionsCustomization.AllowDisplayAppointmentFlyout = false;
                        scheduler.ToolTipController             = new ToolTipController();
                        scheduler.ToolTipController.ToolTipType = ToolTipType.SuperTip;
                        scheduler.ToolTipController.BeforeShow += (o, e) =>
                        {
                            var toolTipController           = (ToolTipController)o;
                            AppointmentViewInfo aptViewInfo = null;
                            try
                            {
                                aptViewInfo = (AppointmentViewInfo)toolTipController.ActiveObject;
                            }
                            catch
                            {
                                return;
                            }

                            if (aptViewInfo == null)
                            {
                                return;
                            }

                            Guid guid = (Guid)aptViewInfo.Appointment.Id;
                            if (!eventsDict.ContainsKey(guid))
                            {
                                // В словаре нет ключа т.к. расписание было только что создано
                                var events = new List <DoctorEvent>(ObjectSpace.GetObjects <DoctorEvent>(listView.CollectionSource.Criteria[FILTERKEY]));
                                eventsDict = events.ToDictionary(de => de.Oid, de => de);
                            }
                            DoctorEvent doctorEvent = eventsDict[guid];
                            // Вид талона (метка)
                            AppointmentLabel label = scheduler.Storage.Appointments.Labels.GetById(doctorEvent.Label);
                            StringBuilder    sb    = new StringBuilder();
                            sb.AppendLine(string.Format("Время: с {0:HH:mm} по {1:HH:mm}", doctorEvent.StartOn, doctorEvent.EndOn));
                            sb.AppendLine(string.Format("Пациент: {0}", doctorEvent.Pacient != null ? doctorEvent.Pacient.FullName : null));
                            sb.AppendLine(string.Format("Кем создано: {0}", doctorEvent.CreatedBy != null ? doctorEvent.CreatedBy.FullName : null));
                            sb.AppendLine(string.Format("Кто записал: {0}", doctorEvent.EditedBy != null ? doctorEvent.EditedBy.FullName : null));
                            sb.AppendLine(string.Format("Вид талона: {0}", label.DisplayName));
                            if (doctorEvent.Pacient != null)
                            {
                                sb.AppendLine(string.Format("Источник записи: {0}", CaptionHelper.GetDisplayText(doctorEvent.SourceType)));
                            }

                            SuperToolTip          SuperTip = new SuperToolTip();
                            SuperToolTipSetupArgs args     = new SuperToolTipSetupArgs();
                            args.Contents.Text = sb.ToString();
                            args.Contents.Font = new Font("Times New Roman", 11);
                            SuperTip.Setup(args);
                            e.SuperTip = SuperTip;
                        };

                        #endregion

                        // Кастомизация коллекции меток
                        var storage = scheduler.Storage;
                        IAppointmentLabelStorage labelStorage = storage.Appointments.Labels;
                        FillLabelStorage(labelStorage);

                        #region Кастомизация всплывающего меню на расписании врача
                        DoctorEvent recordedEvent = null;
                        VisitCase   visitCase     = null;

                        // Всплывающее меню на расписании врача
                        scheduler.PopupMenuShowing += (o, e) =>
                        {
                            Pacient pacient = listView.Tag as Pacient;
                            AppointmentBaseCollection appoinments = (o as SchedulerControl).SelectedAppointments;
                            Appointment appoinment = appoinments.Count == 1 ? appoinments[0] : null;
                            if (appoinment == null)
                            {
                                return;
                            }

                            Guid        key    = (Guid)appoinment.Id;
                            DoctorEvent dEvent = appoinment != null && eventsDict.ContainsKey(key) ? eventsDict[key] : null;

                            if (e.Menu.Id != DevExpress.XtraScheduler.SchedulerMenuItemId.AppointmentMenu)
                            {
                                return;
                            }
                            if (pacient != null && dEvent.Pacient == null & recordedEvent == null && dEvent.StartOn > DateTime.Now)
                            {
                                e.Menu.Items.Insert(0, new SchedulerMenuItem("Записать пациента", (o_, e_) =>
                                {
                                    IObjectSpace dEventObjectSpace = XPObjectSpace.FindObjectSpaceByObject(dEvent);
                                    dEvent.Pacient = dEventObjectSpace.GetObject(pacient);
                                    dEventObjectSpace.CommitChanges();
                                    // Обновление списочного представления
                                    listView.CollectionSource.Reload();
                                    // Расписание на которое записан пациент
                                    recordedEvent = dEvent;
                                    // Создание посещения для пациента
                                    visitCase = VisitCase.CreateVisitCase(dEventObjectSpace,
                                                                          dEventObjectSpace.GetObject(pacient),
                                                                          dEvent.AssignedTo, dEvent.StartOn);
                                    dEventObjectSpace.CommitChanges();
                                }));
                            }
                            else if (dEvent != null && dEvent.Pacient != null)
                            {
                                e.Menu.Items.Insert(0, new SchedulerMenuItem("Отменить запись", (o_, e_) =>
                                {
                                    IObjectSpace dEventObjectSpace = XPObjectSpace.FindObjectSpaceByObject(dEvent);
                                    dEvent.Pacient = null;
                                    dEventObjectSpace.CommitChanges();
                                    // Обновление списочного представления
                                    listView.CollectionSource.Reload();
                                    // Отмена записи пациента на выбранное расписание
                                    if (recordedEvent != null && recordedEvent.Oid == dEvent.Oid)
                                    {
                                        recordedEvent = null;
                                    }
                                    if (visitCase != null)
                                    {
                                        dEventObjectSpace.Delete(visitCase);
                                        dEventObjectSpace.CommitChanges();
                                    }
                                }));
                            }
                        };

                        #endregion

                        // Кастомизация цвета фона расписания:
                        // Если выбранный пациент уже записан, то цвет расписания окрашивается в светло-розовый.
                        // Если в расписании записан другой пациент, то цвет расписания окрашивается в морковный.
                        scheduler.AppointmentViewInfoCustomizing += (o_, e_) =>
                        {
                            Pacient pacient = listView.Tag as Pacient;
                            if (pacient != null)
                            {
                                Guid guid = (Guid)e_.ViewInfo.Appointment.Id;
                                if (eventsDict.ContainsKey(guid) && eventsDict[guid].Pacient != null)
                                {
                                    e_.ViewInfo.Appearance.BackColor = eventsDict[guid].Pacient.Oid == pacient.Oid ?
                                                                       Color.FromArgb(255, 192, 192) : Color.FromArgb(255, 128, 0);
                                }
                            }
                        };
                    }
                }
            }
            else if (detailView != null)
            {
                // Кастомизация коллекции меток
                foreach (SchedulerLabelPropertyEditor pe in ((DetailView)View).GetItems <SchedulerLabelPropertyEditor>())
                {
                    if (pe.Control != null)
                    {
                        ISchedulerStorage        storage      = ((AppointmentLabelEdit)pe.Control).Storage;
                        IAppointmentLabelStorage labelStorage = storage.Appointments.Labels;
                        FillLabelStorage(labelStorage);
                    }
                }
            }
        }
		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);
		}