|
Anyone care to help me get going? Being new to configuration files I'm a bit lost. Searching didn't lead me far, didn't find a clear example. MSDN example was brutally long.
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.Save();
What is needed to create a section, and put a key / value into that section?
Thanks for your help.
(Have already added reference, using, and config file)
|
|
|
|
|
Please go to Articles and look for Custom Configuration Sections in .Net 2.0 from Luis Angel R.C. is written in VB but it's translation is very easy, and very complete and clear , only has a problem for saving at the end.
Regards
|
|
|
|
|
|
Hi All,
Suppose I want to write a web program to find out which websites relevant to my search words, have the number one ranking in all search engines? In other words if I want to find all websites that appear at the top of the search result list that have to do with say "FootBall High Lights", what would I have to consider when writing a web program for such a purpose? I would like the program to go and search all search engines not just Google or Yahoo. Thank you in advance for your help.
|
|
|
|
|
|
I would like to know if is there any parameter which let me ask for confirmation of the Mail arrival using System.Net.Mail and the sender SMTPClient.
|
|
|
|
|
No standard way for Read receipt. But there are some headers I guess specific to outlook, so that if someone downloads the mails to outlook it would get the facility..
well, for a general solution, you need to find a trick.
Just place an img tag on the email you send, the src of which points to a handler. Just place an Unique GUID so that whenever the mail is opened, the server will hit for the image and you will get the time when email is read.
|
|
|
|
|
Most email apps now block this little trick.
|
|
|
|
|
Yes.. I know... Any workaround ?
|
|
|
|
|
No. Not anything that can be considered reliable.
|
|
|
|
|
Hello,
This is my first attempt at writing an event handler.
I am writing a simple packet capture utility utilizing a .NET interface to the WinPCap lib.
However, I've come across an error and do not know how to solve it.
private void button1_Click(object sender, EventArgs e)
{
List<PcapDevice> devices = Pcap.GetAllDevices();
PcapDevice device = devices[2];
device.OnPacketArrival += new SharpPcap.Pcap.PacketArrivalEvent(device_PcapOnPacketArrival);
device.Open(true, 1000);
Console.WriteLine("-- Listenning on {0}, hit 'Enter' to stop...",
device.Description);
device.StartCapture();
Console.ReadLine();
device.StopCapture();
device.Close();
}
private static void device_PcapOnPacketArrival(object sender, SharpPcap.Packets.Packet packet)
{
DateTime time = packet.PcapHeader.Date;
int len = packet.Header.Length;
Console.WriteLine("{0}:{1}:{2},{3} Len={4}",
time.Hour, time.Minute, time.Second, time.Millisecond, len);
}
new SharpPcap.Pcap.PacketArrivalEvent(device_PcapOnPacketArrival) throws an error:
"No overload for 'device_PcapOnPacketArrival' matches delegate 'SharpPcap.Pcap.PacketArrivalEvent'"
Here is some information that may prove useful:
"public delegate void PacketArrivalEvent(object sender, SharpPcap.PcapCaptureEventArgs e)
Member of SharpPcap.Pcap"
Also, I am referring to the outdate sample code located on the main site for the class wrapper.
How can I avoid this error? Any assistance is appreciated.
Thanks,
Matt
|
|
|
|
|
Look closely at how the two are declared:
void device_PcapOnPacketArrival(object sender, SharpPcap.Packets.Packet packet)
delegate void PacketArrivalEvent(object sender, SharpPcap.PcapCaptureEventArgs e)
See the difference?
|
|
|
|
|
Thanks soo much guys.
I sincerely appreciate the explanation.
Event handlers? Check.
|
|
|
|
|
Gideon is right. Your method signature does not match the delegate signature. If you are using Visual Studio, it automatically creates the method stub with the correct signature for you.
|
|
|
|
|
Hi
I want a treeview that show like menu?
I mean that instead of open treeview in left side or right side , i want to open treeview in bottom side like menu?
I want to use treeview because i want to use checkbox in it and i can check choices more than one of the checkboxes?
If anyone have another suggestion i appreciate?
|
|
|
|
|
Tree view does NOT do that. Menu items ARE checkable if you set them to be.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
TreeView and Menu are two different controls that exist for different purposes. TreeView cannot behave like a menu. If you want check box feature, menu control does support it. Use MenuStrip instead of menu and ToolStrip instead of Toolbar. They look good & blend with the OS theme and have more features than their standard counterpart.
|
|
|
|
|
Hi,
when i have to use and when i shld not use generics ?
Thanks in advance
Azeez.
|
|
|
|
|
|
A quick rule of thumb - if your application is doing boxing/unboxing and there are common features on a class, possibly based off an interface, then you should really consider using generics.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
|
Wherever you can - Generics is a very broad subject and it has many applications. It allows your code to work with more than one type at runtime with type safety. If you use a generic List instead of an object array, there's no boxing/unboxing happening at runtime which actually improves performance by orders of magnitude. And there are millions of advantages. I would suggest that you go over the articles on the Internet to learn generics. Initially it may seems to be a complicated technology, but once you start appreciating its purpose, thing will be easy for you.
Essential C# 2.0: Chapter 11: Generics[^]
|
|
|
|
|
Hello.
I have a Datagrid which is bound to a dataset. One of the columns I have changed to ComboBoxColumn. This is bound to a column in the dataset. I read that you can change a combobox dropdown style to dropdown in order to make it editable. I can do this with a normal combobox but I can't work out how to do it with a combobox within a datagridview.
What I am trying to achieve is having a combobox that is editable, meaning that you can type something in the box that isn't in the bound list. I am wanting it to also autofill if what is typed matches what is in the bound list. If it is not in the bound list I am wanting to be able to add to the list what was typed in. (add a new row to the dataset).
So basically a field that you can choose from a list or type in your own. This of course is bound to a dataset which in turn will add to the underlying table in the database.
I am using Visual Studio 2008
|
|
|
|
|
Hi,
I'm writing a Windows Forms application in C# and my design view is now only displaying HTML. Is this an alternative view for the form design and if so, how do I revert back? Have I managed to set some flag I shouldn't have?
|
|
|
|
|
My guess is that you are seeing XAML and not HTML, which would indicate you are creating a WPF windows application perhaps? Try choosing a non-WPF windows forms project.
|
|
|
|