123
使用visual studio 2013
test1
void createbtn(string[]btn_text)
{
groupBox3.Controls.Clear();//清空該groupbox
Button[] buttons = new Button[3];
for (int i = 0; i < buttons.Length; i++)
{
buttons[i] = new Button();
buttons[i].Name = "buttonn" + i;
buttons[i].Text = buttons[i].Name;
buttons[i].Location = new Point(50, 50 * i);
buttons[i].Click += new EventHandler(Buttons_Click);
}
this.Controls.AddRange(buttons);//新增到Form裡
}
test2
void createbtn(string[]btn_text)
{
groupBox3.Controls.Clear();//清空該groupbox
Button[] buttons = new Button[3];
for (int i = 0; i < buttons.Length; i++)
{
buttons[i] = new Button();
buttons[i].Name = "buttonn" + i;
buttons[i].Text = buttons[i].Name;
buttons[i].Location = new Point(50, 50 * i);
buttons[i].Click += new EventHandler(Buttons_Click);
}
this.Controls.AddRange(buttons);//新增到Form裡
}
test3這個有成功 用 <pre><code class="language-csharp line-numbers">xxoo</code><pre>
void createbtn(string[]btn_text)
{
groupBox3.Controls.Clear();//清空該groupbox
Button[] buttons = new Button[3];
for (int i = 0; i < buttons.Length; i++)
{
buttons[i] = new Button();
buttons[i].Name = "buttonn" + i;
buttons[i].Text = buttons[i].Name;
buttons[i].Location = new Point(50, 50 * i);
buttons[i].Click += new EventHandler(Buttons_Click);
}
this.Controls.AddRange(buttons);//新增到Form裡
}
主要是css和js這兩個部分
css在套樣式那邊可以新增
js是用小工具的方式新增
參考文章:
http://prismjs.com/index.html
https://pjchender.blogspot.tw/2016/06/prism-syntax-highlighting.html
https://amobiz.github.io/2013/05/28/blogger-google-code-prettify-github-gist/ https://pjchender.blogspot.tw/2015/03/blogger.html
"<"轉換網址:
http://www.opinionatedgeek.com/DotNet/Tools/HTMLEncode/Encode.aspx
沒有留言:
張貼留言