| this.button3 = new System.Windows.Forms.Button(); this.button4 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // button1 // this.button1.Location = new System.Drawing.Point(96, 32); this.button1.Name = "button1"; this.button1.TabIndex = 0; this.button1.Text = "生成xml"; this.button1.Click = new System.EventHandler(this.button1_Click); // // button2 // this.button2.Location = new System.Drawing.Point(96, 80); this.button2.Name = "button2"; this.button2.TabIndex = 1; this.button2.Text = "生成doc"; this.button2.Click = new System.EventHandler(this.button2_Click); // // button3 // this.button3.Location = new System.Drawing.Point(8, 32); this.button3.Name = "button3"; this.button3.TabIndex = 2; this.button3.Text = "加载doc"; this.button3.Click = new System.EventHandler(this.button3_Click); // // button4 // this.button4.Location = new System.Drawing.Point(8, 80); this.button4.Name = "button4"; this.button4.TabIndex = 3; this.button4.Text = "加载xml"; this.button4.Click = new System.EventHandler(this.button4_Click); // // Form1 // this.AutoScaleBaseSize = new System.Drawing.Size(6, 14); this.ClientSize = new System.Drawing.Size(184, 141); this.Controls.Add(this.button4); this.Controls.Add(this.button3); this.Controls.Add(this.button2); this.Controls.Add(this.button1); this.Name = "Form1"; this.Text = "Form1"; this.ResumeLayout(false); // //手工注册一下Load和Closed事件 // this.Load = new System.EventHandler(this.Form1_Load); this.Closed = new System.EventHandler(this.Form1_Closed); } #endregion /**//// <summary> /// 从这个入口启动窗体 /// </summary> static void Main() { Application.Run(new Form1()); } /**//// <summary> /// 把加载的Office文件转换为xml文件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button1_Click(object sender, System.EventArgs e) { saveFileDialog1.Filter = "xml 文件|*.xml";//设置打开对话框的文件过滤条件 saveFileDialog1.Title = "保存成 xml 文件";//设置打开对话框的标题 saveFileDialog1.FileName=""; saveFileDialog1.ShowDialog();//打开对话框 if(saveFileDialog1.FileName != "")//检测用户是否输入了保存文件名
|
| 共4页: 上一页 [1] 2 [3] [4] 下一页 |
评论加载中…