|
In my example, it is true that implementing ISerializable is unnecessary, but you would still have to implement the constructor that normally goes along with that interface (or you would get a deserialization error if you attempted binary serialization). I think that in the .Net 3.0 framework you can add extensions to classes that you would otherwise not have access to, so you may look into that if you have the 3.0 framework available to develop against. Using this methodology, you could add the methods implemented by IXmlSerializable to the actual collections, but I don't think you can add interfaces (like IXmlSerializable) to the inherited interfaces list. Anyway, good luck, and let us know if you do find an elegant way to go about this.
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
Hi,
I want to develpe a windows application that should be executable in a LAN.
a computer is as server, and another are clients.
Now, I develope it just a standalone application,i.e:
I install application on each client and instal SQL Server on Server and clients use IP address of Server in its Connectionstring
Or I should develope it in another approach?
I don't develope such application before that must be ran in LAN.
Best wishes
|
|
|
|
|
You have the basic idea. It could get more complicated depending on the requirements.
only two letters away from being an asset
|
|
|
|
|
Hello all:
When I was desin a form , it have many radio buttons , how can I save the selected items between the radio buttons on a txt file after I closed the form.
Thanks
|
|
|
|
|
Create the file
Write checkbox.checked value
Close the file
What part don't you understand or are having difficulties with?
only two letters away from being an asset
|
|
|
|
|
Hi:
Sorry , I didn't mean that , when I run my form , inside it there are many radio buttons , when I choose a value , I want this value directly stored in a txt file ........
Thanks
|
|
|
|
|
Handle the selected event and write it to your file.
It would be nice also if you took out all the empty space on your signature line
only two letters away from being an asset
|
|
|
|
|
Hello :
Thank you very much for your intersting , but can you give me an example to do that or explain the steps to do that ,please......
Thanks
|
|
|
|
|
How about at least try something on your own? What part are you having difficulties with? Handling an event? Writing to a file? What? These are not complex topics.
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: What part are you having difficulties with
Perhaps it was the "taking all the empty lines out your sig" part.
|
|
|
|
|
Hello :
I'll try it myself , but I want to know how can I start deal with handles and write to a file ......
Thanks
|
|
|
|
|
There is a little textbox at the top of the page, the one that has Search next to it. You should try it.
If you find that difficult, perhaps another career would be better.
Take the empty lines out of your signature.
only two letters away from being an asset
|
|
|
|
|
This should get you started.
void button1_Click(object sender, EventArgs e)
{
foreach (Control thisControl in Controls)
{
if (thisControl is RadioButton)
{
RadioButton thisButton = (RadioButton)thisControl;
if (thisButton.Checked)
{
string path=Environment.GetFolderPath(
Environment.SpecialFolder.LocalApplicationData
) + "\\test.txt";
TextWriter textWriter = new StreamWriter(path);
textWriter.WriteLine(thisButton.Name);
textWriter.Close();
Console.WriteLine("Data written to " + path);
break;
}
}
}
}
Now use this to get yourself going and post back with a more specific issue if one arises - and alter that signature!
|
|
|
|
|
Rather than learning some very simple techniques, all he has to to do is copy your code. Hope you will always be around for him. Give him a fish, feed him for a day; teach him to fish...
only two letters away from being an asset
|
|
|
|
|
I take your point and I agree totally, but if he is to learn some simple techniques he needs a starting place. What better place than here? Surely that's part of what CP is about.
You'll notice the code I gave is very vague and pretty much useless. To be put into a pratical situation it would need some significant alteration that would require, and hopefully stimulate, a proper understanding of the code I gave.
|
|
|
|
|
Hello
I want to thank (DaveyM69) about the support, and your advance (Mark Nischalke) is nice but I hope you too when you look at it you didn't copy it, it's a disscusing forum, so what is this forum do if we don't sharing information between us....
Thanks
|
|
|
|
|
//This particular function retreives and displays the currency results of the usered selected input
function DisplayCurrencyValue(link,currency)
{
var str,objXMLNode,objXMLDoc,objEmployee,strHTML;;
var stri=AJAXUtilities.GetCurrencyValue(link,currency);
str = stri.value;
var result=parseFloat(str);
var value=parseFloat(document.getElementById("txtConvert").value)
if(isNaN(value))
{
value=1;
document.getElementById("txtConvert").value=1
}
var city=document.getElementById("ddlTo");
var url=document.getElementById("ddlFrom");
var path=url.options[url.selectedIndex].text;
var pathCurr=url.options[url.selectedIndex].value;
var currencyAbr=pathCurr.substring(pathCurr.length-7,pathCurr.length-7+3);
var curr=city.options[city.selectedIndex].value;
result=result*value;
var str=value+" "+currencyAbr+" = "+ result +" "+curr;
document.getElementById("lblConverResult").value=str;
// document.getElementById("txtConvert").focus();
}
---------------------------------------------------------------
*
*
*
--------------------------------------------------------------
public string GetCurrencyValue(string url, string currency)
{
DataSet ds3 = new DataSet();
ds3.ReadXml(url, XmlReadMode.ReadSchema);
DataTable table = ds3.Tables[3];
string curren = currency.Trim();
string title = "";
string rate = "";
string exchange = "";
string outPut = "";
foreach (DataRow row in table.Rows)
{
title = row["title"].ToString();
int endPoint = title.IndexOf("=");
int startPoint = title.IndexOf("(");
int ePoint = title.IndexOf("(");
rate = title.Substring(endPoint + 2);
exchange = (rate.Substring(0, 3));
if (exchange.Equals(curren))
{
outPut = rate.Substring(5, (rate.Length - 1) - 5);
}
rate = title.Substring(startPoint + 1, 3);
}
decimal tr = Convert.ToDecimal(rate.Substring(0, rate.Length - 1));
tr = tr * 100;
//XmlDocument xmlDoc = new XmlDocument();
return outPut;
}
--------------------------------------------------------------------
-------------------------------------------
Result displaying lick this:
200 USD = NaN INR
plz tell me why hear NaN is displaying..
--------------------------------------------
|
|
|
|
|
NaN - Not A Number?
Try converting all those strings to decimals before doing any calculations and/or comparisons.
|
|
|
|
|
Hi everyone,
I have always held some kind of a fascination with the resource editor in Visual Studio. I could never understand how VS allows a user to drag/resize/modify buttons, edit boxes, and other controls on a dialog inside a window.
Can anyone throw some light on the matter?
Thanks!
_________________________
Kri5
|
|
|
|
|
|
Thanks !
_________________________
Kri5
|
|
|
|
|
Microsoft hired Harry Potter to write it.
Sorry, couldn't resist...
|
|
|
|
|
hehe..
_________________________
Kri5
|
|
|
|
|
hi to all!
I m implementing Bandwidth monitor and i don't know i can do this.
I want to know how i can determine the network packet size and
want to calculate the network bandwidth usage .
can anyone tell me how i can determine the incoming or out going packet size in c# and what is the formule to calculte the bandwidth usge ?
thanks to all.
Tahir
|
|
|
|
|
Hi,
Please, I'm using SQL Server and stored procedures which generates many numerical values (floats).
I'd like to know, using Visual C#, how to format these values into one of the two following formats: #,##E+## or #,##E-##
Thank you so much in advance !
|
|
|
|