Profile Picture

Can't get demo working ...

Posted By Peter Spinato 15 Years Ago
Author
Message
Peter Spinato
Posted 15 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: Forum Members
Last Active: 15 Years Ago
Posts: 1, Visits: 1

Support,

Below are my .aspx and the .cs file - I run the demo app to draw an eclipse but the screen just shows a box with an x in it.  Any help is apprecaited,

-Peter

 

ASPX file

---------------------------------------------------------------------------------------------------------------------------

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TheView.aspx.cs" Inherits="TheView" %>

<%@ Register assembly="Nevron.Diagram.WebForm, Version=9.7.23.12, Culture=neutral, PublicKeyToken=95bcc3d41b0512e9" namespace="Nevron.Diagram.WebForm" tagprefix="ndwc" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

<title>Untitled Page</title>

</head>

<body>

<form id="form1" runat="server">

<div>

<ndwc:NDrawingView ID="NDrawingView1" runat="server" Width="416px" Height="336px">

</ndwc:NDrawingView>

</div>

</form>

</body>

</html>

 

CS file

-----------------------------------------------------------------------------------------------------------------------------------

using System;

using System.Collections;

using System.Configuration;

using System.Data;

using System.Linq;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.HtmlControls;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Xml.Linq;

using System.Drawing;

using Nevron.GraphicsCore;

using Nevron.Diagram;

using Nevron.Diagram.WebForm;

using Nevron.Diagram.Shapes;

public partial class TheView : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

if (NDrawingView1.RequiresInitialization)

{

NDrawingView1.ViewLayout = CanvasLayout.Fit;

NDrawingView1.DocumentPadding = new Nevron.Diagram.NMargins(10);

NDrawingView1.Document.HistoryService.Stop();

NDrawingView1.Document.BeginInit();

NDrawingView1.Document.Bounds = new NRectangleF(0, 0, 420, 320);

NStandardFrameStyle fs = (NDrawingView1.Document.BackgroundStyle.FrameStyle as NStandardFrameStyle);

fs.InnerBorderWidth = new NLength(0);

NBasicShapesFactory factory = new NBasicShapesFactory(NDrawingView1.Document);

NEllipseShape ellipse = factory.CreateShape((int)BasicShapes.Ellipse) as NEllipseShape;

ellipse.Name = "myEllipse";

ellipse.Width = 250f;

ellipse.Height = 250f;

ellipse.Center = new NPointF(200, 200);

ellipse.Style.FillStyle = new NGradientFillStyle(GradientStyle.Horizontal, GradientVariant.Variant1, Color.Navy, Color.White);

NDrawingView1.Document.ActiveLayer.AddChild(ellipse);

NDrawingView1.Document.EndInit();

}

}

}

 

 



bob milanov
Posted 15 Years Ago
View Quick Profile
Supreme Being

Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)

Group: Forum Members
Last Active: 6 Months Ago
Posts: 153, Visits: 11

Hi Peter,

It may be related to the axd setting on the servers - you can easily check if this is the case by modifying the image acquisition mode of the control:

1. In the code change the image acquisition:

NDrawingView1.ImageAcquisitionMode = Nevron.UI.WebForm.Controls.ClientSideImageAcquisitionMode.TempFile;

2. Create a directory called NevronTemp in the root folder of your website - for example (C:\Temp\WebSite2\NevronTemp if the web site is located at C:\Temp\WebSite2\).

3. Give this folder read, write, modify permissions to the ASP.NET account.

Hope this helps - let me know if the problem persists.

Best regards,
Bob





Similar Topics


Reading This Topic