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); } }
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]; }