Click here to Skip to main content
15,889,266 members
Home / Discussions / C#
   

C#

 
GeneralRe: The ConnectionString property has not been initialized ! Pin
mostafa_h21-Aug-06 20:26
mostafa_h21-Aug-06 20:26 
GeneralRe: The ConnectionString property has not been initialized ! Pin
Nader Elshehabi22-Aug-06 3:47
Nader Elshehabi22-Aug-06 3:47 
GeneralRe: The ConnectionString property has not been initialized ! Pin
Steve :)22-Aug-06 12:42
Steve :)22-Aug-06 12:42 
AnswerRe: The ConnectionString property has not been initialized ! Pin
Coding C#21-Aug-06 20:26
Coding C#21-Aug-06 20:26 
QuestionmouseMove event Pin
jamsiro21-Aug-06 12:49
jamsiro21-Aug-06 12:49 
AnswerRe: mouseMove event Pin
Shy Agam21-Aug-06 13:06
Shy Agam21-Aug-06 13:06 
AnswerRe: mouseMove event Pin
Nader Elshehabi21-Aug-06 13:18
Nader Elshehabi21-Aug-06 13:18 
QuestionRepresent CSS in C# [modified] Pin
Goebel21-Aug-06 12:32
Goebel21-Aug-06 12:32 
Working on a project that involves generating SVG (Scalable Vector Graphics) charts with C# I have come across the following problem. For reasons of performance I would like to use CSS (Cascading Style Sheets) to represent style properties of SVG elements.

Finally it should look something like that:


<style>
.rectangle
{
fill: blue;
stroke: green;
stroke-opacity: 0.5;
}
</style>

<svg>
<rect x="100" y="40" width="200" height="29" class="rectangle" />
</svg>


A style-area defines all CSS rules which will then be applied in various elements in the SVG document. I'm striving for an elegant solution to represent the CSS properties adequately. Shall I build a few classes representing CSS stylesheets and include these in my classes generating SVG output via composition (see following code snippet).

As you can see the SVG (XML) output is generated via XmlTextWriter class.


<code>
public class SvgElement
{
double x1, x2, y1, y2;
XmlTextWriter writer;
CSSRule rule; // include css rules via composition?

public SvgElement(double x1, double x2, double y1, double y2)
{
this.x1 = x1;
this.x2 = x2;
this.y1 = y1;
this.y2 = y2;
}

public void Draw()
{
writer.WriteStartElement("line");
writer.WriteAttributeString("class", rule.name);
writer.WriteAttributeString("x1", coordX1.ToString());
writer.WriteAttributeString("y1", coordY1.ToString());
writer.WriteAttributeString("x2", coordX2.ToString());
writer.WriteAttributeString("y2", coordY2.ToString());
writer.WriteEndElement();
}
}
</code>

As I'm lacking to describe my problem precisely, please do not hesitate to comment. I'm more than willing to give further details Smile | :)

Thanks,
Goebel


-- modified at 3:07 Tuesday 22nd August, 2006
QuestionError: "Call was rejected by callee" Pin
Goalie3521-Aug-06 11:49
Goalie3521-Aug-06 11:49 
AnswerRe: Error: "Call was rejected by callee" Pin
bradsnobar21-Aug-06 12:13
bradsnobar21-Aug-06 12:13 
QuestionHow to paint embedded controls. Pin
bradsnobar21-Aug-06 11:48
bradsnobar21-Aug-06 11:48 
AnswerRe: How to paint embedded controls. Pin
Nader Elshehabi21-Aug-06 13:14
Nader Elshehabi21-Aug-06 13:14 
QuestionUsing reflection to call an internal method Pin
Ista21-Aug-06 11:33
Ista21-Aug-06 11:33 
AnswerRe: Using reflection to call an internal method Pin
Vitaliy Tsvayer21-Aug-06 11:58
Vitaliy Tsvayer21-Aug-06 11:58 
QuestionC# DataGrid Question Pin
kalyanPaladugu21-Aug-06 10:29
kalyanPaladugu21-Aug-06 10:29 
AnswerRe: C# DataGrid Question Pin
Nader Elshehabi21-Aug-06 11:03
Nader Elshehabi21-Aug-06 11:03 
AnswerRe: C# DataGrid Question [modified] Pin
Vitaliy Tsvayer21-Aug-06 11:52
Vitaliy Tsvayer21-Aug-06 11:52 
QuestionReference Debug/Release version dll's of external projects Pin
wrykyn21-Aug-06 9:45
wrykyn21-Aug-06 9:45 
AnswerRe: Reference Debug/Release version dll's of external projects Pin
Nader Elshehabi21-Aug-06 10:50
Nader Elshehabi21-Aug-06 10:50 
QuestionLooking for a good tutorial Pin
Soot21-Aug-06 9:44
Soot21-Aug-06 9:44 
AnswerRe: Looking for a good tutorial Pin
Nader Elshehabi21-Aug-06 10:42
Nader Elshehabi21-Aug-06 10:42 
Questiondataset sort and combine/consolidate Pin
jeweladdict21-Aug-06 8:52
jeweladdict21-Aug-06 8:52 
AnswerDatarow combining Pin
jeweladdict21-Aug-06 9:50
jeweladdict21-Aug-06 9:50 
AnswerRe: dataset sort and combine/consolidate Pin
Nader Elshehabi21-Aug-06 10:59
Nader Elshehabi21-Aug-06 10:59 
GeneralRe: dataset sort and combine/consolidate Pin
jeweladdict21-Aug-06 12:50
jeweladdict21-Aug-06 12:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.