-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBidPage.cs
215 lines (190 loc) · 7.57 KB
/
BidPage.cs
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
/*============================================================================*
* Title : Artsy (Social Application w/ Art Auction)
* Description : "Artsy" is a social application idea that would provide artists
a place to showcase their artworks and offer them the chance
to make a profit from it.
* Filename : BidPage.cs
* Version : v1.0
* Author : Gensaya, Carl Jerwin F.
* Yr&Sec&Uni : BSCS 3-3 PUP Main
* Subject : Advance Programming
*============================================================================*/
using System;
using System.Drawing;
using System.Threading;
using System.Timers;
using System.Windows.Forms;
namespace Artsy {
public class BiddingPage : Panel {
/*============================================================================*
* Function : DisplayBidPage
* Params : None
* Returns : Void
* Description: This serves as the GUI panel for Artsy's bidding page.
*=============================================================================*/
public BiddingPage() {
DisplayBidPage();
}
void DisplayBidPage() {
BackColor = Color.White;
DoubleBuffered = true;
AutoScroll = true;
_BiddedItem = new PictureBox() {
Size = new Size(250, 300),
Location = new Point(50, 100),
Image = Image.FromFile("res/log2.jpg"),
SizeMode = PictureBoxSizeMode.StretchImage
};
this.Controls.Add(_BiddedItem);
_ItemFullInfo = new Label() {
Size = new Size(250, 100),
Font = new Font("Segoe UI", 12),
Location = new Point(50, 400),
TextAlign = ContentAlignment.MiddleCenter,
Text = "Art full info w/ bidding."
};
this.Controls.Add(_ItemFullInfo);
_ItemName = new Label() {
Size = new Size(350, 50),
Font = new Font("Segoe UI", 15, FontStyle.Bold),
Location = new Point(330, 100),
TextAlign = ContentAlignment.MiddleCenter,
Text = "ITEM NAME: Bidding time left."
};
this.Controls.Add(_ItemName);
_BidPrice[0] = new Label() {
Size = new Size(350, 40),
Font = new Font("Segoe UI", 12),
Location = new Point(330, 170),
TextAlign = ContentAlignment.MiddleCenter,
Text = "Current bid: $$$$$$$$ [Total Bids Count: #]"
};
this.Controls.Add(_BidPrice[0]);
_PriceBox = new TextBox() {
Size = new Size(180, 40),
Font = new Font("Segoe UI", 12),
Location = new Point(500, 230),
};
this.Controls.Add(_PriceBox);
_BidPrice[1] = new Label() {
Size = new Size(150, 30),
Font = new Font("Segoe UI", 12),
Location = new Point(330, 230),
TextAlign = ContentAlignment.MiddleCenter,
Text = "Your bid:"
};
this.Controls.Add(_BidPrice[1]);
_BidPrice[2] = new Label() {
Size = new Size(100, 40),
Font = new Font("Segoe UI", 12),
Location = new Point(330, 300),
TextAlign = ContentAlignment.MiddleCenter,
Text = "Buy now: $$"
};
this.Controls.Add(_BidPrice[2]);
_BuyOption[0] = new Button() {
Size = new Size(110, 40),
Font = new Font("Segoe UI", 12),
Location = new Point(450, 300),
TextAlign = ContentAlignment.MiddleCenter,
Text = "Add to Cart"
};
this.Controls.Add(_BuyOption[0]);
_BuyOption[1] = new Button() {
Size = new Size(110, 40),
Font = new Font("Segoe UI", 12),
Location = new Point(570, 300),
TextAlign = ContentAlignment.MiddleCenter,
Text = "Buy it Now"
};
this.Controls.Add(_BuyOption[1]);
_BidRemind = new Label() {
Size = new Size(350, 190),
Font = new Font("Segoe UI", 12),
Location = new Point(330, 360),
TextAlign = ContentAlignment.MiddleCenter,
Text = "Bidding Reminders"
};
this.Controls.Add(_BidRemind);
_Tab = new Label() {
Size = new Size(900, 100),
Text = "TAB HOLDER ETC",
BackColor = Color.Gray,
Font = new Font("Segoe UI", 20, FontStyle.Bold),
TextAlign = ContentAlignment.MiddleLeft
};
//this.Controls.Add(_Tab);
_SellerInfo = new Label() {
Size = new Size(150, 150),
Text = "Seller Info",
Font = new Font("Segoe UI", 15, FontStyle.Bold),
TextAlign = ContentAlignment.MiddleCenter,
Location = new Point(700, 100)
};
this.Controls.Add(_SellerInfo);
_SellerMess = new Label() {
Size = new Size(150, 280),
Text = "OP's message regarding the item being sold.",
Font = new Font("Segoe UI", 15, FontStyle.Bold),
TextAlign = ContentAlignment.MiddleCenter,
Location = new Point(700, 270)
};
this.Controls.Add(_SellerMess);
_ItemAction[0] = new Label() {
Size = new Size(120, 30),
Location = new Point(50, 520),
Text = "Message OP",
Font = new Font("Segoe UI", 10, FontStyle.Bold),
TextAlign = ContentAlignment.MiddleCenter
};
this.Controls.Add(_ItemAction[0]);
_ItemAction[1] = new Label() {
Size = new Size(120, 30),
Location = new Point(180, 520),
Text = "Report Item",
Font = new Font("Segoe UI", 10, FontStyle.Bold),
TextAlign = ContentAlignment.MiddleCenter
};
this.Controls.Add(_ItemAction[1]);
_Back = new Label() {
Size = new Size(120, 20),
Location = new Point(60, 20),
Text = "◄ BACK",
Font = new Font("Segoe UI", 15),
TextAlign = ContentAlignment.MiddleCenter,
ForeColor = ColorTranslator.FromHtml("#212121"),
BackColor = ColorTranslator.FromHtml("#954535")
};
_Back.MouseEnter += new EventHandler(__MouseEnter);
_Back.MouseLeave += new EventHandler(__MouseLeave);
_Back.Click += new EventHandler(__MouseClick);
this.Controls.Add(_Back);
}
void __MouseEnter(object source, EventArgs e){
var sender = source as Label;
sender.BackColor = ColorTranslator.FromHtml("#212121");
sender.ForeColor = ColorTranslator.FromHtml("#954535");
}
void __MouseLeave(object source, EventArgs e){
var sender = source as Label;
sender.ForeColor = ColorTranslator.FromHtml("#212121");
sender.BackColor = ColorTranslator.FromHtml("#954535");
}
void __MouseClick(object source, EventArgs e){
this.Hide();
}
/*==============================INITIALIZATION==============================*/
Label _Tab;
PictureBox _BiddedItem;
Label _ItemFullInfo;
Label _ItemName;
Label _SellerMess;
Label[] _BidPrice = new Label[3];
Label _SellerInfo;
TextBox _PriceBox;
Label _Back;
Button[] _BuyOption = new Button[2];
Label[] _ItemAction = new Label[2];
Label _BidRemind;
}
}