|
You need Mono. See the articles on this site and this link:
Mono
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
well mono is the only chance of c# on linux, but as I said "chance"..
mono isn't the framework. it's less functional and if memory didn't trick me it's only framework 1.1 'compatiblie'
life is study!!!
|
|
|
|
|
I thought Microsoft was supposed to be working on Linux support. I found this for FreeBSD: http://msdn.microsoft.com/msdnmag/issues/02/07/SharedSourceCLI/
DD
|
|
|
|
|
thx for the information
I though that the c# compiler wasn't open source so how did they get it on linux? So c# on windows is not really the same as on linux?
|
|
|
|
|
Not that I completely understand it, but what I think they are doing with this project is creating a Common Language Runtime library for FreeBSD. So in theory your compiled c# code should run on FreeBSD with Rotor installed.
FreeBSD is not Linux but it is a free version of Unix that is similar to Linux.
|
|
|
|
|
Hi folks,
I am a bit puzzled how to use the System.Xml.XmlReader to read data
To give a simple example I want to read a Xml file like this:
<Person>
<Name>Peter</Name>
<Sirname>Alen</Sirname>
</Person>
in a object with the same properties...
what I did was something like this:
...
Person person = new Person();
while (reader.Read())
{
if (reader.Name=="Name")
{
person.Name = reader.ReadElementContentAsString();
}
if (reader.Sirname == "Sirname")
{
person.Sirname = reader.ReadElementContentAsString();
}
}
...
of course simplified, the real thing is a bit more complicated...
this does work if the Xml is exactly the same way I outlined above but if, for example, the Name tag comes after the Sirname tag the code doesn't work anymore because the reader.ReadElementContentAsString() is advancing the reader and the reader.Read() as well thus one element is simply not handled by the code in the while loop...
I hope I explained it well enough
any suggestions welcome!
TIA
Pakl
|
|
|
|
|
If you don't have a proper schema, you're better off using an XmlDocument or XmlDataDocument, and XPath
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hmm, alright...
then I will switch to XPath for reading and use XmlWriter for writing...
thanks
just another thought...
I searched for any trick I could use to keep using XmlReader... maybe something like this...
bool read = false;
do
{
read = false;
if (reader.Name=="Person")
{
person = reader.ReadElementContentAsString();
read = true;
}
..... other stuff comes here...
}
while (read || reader.Read())
but of course I don't want to create a mess when I forget to set the read = true....
doesn't seem to fit so I will use XPath...
|
|
|
|
|
The core issue is that you don't have a defined schema. It would be better if you did.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
I understand. Just a question on that topic.
If I have a defined schema, does this mean that those tags have to be in the same order all the time.
I always thought that it is 'correct' to place tags in any order in the file.
|
|
|
|
|
No, a schema defines the order as well.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hmm, alright, probably I am not understanding that so well after all
how exactly would it help me, if I had a schema...
btw. thanks for your time
|
|
|
|
|
It wouldn't, directly, unless you needed to validate the documents coming in. But, it's very uncommon for a program to not care what order the nodes are in, or expect them to differ.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
I have two objects that I'm drawing to the screen each is drawn in its own graphics context. I set region, clipping region, etc.. appropriately.
My question is this if I want to do a hit test, combine the two regions or whatever how do I/do I have to save the context and restore it and if so how????
I'm real confused???????
Thanks for any help
Mike
Theres light at the end of the tunnel, hope it ain't no train.
|
|
|
|
|
I am new to .net and C# programming and I am writing a POS type of application that prints a receipt to a small receipt printer. I am having some problems understanding how to format my report for this little printer. It will work in a laserjet on a full sheet, but it won't print on the receipt printer. This is making me crazy!!! Anyway if anyone has any ideas I am so in need of help.
Thanks!!!
Christopher J. Thornburg
Senior Systems Analyst
Ideal Card
|
|
|
|
|
hi,
for POS applications , normally APIs are available like OPOS. which provide methods for primitive printing tasks. for direct printing to a printing device using serial cable , u still can use OPOS standard. u will have to use special characters at begining and end of , for instance , a string to print it. in both cases, you will have to build a string that you want to print and send to printer (like a batch printing pattern). i dont think u its going to be like windows standard printing (i.e on A4 printer).
have a look here for more info
http://monroecs.com/posstandards.htm[^]
regards.
|
|
|
|
|
I'm need to have a control at my c# app that enables the user to crop a picture. I was looking for something like the way it is done when you use a scanner at windows XP(WIA).
Will I have to code it myself or is something allready done for that?
Nuno
--You can't make a program without broken egos--
|
|
|
|
|
It's a pretty easy thing to write. Just capture the users click events to draw the crop area, and then create the new bitmap.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
I would imagine that you have to redraw a rectangle in between mouse down and up. I would really like to see some working source code for this. Do you know where to find such a thing.
|
|
|
|
|
Yes, you'd handle MouseMove, and call Invalidate, and then draw the rect in your paint method.
Not sure off hand of any samples in C#.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Will this continuously redraw the rectangle between mouse button down and mouse button up.
|
|
|
|
|
Will this continuously redraw the rectangle between mouse button down and mouse button up. I am very interested in this routine as I have many applications for it but have not been able to implement it even though I have spent many days trying.
|
|
|
|
|
umhh...
I want it to have that usual selection rectangle. I will be coding it when I have some free time and then I will post it...maybe in the next two weeks.
Nuno
|
|
|
|
|
Hi
i want to display the time and date over the form when it runs. How can i achieve that.
What should be the suitable code for it. I can do it in console but i am not getting how to do that over Windows application.
Thanks in advance
|
|
|
|
|
What do you mean by "over" the form?
If you want to display the time and update it continously, you can use a Timer control to update the text of the control where you want to display it.
---
Year happy = new Year(2007);
|
|
|
|