|
"Obsolete" : "No longer in use"[^]
In practice, it means you should not use it for new projects; there is a better equivalent. If you do use it, be aware that future releases of the IDE may not support it, or may not support it fully. On your own head be it!
Would you specify a 80386 based computer for a new project? It is obsolete too.
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
I am working on creating a Datagridview Cell with a combobox which is having multiple columns in C#.I got the idea about multicoulumn combobox but i am having difficulty in implementing it to a datagridviewcombobox. Can anyone help me?
|
|
|
|
|
The canned DataGridViewComboBox does not support multi-column functionality; you'll need to implement a custom column to host your own combo box and set the proper options in order to allow it to be multi-column. Refer to the below article for information on creating custom DataGridView column classes, it's actually not that difficult to do; I've made a few custom columns using this information as the basis.
http://msdn.microsoft.com/en-us/library/7tas5c80.aspx[^]
Hope in one hand and poop in the other; see which fills up first. Hope and change were good slogans, now show us more than words.
|
|
|
|
|
how do i make such an application which is web based but multipoint sdk based also
please reply
thanks in advance
|
|
|
|
|
Please ask this question in Web Development forum. This isnot a right forum for ur question.
|
|
|
|
|
I have 3 gateways
Gateway
1: 192.168.0.1 >> DNS: 202.84.54.20
2: 192.168.0.2 >> DNS: 220.120.46.34
3: 192.168.0.3 >> DNS: 203.73.86.10
Any point of time my LAN TCP Settings will be using any one of the above configuration.
and i can check the internet connectivity on the current configuration but want to determine whether internet is available or not on any of the gateways apart from current one w/o configuring it.
My preference for the solution is : How can i check internet connectivity on different gateway & DNS Server Setting without having to change the LAN Settings
mayuresh
|
|
|
|
|
One way to do this is connect to any site from the certain interface.
An example:
static void Main(string[] args) {
Console.WriteLine(IsInternetUp("192.168.1.6"));
Console.WriteLine(IsInternetUp("127.0.0.1"));
}
private static bool IsInternetUp(string address) {
IPEndPoint localEp = new IPEndPoint(IPAddress.Parse(address), 0);
TcpClient client = new TcpClient(localEp);
try {
client.Connect("google.com", 80);
} catch (SocketException) {
return false;
} finally {
client.Close();
}
return true;
}
This will give:
True
False
Another way is to make a ping from a certain interface:
<br />
ping -S 192.168.1.6 google.com<br />
ping -S 127.0.0.1 google.com<br />
But I'm not sure whether it's possible to implement this using .NET Framework built-in classes.
Possibly this will help you: [^]
|
|
|
|
|
I am trying to insert a code block into the custom indicator wizard at Ninjatrader. They use C#. I've found a code block for what I want that produces eSignal's fractal index, I think they use javascript, and it inserts OK except for only 6 "expects ;" errors which I can fix. But at the end of this block, it gives an "expects statement" error. What ending statement goes there??? Will this revise the javascript version to Ninjascript OK? The last part of the code looks like this:
function verify() {
var b = false;
if (getBuildNumber() < 779) {
drawTextAbsolute(5, 35, "This study requires version 8.0 or later.",
Color.white, Color.blue, Text.RELATIVETOBOTTOM|Text.RELATIVETOLEFT|Text.BOLD|Text.LEFT,
null, 13, "error");
drawTextAbsolute(5, 20, "Click HERE to upgrade.@URL=http://www.esignal.com/download/default.asp",
Color.white, Color.blue, Text.RELATIVETOBOTTOM|Text.RELATIVETOLEFT|Text.BOLD|Text.LEFT,
null, 13, "upgrade");
return b;
} else {
b = true;
}
return b;
}
Ninjatrader's Ninjascript expects a closing statement right after the last "}" - What the heck is it? The whole code is here "http://forum.esignalcentral.com/showthread.php?threadid=22092
|
|
|
|
|
Hi guys.
I'm looking for a sample of ListView that contains some ListViewItems in XAML code.
I have been searching the web but I couldn't find any useful sample !
Could you guide me ?
Thanks.
|
|
|
|
|
|
Hi
sorry for bad subject!!
let me explain my project.
I create a Gate simulator ( AND - OR - XOR...) each gate is a user control.
user drag desired gates to page and then connect them to each other.
(for example the output of OR should connect to input of XOR gate)
I have no idea to how connect them to gather?!!
appreciate for your help.
N
o
N
ame
|
|
|
|
|
Hi,
1.
you need "wires" to interconnect input and output pins of your gates. So in your approach, why not create some "Wire" user controls (either arbitrary size and orientation, or a horizontal and a vertical having arbitrary length).
2.
I wouldn't use user controls at all for a drawing or CAD app; just a simple Panel onto which you add "electronic components", which would be instances of "Wire" and "SomeGate", both derived from "ElectronicComponent"; keep them in a List<ElectronicComponent>; give them a "Draw" method so they paint themselves on a given Graphics; use the Panel's mouse events to grab, move, resize them. Then add logic to discover which components are connected to which, so you get a circuit.
Suggestion: have a look at the source of some drawing app, maybe Paint.NET
|
|
|
|
|
thanks for your help and idea.
I will try your idea. but my experience in draw and graphics is zero
N
o
N
ame
|
|
|
|
|
you might have a look at my Sokoban article, it has some simple graphics; it does not however have click-and-drag.
If that does not help, maybe you should start with a simpler app first.
|
|
|
|
|
actually I don't want write this app, my teacher pressure on me to do this
I will take a look at your articles,
regards
N
o
N
ame
|
|
|
|
|
Hi all
i need helping of how to fragment a payload data at IP layer
packet fragmentation: devide an IP packet into pecies of sub packets.........
Regards
modified on Monday, December 28, 2009 2:29 AM
|
|
|
|
|
The the following link it's about: IP packet format
The IP packet format
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
after adding a key in app.config for format
i tried this, in the Main method
CultureInfo culture = (CultureInfo)CultureInfo.CurrentCulture.Clone();
culture.DateTimeFormat.ShortDatePattern = "dd-MMM-yyyy";
culture.DateTimeFormat.LongTimePattern = "";
Thread.CurrentThread.CurrentCulture = culture;
i was able to change pattern for short date, but what i want is that the datetimepicker format's property defaults
to what i set in config file.
like if i set the datetime format in config file to Long the rule will applay to entire application.
do i have to check and change manually for each control.
thanks
modified on Sunday, December 27, 2009 2:46 AM
|
|
|
|
|
You could:
0) You could override the DateTime class with your own
1) You could setup a static method in your application that does it for you.
2) You could simply specify a string constant and use it when you call DateTime.ToString()
3) You could setup the culture object you've already got there as static, and the rest of the app could use it. (You would have to initialize it from the config file via a static method as well.
I would probably go with #3 myself.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
#3 is fine
#0 isn't, as DateTime is sealed.
|
|
|
|
|
thanks for reply
first:
as i mentioned in my question, i was able to change the pattern of the format, not the format property
for option 2: it does not work for me, because i am actually showing the date in the datetimepicker
not into textbox control, so i'm not using DateTime.ToString()
for option 3:
do you mean that i have to access the static cultureinfo object every time i need to to display the date in
datetimepicker
or do i have to change the format manually in each datetimepicker contro on my form based on the cultureInfi
properties
excuse my bad english
thanks for the reply again
|
|
|
|
|
Hussam Fattahi wrote: for option 3:
do you mean that i have to access the static cultureinfo object every time i need to to display the date in
datetimepicker
I don't know. I've never had to do what you're trying to do. Experiment with it. The benefit of creating a static culture object is that you don't have to recreate it every time you need it. It's always there, and it's always the same. I suspect that you can get away with setting the control when the form is constructed, and then forget about it.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: I suspect that you can get away with setting the control when the form is constructed, and then forget about it.
yes, i can do that, but then i have to put it in each form in my application.
i'm looking if there is a way to do it globaly
do it in one place and this is it for the whole application
thanks anyway
|
|
|
|
|
Well, you could derive your own datetime control from the .Net DateTimePicker class, and set it in the constructor, but then you'd have to remember to use YOUR datetimepicker control instead of .Net's version...
If it were me, I would probably just take the easy way out and set the custom format on each control that needed it, and be done with it.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Hmm,
You could also create an Extension method if you are using .NET 3.5 or better.
|
|
|
|