Ejemplo n.º 1
0
        internal void InitDefaultPopup()
        {
            m_SkinPopup = new NPopupNotify();
            m_SkinPopup.OptionsButton   = true;
            m_SkinPopup.PredefinedStyle = PredefinedPopupStyle.Skinned;
            m_SkinPopup.Font            = new Font("Tahoma", 8.0f);

            m_SkinPopup.Caption.Content.Text = "Skinnable Popup";

            NImageAndTextItem content = m_SkinPopup.Content;

            content.Image     = imageList1.Images[1];
            content.ImageSize = new Nevron.GraphicsCore.NSize(28, 28);

            content.TextMargins = new NPadding(0, 4, 0, 0);
            content.Text        = "<b>Peter Brown</b><br>Re: Thank you for purchasing Nevron UI</br><br><font color='navy'>See comments below</font></br>";
            content.Click      += new EventHandler(OnContentClick);

            Nevron.UI.WinForm.Controls.NCommand comm;
            NCommandCollection coll = m_SkinPopup.OptionsCommands;

            for (int i = 1; i < 6; i++)
            {
                comm = new Nevron.UI.WinForm.Controls.NCommand();
                comm.Properties.Text = "Options command " + i.ToString();
                coll.Add(comm);
            }
        }
Ejemplo n.º 2
0
        internal void ShowPopup(NPopupNotify popup)
        {
            PopupAnimation animation = PopupAnimation.None;

            if (m_FadeCheck.Checked)
            {
                animation |= PopupAnimation.Fade;
            }
            if (m_SlideCheck.Checked)
            {
                animation |= PopupAnimation.Slide;
            }

            popup.AutoHide               = m_AutoHideCheck.Checked;
            popup.VisibleSpan            = (int)m_VisibleSpanNumeric.Value;
            popup.Opacity                = (int)m_OpacityNumeric.Value;
            popup.Animation              = animation;
            popup.AnimationDirection     = (PopupAnimationDirection)animationDirectionCombo.SelectedItem;
            popup.VisibleOnMouseOver     = m_StayVisibleCheck.Checked;
            popup.FullOpacityOnMouseOver = m_FullOpacityCheck.Checked;
            popup.AnimationInterval      = (int)m_IntervalNumeric.Value;
            popup.AnimationSteps         = (int)m_StepsNumeric.Value;

            popup.Palette.Copy(NUIManager.Palette);
            popup.Show();
        }
Ejemplo n.º 3
0
        internal void InitShapedPopups()
        {
            m_ShapedPopup1 = new NPopupNotify();
            m_ShapedPopup2 = new NPopupNotify();
            m_ShapedPopup3 = new NPopupNotify();

            m_ShapedPopup1.PredefinedStyle = PredefinedPopupStyle.Shaped;
            m_ShapedPopup2.PredefinedStyle = PredefinedPopupStyle.Shaped;
            m_ShapedPopup3.PredefinedStyle = PredefinedPopupStyle.Shaped;

            Type   type = typeof(NPopupNotifyUC);
            string path = "Nevron.Examples.UI.WinForm.PopupNotify";

            m_ShapedPopup1.ShapeTransparentColor = Color.Magenta;
            m_ShapedPopup2.ShapeTransparentColor = Color.Magenta;
            m_ShapedPopup3.ShapeTransparentColor = Color.Magenta;

            m_ShapedPopup1.Shape = NResourceHelper.BitmapFromResource(type, "notification3.bmp", path);
            m_ShapedPopup1.Caption.ButtonSize     = new NSize(20, 20);
            m_ShapedPopup1.Caption.ButtonsMargins = new NPadding(0, 4, 0, 6);
            m_ShapedPopup1.MoveableBounds         = new Rectangle(100, 69, 226, 10);
            m_ShapedPopup1.CaptionBounds          = new Rectangle(80, 69, 246, 30);
            m_ShapedPopup1.ContentBounds          = new Rectangle(100, 79, 206, 46);

            m_ShapedPopup2.Shape                  = NResourceHelper.BitmapFromResource(type, "notification1.bmp", path);
            m_ShapedPopup2.Content.Padding        = new NPadding(6, 0, 0, 0);
            m_ShapedPopup2.Caption.ButtonsMargins = new NPadding(0, 6, 0, 23);
            m_ShapedPopup2.Content.Text           = "<font color='#606060' face='Tahoma'><b>Meet John!</b></font>";

            m_ShapedPopup3.Shape = NResourceHelper.BitmapFromResource(type, "notification2.bmp", path);
            m_ShapedPopup3.Caption.ButtonsMargins = new NPadding(0, 3, 0, 4);
            m_ShapedPopup3.Content.Text           = "<font face='Trebuchet MS' color='brown' size='10'><b>Welcome to<br/>Nevron UI for .NET</b></font>";

            NImageAndTextItem item = m_ShapedPopup1.Content;

            item.Text = "<u><font face='Verdana' color='Red'><i>You have 1 <font color='Navy'>new</font> message(s)!</i></font></u>";

            ImageList       list     = NResourceHelper.ImageListFromBitmap(type, new Size(20, 20), Color.Magenta, "close.bmp", path);
            NUIItemImageSet imageSet = m_ShapedPopup1.CloseButtonImageSet;

            imageSet.NormalImage  = list.Images[0];
            imageSet.HotImage     = list.Images[1];
            imageSet.PressedImage = list.Images[2];
        }
Ejemplo n.º 4
0
        internal void InitMessengerPopup()
        {
            m_MessengerPopup = new NPopupNotify();
            m_MessengerPopup.PredefinedStyle = PredefinedPopupStyle.Messenger;
            m_MessengerPopup.Font            = new Font("Tahoma", 8.0f);

            m_MessengerPopup.Caption.Content.Image = imageList2.Images[0];
            m_MessengerPopup.Caption.Content.Text  = "<b><font color='Navy'>Messenger Style Popup</font></b><br/>";
            m_MessengerPopup.Content.ContentAlign  = ContentAlignment.TopLeft;
            m_MessengerPopup.Content.Image         = imageList1.Images[1];
            m_MessengerPopup.Content.ImageSize     = new Nevron.GraphicsCore.NSize(28, 28);
            m_MessengerPopup.Content.Padding       = new NPadding(4);
            m_MessengerPopup.Content.Text          = "<b><u>Notification Content</u></b><br/>You have <u>complete</u> control over text <i>visualization!</i>";
            m_MessengerPopup.Content.Click        += new EventHandler(OnContentClick);

            m_MessengerPopup.Content.TreatAsOneEntity = false;
            m_MessengerPopup.Content.ImageAlign       = ContentAlignment.TopLeft;
            m_MessengerPopup.Content.TextAlign        = ContentAlignment.TopLeft;
            //m_MessengerPopup.Content.TextMargins = new NPadding(5, 5, 0, 0);
        }