namespace NPOI_Word_Test /* 命名空間NPOI....,定義一個程式作業的記憶體空間名*/
{
partial class Form1 /*定義FORM1 擁有多個分布類,方法和結構*/
{
/// <summary>
/// 必需的設計器變數。
/// <summary>
private System.ComponentModel.IContainer components = null;/* 定義components可以為空, Private是定義此變數只能在宣告它們的類或結構體中訪問(System.ComponentModel.IContainer是什么東西?)*/
/// <summary>
/// 清理所有正在使用的資源。
/// <summary>
/// <param name="disposing">如果應釋放托管資源,為 true;否則為 false。<param>
protected override void Dispose(bool disposing)/* Dispose 具備如下性質:protected說明受保護成員可在其所在的類與派生類訪問,override說明要擴展或修改繼承的方法、屬性、索引器或事件的抽象實作或虛實作,void指定該方法不回傳值,同時因VOID用于方法才有不回傳值的作用,因此Dispose是一個方法*/
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 表單設計器生成的代碼
/// <summary>
/// 設計器支持所需的方法 - 不要修改
/// 使用代碼編輯器修改此方法的內容。
/// </summary>
private void InitializeComponent()
{
this.btnReplace = new System.Windows.Forms.Button();// btnReplace 套用 System.Windows.Forms.Button 模板并分配記憶體
this.txtOldKey = new System.Windows.Forms.TextBox();// txtOldKey 套用 System.Windows.Forms.TextBox 模板并分配記憶體
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); //folderBrowserDialog1 是什么東西?
this.label1 = new System.Windows.Forms.Label();//label1 套用模板并分配記憶體
this.txtNewKey = new System.Windows.Forms.TextBox();//textNewkey 套用...并分配記憶體
this.label2 = new System.Windows.Forms.Label();//label2 套用模板并分配記憶體
this.SuspendLayout();// 什么意思?
//
// btnReplace
//
this.btnReplace.Location = new System.Drawing.Point(176, 155);//給按鈕定位?
this.btnReplace.Name = "btnReplace";//按鈕命名
this.btnReplace.Size = new System.Drawing.Size(147, 47);//按鈕大小
this.btnReplace.TabIndex = 0;//?
this.btnReplace.Text = "替換Word內容";//TEXT的作用是什么意思?
this.btnReplace.UseVisualStyleBackColor = true;//什么意思?
this.btnReplace.Click += new System.EventHandler(this.btnReplace_Click);// 計算符什么意思?
//
// txtOldKey
//
this.txtOldKey.Location = new System.Drawing.Point(130, 71);//文本框位置
this.txtOldKey.Name = "txtOldKey";//文本框名
this.txtOldKey.Size = new System.Drawing.Size(255, 25);//文本框大小
this.txtOldKey.TabIndex = 1;//什么意思?
//
// label1
//
this.label1.AutoSize = true;// 什么意思?
this.label1.Location = new System.Drawing.Point(48, 73);//標簽位置
this.label1.Name = "label1";//標簽名
this.label1.Size = new System.Drawing.Size(67, 15);//標簽大小
this.label1.TabIndex = 2;//什么意思?
this.label1.Text = "原關鍵詞";//文本內容
//
// txtNewKey
//
this.txtNewKey.Location = new System.Drawing.Point(130, 102);//新文本位置
this.txtNewKey.Name = "txtNewKey";//新文本名
this.txtNewKey.Size = new System.Drawing.Size(255, 25);//文本框大小
this.txtNewKey.TabIndex = 1;//?什么意思
//
// label2
//
this.label2.AutoSize = true;// 什么意思?
this.label2.Location = new System.Drawing.Point(63, 112);//--
this.label2.Name = "label2";//--
this.label2.Size = new System.Drawing.Size(52, 15);//--
this.label2.TabIndex = 2;//什么意思?
this.label2.Text = "替換成";//--
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);//??
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;//??
this.ClientSize = new System.Drawing.Size(528, 293);//視窗大小?
this.Controls.Add(this.label2);//視窗添加標簽2
this.Controls.Add(this.label1);//--
this.Controls.Add(this.txtNewKey);//--
this.Controls.Add(this.txtOldKey);//--
this.Controls.Add(this.btnReplace);//--
this.Name = "Form1";//視窗名?
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;//?????
this.Text = "操作Word";
this.ResumeLayout(false);//??
this.PerformLayout();//??
}
#endregion
private System.Windows.Forms.Button btnReplace;
private System.Windows.Forms.TextBox txtOldKey;
private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtNewKey;
private System.Windows.Forms.Label label2;
}
}// 問題匯總如下,程式撰寫時各類定義順序是否被打亂,框架構建為什么不是先大后小,而是先小后大,private定義為什么是放在最后???
uj5u.com熱心網友回復:
請問您現在學習C#學到哪了?//誠懇.jpguj5u.com熱心網友回復:
這個順序無關緊要,不能保證按照所謂的順序創建。而且也沒有必要有什么順序。如果你需要用戶按鍵順序,應該是tabindex來保證的
uj5u.com熱心網友回復:
這個和C#中的 class 類的變數范圍有關,與順序無關。可以簡單的理解為:
{
變數1;
{
在這里可以使用變數1、與可以使用變數2;
}
變數2;
}
uj5u.com熱心網友回復:
首先是考慮“里、外”的關系,寫在里邊的參考永遠都能找到寫在外邊的定義,不管這個定義在打字順序上是不是寫在前邊。編譯器是先做詞法分析,先懂得各種單詞兒的里外布局,然后才進行語意分析。如果不懂“里外”而糾結“意義”即是自己一廂情愿的幻想了。uj5u.com熱心網友回復:
好比如說,一個 class 內部的代碼可以使用自身這個 class 定義。這也就是靠編譯原理的知識結構來支持的。如果沒有同時去學基礎知識,那么就容易空想各種詭異的問題。uj5u.com熱心網友回復:
謝謝!我知道了!uj5u.com熱心網友回復:
剛到一半
uj5u.com熱心網友回復:
這些東西都是自動生成的..沒必要改.也沒有必要去了解...
至少我是這么認為的.. 對:"常規開發"來說,意義不是很大
uj5u.com熱心網友回復:
復活了呢!
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/60526.html
標籤:ASP.NET
上一篇:C#
