using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace csharpWindowsApplication1
{
///
/// Summary description for Form1.
///
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.MenuItem menuItem4;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.MenuItem menuItem5;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem6;
private System.Windows.Forms.MenuItem menuItem7;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
System.IO.StreamReader s=new System.IO.StreamReader(”a.txt”,System.Text.Encoding.ASCII);
string d=s.ReadToEnd().ToString();
textBox1.Text=d;
s.Close();
System.IO.StreamReader t=new System.IO.StreamReader(”b.txt”,System.Text.Encoding.ASCII);
string e=t.ReadToEnd().ToString();
textBox2.Text=e;
t.Close();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
///
/// Required method for Designer support – do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem5 = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.menuItem4 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.menuItem6 = new System.Windows.Forms.MenuItem();
this.menuItem7 = new System.Windows.Forms.MenuItem();
this.button1 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// mainMenu1
//
this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem1,
this.menuItem3,
this.menuItem2,
this.menuItem6,
this.menuItem7});
this.mainMenu1.RightToLeft = System.Windows.Forms.RightToLeft.No;
//
// menuItem1
//
this.menuItem1.Index = 0;
this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem5});
this.menuItem1.Text = “&File”;
//
// menuItem5
//
this.menuItem5.Index = 0;
this.menuItem5.Text = “E&xit”;
this.menuItem5.Click += new System.EventHandler(this.menuItem5_Click);
//
// menuItem3
//
this.menuItem3.Index = 1;
this.menuItem3.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem4});
this.menuItem3.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftH;
this.menuItem3.Text = “&Help”;
//
// menuItem4
//
this.menuItem4.Index = 0;
this.menuItem4.Shortcut = System.Windows.Forms.Shortcut.F1;
this.menuItem4.Text = “About”;
this.menuItem4.Click += new System.EventHandler(this.menuItem4_Click);
//
// menuItem2
//
this.menuItem2.Index = 2;
this.menuItem2.Shortcut = System.Windows.Forms.Shortcut.F2;
this.menuItem2.Text = ” ->”;
this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click_1);
//
// menuItem6
//
this.menuItem6.Index = 3;
this.menuItem6.Text = “11/3/2002 8:09:41 PM”;
//
// menuItem7
//
this.menuItem7.Index = 4;
this.menuItem7.Text = “< - ";
this.menuItem7.Click += new System.EventHandler(this.menuItem7_Click);
//
// button1
//
this.button1.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(224)), ((System.Byte)(224)), ((System.Byte)(224)));
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.button1.ForeColor = System.Drawing.SystemColors.Desktop;
this.button1.Location = new System.Drawing.Point(208, 280);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(120, 24);
this.button1.TabIndex = 2;
this.button1.Text = "&Save";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// textBox1
//
this.textBox1.BackColor = System.Drawing.Color.WhiteSmoke;
this.textBox1.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.textBox1.ForeColor = System.Drawing.SystemColors.ActiveCaption;
this.textBox1.Location = new System.Drawing.Point(8, 32);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(240, 232);
this.textBox1.TabIndex = 4;
this.textBox1.Text = "";
//
// label1
//
this.label1.BackColor = System.Drawing.Color.LightSteelBlue;
this.label1.Font = new System.Drawing.Font("Verdana", 10F, (System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline), System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.label1.ForeColor = System.Drawing.SystemColors.Highlight;
this.label1.Location = new System.Drawing.Point(16, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(64, 16);
this.label1.TabIndex = 5;
this.label1.Text = "To Do...";
//
// label2
//
this.label2.BackColor = System.Drawing.Color.LightSteelBlue;
this.label2.Font = new System.Drawing.Font("Verdana", 10F, (System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline), System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.label2.ForeColor = System.Drawing.SystemColors.ActiveCaption;
this.label2.Location = new System.Drawing.Point(288, 8);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(88, 16);
this.label2.TabIndex = 6;
this.label2.Text = "Checkout";
this.label2.Click += new System.EventHandler(this.label2_Click);
//
// textBox2
//
this.textBox2.AutoSize = false;
this.textBox2.BackColor = System.Drawing.Color.WhiteSmoke;
this.textBox2.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.textBox2.ForeColor = System.Drawing.SystemColors.ActiveCaption;
this.textBox2.Location = new System.Drawing.Point(280, 32);
this.textBox2.Multiline = true;
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(224, 232);
this.textBox2.TabIndex = 7;
this.textBox2.Text = "";
this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.BackColor = System.Drawing.Color.LightSteelBlue;
this.ClientSize = new System.Drawing.Size(518, 319);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.textBox2,
this.label2,
this.label1,
this.textBox1,
this.button1});
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Menu = this.mainMenu1;
this.Name = "Form1";
this.Opacity = 0.99000000953674316;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Jnote Version 2.0";
this.ResumeLayout(false);
}
#endregion
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void menuItem1_Click(object sender, System.EventArgs e)
{
}
private void menuItem4_Click(object sender, System.EventArgs e)
{
new Form2().Show();
// Application.Run(new Form2());
}
private void menuItem2_Click(object sender, System.EventArgs e)
{
//p.Write(listBox1.Items.Count.ToString());
//397983 repair
System.IO.StreamWriter p=new System.IO.StreamWriter(”d://a.txt”,true,System.Text.Encoding.ASCII);
p.Write(textBox1.Text);
p.Close();
}
private void button1_Click(object sender, System.EventArgs e)
{
System.IO.StreamWriter p=new System.IO.StreamWriter(”a.txt”,false,System.Text.Encoding.ASCII);
p.Write(textBox1.Text);
p.Close();
System.IO.StreamWriter q=new System.IO.StreamWriter(”b.txt”,false,System.Text.Encoding.ASCII);
q.Write(textBox2.Text);
q.Close();
}
private void menuItem5_Click(object sender, System.EventArgs e)
{
base.Dispose();
Application.Exit();
}
private void menuItem2_Click_1(object sender, System.EventArgs e)
{
this.Opacity=(this.Opacity)+0.1;
}
private void menuItem7_Click(object sender, System.EventArgs e)
{
this.Opacity=(this.Opacity)-0.1;
}
private void textBox2_TextChanged(object sender, System.EventArgs e)
{
}
private void label2_Click(object sender, System.EventArgs e)
{
}
}
}