Click here to Skip to main content
15,913,709 members
Home / Discussions / C#
   

C#

 
GeneralRe: Word interop problem Pin
Amos_Keeto16-Jun-06 8:02
Amos_Keeto16-Jun-06 8:02 
GeneralRe: Word interop problem Pin
Dustin Metzgar16-Jun-06 8:11
Dustin Metzgar16-Jun-06 8:11 
GeneralRe: Word interop problem Pin
Amos_Keeto17-Jun-06 0:41
Amos_Keeto17-Jun-06 0:41 
QuestionIs there a way to consolidate this? Pin
Blubbo16-Jun-06 6:47
Blubbo16-Jun-06 6:47 
AnswerRe: Is there a way to consolidate this? Pin
Dustin Metzgar16-Jun-06 7:09
Dustin Metzgar16-Jun-06 7:09 
GeneralRe: Is there a way to consolidate this? Pin
RonBou16-Jun-06 7:19
RonBou16-Jun-06 7:19 
GeneralRe: Is there a way to consolidate this? Pin
RonBou16-Jun-06 7:33
RonBou16-Jun-06 7:33 
GeneralRe: Is there a way to consolidate this? Pin
Guffa16-Jun-06 8:41
Guffa16-Jun-06 8:41 
Nothing like a challange. 36 lines. Wink | ;)

private void do(Contol upDown, Control upDown2, string math, Control picker, Control picker2) {
	upDown2.Visible = (upDown.Visible && math == "Range");
	picker2.Visible = (picker.Visible && math == "Range")
}

private void cbMath_IndexChanged(object sender, System.EventArgs e) {
	switch (((ComboBox)sender).Name) {
	case "cbMathA":
		do(this.numericUpDownAL, this.numericUpDownAR, this.cbMathA.Text, this.dateTimePickerAL, this.dateTimePickerAR);
		break;
	case "cbMathB":
		do(this.numericUpDownBL, this.numericUpDownBR, this.cbMathB.Text, this.dateTimePickerBL, this.dateTimePickerBR);
 		break;
	case "cbMathC":
		do(this.numericUpDownCL, this.numericUpDownCR, this.cbMathC.Text, this.dateTimePickerCL, this.dateTimePickerCR);
		break;
	case "cbMathD":
		do(this.numericUpDownDL, this.numericUpDownDR, this.cbMathD.Text, this.dateTimePickerDL, this.dateTimePickerDR);
		break;
	case "cbMathE":
		do(this.numericUpDownEL, this.numericUpDownER, this.cbMathE.Text, this.dateTimePickerEL, this.dateTimePickerER);
		break;
	case "cbMathF":
		do (this.numericUpDownFL, this.numericUpDownFR, this.cbMathF.Text, this.dateTimePickerFL, this.dateTimePickerFR);
		break;
	case "cbMathG":
		do (this.numericUpDownGL, this.numericUpDownGR, this.cbMathG.Text, this.dateTimePickerGL, this.dateTimePickerGR);
		break;
	}
}



---
b { font-weight: normal; }

GeneralRe: Is there a way to consolidate this? [modified] Pin
Robert Rohde16-Jun-06 9:32
Robert Rohde16-Jun-06 9:32 
GeneralRe: Is there a way to consolidate this? [modified] Pin
Blubbo16-Jun-06 9:48
Blubbo16-Jun-06 9:48 
GeneralRe: Is there a way to consolidate this? Pin
Guffa16-Jun-06 10:07
Guffa16-Jun-06 10:07 
GeneralRe: Is there a way to consolidate this? Pin
Robert Rohde16-Jun-06 10:21
Robert Rohde16-Jun-06 10:21 
QuestionMAC Address Pin
moro14516-Jun-06 6:40
moro14516-Jun-06 6:40 
AnswerRe: MAC Address [modified] Pin
Ravi Bhavnani16-Jun-06 6:52
professionalRavi Bhavnani16-Jun-06 6:52 
GeneralRe: MAC Address Pin
moro14516-Jun-06 8:17
moro14516-Jun-06 8:17 
AnswerRe: MAC Address Pin
Ravi Bhavnani16-Jun-06 8:25
professionalRavi Bhavnani16-Jun-06 8:25 
GeneralRe: MAC Address Pin
moro14516-Jun-06 9:48
moro14516-Jun-06 9:48 
AnswerRe: MAC Address Pin
Ravi Bhavnani16-Jun-06 9:55
professionalRavi Bhavnani16-Jun-06 9:55 
GeneralRe: MAC Address Pin
moro14516-Jun-06 10:23
moro14516-Jun-06 10:23 
AnswerRe: MAC Address Pin
bob1697216-Jun-06 6:56
bob1697216-Jun-06 6:56 
GeneralRe: MAC Address Pin
moro14516-Jun-06 8:12
moro14516-Jun-06 8:12 
GeneralRe: MAC Address Pin
bob1697216-Jun-06 9:28
bob1697216-Jun-06 9:28 
GeneralRe: MAC Address Pin
moro14516-Jun-06 9:57
moro14516-Jun-06 9:57 
Questioncustom shapes buttons Pin
relsirc16-Jun-06 6:35
relsirc16-Jun-06 6:35 
AnswerRe: custom shapes buttons Pin
Ravi Bhavnani16-Jun-06 6:57
professionalRavi Bhavnani16-Jun-06 6:57 

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.