public NRangeSlidersUC(MainForm f) : base(f) { m_Image = NResourceHelper.BitmapFromResource(this.GetType(), "UISplash.png", "Nevron.Examples.UI.WinForm.Resources"); InitializeComponent(); Dock = DockStyle.Fill; }
private void BackgroundFillStyleComboBox_SelectedIndexChanged_1(object sender, System.EventArgs e) { switch (BackgroundFillStyleComboBox.SelectedIndex) { case 0: // Solid color nChartControl1.BackgroundStyle.FillStyle = new NColorFillStyle(Color.BlanchedAlmond); break; case 1: // Gradient nChartControl1.BackgroundStyle.FillStyle = new NGradientFillStyle(GradientStyle.Horizontal, GradientVariant.Variant2, Color.AliceBlue, Color.BlanchedAlmond); break; case 2: // Image { NImageFillStyle imageFillStyle = new NImageFillStyle(NResourceHelper.BitmapFromResource(this.GetType(), "Back.png", "Nevron.Examples.Chart.WinForm.Resources")); imageFillStyle.TextureMappingStyle.MapLayout = MapLayout.Tiled; nChartControl1.BackgroundStyle.FillStyle = imageFillStyle; } break; case 3: // Pattern nChartControl1.BackgroundStyle.FillStyle = new NHatchFillStyle(HatchStyle.Divot, Color.BlueViolet, Color.Beige); break; case 4: // Advanced gradient nChartControl1.BackgroundStyle.FillStyle = new NAdvancedGradientFillStyle(AdvancedGradientScheme.Ocean3, 12); break; } nChartControl1.Refresh(); }
private void SurfaceSizeCombo_SelectedIndexChanged(object sender, EventArgs e) { NGridSurfaceSeries surface = (NGridSurfaceSeries)nChartControl1.Charts[0].Series[0]; string heightMapName = ""; switch (surfaceSizeCombo.SelectedIndex) { case 0: heightMapName = "HeightMap0500.png"; break; case 1: heightMapName = "HeightMap1024.png"; break; default: return; } Bitmap bitmap = NResourceHelper.BitmapFromResource(this.GetType(), heightMapName, "Nevron.Examples.Chart.WinForm.Resources"); surface.Data.InitFromBitmap(bitmap); bitmap.Dispose(); nChartControl1.Refresh(); }
public override void Initialize() { base.Initialize(); this.nButton1.TransparentBackground = true; this.nCommandContext1.Properties.ImageInfo.Image = NResourceHelper.BitmapFromResource(this.GetType(), "JournalSmall.png", "Nevron.Examples.UI.WinForm.Resources.Images.NavigationPane"); this.nCommand1.Properties.ImageInfo.Image = NResourceHelper.BitmapFromResource(this.GetType(), "JournalSmall.png", "Nevron.Examples.UI.WinForm.Resources.Images.NavigationPane"); nCommandBarsManager1.ApplyPalette(NUIManager.Palette); NSkinResource resource = new NSkinResource(SkinResourceType.EntryAssembly, "ButtonsSkin"); m_ButtonsSkin1 = new NSkin(); m_ButtonsSkin1.Load(resource); resource.SkinName = "ScrollbarsSkin"; m_ScrollbarsSkin1 = new NSkin(); m_ScrollbarsSkin1.Load(resource); FillSkinCombo(buttonsSkinCombo); FillSkinCombo(scrollSkinCombo); FillSkinCombo(commandBarsSkinCombo); buttonsSkinCombo.SelectedIndex = 1; scrollSkinCombo.SelectedIndex = 4; commandBarsSkinCombo.SelectedIndex = 5; }
public override void InitDefault() { base.InitDefault(); m_SplashImage = NResourceHelper.BitmapFromResource(this.GetType(), "ChartSplash.png", "Nevron.Examples.Chart.WinForm.Resources"); m_sExamplesNamespace = "Nevron.Examples.Chart.WinForm"; m_sTreeResource = "ExamplesTree.xml"; m_sTreeResourcePath = "Nevron.Examples.Chart.WinForm.Resources"; m_FilterSearchResultsByParentTitles = new string[] { "C# Examples", "All Examples", "What's New" }; m_EmbeddedResourcesAssembly = typeof(NChartExamplesConfig).Assembly; m_FormIcon = NResourceHelper.IconFromResource(this.GetType(), "Chart.ico", "Nevron.Examples.Chart.WinForm.Resources"); m_sFormText = "Nevron Chart for Windows Forms - Part of Nevron .NET Vision - Examples"; m_bSearchForVbSourceFiles = false; m_iExampleTreeNodeImageIndex = 0; m_iExampleTreeNodeSelectedImageIndex = 1; m_sReportBugString = "mailto:[email protected]?subject=Chart Bug Report"; m_sFeedbackString = "mailto:[email protected]?subject=Chart Feedback"; this.LayoutStrategy = new NExamplesLayoutStrategy(); ProductName = "Nevron Chart for .NET"; ProductLogo = NResourceHelper.BitmapFromResource(this.GetType(), "ChartLogo.png", "Nevron.Examples.Chart.WinForm.Resources"); ProductAssemblies = new System.Reflection.Assembly[] { typeof(Nevron.Chart.WinForm.NChartControl).Assembly }; }
private void SurfaceSizeComboBox_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { NGridSurfaceSeries surface = (NGridSurfaceSeries)nChartControl1.Charts[0].Series[0]; string heightMapName = ""; switch (SurfaceSizeComboBox.SelectedIndex) { case 0: heightMapName = "HeightMap0500.png"; break; case 1: heightMapName = "HeightMap1024.png"; break; default: return; } using (Bitmap bitmap = NResourceHelper.BitmapFromResource(this.GetType(), heightMapName, "Nevron.Examples.Chart.Wpf.Resources.Images")) { surface.Data.InitFromBitmap(bitmap); } nChartControl1.Refresh(); }
public override void InitDefault() { base.InitDefault(); m_SplashImage = NResourceHelper.BitmapFromResource(typeof(NMainForm), "DiagramSplash.png", "Nevron.Examples.Diagram.WinForm.Resources"); m_sExamplesNamespace = "Nevron.Examples.Diagram.WinForm"; m_sTreeResource = "ExamplesTree.xml"; m_sTreeResourcePath = "Nevron.Examples.Diagram.WinForm.Resources"; m_sFormText = "Nevron Diagram for Windows Forms - Part of Nevron .NET Vision - Examples"; m_FormIcon = NResourceHelper.IconFromResource(typeof(NMainForm), "Diagram.ico", "Nevron.Examples.Diagram.WinForm.Resources"); m_sFeedbackString = "mailto:[email protected]?subject=Diagram Feedback"; m_iExampleTreeNodeImageIndex = 11; m_iExampleTreeNodeSelectedImageIndex = 12; m_EmbeddedResourcesAssembly = this.GetType().Assembly; m_LayoutStrategy = new NDiagramExamplesLayoutStrategy(); ProductLogo = NResourceHelper.BitmapFromResource(typeof(NMainForm), "DiagramLogo.png", "Nevron.Examples.Diagram.WinForm.Resources"); ProductName = "Nevron Diagram for .NET"; ProductAssemblies = new System.Reflection.Assembly[] { typeof(NDiagramCommandBarsManager).Assembly }; }
static NIDELoadUC() { Type t = typeof(NIDELoadUC); string path = "Nevron.Examples.UI.WinForm.SampleIDEs.Bitmaps"; StandardImageList = NResourceHelper.ImageListFromBitmap(t, new Size(16, 16), Color.Magenta, "IDEStandard.bmp", path); SolutionExplorerImageList = NResourceHelper.ImageListFromBitmap(t, new Size(16, 16), Color.Magenta, "SolutionExplorer.bmp", path); }
public override void Initialize() { base.Initialize(); // set a chart title NLabel title = new NLabel("Heat Map"); title.TextStyle.FontStyle = new NFontStyle("Times New Roman", 18, FontStyle.Italic); title.TextStyle.FillStyle = new NColorFillStyle(GreyBlue); NChart chart = nChartControl1.Charts[0]; chart.BoundsMode = BoundsMode.Stretch; // create the heat map (will be updated on timer tick) m_HeatMap = new NHeatMapSeries(); m_HeatMap.Data.SetGridSize(m_SizeX, m_SizeY); m_HeatMap.Data.SetValues(double.NaN); m_HeatMap.Legend.Mode = SeriesLegendMode.SeriesLogic; // used to display palette information m_HeatMap.Legend.PaletteLegendMode = PaletteLegendMode.GradientAxis; m_HeatMap.Legend.PaletteScaleStepMode = PaletteScaleStepMode.SynchronizeWithScaleConfigurator; m_HeatMap.Legend.PaletteLength = new NLength(400); NNumericScaleConfigurator numericScale = m_HeatMap.Legend.PaletteScaleConfigurator as NNumericScaleConfigurator; numericScale.MajorTickMode = MajorTickMode.CustomStep; numericScale.CustomStep = 10; m_HeatMap.Palette.Mode = PaletteMode.AutoMinMaxColor; m_HeatMap.Palette.PositiveColor = Color.FromArgb(125, Color.Red); m_HeatMap.Palette.ZeroColor = Color.FromArgb(125, Color.Blue); m_HeatMap.Palette.SmoothPalette = true; chart.Series.Add(m_HeatMap); // add background image NRangeSeries range = new NRangeSeries(); range.UseXValues = true; range.DataLabelStyle.Visible = false; range.Legend.Mode = SeriesLegendMode.None; range.Values.Add(0); range.Y2Values.Add(m_SizeY); range.XValues.Add(0); range.X2Values.Add(m_SizeX); Bitmap bitmap = NResourceHelper.BitmapFromResource(this.GetType(), "USMap.png", "Nevron.Examples.Chart.WinForm.Resources"); range.FillStyle = new NImageFillStyle(bitmap); chart.Series.Add(range); timer1.Interval = 100; timer1.Start(); ConfigureStandardLayout(chart, title, nChartControl1.Legends[0]); }
private void FillData() { NChart chart = nChartControl1.Charts[0]; NTriangulatedSurfaceSeries surface = (NTriangulatedSurfaceSeries)chart.Series[0]; Stream stream = null; BinaryReader reader = null; try { // fill the XYZ data from a binary resource stream = NResourceHelper.GetResourceStream(GetType().Assembly, "DataXYZ.bin", "Nevron.Examples.Chart.Wpf.Resources"); reader = new BinaryReader(stream); int nDataPointsCount = (int)stream.Length / 12; //surface.Data.SetCapacity(nDataPointsCount); NVector3DF[] data = new NVector3DF[nDataPointsCount]; // fill Y values for (int i = 0; i < nDataPointsCount; i++) { data[i].Y = reader.ReadSingle(); } // fill X values for (int i = 0; i < nDataPointsCount; i++) { data[i].X = reader.ReadSingle(); } // fill Z values for (int i = 0; i < nDataPointsCount; i++) { data[i].Z = reader.ReadSingle(); } for (int i = 0; i < nDataPointsCount; i++) { surface.Data.AddValue(data[i]); } } finally { if (reader != null) { reader.Close(); } if (stream != null) { stream.Close(); } } }
private void FillData() { NChart chart = nChartControl1.Charts[0]; NTriangulatedSurfaceSeries surface = (NTriangulatedSurfaceSeries)chart.Series[0]; Stream stream = null; BinaryReader reader = null; try { // fill the XYZ data from a binary resource stream = NResourceHelper.GetResourceStream(GetType().Assembly, "DataXYZ.bin", "Nevron.Examples.Chart.WinForm.Resources"); reader = new BinaryReader(stream); int nDataPointsCount = (int)stream.Length / 12; NTriangulatedSurfaceData surfaceData = surface.Data; surfaceData.SetCount(nDataPointsCount); surfaceData.UseColors = true; // fill Y values and colors for (int i = 0; i < nDataPointsCount; i++) { float y = 300 - reader.ReadSingle(); surfaceData.SetYValue(i, y); surfaceData.SetColor(i, GetColorFromValue(y)); } // fill X values for (int i = 0; i < nDataPointsCount; i++) { surfaceData.SetXValue(i, reader.ReadSingle()); } // fill Z values for (int i = 0; i < nDataPointsCount; i++) { surfaceData.SetZValue(i, reader.ReadSingle()); } } finally { if (reader != null) { reader.Close(); } if (stream != null) { stream.Close(); } } }
private void embeddedFileBtn_Click(object sender, EventArgs e) { Assembly assembly = GetType().Assembly; string xml = NResourceHelper.ReadTextResource(assembly, "ExamplesTree.xml", "Nevron.Examples.UI.WinForm.Resources"); XmlDocument doc = new XmlDocument(); doc.LoadXml(xml); nTreeViewEx1.DisplayXml(doc); //this.nTreeViewEx1.SaveToXml(@"C:\Test.xml"); }
private void InitFormControls() { PauseEventsHandling(); // string items TreeNode stringItems = new TreeNode("String items"); TreeNode string1 = new TreeNode("Nevron Diagram for .NET"); string1.Tag = "Dragged and dropped text"; stringItems.Nodes.Add(string1); TreeNode string2 = new TreeNode("Text2"); string1.Tag = "Nevron Diagram for .NET"; stringItems.Nodes.Add(string1); treeView.Nodes.Add(stringItems); // image items TreeNode imageItems = new TreeNode("Image items"); TreeNode image1 = new TreeNode("Man"); image1.Tag = NResourceHelper.BitmapFromResource(GetType(), "man7.jpg", "Nevron.Examples.Diagram.WinForm.Resources"); imageItems.Nodes.Add(image1); TreeNode image2 = new TreeNode("Woman"); image2.Tag = NResourceHelper.BitmapFromResource(GetType(), "woman1.jpg", "Nevron.Examples.Diagram.WinForm.Resources"); imageItems.Nodes.Add(image2); treeView.Nodes.Add(imageItems); // shape items TreeNode shapeItems = new TreeNode("Shape items"); TreeNode shape1 = new TreeNode("Rectangle"); shape1.Tag = new NMyDataObject("Rectangle", new NSizeF(20, 30)); shapeItems.Nodes.Add(shape1); TreeNode shape2 = new TreeNode("Ellipse"); shape2.Tag = new NMyDataObject("Ellipse", new NSizeF(30, 20)); shapeItems.Nodes.Add(shape2); treeView.Nodes.Add(shapeItems); ResumeEventsHandling(); }
static MainForm() { Type t = typeof(MainForm); string path = "Nevron.Examples.UI.WinForm.Resources"; StandardImages = NResourceHelper.ImageListFromBitmap(typeof(MainForm), new Size(16, 16), Color.Silver, "Standard.bmp", path); ActionImages = NResourceHelper.ImageListFromBitmap(typeof(MainForm), new Size(16, 16), Color.Magenta, "Action.bmp", path); LayoutImages = NResourceHelper.ImageListFromBitmap(typeof(MainForm), new Size(16, 16), Color.Magenta, "Layout.bmp", path); ToolsImages = NResourceHelper.ImageListFromBitmap(typeof(MainForm), new Size(16, 16), Color.Magenta, "Tools.bmp", path); ViewImages = NResourceHelper.ImageListFromBitmap(typeof(MainForm), new Size(16, 16), Color.Magenta, "View.bmp", path); TestImages = NResourceHelper.ImageListFromBitmap(typeof(MainForm), new Size(16, 16), Color.Magenta, "Test.bmp", path); FormatImages = NResourceHelper.ImageListFromBitmap(typeof(MainForm), new Size(16, 16), Color.Magenta, "Format.bmp", path); MiscImages = NResourceHelper.ImageListFromBitmap(typeof(MainForm), new Size(16, 16), Color.Magenta, "Misc.bmp", path); DockingImages = NResourceHelper.ImageListFromBitmap(typeof(MainForm), new Size(16, 16), Color.Magenta, "Docking.bmp", path); }
/// <summary> /// Loads the data for the tree map /// </summary> /// <returns></returns> private XmlDocument LoadData() { Stream stream = NResourceHelper.GetResourceStream(GetType().Assembly, "TreeMapDataSmall.xml", "Nevron.Examples.Chart.WinForm.Resources"); if (stream == null) { return(null); } XmlDocument document = new XmlDocument(); document.Load(stream); return(document); }
private void FillSurfaceData() { NChart chart = nChartControl1.Charts[0]; NTriangulatedSurfaceSeries surface = (NTriangulatedSurfaceSeries)chart.Series[0]; Stream stream = null; BinaryReader reader = null; try { // fill the XYZ data from a binary resource stream = NResourceHelper.GetResourceStream(GetType().Assembly, "DataXYZ.bin", "Nevron.Examples.Chart.WinForm.Resources"); reader = new BinaryReader(stream); int nDataPointsCount = (int)stream.Length / 12; // fill Y values for (int i = 0; i < nDataPointsCount; i++) { surface.Values.Add(reader.ReadSingle()); } // fill X values for (int i = 0; i < nDataPointsCount; i++) { surface.XValues.Add(reader.ReadSingle()); } // fill Z values for (int i = 0; i < nDataPointsCount; i++) { surface.ZValues.Add(reader.ReadSingle()); } } finally { if (reader != null) { reader.Close(); } if (stream != null) { stream.Close(); } } }
public NTreeViewExAppearanceUC() { InitializeComponent(); Dock = DockStyle.Fill; m_Images = new Image[6]; string path = "Nevron.Examples.UI.WinForm.TreeView.Resources"; Type t = typeof(NTreeViewExAppearanceUC); m_Images[0] = NResourceHelper.BitmapFromResource(t, "TreeView1.png", path); m_Images[1] = NResourceHelper.BitmapFromResource(t, "TreeView2.png", path); m_Images[2] = NResourceHelper.BitmapFromResource(t, "TreeView3.png", path); m_Images[3] = NResourceHelper.BitmapFromResource(t, "TreeView4.png", path); m_Images[4] = NResourceHelper.BitmapFromResource(t, "TreeView5.png", path); m_Images[5] = NResourceHelper.BitmapFromResource(t, "TreeView6.png", path); }
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]; }
public override void Initialize() { base.Initialize(); this.nCommandBarsManager1.Palette.Copy(NUIManager.Palette); Type t = GetType(); nDockingToolbar1.ImageSize = new Size(48, 48); string path = "Nevron.Examples.UI.WinForm.Resources.Images"; Bitmap bmp = NResourceHelper.BitmapFromResource(t, "Clock.png", path); nCommand1.Properties.ImageInfo.Image = bmp; bmp = NResourceHelper.BitmapFromResource(t, "Envelope.png", path); nCommand2.Properties.ImageInfo.Image = bmp; bmp = NResourceHelper.BitmapFromResource(t, "Flash.png", path); nCommand3.Properties.ImageInfo.Image = bmp; bmp = NResourceHelper.BitmapFromResource(t, "Book.png", path); nCommand4.Properties.ImageInfo.Image = bmp; bmp = NResourceHelper.BitmapFromResource(t, "Pencil.png", path); nCommand5.Properties.ImageInfo.Image = bmp; bmp = NResourceHelper.BitmapFromResource(t, "Light.png", path); nCommand6.Properties.ImageInfo.Image = bmp; bmp = NResourceHelper.BitmapFromResource(t, "Globe.png", path); nCommand7.Properties.ImageInfo.Image = bmp; bmp = NResourceHelper.BitmapFromResource(t, "Mobile.png", path); nCommand8.Properties.ImageInfo.Image = bmp; bmp = NResourceHelper.BitmapFromResource(t, "Flask.png", path); nCommand9.Properties.ImageInfo.Image = bmp; bmp = NResourceHelper.BitmapFromResource(t, "Darts.png", path); nCommand10.Properties.ImageInfo.Image = bmp; }
private void FillData(NGridSurfaceSeries surface, NGridSurfaceSeries contour) { Stream stream = null; BinaryReader reader = null; try { // fill the XYZ data from a binary resource stream = NResourceHelper.GetResourceStream(GetType().Assembly, "DataY.bin", "Nevron.Examples.Chart.Wpf.Resources"); reader = new BinaryReader(stream); int dataPointsCount = (int)(stream.Length / 4); int sizeX = (int)Math.Sqrt(dataPointsCount); int sizeZ = sizeX; surface.Data.SetGridSize(sizeX, sizeZ); contour.Data.SetGridSize(sizeX, sizeZ); for (int z = 0; z < sizeZ; z++) { for (int x = 0; x < sizeX; x++) { double value = 300 + 0.3 * (double)reader.ReadSingle(); surface.Data.SetValue(x, z, value); contour.Data.SetValue(x, z, value); } } } finally { if (reader != null) { reader.Close(); } if (stream != null) { stream.Close(); } } }
private void FillData() { NChart chart = nChartControl1.Charts[0]; NGridSurfaceSeries surface = (NGridSurfaceSeries)chart.Series[0]; Stream stream = null; BinaryReader reader = null; try { // fill the XYZ data from a binary resource stream = NResourceHelper.GetResourceStream(GetType().Assembly, "DataY.bin", "Nevron.Examples.Chart.WinForm.Resources"); reader = new BinaryReader(stream); int dataPointsCount = (int)(stream.Length / 4); int sizeX = (int)Math.Sqrt(dataPointsCount); int sizeZ = sizeX; surface.Data.SetGridSize(sizeX, sizeZ); for (int z = 0; z < sizeZ; z++) { for (int x = 0; x < sizeX; x++) { surface.Data.SetValue(x, z, reader.ReadSingle()); } } } finally { if (reader != null) { reader.Close(); } if (stream != null) { stream.Close(); } } }
private void CreateConceptCarPanels(NDockPanel parentPanel, CarData car) { Bitmap conceptImage = NResourceHelper.BitmapFromResource(this.GetType(), car.ImageResourceName, "Nevron.Examples.Chart.WinForm.Resources"); NLabel label = new NLabel(car.AuthorName); label.DockMode = PanelDockMode.Top; label.BoundsMode = BoundsMode.Fit; label.UseAutomaticSize = true; label.Padding = new NMarginsL(10, 0, 0, 0); label.TextStyle.FontStyle = new NFontStyle("Times New Roman", 20, FontStyle.Italic); label.TextStyle.FillStyle = new NGradientFillStyle(Nevron.GraphicsCore.GradientStyle.Horizontal, GradientVariant.Variant1, Color.DarkKhaki, Color.White); parentPanel.ChildPanels.Add(label); NWatermark watermark = new NWatermark(); watermark.FillStyle = new NImageFillStyle(conceptImage); watermark.DockMode = PanelDockMode.Top; watermark.UseAutomaticSize = true; watermark.Padding = new NMarginsL(10, 0, 0, 0); watermark.Tag = car; parentPanel.ChildPanels.Add(watermark); }
public override void InitDefault() { base.InitDefault(); ProductType = ENDotNetProductType.NETUserInterface; Type t = typeof(MainForm); string path = "Nevron.Examples.UI.WinForm.Resources"; PersistFormState = false; //PersistPanelsState = false; WindowState = FormWindowState.Maximized; //specify about box m_SplashImage = NResourceHelper.BitmapFromResource(t, "UISplash.png", path); ProductLogo = NResourceHelper.BitmapFromResource(t, "UILogo.png", path); ProductName = "Nevron UI for .NET"; ProductAssemblies = new System.Reflection.Assembly[] { typeof(NUIManager).Assembly, typeof(NDockManager).Assembly }; m_FilterSearchResultsByParentTitles = new string[] { "C# Examples", "All Examples", "What's New" }; m_EmbeddedResourcesAssembly = typeof(NUIExamplesConfig).Assembly; m_sExamplesNamespace = "Nevron.Examples.UI.WinForm"; m_sTreeResource = "ExamplesTree.xml"; m_sTreeResourcePath = path; m_FormIcon = NResourceHelper.IconFromResource(t, "UI.ico", path); m_sFormText = "Nevron User Interface - Part of Nevron .NET Vision - Examples"; m_iExampleTreeNodeImageIndex = 13; m_iExampleTreeNodeSelectedImageIndex = 14; m_sFeedbackString = "mailto:[email protected]?subject=Nevron User Interface Feedback"; m_LayoutStrategy = new NUIExamplesLayoutStrategy(); }
public override void Initialize() { base.Initialize(); nChartControl1.Controller.Tools.Add(new NPanelSelectorTool()); nChartControl1.Controller.Tools.Add(new NTrackballTool()); // set a chart title NLabel title = nChartControl1.Labels.AddHeader("Shape Series used to display a house"); title.TextStyle.FontStyle = new NFontStyle("Times New Roman", 18, FontStyle.Italic); title.TextStyle.FillStyle = new NColorFillStyle(GreyBlue); // setup chart m_Chart = nChartControl1.Charts[0]; m_Chart.Enable3D = true; m_Chart.Depth = 55.0f; m_Chart.Width = 55.0f; m_Chart.Height = 55.0f; m_Chart.Projection.Type = ProjectionType.Perspective; m_Chart.Projection.Rotation = -19.0f; m_Chart.Projection.Elevation = 20.0f; // configure axes NLinearScaleConfigurator linearScale = new NLinearScaleConfigurator(); m_Chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = linearScale; linearScale.MajorTickMode = MajorTickMode.AutoMaxCount; linearScale.MajorGridStyle.SetShowAtWall(ChartWallType.Back, true); linearScale.MajorGridStyle.SetShowAtWall(ChartWallType.Floor, true); linearScale = new NLinearScaleConfigurator(); m_Chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator = linearScale; linearScale.MajorTickMode = MajorTickMode.AutoMaxCount; linearScale.MajorGridStyle.SetShowAtWall(ChartWallType.Back, true); linearScale.MajorGridStyle.SetShowAtWall(ChartWallType.Left, true); linearScale = new NLinearScaleConfigurator(); m_Chart.Axis(StandardAxis.Depth).ScaleConfigurator = linearScale; linearScale.MajorTickMode = MajorTickMode.AutoMaxCount; linearScale.MajorGridStyle.SetShowAtWall(ChartWallType.Floor, true); linearScale.MajorGridStyle.SetShowAtWall(ChartWallType.Left, true); NLegend legend = (NLegend)nChartControl1.Legends[0]; legend.Data.MarkSize = new NSizeL(20, 20); // create the door NShapeSeries shape = (NShapeSeries)m_Chart.Series.Add(SeriesType.Shape); shape.Name = "door"; shape.DataLabelStyle.Visible = false; shape.UseXValues = true; shape.UseZValues = true; shape.Shape = BarShape.Bar; shape.AddDataPoint(new NShapeDataPoint(-0.5, -0.25, -1.0, 0.5, 1.5, 0.02)); NImageFillStyle doorFS = new NImageFillStyle(NResourceHelper.BitmapFromResource(this.GetType(), "Door.jpg", "Nevron.Examples.Chart.WinForm.Resources")); shape.FillStyle = doorFS; // create the window shape = (NShapeSeries)m_Chart.Series.Add(SeriesType.Shape); shape.Name = "window"; shape.DataLabelStyle.Visible = false; shape.UseXValues = true; shape.UseZValues = true; shape.Shape = BarShape.Bar; shape.AddDataPoint(new NShapeDataPoint(0.4, 0.0, -1.0, 0.75, 1.0, 0.02)); NImageFillStyle windowFS = new NImageFillStyle(NResourceHelper.BitmapFromResource(this.GetType(), "Window.jpg", "Nevron.Examples.Chart.WinForm.Resources")); shape.FillStyle = windowFS; // create the house shape = (NShapeSeries)m_Chart.Series.Add(SeriesType.Shape); shape.Name = "house"; shape.DataLabelStyle.Visible = false; shape.UseXValues = true; shape.UseZValues = true; shape.Shape = BarShape.Bar; shape.AddDataPoint(new NShapeDataPoint(0.0, 0.0, 0.0, 2.0, 2.0, 2.0)); shape.FillStyle = new NColorFillStyle(Color.White); NImageFillStyle houseFS = new NImageFillStyle(NResourceHelper.BitmapFromResource(this.GetType(), "Cobblestone.jpg", "Nevron.Examples.Chart.WinForm.Resources")); houseFS.TextureMappingStyle.MapLayout = MapLayout.Tiled; houseFS.TextureMappingStyle.HorizontalScale = 0.1f; houseFS.TextureMappingStyle.VerticalScale = 0.1f; shape.FillStyle = houseFS; // create the roof shape = (NShapeSeries)m_Chart.Series.Add(SeriesType.Shape); shape.Name = "roof"; shape.DataLabelStyle.Visible = false; shape.UseXValues = true; shape.UseZValues = true; shape.Shape = BarShape.Pyramid; shape.AddDataPoint(new NShapeDataPoint(0.0, 1.5, 0.0, 2.4, 1.0, 2.4)); NImageFillStyle roofFS = new NImageFillStyle(NResourceHelper.BitmapFromResource(this.GetType(), "Rooftile.jpg", "Nevron.Examples.Chart.WinForm.Resources")); roofFS.TextureMappingStyle.MapLayout = MapLayout.Tiled; roofFS.TextureMappingStyle.HorizontalScale = 0.2f; roofFS.TextureMappingStyle.VerticalScale = 0.2f; shape.FillStyle = roofFS; // create the chimney shape = (NShapeSeries)m_Chart.Series.Add(SeriesType.Shape); shape.Name = "chimney"; shape.DataLabelStyle.Visible = false; shape.UseXValues = true; shape.UseZValues = true; shape.Shape = BarShape.Cylinder; shape.AddDataPoint(new NShapeDataPoint(0.75, 1.5, 0.0, 0.2, 1.0, 0.2)); NImageFillStyle chimneyFS = new NImageFillStyle(NResourceHelper.BitmapFromResource(this.GetType(), "Bricks.jpg", "Nevron.Examples.Chart.WinForm.Resources")); chimneyFS.TextureMappingStyle.MapLayout = MapLayout.Tiled; chimneyFS.TextureMappingStyle.HorizontalScale = 0.1f; chimneyFS.TextureMappingStyle.VerticalScale = 0.1f; shape.FillStyle = chimneyFS; // apply layout ConfigureStandardLayout(m_Chart, title, nChartControl1.Legends[0]); }
public override void Initialize() { base.Initialize(); // load textures from resources Bitmap bmp0 = NResourceHelper.BitmapFromResource(this.GetType(), "Back.png", "Nevron.Examples.Chart.WinForm.Resources"); Bitmap bmp1 = NResourceHelper.BitmapFromResource(this.GetType(), "Leafs.png", "Nevron.Examples.Chart.WinForm.Resources"); Bitmap bmp2 = NResourceHelper.BitmapFromResource(this.GetType(), "Banner.png", "Nevron.Examples.Chart.WinForm.Resources"); NImageFillStyle imageFillStyle = new NImageFillStyle(bmp0); imageFillStyle.TextureMappingStyle.MapLayout = MapLayout.Tiled; nChartControl1.BackgroundStyle.FillStyle = imageFillStyle; // add label NLabel title = nChartControl1.Labels.AddHeader("Image Fill Style"); title.TextStyle.FontStyle = new NFontStyle("Times New Roman", 18, FontStyle.Italic); title.TextStyle.FillStyle = new NColorFillStyle(GreyBlue); title.ContentAlignment = ContentAlignment.BottomCenter; title.Location = new NPointL(new NLength(50, NRelativeUnit.ParentPercentage), new NLength(2, NRelativeUnit.ParentPercentage)); // setup chart and axes m_Chart = nChartControl1.Charts[0]; m_Chart.Projection.SetPredefinedProjection(PredefinedProjection.Perspective); m_Chart.LightModel.SetPredefinedLightModel(PredefinedLightModel.SoftTopLeft); m_Chart.Axis(StandardAxis.Depth).Visible = false; NLinearScaleConfigurator linearScale = (NLinearScaleConfigurator)m_Chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator; linearScale.MajorGridStyle.LineStyle.Pattern = LinePattern.Dot; linearScale.MajorGridStyle.LineStyle.Color = Color.White; linearScale = new NLinearScaleConfigurator(); m_Chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = linearScale; linearScale.MajorGridStyle.LineStyle.Pattern = LinePattern.Dot; linearScale.MajorGridStyle.LineStyle.Color = Color.White; linearScale.MajorGridStyle.SetShowAtWall(ChartWallType.Back, true); // Setup walls Color c = Color.FromArgb(128, 128, 192); imageFillStyle = new NImageFillStyle(bmp1); imageFillStyle.TextureMappingStyle.MapLayout = MapLayout.Tiled; m_Chart.Wall(ChartWallType.Back).FillStyle = imageFillStyle; m_Chart.Wall(ChartWallType.Left).FillStyle = imageFillStyle; m_Chart.Wall(ChartWallType.Floor).FillStyle = imageFillStyle; // create bubble chart m_Bubble = (NBubbleSeries)m_Chart.Series.Add(SeriesType.Bubble); m_Bubble.DataLabelStyle.Visible = false; m_Bubble.Legend.Mode = SeriesLegendMode.DataPoints; m_Bubble.BubbleShape = PointShape.Ellipse; m_Bubble.UseXValues = true; m_Bubble.InflateMargins = true; m_Bubble.BorderStyle.Width = new NLength(1, NGraphicsUnit.Pixel); m_Bubble.FillStyle = new NImageFillStyle(bmp2); GenerateData(); }
static NCustomDiagramButtonCommand() { Type thisType = typeof(NCustomDiagramButtonCommand); ImageListCustom = new NCustomImageList(NResourceHelper.BitmapFromResource(thisType, "CustomCommandbarImageList.png", "Nevron.Examples.Diagram.WinForm.Resources"), new NSize(16, 16)); }
static NCustomChartCommander() { Type thisType = typeof(NCustomChartCommander); ImageListCustom = new NCustomImageList(NResourceHelper.BitmapFromResource(thisType, "CustomCommandbarImageList.png", "Nevron.Examples.Chart.WinForm.Resources"), new NSize(16, 16)); }
internal void InitContexts() { Image img = NResourceHelper.BitmapFromResource(GetType(), "orang021.jpg", "Nevron.Examples.UI.WinForm.Resources.Backgrounds"); InitBackgroundImageContext(img, Contexts.BackgroundImage1); }
public override void Initialize() { base.Initialize(); // Enable GPU acceleration nChartControl1.Settings.RenderSurface = RenderSurface.Window; nChartControl1.Controller.Tools.Add(new NPanelSelectorTool()); nChartControl1.Controller.Tools.Add(new NTrackballTool()); // set a chart title NLabel title = new NLabel("Surface With Texture"); title.TextStyle.FontStyle = new NFontStyle("Times New Roman", 18, FontStyle.Italic); title.TextStyle.FillStyle = new NColorFillStyle(GreyBlue); // no legends nChartControl1.Legends.Clear(); // configure the chart NChart chart = nChartControl1.Charts[0]; chart.Enable3D = true; chart.Width = 60.0f; chart.Depth = 60.0f; chart.Height = 15.0f; chart.BoundsMode = BoundsMode.Fit; chart.Projection.SetPredefinedProjection(PredefinedProjection.PerspectiveTilted); chart.Projection.Elevation = 45; chart.LightModel.SetPredefinedLightModel(PredefinedLightModel.ShinyTopLeft); // setup Y axis NLinearScaleConfigurator scaleY = new NLinearScaleConfigurator(); scaleY.RoundToTickMax = false; scaleY.RoundToTickMin = false; scaleY.MinTickDistance = new NLength(10, NGraphicsUnit.Point); scaleY.MajorGridStyle.ShowAtWalls = new ChartWallType[] { ChartWallType.Left, ChartWallType.Back }; scaleY.MajorGridStyle.LineStyle.Pattern = LinePattern.Dot; chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator = scaleY; // setup X axis NLinearScaleConfigurator scaleX = new NLinearScaleConfigurator(); scaleX.RoundToTickMax = false; scaleX.RoundToTickMin = false; scaleX.MajorGridStyle.ShowAtWalls = new ChartWallType[] { ChartWallType.Floor, ChartWallType.Back }; scaleX.MajorGridStyle.LineStyle.Pattern = LinePattern.Dot; chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = scaleX; // setup Z axis NLinearScaleConfigurator scaleZ = new NLinearScaleConfigurator(); scaleZ.RoundToTickMax = false; scaleZ.RoundToTickMin = false; scaleZ.MajorGridStyle.ShowAtWalls = new ChartWallType[] { ChartWallType.Floor, ChartWallType.Left }; scaleZ.MajorGridStyle.LineStyle.Pattern = LinePattern.Dot; chart.Axis(StandardAxis.Depth).ScaleConfigurator = scaleZ; // add the surface series NGridSurfaceSeries surface = (NGridSurfaceSeries)chart.Series.Add(SeriesType.GridSurface); surface.Name = "Surface"; surface.FrameMode = SurfaceFrameMode.None; surface.FillMode = SurfaceFillMode.Uniform; surface.Data.SetGridSize(60, 60); FillData(); Bitmap bitmap = NResourceHelper.BitmapFromResource(this.GetType(), "Marble.jpg", "Nevron.Examples.Chart.WinForm.Resources"); NImageFillStyle imageFillStyle = new NImageFillStyle(bitmap); imageFillStyle.TextureMappingStyle.MapLayout = MapLayout.Tiled; imageFillStyle.TextureMappingStyle.HorizontalScale = 0.1f; imageFillStyle.TextureMappingStyle.VerticalScale = 0.1f; imageFillStyle.MaterialStyle.Diffuse = Color.FromArgb(204, 204, 0); imageFillStyle.MaterialStyle.Ambient = Color.FromArgb(51, 102, 153); imageFillStyle.MaterialStyle.Specular = Color.DarkGray; surface.FillStyle = imageFillStyle; // apply layout ConfigureStandardLayout(chart, title, null); // form controls smoothShadingCheck.Checked = true; texturePlaneCombo.SelectedIndex = 0; }
internal NTreeListUCHelper() { m_Images = NResourceHelper.ImageListFromBitmap(GetType(), new Size(16, 16), Color.Transparent, "Outlook.jpg", "Nevron.Examples.UI.WinForm.TreeList.Images"); m_arrNames = new string[] { "John Doe", "*****@*****.**", "*****@*****.**", "*****@*****.**" }; m_arrSubjects = new string[] { "NTreeList Question", "Re: Help Needed", "Licensing Question", "Nevron UI General Support" }; }