Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sweep: Modify, refactor and integrate the code #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions BIMAPI_HW2/BIMAPI_HW2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="FormControls.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Form1.resx">
Expand Down
30 changes: 16 additions & 14 deletions BIMAPI_HW2/BIMAPI_HW2/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions BIMAPI_HW2/BIMAPI_HW2/FormControls.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using System;
using System.Drawing;
using System.Windows.Forms;

namespace BIMAPI_HW2
{
public class FormControls
{
public Label SetupLabel1()
{
Label label1 = new Label();
label1.AutoSize = true;
label1.Font = new Font("Microsoft JhengHei", 14F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(136)));
label1.Location = new Point(30, 256);
label1.Margin = new Padding(8, 0, 8, 0);
label1.Name = "label1";
label1.Size = new Size(150, 42);
label1.TabIndex = 0;
label1.Text = "選擇物仢";
return label1;
}

public Button SetupButton1()
{
Button button1 = new Button();
button1.Font = new Font("Microsoft JhengHei", 12F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(136)));
button1.Location = new Point(948, 342);
button1.Margin = new Padding(8, 6, 8, 6);
button1.Name = "button1";
button1.Size = new Size(60, 45);
button1.TabIndex = 2;
button1.Text = "...";
button1.UseVisualStyleBackColor = true;
button1.Click += new EventHandler(button1_Click);
return button1;
}

// Similar functions for maskedTextBox1, maskedTextBox2, button2, checkBox1, checkBox2, button3, button4, label2, label3, pictureBox1, dataGridView1, and label4

private void button1_Click(object sender, EventArgs e)
{
// Event handler code here
}
}
}