Click here to Skip to main content
15,910,121 members
Home / Discussions / C#
   

C#

 
GeneralRe: pointer in C# Pin
amitmohanty12-Jul-05 6:03
amitmohanty12-Jul-05 6:03 
GeneralRe: pointer in C# Pin
Guffa12-Jul-05 6:45
Guffa12-Jul-05 6:45 
GeneralRe: pointer in C# Pin
amitmohanty12-Jul-05 6:49
amitmohanty12-Jul-05 6:49 
GeneralRe: pointer in C# Pin
Guffa12-Jul-05 7:39
Guffa12-Jul-05 7:39 
GeneralRe: pointer in C# Pin
3Dizard12-Jul-05 7:09
3Dizard12-Jul-05 7:09 
GeneralExcel Reporting using a Template Pin
Alomgir Miah12-Jul-05 4:34
Alomgir Miah12-Jul-05 4:34 
GeneralEventhandler Pin
pssuresh12-Jul-05 4:12
pssuresh12-Jul-05 4:12 
GeneralRe: Eventhandler Pin
S. Senthil Kumar12-Jul-05 4:39
S. Senthil Kumar12-Jul-05 4:39 
Yes, you can derive your own class from EventArgs and add custom fields to it.

I'm wondering how it would help you solve your problem, in your case, you know beforehand the range of valid values that YearBuiltTextBox and YearRenovateTextBox can accept. Why not put the range information in a hashtable or similar datastructure and do the ParseInteger stuff after retrieving the range?

I'm suggesting something like this
Hashtable rangeMap = new Hashtable();
rangeMap[YearBuiltTextBox] = new int[] {1800, 2200};
rangeMap[YearRenovateTextBox] = new int[] {2400, 2800};

this.YearRenovateTextBox.Enter += new EventHandler(Parse_TextBox);
this.YearBuiltTextBox.Enter += new EventHandler(Parse_TextBox);


and withing ParseTextBox
public void Parse_TextBox(System.Object sender, System.EventArgs e)
{
   int[] range = (int[])rangeMap[sender];
    object parseValue = DataFormatter.ParseInteger(this.YearBuiltTextBox.Text,range[0], range[1]); 
}


Hope this helps.



Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
GeneralRe: Eventhandler Pin
Gavin Jeffrey12-Jul-05 4:43
Gavin Jeffrey12-Jul-05 4:43 
GeneralRe: Eventhandler Pin
Judah Gabriel Himango12-Jul-05 4:57
sponsorJudah Gabriel Himango12-Jul-05 4:57 
GeneralRe: Eventhandler Pin
J4amieC12-Jul-05 5:52
J4amieC12-Jul-05 5:52 
GeneralDatakeyfield in Datagrid Pin
livez12-Jul-05 4:07
livez12-Jul-05 4:07 
GeneralPessimistic locking Pin
rmedo12-Jul-05 3:47
rmedo12-Jul-05 3:47 
GeneralRe: Pessimistic locking Pin
Dave Kreskowiak12-Jul-05 5:56
mveDave Kreskowiak12-Jul-05 5:56 
GeneralWi-fi Pin
jonty1912-Jul-05 3:34
jonty1912-Jul-05 3:34 
GeneralRe: Wi-fi Pin
Dave Kreskowiak12-Jul-05 5:55
mveDave Kreskowiak12-Jul-05 5:55 
GeneralRe: Wi-fi Pin
jonty1912-Jul-05 6:06
jonty1912-Jul-05 6:06 
GeneralCrystal Reports help required Pin
asmyan12-Jul-05 3:27
asmyan12-Jul-05 3:27 
GeneralWindows Service Pin
the_jebus12-Jul-05 3:18
the_jebus12-Jul-05 3:18 
GeneralRe: Windows Service Pin
Dave Kreskowiak12-Jul-05 5:52
mveDave Kreskowiak12-Jul-05 5:52 
GeneralRe: Windows Service Pin
the_jebus12-Jul-05 7:26
the_jebus12-Jul-05 7:26 
GeneralRe: Windows Service Pin
Dave Kreskowiak12-Jul-05 8:10
mveDave Kreskowiak12-Jul-05 8:10 
QuestionHow to save image of a panel with panels inside it Pin
Atlemann12-Jul-05 3:01
Atlemann12-Jul-05 3:01 
GeneralSening Keys to App using directinput Pin
moongood12-Jul-05 2:55
moongood12-Jul-05 2:55 
GeneralRe: Sening Keys to App using directinput Pin
Dave Kreskowiak12-Jul-05 5:23
mveDave Kreskowiak12-Jul-05 5:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.