<div class="colorscripter-code" style="color:#010101;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;"> <table class="colorscripter-code-table" style="margin:0px;padding:0px;border:none;background-color:#fafafa;" cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:6px;border-right:2px solid rgb(229,229,229);"> <div style="margin:0px;padding:0px;text-align:right;color:#666666;line-height:130%;"> <div style="line-height:130%;">1</div> <div style="line-height:130%;">2</div> <div style="line-height:130%;">3</div> <div style="line-height:130%;">4</div> <div style="line-height:130%;">5</div> <div style="line-height:130%;">6</div> <div style="line-height:130%;">7</div> <div style="line-height:130%;">8</div> <div style="line-height:130%;">9</div> <div style="line-height:130%;">10</div> <div style="line-height:130%;">11</div> <div style="line-height:130%;">12</div> <div style="line-height:130%;">13</div> <div style="line-height:130%;">14</div> <div style="line-height:130%;">15</div> <div style="line-height:130%;">16</div> <div style="line-height:130%;">17</div> <div style="line-height:130%;">18</div> <div style="line-height:130%;">19</div> <div style="line-height:130%;">20</div> <div style="line-height:130%;">21</div></div></td> <td style="padding:6px 0px;"> <div style="margin:0px;padding:0px;color:#010101;line-height:130%;"> <div style="padding:0px 6px;white-space:pre;line-height:130%;"><span style="color:#a71d5d;">private</span> <span style="color:#a71d5d;">void</span> button2_Click(<span style="color:#a71d5d;">object</span> sender, EventArgs e)</div> <div style="padding:0px 6px;white-space:pre;line-height:130%;">{</div> <div style="padding:0px 6px;white-space:pre;line-height:130%;"> info.titleColor <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> toolStrip1.BackColor.Name;</div> <div style="padding:0px 6px;white-space:pre;line-height:130%;"> info.formColor <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#a71d5d;">this</span>.BackColor.Name;</div> <div style="padding:0px 6px;white-space:pre;line-height:130%;"> info.labelColor <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> label2.ForeColor.Name;</div> <div style="padding:0px 6px;white-space:pre;line-height:130%;"> MessageBox.Show(<span style="color:#63a35c;">"적용되었습니다."</span>, <span style="color:#63a35c;">"설정"</span>);</div> <div style="padding:0px 6px;white-space:pre;line-height:130%;">}</div> <div style="padding:0px 6px;white-space:pre;line-height:130%;"> </div> <div style="padding:0px 6px;white-space:pre;line-height:130%;"><span style="color:#a71d5d;">private</span> <span style="color:#a71d5d;">void</span> button3_Click(<span style="color:#a71d5d;">object</span> sender, EventArgs e)</div> <div style="padding:0px 6px;white-space:pre;line-height:130%;">{</div> <div style="padding:0px 6px;white-space:pre;line-height:130%;"> toolStrip1.BackColor <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> Color.WhiteSmoke;</div> <div style="padding:0px 6px;white-space:pre;line-height:130%;"> <span style="color:#a71d5d;">this</span>.BackColor <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> Color.WhiteSmoke;</div> <div style="padding:0px 6px;white-space:pre;line-height:130%;"> label2.ForeColor <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> Color.Black;</div> <div style="padding:0px 6px;white-space:pre;line-height:130%;"> </div> <div style="padding:0px 6px;white-space:pre;line-height:130%;"> <span style="color:#999999;">// button2 클릭 이벤트 코드와 중복</span></div> <div style="padding:0px 6px;white-space:pre;line-height:130%;"> info.titleColor <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> toolStrip1.BackColor.Name;</div> <div style="padding:0px 6px;white-space:pre;line-height:130%;"> info.formColor <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#a71d5d;">this</span>.BackColor.Name;</div> <div style="padding:0px 6px;white-space:pre;line-height:130%;"> info.labelColor <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> label2.ForeColor.Name;</div> <div style="padding:0px 6px;white-space:pre;line-height:130%;"> </div> <div style="padding:0px 6px;white-space:pre;line-height:130%;"> MessageBox.Show(<span style="color:#63a35c;">"초기화되었습니다."</span>, <span style="color:#63a35c;">"설정"</span>);</div> <div style="padding:0px 6px;white-space:pre;line-height:130%;">}</div></div> <div style="text-align:right;margin-top:-13px;margin-right:5px;font-size:9px;font-style:italic;"><a target="_blank" href="http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5;">Colored by Color Scripter</a></div></td> <td style="vertical-align:bottom;padding:0px 2px 4px 0px;"><a target="_blank" href="http://colorscripter.com/info#e" target="_blank" style="color:#FFFFFF;"><span style="font-size:9px;background-color:#e5e5e5;padding:1px;">cs</span></a></td></tr></tbody></table><br></div> <div class="colorscripter-code" style="color:#010101;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;">button3를 누르면 button2 이벤트 처리도 같이 하고 싶은데</div> <div class="colorscripter-code" style="color:#010101;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;"><br></div> <div class="colorscripter-code" style="color:#010101;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;">좋은 방법 없을까요?</div>
댓글 분란 또는 분쟁 때문에 전체 댓글이 블라인드 처리되었습니다.