Skip to content
Browse files

Added some code so can test writenotewindow

  • Loading branch information...
1 parent 7ca163e commit 1dab1f048a1289523502d2bd16abf62ad2478c8f @Marthyn committed
Showing with 55 additions and 2 deletions.
  1. +6 −0 CourseWorkCsharp2/LoginWindow.cs
  2. +9 −0 CourseWorkCsharp2/ShareNote.csproj
  3. +40 −2 CourseWorkCsharp2/WriteNote.Designer.cs
View
6 CourseWorkCsharp2/LoginWindow.cs
@@ -29,14 +29,20 @@ private void loginButton_Click(object sender, EventArgs e)
{
String username = this.usernameField.Text;
String password = this.passwordField.Text;
+ WriteNote writenotewindow = new WriteNote();
+ writenotewindow.ShowDialog();
+ /*
if (SQL.checkLogin(username, password))
{
MessageBox.Show("Login succesful");
+
}
else
{
MessageBox.Show("Login failed");
+
}
+ */
}
}
}
View
9 CourseWorkCsharp2/ShareNote.csproj
@@ -62,6 +62,12 @@
</Compile>
<Compile Include="SQLconnect.cs" />
<Compile Include="User.cs" />
+ <Compile Include="WriteNote.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="WriteNote.Designer.cs">
+ <DependentUpon>WriteNote.cs</DependentUpon>
+ </Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="LoginWindow.resx">
@@ -71,6 +77,9 @@
<EmbeddedResource Include="RegisterWindow.resx">
<DependentUpon>RegisterWindow.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="WriteNote.resx">
+ <DependentUpon>WriteNote.cs</DependentUpon>
+ </EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="Properties\Settings.settings" />
View
42 CourseWorkCsharp2/WriteNote.Designer.cs
@@ -1,4 +1,4 @@
-namespace ShareNote
+namespace CourseWorkCsharp2
{
partial class WriteNote
{
@@ -39,6 +39,9 @@ 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.button1 = new System.Windows.Forms.Button();
+ this.button2 = new System.Windows.Forms.Button();
+ this.button3 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// noteText
@@ -57,6 +60,7 @@ private void InitializeComponent()
this.boldButton.TabIndex = 1;
this.boldButton.Text = "B";
this.boldButton.UseVisualStyleBackColor = true;
+ this.boldButton.Click += new System.EventHandler(this.boldButton_Click);
//
// underlineButton
//
@@ -75,6 +79,7 @@ private void InitializeComponent()
this.italicButton.TabIndex = 4;
this.italicButton.Text = "I";
this.italicButton.UseVisualStyleBackColor = true;
+ this.italicButton.Click += new System.EventHandler(this.italicButton_Click);
//
// fontBox
//
@@ -85,7 +90,7 @@ private void InitializeComponent()
"Title 2",
"Title 3",
"Paragraph"});
- this.fontBox.Location = new System.Drawing.Point(112, 48);
+ this.fontBox.Location = new System.Drawing.Point(219, 47);
this.fontBox.Name = "fontBox";
this.fontBox.Size = new System.Drawing.Size(126, 21);
this.fontBox.TabIndex = 5;
@@ -141,11 +146,41 @@ private void InitializeComponent()
this.label3.TabIndex = 11;
this.label3.Text = "Notebook";
//
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(178, 46);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(27, 23);
+ this.button1.TabIndex = 12;
+ this.button1.Text = "R";
+ this.button1.UseVisualStyleBackColor = true;
+ //
+ // button2
+ //
+ this.button2.Location = new System.Drawing.Point(112, 46);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(27, 23);
+ this.button2.TabIndex = 13;
+ this.button2.Text = "L";
+ this.button2.UseVisualStyleBackColor = true;
+ //
+ // button3
+ //
+ this.button3.Location = new System.Drawing.Point(145, 46);
+ this.button3.Name = "button3";
+ this.button3.Size = new System.Drawing.Size(27, 23);
+ this.button3.TabIndex = 14;
+ this.button3.Text = "C";
+ this.button3.UseVisualStyleBackColor = true;
+ //
// WriteNote
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(881, 529);
+ this.Controls.Add(this.button3);
+ this.Controls.Add(this.button2);
+ this.Controls.Add(this.button1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
@@ -177,5 +212,8 @@ private void InitializeComponent()
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.Button button2;
+ private System.Windows.Forms.Button button3;
}
}

0 comments on commit 1dab1f0

Please sign in to comment.
Something went wrong with that request. Please try again.