|
|
Arrays, Collections, HashTables, ... What works best depends on what your storing and how you want to access it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi All,
I am developing a Wireless Network monitoring tool, I have tried importing CreateFile and DeviceIoControl. But its not working for me. I need all wireless details such as SSID,BSSIList,Signalstrength etc.. I have even tried WMI. I think the reason for failure of these two methods is incorrect specification of Name of the device. Is there any namespace, classes in C# to get this done can anyone help me its very urgent.
Thanks in advance,
Mohan
|
|
|
|
|
None at all. WMI doesn't have any classes that expose this either. You'r best bet is a third party library. But be warned, not evey wireless card is capable of doing this. You might want to checkout AirSnare for some library hints.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
When you start VS, you get the project list with the recent edited projects. I wonder why the date of edit is the date of project creation all the time. I need the last date of modification.
Has anybody an answer for this problem. Thank you !
|
|
|
|
|
|
That's the main problem. VS takes the date of the *.sln file, not the other one, but I didn't found a way to change/update the *.sln file yet.
|
|
|
|
|
|
Thank you! It's the saving option in the project explorer by clicking the context menu.
|
|
|
|
|
Can anyone recommend a commercial PDF server product.
|
|
|
|
|
hi,
I have written code to insert node
but its inserting after root node i want that it should insert after farm-config
pls check my code
private void button6_Click_1(object sender, System.EventArgs e)
{
XmlDocument xmldoc = new XmlDocument();
xmldoc.Load("c:/farm-config.xml");
XmlElement farmelement = xmldoc.CreateElement("farm");
xmldoc.DocumentElement.InsertBefore(farmelement,xmldoc.DocumentElement.LastChild);
FileStream fsxml = new FileStream("c:/farm-config.xml",FileMode.Truncate,FileAccess.Write,FileShare.ReadWrite);
// XML Document Saved
xmldoc.Save(fsxml);
}
Pls modify my existing code so that i could insert after farm-config node
Hi this is my original stururtue of XML file
<?xml version="1.0" encoding="UTF-8"?>
<root>
<farm-config>
<farm name="dev1">
<connection address="localhost" user="root" selectedConnection="1" password="ram">
<lastJob>Copy-All</lastJob>
<lastConnection startdate="2005-05-10" starttime="12:43:23" enddate="2005-05-10" endtime="12:58:32" />
<state>1</state>
</connection>
</farm>
</farm-config>
</root>
after inserting XML looks like in the given below structure
----- --------- ----------------
<?xml version="1.0" encoding="UTF-8"?>
<root>
<farm />
<farm-config>
<farm name="dev1">
<connection address="localhost" user="root" selectedConnection="1" password="ram">
<lastJob>Copy-All</lastJob>
<lastConnection startdate="2005-05-10" starttime="12:43:23" enddate="2005-05-10" endtime="12:58:32" />
<state>1</state>
</connection>
</farm>
</farm-config>
</root>
I want Xml to be inserted after farm-config
This should be inserted like that
I am giving you the structure of XML file
What fucntion should i write or modify my existing code
For the code see above
<?xml version="1.0" encoding="UTF-8"?>
<root>
<farm-config>
<farm />
<farm name="dev1">
<connection address="localhost" user="root" selectedConnection="1" password="ram">
<lastJob>Copy-All</lastJob>
<lastConnection startdate="2005-05-10" starttime="12:43:23" enddate="2005-05-10" endtime="12:58:32" />
<state>1</state>
</connection>
</farm>
</farm-config>
</root>
regards
sanjeev
|
|
|
|
|
Correct me if I'm wrong but the xmldoc.DocumentElement.LastChild would return farm-cfg since the only elements in the xml doc are root and farm-cfg. If this is the case then wouldn't you want to use InsertAfter if you are trying to get the element to insert after farm-cfg?
|
|
|
|
|
hi,
I tried using InsertAfter it produces like the result
<?xml version="1.0" encoding="UTF-8"?>
<root>
<farm-config>
<farm name="dev1">
<connection address="localhost" user="root" selectedConnection="1" password="ram">
<lastJob>Copy-All</lastJob>
<lastConnection startdate="2005-05-10" starttime="12:43:23" enddate="2005-05-10" endtime="12:58:32" />
<state>1</state>
</connection>
</farm>
<farm />
</farm-config>
</root>
private void button6_Click_1(object sender, System.EventArgs e)
{
XmlDocument xmldoc = new XmlDocument();
xmldoc.Load("c:/farm-config.xml");
XmlElement farmelement = xmldoc.CreateElement("farm");
xmldoc.DocumentElement.InsertAfter(farmelement,xmldoc.DocumentElement.LastChild);
FileStream fsxml = new FileStream("c:/farm-config.xml",FileMode.Truncate,FileAccess.Write,FileShare.ReadWrite);
// XML Document Saved
xmldoc.Save(fsxml);
}
I need to insert after farm node
pls reply
regards
sanjeev
|
|
|
|
|
XmlElement 's have a PrependChild Option that add the node as the first child, so:
<br />
XmlElement farmelement = xmldoc.CreateElement("farm");<br />
xmldoc.DocumentElement["farm-config"].PrependChild(farmelement);<br />
|
|
|
|
|
hi,
These contents i want to insert after farm elements where farm is equal to dev2
<database state="0" name="one" sourceType="amacs">
<database>
I want Xml(database) to be inserted after farm where farm is equal to "dev2"
I am giving you the structure of XML file
<?xml version="1.0" encoding="UTF-8"?>
<root>
<farm-config>
<farm name="dev1">
<connection address="localhost" user="root" selectedConnection="1" password="ram">
<lastJob>Copy-All</lastJob>
<lastConnection startdate="2005-05-10" starttime="12:43:23" enddate="2005-05-10" endtime="12:58:32" />
<state>1</state>
</connection>
<database state="0" name="bd_plc1_house1_14022005" sourceType="amacs">
<tables state="0" name="feed_delivery">
</table>
</database>
</farm>
<farm name="dev2">
<connection address="localhost" user="root" selectedConnection="1" password="ram">
<lastJob>Copy-All</lastJob>
<lastConnection startdate="2005-05-10" starttime="12:43:23" enddate="2005-05-10" endtime="12:58:32" />
<state>1</state>
</connection>
</farm>
</farm-config>
</root>
pls send me code for that
regards
sanjeev
|
|
|
|
|
Hai all,
i have developed a program and i want make it as demo version .....
how shuld write code such that my demo version expires once the date of expiration crossed.
if i create a table with start date as column ,what if user changes the date?
shuld i need to encrypt the date or is there any other way >
help me out
regards,
RANA
|
|
|
|
|
i need help to set Html file as a desktop wallpaper using C#
thx for ur interest
|
|
|
|
|
I have gone back to the original synchronous client/server code, however keeping the BeginAccept and EndAccept in order to alleviate the need for a keep alive. I have now run into a final problem being Encoding and streaming.
1) What would be the best Encoding for sending String messages but also files? (Is there 1 encoding that could handle both?) I have had success just opening a file, converting to UTF8, converting back to Default, then writing to another file, but somewhere along the line my client/server code muffles the data.
2) Should I use the socket stream or the socket directly for sending/receiving? Is there any real difference (IE socket.Send(..) streamWriter.Write(..)) Currently I'm using a mixture of both and I don't think that it is good coding.
Thanks in advance.
|
|
|
|
|
We have developed a framework lib in C# that will be used by many of our Apps. For tracing purpose we use .Net reflection and log all the Class elements as the messages flow through various layers of each assambly. But we are unhappy with this generic logic because we end up logging a lot of class members that are needless to be logged.
Can we use custom attributes for overcoming the problem? The message classes will dictate which all class members should become a part of the trace logs.
Will be grateful for anyone who can give suggestions. Thanks.
Regards,
Senthil.
|
|
|
|
|
I think this can help u:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcwlkattributestutorial.asp
|
|
|
|
|
Can on use "transforming" and "stretching" to copy a part of one picture to another picture object.
Thanks
|
|
|
|
|
You can use Graphics.DrawImage to draw part of one image onto another.
Just use:
Graphics g1 = Graphics.FromImage(destinationImage);
g1.DrawImage(sourceImage, you can specify source coordinates and destinartion coordiates here just lookup the many overload for DrawImage);
g1.Dispose();
|
|
|
|
|
Thanks for that
When I try that code i.e.
_____________________________________________________________________________
Graphics g1 = Graphics.FromImage(viewer1.Image);
g1.DrawImage(dxfdefaultBox.Image, new Rectangle(1,1,400,300),new Rectangle(1,1,1000,1000),GraphicsUnit.Pixel);
g1.Dispose();
_____________________________________________________________________________
I get a "An unhandled exception of type 'System.ArgumentNullException' occurred in system.drawing.dll".
viewer1.Image is stated as <undefined value="">
viewer1 does exist as a pictureBox on the form, and I can write directly to it through a device context -do you have any idea as to why it would appear as a null item in this use ?
Thanks
|
|
|
|
|
hi all,
I am doing a database Application using C# and SQL Server 2000.
my application is always running (24hours)..
while running the application,the sql server stop and connected.
after that the application generate error "GENERAL NETWORK ERROR..CONTACT YOUR DOCUMENTATION"
..
Can any ones please help me to solve the problem.?
thanks in advance..
|
|
|
|
|
Hi!
This info is too sparse to provide true help. But if I understand your request correctly, the SQLServer cannot be accessed after a while, correct?
The "GENERAL NETWORK ERROR" is in your app when you try to query the SQL Server?
If it's not happening immediately it sounds like a ressource leak.
Make sure you free/dispose of any connections you create after you don't need them anymore.
mav
|
|
|
|