-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSupportingClass.cs
More file actions
113 lines (96 loc) · 3.63 KB
/
Copy pathSupportingClass.cs
File metadata and controls
113 lines (96 loc) · 3.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LibraryApp
{
public partial class SupportingClass : Form
{
Main pf;
public String Description;
public SupportingClass()
{
InitializeComponent();
}
public SupportingClass(Main parent, String NewText, String NewDescription, String NewRec1, String NewRec2, String NewRec3, String NewRec4, String NewRec5)
{
InitializeComponent();
pf = parent;
this.Height = 370;
this.Width = 400;
txtRec1.Text = NewRec1;
txtRec2.Text = NewRec2;
txtRec3.Text = NewRec3;
txtRec4.Text = NewRec4;
txtRec5.Text = NewRec5;
lbDescription.Text = NewDescription;
}
public void Update(string Value, string Option)
{
if (Option == "Add")
{
if (txtRec5.Text == "")
txtRec5.Text = Value;
else
txtRec6.Text = Value;
}
if (Option == "Edit")
txtRec5.Text = Value;
}
private void SupportingClass_Load(object sender, EventArgs e)
{
}
//--------------------------------------------------------------------------------
//---------------------- Dr. Hicks Initializtion Utilities -----------------------
#region ----SupportingClass--SupportingClass_Load--MyRenderer--CreateParams ------
//--------------------------------------------------------------------------------
private class MyRenderer : ToolStripProfessionalRenderer
{
protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs e)
{
Rectangle rc = new Rectangle(Point.Empty, e.Item.Size);
Color c = e.Item.Selected ? Color.Black : Color.FromArgb(146, 164, 211);
using (SolidBrush brush = new SolidBrush(c))
e.Graphics.FillRectangle(brush, rc);
}
}
public const int CS_NOCLOSE = 0x200;
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ClassStyle = cp.ClassStyle | CS_NOCLOSE;
return cp;
}
}
private void ExitToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
}
private void BtnDelete5_Click(object sender, EventArgs e)
{
txtRec5.Text = "";
}
private void AddToolStripMenuItem_Click(object sender, EventArgs e)
{
SupportingClassAddEdit SupportingClassAddForm = new SupportingClassAddEdit(this, Description, "Add", "");
SupportingClassAddForm.Show();
SupportingClassAddForm.MdiParent = pf;
}
private void BtnEdit5_Click(object sender, EventArgs e)
{
SupportingClassAddEdit SupportingClassAddForm = new SupportingClassAddEdit(this, Description, "Edit", txtRec5.Text);
SupportingClassAddForm.Show();
SupportingClassAddForm.MdiParent = pf;
}
//--------------------------------------------------------------------------------
#endregion ------------- Dr. Hicks Initializtion Utilities -----------------------
//--------------------------------------------------------------------------------
}
}