|
Gary - if I were you, I'd ask this question in the General IT forum or the .NET forum. The problem with posting here is that this is a high traffic forum, so your post will soon get swamped. As it is, the post is worthy of more consideration so I would definitely consider moving it.
|
|
|
|
|
Well, after posting it 2 other times to other .Net forums on CodeProject, and multiple times on other sites, yours is the *only* reply I've received. So, if "this post is [really] worthy of more consideration", you and I seem to be the only ones who conclude such.
http://www.codeproject.com/script/Forums/View.aspx?fid=12076&msg=2888591[^]
ASPX ~ Apple Simply Performs eXcellently
|
|
|
|
|
I've used xsd.exe to great effect in the past to generate classes from xsds, but what I'd like to do now is do the same thing at runtime. The idea is to provide a plugin-type architecture where xsds can be dumped into a certain location and on its next run my application will pick them up, generate code from them and add that code to itself. I can't go into specifics too much, but I can give a more general example:
Imagine an app that by default only knows how to handle certain xml files. What I want to do is essentially provide that application with the ability to understand other document types by giving it a definition (xsd) of what those types look like. From the definition the app will be able to generate classes from which it can instantiate objects of the document's type. Assuming the generated class conforms to an interface (which it will) generic code can then be written to use any document type without knowing anything about that type in advance.
I'm not too concerned about the more theoretical bits here, I'll try that myself and see if it works as I think it should, but if anyone has any examples of how a class can be created from an xsd, so I can perpetrate this madness I'd be grateful.
|
|
|
|
|
Just use a DOM parser. It will save time.
If you really, really, really want to try this approach, spawn a process, run xsd.exe with valid options on the file, run csc.exe on the .cs file created, use and Assembly.LoadFile to load the assembly.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego.
|
|
|
|
|
Hi
I want to read the caption(title) of another window in C#. Is it possible? If it is how can I do it?
Thanks.
|
|
|
|
|
Use P/Invoke. Get the hWnd of a window through one method or another, then call SetWindowText, passing the new title and hWnd as parameters
|
|
|
|
|
|
Hi folks,
i´m trying to get a SelectedListViewItemCollection threadsafe, because i´m using it in a method which is called from another thread (FileSystemWatcher_Created).
I have tried to get the collection using a delegate function, but it won´t work fine.
Here is the code:
private void FuelleUnitsAuto()
{
Invoke(new clearListViewDelegate(BeginUpdateListView), new object[] { lV_Einheiten });
Invoke(new beginUpdateListViewDelegate(ClearListView), new object[] { lV_Einheiten });
ListView.SelectedListViewItemCollection coll = (ListView.SelectedListViewItemCollection)Invoke (new selectedListViewItemsDelegate(SelectedListViewItems), new object[] { lV_Num });
foreach (cEinsatzListViewItem i in coll)
{
}
Invoke(new endUpdateListViewDelegate(EndUpdateListView), new object[] { lV_Einheiten });
}
private delegate ListView.SelectedListViewItemCollection selectedListViewItemsDelegate(ListView view);
private ListView.SelectedListViewItemCollection SelectedListViewItems(ListView view)
{
return view.SelectedItems;
}
Anyone knows this error and can help?
Thanks a lot in advance,
Tobe
modified on Friday, February 6, 2009 10:22 AM
|
|
|
|
|
Does someone know this problem?
|
|
|
|
|
My project is a windows application. After i install the setup file of this project. I am getting the first form, i need to select from four options i,e. four buttons. When i press a button, next form is displayed asking for username and password. After giving username and password, when i press login button then i am getting that exception. If i run normally in visual studio 2005 , it is executing
|
|
|
|
|
|
even thou in the past i post a link to an old post, you have to feel sorry for people who dont have a clue. They try programming before even knowing how to learn, or search on the interent.
I think it would be good if unanswered posts where auto reposted in some fashion every so often for a period of time, because im sure most people only answer recent post and unless someone who can help is online when you put the post, the chances are they wont see your question after a few hours have passed.
Anyway, dont want to stick up for the people who rely solely on asking for answers to much lol
My opinion is... If someone has already posted an answer, dont post the SAME answer
|
|
|
|
|
Hi,
I have a datagridview control that has the datasource attribute set to my binding source bndSrc . Two buttons with the below code are filling the datagrid successfully with the datatable data whenever clicked but the problem is I still get columns from the previous table that I just cant get rid of by clearing the binding source, the dataset or by refreshing the datagrid or resetting it's datasource!
Please help guys.
private void button1_Click(object sender, EventArgs e)
{
FistTableAdapter.Fill(dataSet1.Table1);
bndSrc.DataSource = dataSet1.Table1;
}
private void button2_Click(object sender, EventArgs e)
{
SecondTableAdapter.Fill(dataSet1.Table2);
bndSrc.DataSource = dataSet1.Table2;
}
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Aren't you filling the datagridview before binding it to the table you want?
I'm still pretty green, but I've done something like this and I bound the dataGridView to the desired tableBindingSource before issuing a fill statement and that worked fine for me.
dataGridView1.DataSource = tableBindingSource;
|
|
|
|
|
You should be able to just go dataGridViewControlName.Columns.Clear before you change your datasource
|
|
|
|
|
Thanks mate! I think it's working now but I still cant see any change!!
I know my problem though, it's just refreshing the datagrid which I still cant do it!!
I know my datatable is loaded using the binding navigator and seeing how much rows I have for each table when there's nothing but a dark gray background on my datagrid!!
Please tell me how to refresh this bloody control refresh() or even reassigning the datasource didnt help.
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
|
|
hi
When i was run that code i cannot received the marker in particular position in web page.
But when i was save that map via the coding ,at that time i can able to see the marker in particular lat and long position only in image format .but in webpage(aspx) a cannot be received the marker's position ..
plz guide me
This is my code snippet
protected void Button2_Click()
{
double Lat_max = 48.11576;
double Long_max = 29.17936;
mapObj map = new mapObj("1.map");
layerObj layer = new layerObj(map);
layer.name = "School";
layer.type = MS_LAYER_TYPE.MS_LAYER_POINT;
layer.status = mapscript.MS_ON;
classObj clsobj = new classObj(layer);
styleObj styobj = new styleObj(clsobj);
styobj.symbol = map.getSymbolByName("marker");
pointObj poiobj = new pointObj(0,0, 0, 0);
poiobj.setXY(Lat_max, Long_max, 0);
lineObj line = new lineObj();
line.add(poiobj);
shapeObj shp = new shapeObj ((int) MS_SHAPE_TYPE.MS_SHAPE_POINT);
shp.add(line);
layer.addFeature(shp);
imageObj img = map.draw();
}
Thanks in advance
Raju
|
|
|
|
|
No, it's not a problem in C#, the problem is that you have not yet grasped the full difference between a windows application and a web application.
What you are trying to do is possible in a web application, but it's done in a completely different way. You can't create an image in a click event and put on the page, you have to create the image in a separate page and use the url of that page as source in an image tag on the page.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I am working with WindowsApplication template of VS.NET 2005....
I have designed the form which contains a button and a listbox control....
I want to display the contents of the XML file in the listbox....error is displayed if i try include listBox1.Items.Add()
If i give Console.Writeline()...where will the output be displayed....
I am using the following code to read from XML file...
namespace ReadXMLfromFile
{
class xmlpath
{
static void Main(string[] args)
{
XmlTextReader reader = new XmlTextReader ("books.xml");
while (reader.Read())
{
switch (reader.NodeType)
{
case XmlNodeType.Element:
Console.Write("<" + reader.Name);
Console.WriteLine(">");
break;
case XmlNodeType.Text:
Console.WriteLine (reader.Value);
break;
case XmlNodeType.EndElement:
Console.Write(" Console.WriteLine(">");
break;
}
}
Console.ReadLine();
}
}
}
|
|
|
|
|
use a richTextBox instead of listbox
My opinion is... If someone has already posted an answer, dont post the SAME answer
|
|
|
|
|
Any specific reason for choosing the listbox than multiline textbox,richtextbox or treeview to display contents of xml.
|
|
|
|
|
You have a typo/html conversion error here:
Console.Write(" Console.WriteLine(">");
|
|
|
|
|
Hi everybody,
We have to store a password that we use to access an encryption certificate in the configuration of our application (it is an automated process, so we cannot ask a user for a password). We have done this for many years, using our own enceryption / decryption algorithm. The decryption would be coded in the software itself and not in a dll, so that it would not be easily accesible to others. Since we are moving the software from C++ to C# however, the easy possibilities of reverse engineering, make it an easy task for outsiders to find the used algorithm and consequently to decrypt the password, which would then give them access to the certificates used.
Does anyone have an idea of a means of incorporating routines in a c# program that cannot be easily reverse engineered (of course, if one goes through the hassle of viewing the assembly, it would always be possible to find-out, but this is a such an effort that we feel we can take that risk)
Many thanks in advance,
William
|
|
|
|