Example #1
0
        /// <summary>
        /// Assigns the specified item.
        /// </summary>
        /// <param name="item">The item.</param>
        public override void Assign(RepositoryItem item)
        {
            RepositoryItemFADatePicker source = item as RepositoryItemFADatePicker;

            BeginUpdate();
            try
            {
                PopupContainerControl popupControl = PopupControl;
                base.Assign(item);
                PopupControl = popupControl;

                if (source == null)
                {
                    return;
                }

                LookAndFeel.Assign(source.LookAndFeel);
            }
            finally
            {
                EndUpdate();
            }
        }
Example #2
0
 protected override PopupContainerBarControl CreatePopupContainerBarControl(BarManager manager)
 {
     LookAndFeel.Assign(temp);
     return(base.CreatePopupContainerBarControl(manager));
 }
Example #3
0
        DialogResult ShowMessageBoxDialog()
        {
            if (Message.GetLookAndFeel() != null)
            {
                LookAndFeel.Assign(Message.GetLookAndFeel());
            }
            if (!AllowCustomLookAndFeel)
            {
                if (LookAndFeel.ActiveStyle != ActiveLookAndFeelStyle.Skin)
                {
                    ActiveLookAndFeelStyle active = UserLookAndFeel.Default.ActiveStyle;
                    if (active == ActiveLookAndFeelStyle.Office2003)
                    {
                        LookAndFeel.SetStyle(LookAndFeelStyle.Office2003, true, false, "");
                    }
                    else
                    {
                        LookAndFeel.SetDefaultStyle();
                    }
                }
            }
            this.Text       = Message.Caption;
            FormBorderStyle = FormBorderStyle.FixedSingle;
            MinimizeBox     = false;
            MaximizeBox     = false;
            IWin32Window owner = Message.Owner;

            if (owner == null)
            {
                Form activeForm = Form.ActiveForm;
                if (activeForm != null && !activeForm.InvokeRequired)
                {
                    owner = activeForm;
                }
            }
            if (owner != null)
            {
                Control ownerControl = owner as Control;
                if (ownerControl != null)
                {
                    if (!ownerControl.Visible)
                    {
                        owner = null;
                    }
                    else
                    {
                        Form ownerForm = ownerControl.FindForm();
                        if (ownerForm != null)
                        {
                            if ((!ownerForm.Visible) ||
                                ownerForm.WindowState == FormWindowState.Minimized ||
                                ownerForm.Right <= 0 ||
                                ownerForm.Bottom <= 0)
                            {
                                owner = null;
                            }
                        }
                    }
                }
            }
            if (owner == null)
            {
                ShowInTaskbar = true;
                StartPosition = FormStartPosition.CenterScreen;
            }
            else
            {
                ShowInTaskbar = false;
                StartPosition = FormStartPosition.CenterParent;
            }
            CreateButtons();
            CalcIconBounds();
            CalcMessageBounds();
            CalcFinalSizes();
            Form frm = owner as Form;

            if (frm != null && frm.TopMost)
            {
                this.TopMost = true;
            }
            return(DoShowDialog(owner));

            return(this.ShowDialog(owner));
        }
        private void ShowMessageBoxDialog(string caption, string exceptionMessage)
        {
            this.Text        = caption;
            this.messageText = exceptionMessage;
            if (GetLookAndFeel() != null)
            {
                LookAndFeel.Assign(GetLookAndFeel());
            }
            FormBorderStyle = FormBorderStyle.FixedDialog;
            MinimizeBox     = false;
            MaximizeBox     = false;
            IWin32Window owner = Owner;

            if (owner == null)
            {
                Form activeForm = Form.ActiveForm;
                if (activeForm != null && !activeForm.InvokeRequired)
                {
                    owner = activeForm;
                }
            }
            if (owner != null)
            {
                Control ownerControl = owner as Control;
                if (ownerControl != null)
                {
                    if (!ownerControl.Visible)
                    {
                        owner = null;
                    }
                    else
                    {
                        Form ownerForm = ownerControl.FindForm();
                        if (ownerForm != null)
                        {
                            if ((!ownerForm.Visible) ||
                                ownerForm.WindowState == FormWindowState.Minimized ||
                                ownerForm.Right <= 0 ||
                                ownerForm.Bottom <= 0)
                            {
                                owner = null;
                            }
                        }
                    }
                }
            }
            if (owner == null)
            {
                ShowInTaskbar = true;
                StartPosition = FormStartPosition.CenterScreen;
            }
            else
            {
                ShowInTaskbar = false;
                StartPosition = FormStartPosition.CenterParent;
            }
            CreateButtons();
            CalcIconBounds();
            CalcMessageBounds();
            CreateMemo();
            CalcFinalSizes();
            Form frm = owner as Form;

            if (frm != null && frm.TopMost)
            {
                this.TopMost = true;
            }
            ShowDialog(owner);
        }