用C#编写PDA程序!!!
有哪个给个实例可以吗?????

解决方案 »

  1.   

    using System;
    using System.Drawing;
    using System.Collections;
    using System.Windows.Forms;
    using System.Data;namespace Cistern
    {
    /// <summary>
    /// Form1 的摘要说明。
    /// </summary>
    public class FormMain : System.Windows.Forms.Form
    {
    private System.Windows.Forms.Label lblRoof;
    private System.Windows.Forms.Label lblRain;
    private System.Windows.Forms.Label lblAnswer;
    private System.Windows.Forms.Label lblAnserHdr;
    private System.Windows.Forms.Button cmdCalc;
    private System.Windows.Forms.Button cmdFacts;
    private System.Windows.Forms.TextBox textRoof;
    private System.Windows.Forms.TextBox textRain;
    private System.Windows.Forms.MainMenu mainMenu1;
    private System.Windows.Forms.Form refFormFacts; public FormMain()
    {
    //
    // Windows 窗体设计器支持所必需的
    //
    InitializeComponent(); //
    // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
    //
    }
    /// <summary>
    /// 清理所有正在使用的资源。
    /// </summary>
    protected override void Dispose( bool disposing )
    {
    base.Dispose( disposing );
    }
    #region Windows 窗体设计器生成的代码
    /// <summary>
    /// 设计器支持所需的方法 - 不要使用代码编辑器修改
    /// 此方法的内容。
    /// </summary>
    private void InitializeComponent()
    {
    this.mainMenu1 = new System.Windows.Forms.MainMenu();
    this.lblRoof = new System.Windows.Forms.Label();
    this.lblRain = new System.Windows.Forms.Label();
    this.lblAnswer = new System.Windows.Forms.Label();
    this.lblAnserHdr = new System.Windows.Forms.Label();
    this.cmdCalc = new System.Windows.Forms.Button();
    this.cmdFacts = new System.Windows.Forms.Button();
    this.textRoof = new System.Windows.Forms.TextBox();
    this.textRain = new System.Windows.Forms.TextBox();
    // 
    // lblRoof
    // 
    this.lblRoof.Location = new System.Drawing.Point(16, 24);
    this.lblRoof.Size = new System.Drawing.Size(80, 20);
    this.lblRoof.Text = "Roof(Sq.ft.)";
    // 
    // lblRain
    // 
    this.lblRain.Location = new System.Drawing.Point(136, 24);
    this.lblRain.Size = new System.Drawing.Size(80, 20);
    this.lblRain.Text = "Rain(Inches)";
    // 
    // lblAnswer
    // 
    this.lblAnswer.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold);
    this.lblAnswer.Location = new System.Drawing.Point(64, 144);
    // 
    // lblAnserHdr
    // 
    this.lblAnserHdr.Location = new System.Drawing.Point(64, 120);
    this.lblAnserHdr.Text = "Volume(Gallons)";
    // 
    // cmdCalc
    // 
    this.cmdCalc.Location = new System.Drawing.Point(24, 208);
    this.cmdCalc.Text = "Calc";
    this.cmdCalc.Click += new System.EventHandler(this.cmdCalc_Click);
    // 
    // cmdFacts
    // 
    this.cmdFacts.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular);
    this.cmdFacts.Location = new System.Drawing.Point(136, 208);
    this.cmdFacts.Text = "Show";
    this.cmdFacts.Click += new System.EventHandler(this.cmdFacts_Click);
    // 
    // textRoof
    // 
    this.textRoof.Location = new System.Drawing.Point(16, 48);
    this.textRoof.Size = new System.Drawing.Size(64, 21);
    this.textRoof.Text = "";
    // 
    // textRain
    // 
    this.textRain.Location = new System.Drawing.Point(136, 48);
    this.textRain.Size = new System.Drawing.Size(64, 21);
    this.textRain.Text = "";
    // 
    // FormMain
    // 
    this.Controls.Add(this.textRain);
    this.Controls.Add(this.textRoof);
    this.Controls.Add(this.cmdFacts);
    this.Controls.Add(this.cmdCalc);
    this.Controls.Add(this.lblAnserHdr);
    this.Controls.Add(this.lblAnswer);
    this.Controls.Add(this.lblRain);
    this.Controls.Add(this.lblRoof);
    this.Menu = this.mainMenu1;
    this.Text = "Cistern"; }
    #endregion /// <summary>
    /// 应用程序的主入口点。
    /// </summary> static void Main() 
    {
    Application.Run(new Cistern.FormMain());
    } private void cmdFacts_Click(object sender, System.EventArgs e)
    {
    this.refFormFacts = new FormFacts(); this.refFormFacts.Show();

    } private void cmdCalc_Click(object sender, System.EventArgs e)
    {
    Cistern.WaterMath wmCalc = new Cistern.WaterMath(); lblAnswer.Text = wmCalc.GetVolume(double.Parse(textRoof.Text),int.Parse(textRain.Text)).ToString();
    }
    }
    }
      

  2.   

    http://www.mswebcast.com.cn/technet/record.aspx
    不是有讲座嘛..只不过讲的简单一些..================================================================
    巅峰之道,高瞻才能远瞩;
    实力之道,厚积而薄发;东莞打工者创业论坛:
    http://211.148.133.100/work/
    ================================================================
      

  3.   

    2.
    using System;
    using System.Drawing;
    using System.Collections;
    using System.ComponentModel;
    using System.Windows.Forms;namespace Cistern
    {
    /// <summary>
    /// FormFacts 的摘要说明。
    /// </summary>
    public class FormFacts : System.Windows.Forms.Form
    {
    private System.Windows.Forms.Label label1;
    private System.Windows.Forms.Label label2;
    private System.Windows.Forms.Label label3;
    private System.Windows.Forms.Label label4;
    private System.Windows.Forms.Label label5;
    private System.Windows.Forms.Label label6;
    private System.Windows.Forms.Button cmdBack;
    private System.Windows.Forms.Label label7;
    public FormFacts()
    {
    //
    // Windows 窗体设计器支持所必需的
    //
    InitializeComponent(); //
    // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
    //
    } /// <summary>
    /// 清理所有正在使用的资源。
    /// </summary>
    protected override void Dispose( bool disposing )
    {
    base.Dispose( disposing );
    } #region Windows 窗体设计器生成的代码
    /// <summary>
    /// 设计器支持所需的方法 - 不要使用代码编辑器修改
    /// 此方法的内容。
    /// </summary>
    private void InitializeComponent()
    {
    this.label1 = new System.Windows.Forms.Label();
    this.label2 = new System.Windows.Forms.Label();
    this.label3 = new System.Windows.Forms.Label();
    this.label4 = new System.Windows.Forms.Label();
    this.label5 = new System.Windows.Forms.Label();
    this.label6 = new System.Windows.Forms.Label();
    this.label7 = new System.Windows.Forms.Label();
    this.cmdBack = new System.Windows.Forms.Button();
    // 
    // label1
    // 
    this.label1.Location = new System.Drawing.Point(8, 8);
    this.label1.Text = "Water Facts";
    // 
    // label2
    // 
    this.label2.Location = new System.Drawing.Point(16, 32);
    this.label2.Size = new System.Drawing.Size(208, 24);
    this.label2.Text = "1 cu ft water = 7.48 gal";
    // 
    // label3
    // 
    this.label3.Location = new System.Drawing.Point(16, 72);
    this.label3.Size = new System.Drawing.Size(208, 24);
    this.label3.Text = "1 gal water = 8.34 lbs";
    // 
    // label4
    // 
    this.label4.Location = new System.Drawing.Point(16, 104);
    this.label4.Size = new System.Drawing.Size(208, 32);
    this.label4.Text = "1 cu ft water = 62.38 lbs";
    // 
    // label5
    // 
    this.label5.Location = new System.Drawing.Point(16, 144);
    this.label5.Size = new System.Drawing.Size(208, 32);
    this.label5.Text = "1 in rain on 1000 sq ft roof = 623 gal";
    // 
    // label6
    // 
    this.label6.Location = new System.Drawing.Point(16, 184);
    this.label6.Size = new System.Drawing.Size(208, 32);
    this.label6.Text = "Avg annual Seattle rainfall = 35 in";
    // 
    // label7
    // 
    this.label7.Location = new System.Drawing.Point(16, 216);
    this.label7.Size = new System.Drawing.Size(208, 48);
    this.label7.Text = "Estrunoff from Seattleite who stands in the rain for 1 year = 22 gal";
    // 
    // cmdBack
    // 
    this.cmdBack.Location = new System.Drawing.Point(120, 0);
    this.cmdBack.Text = "Back";
    this.cmdBack.Click += new System.EventHandler(this.cmdBack_Click);
    // 
    // FormFacts
    // 
    this.Controls.Add(this.cmdBack);
    this.Controls.Add(this.label7);
    this.Controls.Add(this.label6);
    this.Controls.Add(this.label5);
    this.Controls.Add(this.label4);
    this.Controls.Add(this.label3);
    this.Controls.Add(this.label2);
    this.Controls.Add(this.label1); }
    #endregion private void cmdBack_Click(object sender, System.EventArgs e)
    {
    this.Hide();
    }
    }
    }
    3.
    using System;namespace Cistern
    {
    /// <summary>
    /// WaterMath 的摘要说明。
    /// </summary>
    public class WaterMath
    {
    public WaterMath()
    {
    } private const double GALLONS_PER_FOOT = 7.48;
    private const int INCHES_PER_FOOT = 12;
    public int GetVolume(double dblSquareFeet)
    {
    return (int)(dblSquareFeet * GALLONS_PER_FOOT / INCHES_PER_FOOT);
    } public int GetVolume(double dblSquareFeet,int intInches)
    {
    return (int)(dblSquareFeet * GALLONS_PER_FOOT / INCHES_PER_FOOT);
    }
    }
    }