|
Your original message is here[^]. 2 things to note:
1. Please don't delete messages.
2. Give people a chance to answer them first. Don't rush with your reposts; if you haven't had an answer after a couple of days then repost it by all means.
"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
|
|
|
|
|
Hi
I want to disable the first item in the CheckedListBox control of C SHARP I checked for .selected property but i don find it in CheckedListBox property in Winform . checkedListBox2.Items[i].Equal, checkedListBox2.Items[i].GetHashcode, checkedListBox2.Items[i].GetType, checkedListBox2.Items[i].ToString() is only available.. i don find the checkedListBox2.Items[i].Enabled property... Pls help me
Regards,
Hema Krish.
|
|
|
|
|
checkedListBox1.SetItemCheckState(1, CheckState.Indeterminate);
|
|
|
|
|
Hi all.
I want listen to a telephone line via a modem programmatically and save transferred data over it to a file.
How can I do this?
Could you, please help me.
Thanks a'lot.
|
|
|
|
|
See my comment in C++ forum.
It's time for a new signature.
|
|
|
|
|
am new to linking c# to a database
am supposed to add OleDbDataAdapter to my code....is this a method and kindly show me how to do this
Regards,
Elizabeth
|
|
|
|
|
|
Hi All,
I have this string: "1x #234 Greenock Creek - Alice's - Shiraz - 2001 - 750mL = $578.05 1x #242 Greenock Creek - Cornerstone - Grenache - 2001 - 750mL = $297.55 2x #363 Maxwell - Ellen Street - Shiraz - 2002 - 750mL = $309.10 2x #369 Maxwell - Meracus 53 - Shiraz Grenache - 2002 - 750mL = $226.60"
Now i want to split this string like this:
1x #234 Greenock Creek - Alice's - Shiraz - 2001 - 750mL = $578.05
1x #242 Greenock Creek - Cornerstone - Grenache - 2001 - 750mL = $297.55
2x #363 Maxwell - Ellen Street - Shiraz - 2002 - 750mL = $309.10
2x #369 Maxwell - Meracus 53 - Shiraz Grenache - 2002 - 750mL = $226.60
I was tring to load this string into an array of char, but the performance will be affected since i have a pretty large string input. Are there any other ways to split this string.
Thanks very much.
|
|
|
|
|
You can do this with a fairly naive regex. I'm no regex expert, but I quickly knocked this one together which should satisfy your requirements here:
Regex regex = new Regex(
@"\d+x\s\#\w*[^$]+\$\d+\.\d+",
RegexOptions.IgnoreCase
| RegexOptions.Multiline
| RegexOptions.ExplicitCapture
| RegexOptions.IgnorePatternWhitespace
| RegexOptions.Compiled
);
"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
|
|
|
|
|
Thanks for your posting, but you regular expression is not working. and this is supposed to be: @"([0-9][x]\s#[0-9]+\s[A-Z,a-z,\s,',0-9]+\s-\s[A-Z,a-z,\s,',0-9]+\s-\s[A-Z,a-z,\s,',0-9]+\s-\s[0-9]+\s-\s[0-9]+mL\s=\s[$][0-9,.]+)", but it is verbose, and i need to refine it.
|
|
|
|
|
I worked out, here is the solution:
string input = "1x #234 Greenock Creek - Alice's - Shiraz - 2001 - 750mL = $578.05 1x #242 Greenock Creek - Cornerstone - Grenache - 2001 - 750mL = $297.55 2x #363 Maxwell - Ellen Street - Shiraz - 2002 - 750mL = $309.10 2x #369 Maxwell - Meracus 53 - Shiraz Grenache - 2002 - 750mL = $226.60";
string pattern = "([0-9][x] #)";
string[] substrings = Regex.Split(input, pattern);
for (int i = 0; i < substrings.Length; i++)
{
if (substrings[i] != "")
{
int j = i + 1;
Console.WriteLine(substrings[i] + substrings[j]);
i++;
}
}
Console.ReadLine();
|
|
|
|
|
Here's a RegEx:
(?'Quantity'\d+)x #(?'Number'\d+) (?'Winery'[^-]+)- (?'Brand'[^-]+)- (?'Type'[^-]+)- (?'Year'\d+) - (?'Size'[^=]+)= (?'Price'[0-9$\.]+)
Some of the values may need trimming.
|
|
|
|
|
Hi,
I have created multiview C# form application and I am displaying context menu on mouse click event. Generally the display direction of menu click is towards right and it encroaches to the other view if I click the mouse near the edge of one view.
I want that if context menu is crossing the boundry it should be displayed in opposite direction in within the same view limit. How can I do it?
Thanks in advance.
modified on Monday, May 10, 2010 3:54 AM
|
|
|
|
|
This[^] from MSDN might help.
RTFD!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
hi,
i have two ini files with same format and i have to compare them and if any change in new ini file then corporate the change in old one.hw to do that?
|
|
|
|
|
Why don't you just replace the old one with the new one?
Cheers
I don't like my signature at all
|
|
|
|
|
no i have to jst look at keys in new ini and change respective values in old ini.I dnt want to replace.
|
|
|
|
|
reason for not using replace method is i have to skip some specific keys and change others.
|
|
|
|
|
|
You can use "Notepad++", it has compare feature in it's Plugins menu.
From here you can compare two file which are text based..(i.e. .txt, .doc, etc and also .ini)
You can download it from following link, it's totally free
http://notepad-plus.sourceforge.net/uk/download.php[^]
Hope this will help!
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
i have to do it programatically.
|
|
|
|
|
Then you can load both files in string using streamreader
and then you can compare by using equal function of it.
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Comparing two text files can be tricky business and may need some complex algorithms.
If you just have a few keys in your file, then it might just be faster for you to load both files in a dictionary and then compare the values.
|
|
|
|
|
I am Using Smo to Generate Insertion Script of the database.
How can I check whether a field is Identity or not Using SMO?
|
|
|
|
|