Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stojcheska Teodora
Programming_Project
Commits
9189a171
Commit
9189a171
authored
Jul 03, 2021
by
Stojcheska Teodora
Browse files
Changes
parent
8d3a6f0c
Changes
9
Hide whitespace changes
Inline
Side-by-side
Calendar.cs
View file @
9189a171
...
...
@@ -10,6 +10,8 @@ public class Calendar
public
(
int
,
int
)
defaultWorkingHoursInterval
{
get
;
set
;
}
public
int
defaultWorkingHours
{
get
;
set
;
}
public
delegate
void
ErrorNotify
();
public
Calendar
()
{
this
.
days
=
new
List
<
Day
>();
...
...
@@ -39,7 +41,21 @@ public class Calendar
return
day
;
}
}
WriteLine
(
"Day has not been added -> check for error"
);
return
null
;
}
public
Day
findTaskInDay
(
Task
task
)
{
foreach
(
Day
day
in
days
)
{
foreach
(
Task
t
in
day
.
tasks
)
{
if
(
t
.
Equals
(
task
))
{
return
day
;
}
}
}
return
null
;
}
...
...
@@ -79,23 +95,22 @@ public class Calendar
int
numberOfValidDaysInRange
=
numberOfDaysInRange
(
currentDate
,
task
.
deadline
);
if
(
numberOfValidDaysInRange
==
0
)
{
WriteLine
(
"The date is not valid!"
);
}
// start from current date
int
startIndex
=
numberOfDaysInRange
(
days
[
0
].
date
,
currentDate
)
-
1
;
for
(
int
i
=
0
;
i
<
numberOfValidDaysInRange
;
++
i
)
{
if
(
days
.
Count
<=
i
)
{
break
;
}
validDays
.
Add
(
days
[
i
]);
validDays
.
Add
(
days
[
startIndex
+
i
]);
}
return
validDays
;
}
public
event
ErrorNotify
ErrorInTaskParameters
;
/* ---------------------------------- Exception Handling ----------------------------------- */
public
void
errorCheck
(
Task
task
,
List
<
Day
>
validDays
,
ref
Day
d
)
...
...
@@ -119,7 +134,6 @@ public class Calendar
if
(
hours
<
task
.
duration
)
{
WriteLine
(
"No space to add task"
);
validDays
[
validDays
.
Count
-
1
].
addTask
(
task
,
validDays
[
validDays
.
Count
-
1
].
tasks
.
Count
);
throw
new
NoSpaceForTaskExeption
(
"There is no space to add the task which needs to be added as the last task in the calendar"
,
d
,
task
,
hours
-
task
.
duration
);
}
...
...
@@ -145,6 +159,8 @@ public class Calendar
Day
day
=
getDayByDate
(
task
.
deadline
);
day
.
removeTask
(
task
);
deleteReorderCalendar
(
exception
.
day
.
nextDay
,
day
.
hoursToShift
*
-
1
,
day
);
ErrorInTaskParameters
.
Invoke
();
// notify calendar view about exeption and show error message
}
}
...
...
@@ -325,14 +341,24 @@ public class Calendar
public
void
deleteTask
(
Day
day
,
Task
task
)
{
int
hours
=
0
;
if
(
task
.
isSplit
)
{
hours
+=
task
.
splitTaskPtr
.
duration
;
day
.
nextDay
.
removeTask
(
task
.
splitTaskPtr
);
task
.
isSplit
=
false
;
deleteReorderCalendar
(
days
[
days
.
Count
-
1
],
task
.
splitTaskPtr
.
duration
,
day
.
nextDay
);
}
if
(
day
.
prevDay
!=
null
&&
day
.
prevDay
.
tasks
.
Count
!=
0
&&
day
.
prevDay
.
tasks
[
day
.
prevDay
.
tasks
.
Count
-
1
].
isSplit
)
{
hours
+=
day
.
prevDay
.
tasks
[
day
.
prevDay
.
tasks
.
Count
-
1
].
duration
;
deleteTask
(
day
.
prevDay
,
day
.
prevDay
.
tasks
[
day
.
prevDay
.
tasks
.
Count
-
1
]);
}
hours
+=
task
.
duration
;
day
.
removeTask
(
task
);
deleteReorderCalendar
(
days
[
days
.
Count
-
1
],
task
.
duration
,
day
);
task
.
duration
=
hours
;
}
}
\ No newline at end of file
Controls/DatePicker.cs
View file @
9189a171
...
...
@@ -18,69 +18,65 @@ namespace Scheduler.Controls
/* ------------------------------ Private Methods ------------------------------*/
private
void
InitializeComponent
()
{
this
.
day
=
new
HintTextBox
();
this
.
month
=
new
HintTextBox
();
this
.
year
=
new
HintTextBox
();
this
.
day
=
new
Scheduler
.
Controls
.
HintTextBox
();
this
.
month
=
new
Scheduler
.
Controls
.
HintTextBox
();
this
.
year
=
new
Scheduler
.
Controls
.
HintTextBox
();
this
.
SuspendLayout
();
//
// day
//
this
.
day
.
ForeColor
=
System
.
Drawing
.
Color
.
DarkGray
;
this
.
day
.
Hint
=
"dd"
;
this
.
day
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
5
);
this
.
day
.
Margin
=
new
Padding
(
5
);
this
.
day
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
6
);
this
.
day
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
6
,
6
,
6
,
6
);
this
.
day
.
MaxLength
=
2
;
this
.
day
.
Name
=
"day"
;
this
.
day
.
Size
=
new
System
.
Drawing
.
Size
(
35
,
29
);
this
.
day
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
34
);
this
.
day
.
TabIndex
=
0
;
this
.
day
.
Text
=
"dd"
;
this
.
day
.
TextAlign
=
HorizontalAlignment
.
Center
;
this
.
day
.
TextAlign
=
System
.
Windows
.
Forms
.
HorizontalAlignment
.
Center
;
//
// month
//
this
.
month
.
ForeColor
=
System
.
Drawing
.
Color
.
DarkGray
;
this
.
month
.
Hint
=
"mm"
;
this
.
month
.
Location
=
new
System
.
Drawing
.
Point
(
50
,
5
);
this
.
month
.
Margin
=
new
Padding
(
5
);
this
.
month
.
Location
=
new
System
.
Drawing
.
Point
(
62
,
6
);
this
.
month
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
6
,
6
,
6
,
6
);
this
.
month
.
MaxLength
=
2
;
this
.
month
.
Name
=
"month"
;
this
.
month
.
Size
=
new
System
.
Drawing
.
Size
(
35
,
29
);
this
.
month
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
34
);
this
.
month
.
TabIndex
=
1
;
this
.
month
.
Text
=
"mm"
;
this
.
month
.
TextAlign
=
HorizontalAlignment
.
Center
;
this
.
month
.
TextAlign
=
System
.
Windows
.
Forms
.
HorizontalAlignment
.
Center
;
//
// year
//
this
.
year
.
ForeColor
=
System
.
Drawing
.
Color
.
DarkGray
;
this
.
year
.
Hint
=
"yyyy"
;
this
.
year
.
Location
=
new
System
.
Drawing
.
Point
(
9
5
,
5
);
this
.
year
.
Margin
=
new
Padding
(
5
);
this
.
year
.
Location
=
new
System
.
Drawing
.
Point
(
11
9
,
6
);
this
.
year
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
6
,
6
,
6
,
6
);
this
.
year
.
MaxLength
=
4
;
this
.
year
.
Name
=
"year"
;
this
.
year
.
Size
=
new
System
.
Drawing
.
Size
(
4
5
,
29
);
this
.
year
.
Size
=
new
System
.
Drawing
.
Size
(
5
5
,
34
);
this
.
year
.
TabIndex
=
2
;
this
.
year
.
Text
=
"yyyy"
;
this
.
year
.
TextAlign
=
HorizontalAlignment
.
Center
;
this
.
year
.
TextAlign
=
System
.
Windows
.
Forms
.
HorizontalAlignment
.
Center
;
//
// DatePicker
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96
F
);
this
.
AutoScaleMode
=
AutoScaleMode
.
Dpi
;
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
120F
,
120
F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Dpi
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
Controls
.
Add
(
this
.
year
);
this
.
Controls
.
Add
(
this
.
month
);
this
.
Controls
.
Add
(
this
.
day
);
this
.
Font
=
new
System
.
Drawing
.
Font
(
"Segoe UI"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
);
this
.
Margin
=
new
Padding
(
0
);
this
.
Font
=
new
System
.
Drawing
.
Font
(
"Segoe UI"
,
12F
);
this
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
Name
=
"DatePicker"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
147
,
40
);
this
.
Size
=
new
System
.
Drawing
.
Size
(
184
,
50
);
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
this
.
ResumeLayout
();
}
private
void
HintTextBox_KeyPress
(
object
sender
,
KeyPressEventArgs
e
)
...
...
Controls/DatePicker.resx
0 → 100644
View file @
9189a171
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema
id=
"root"
xmlns=
""
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
xmlns:msdata=
"urn:schemas-microsoft-com:xml-msdata"
>
<xsd:import
namespace=
"http://www.w3.org/XML/1998/namespace"
/>
<xsd:element
name=
"root"
msdata:IsDataSet=
"true"
>
<xsd:complexType>
<xsd:choice
maxOccurs=
"unbounded"
>
<xsd:element
name=
"metadata"
>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name=
"value"
type=
"xsd:string"
minOccurs=
"0"
/>
</xsd:sequence>
<xsd:attribute
name=
"name"
use=
"required"
type=
"xsd:string"
/>
<xsd:attribute
name=
"type"
type=
"xsd:string"
/>
<xsd:attribute
name=
"mimetype"
type=
"xsd:string"
/>
<xsd:attribute
ref=
"xml:space"
/>
</xsd:complexType>
</xsd:element>
<xsd:element
name=
"assembly"
>
<xsd:complexType>
<xsd:attribute
name=
"alias"
type=
"xsd:string"
/>
<xsd:attribute
name=
"name"
type=
"xsd:string"
/>
</xsd:complexType>
</xsd:element>
<xsd:element
name=
"data"
>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name=
"value"
type=
"xsd:string"
minOccurs=
"0"
msdata:Ordinal=
"1"
/>
<xsd:element
name=
"comment"
type=
"xsd:string"
minOccurs=
"0"
msdata:Ordinal=
"2"
/>
</xsd:sequence>
<xsd:attribute
name=
"name"
type=
"xsd:string"
use=
"required"
msdata:Ordinal=
"1"
/>
<xsd:attribute
name=
"type"
type=
"xsd:string"
msdata:Ordinal=
"3"
/>
<xsd:attribute
name=
"mimetype"
type=
"xsd:string"
msdata:Ordinal=
"4"
/>
<xsd:attribute
ref=
"xml:space"
/>
</xsd:complexType>
</xsd:element>
<xsd:element
name=
"resheader"
>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name=
"value"
type=
"xsd:string"
minOccurs=
"0"
msdata:Ordinal=
"1"
/>
</xsd:sequence>
<xsd:attribute
name=
"name"
type=
"xsd:string"
use=
"required"
/>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader
name=
"resmimetype"
>
<value>
text/microsoft-resx
</value>
</resheader>
<resheader
name=
"version"
>
<value>
2.0
</value>
</resheader>
<resheader
name=
"reader"
>
<value>
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
</resheader>
<resheader
name=
"writer"
>
<value>
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
</resheader>
</root>
\ No newline at end of file
Day.cs
View file @
9189a171
...
...
@@ -36,16 +36,7 @@ public class Day
}
}
public
override
int
GetHashCode
()
{
long
hash
=
0
;
foreach
(
char
c
in
date
.
ToString
())
{
hash
=
hash
*
1000003
+
c
.
GetHashCode
();
}
return
(
int
)
hash
;
}
public
override
int
GetHashCode
()
=>
date
.
GetHashCode
();
public
int
totalHoursTasks
()
{
int
totalHours
=
0
;
...
...
Forms/CalendarView.cs
View file @
9189a171
...
...
@@ -19,6 +19,10 @@ namespace Scheduler.Forms
/* ------------------------------ Private Variables ------------------------------*/
private
Day
CurrentDay
;
private
Button
NextDayButton
;
private
Button
PreviousDayButton
;
private
Controls
.
HintTextBox
setWorkingHours
;
private
Label
workingHours
;
private
ContextMenuStrip
ItemMenuStrip
;
/* ------------------------------ Private Methods ------------------------------*/
...
...
@@ -37,177 +41,211 @@ namespace Scheduler.Forms
private
void
InitializeComponent
()
{
this
.
TitlePanel
=
new
TableLayoutPanel
();
this
.
TitleLabel
=
new
Label
();
this
.
DatePanel
=
new
FlowLayoutPanel
();
this
.
DateLabel
=
new
Label
();
this
.
DatePicker
=
new
Controls
.
DatePicker
();
this
.
SearchButton
=
new
Button
();
this
.
CurrentDateLabel
=
new
Label
();
this
.
TaskList
=
new
CheckedListBox
();
this
.
ButtonsPanel
=
new
FlowLayoutPanel
();
this
.
AddTaskButton
=
new
Button
();
this
.
TitlePanel
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
TitleLabel
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
DatePanel
=
new
System
.
Windows
.
Forms
.
FlowLayoutPanel
();
this
.
DateLabel
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
DatePicker
=
new
Scheduler
.
Controls
.
DatePicker
();
this
.
SearchButton
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
CurrentDateLabel
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
TaskList
=
new
System
.
Windows
.
Forms
.
CheckedListBox
();
this
.
ButtonsPanel
=
new
System
.
Windows
.
Forms
.
FlowLayoutPanel
();
this
.
AddTaskButton
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
setWorkingHours
=
new
Scheduler
.
Controls
.
HintTextBox
();
this
.
workingHours
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
NextDayButton
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
PreviousDayButton
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
TitlePanel
.
SuspendLayout
();
this
.
DatePanel
.
SuspendLayout
();
this
.
ButtonsPanel
.
SuspendLayout
();
this
.
SuspendLayout
();
//
// TitlePanel
//
this
.
TitlePanel
.
ColumnCount
=
1
;
this
.
TitlePanel
.
ColumnStyles
.
Add
(
new
ColumnStyle
(
SizeType
.
Percent
,
100F
));
this
.
TitlePanel
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
100F
));
this
.
TitlePanel
.
Controls
.
Add
(
this
.
TitleLabel
,
0
,
0
);
this
.
TitlePanel
.
Controls
.
Add
(
this
.
DatePanel
,
0
,
1
);
this
.
TitlePanel
.
Controls
.
Add
(
this
.
CurrentDateLabel
,
0
,
2
);
this
.
TitlePanel
.
Controls
.
Add
(
this
.
TaskList
,
0
,
3
);
this
.
TitlePanel
.
Controls
.
Add
(
this
.
ButtonsPanel
,
0
,
4
);
this
.
TitlePanel
.
Dock
=
DockStyle
.
Fill
;
this
.
TitlePanel
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
TitlePanel
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
TitlePanel
.
Margin
=
new
Padding
(
0
);
this
.
TitlePanel
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
TitlePanel
.
Name
=
"TitlePanel"
;
this
.
TitlePanel
.
RowCount
=
5
;
this
.
TitlePanel
.
RowStyles
.
Add
(
new
RowStyle
(
SizeType
.
Absolute
,
60
F
));
this
.
TitlePanel
.
RowStyles
.
Add
(
new
RowStyle
(
SizeType
.
Absolute
,
4
0F
));
this
.
TitlePanel
.
RowStyles
.
Add
(
new
RowStyle
(
SizeType
.
Absolute
,
4
0F
));
this
.
TitlePanel
.
RowStyles
.
Add
(
new
RowStyle
(
SizeType
.
Percent
,
100F
));
this
.
TitlePanel
.
RowStyles
.
Add
(
new
RowStyle
(
SizeType
.
Absolute
,
4
0F
));
this
.
TitlePanel
.
Size
=
new
System
.
Drawing
.
Size
(
484
,
76
1
);
this
.
TitlePanel
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
75
F
));
this
.
TitlePanel
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
5
0F
));
this
.
TitlePanel
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
5
0F
));
this
.
TitlePanel
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
100F
));
this
.
TitlePanel
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
5
0F
));
this
.
TitlePanel
.
Size
=
new
System
.
Drawing
.
Size
(
605
,
95
1
);
this
.
TitlePanel
.
TabIndex
=
0
;
//
// TitleLabel
//
this
.
TitleLabel
.
Anchor
=
AnchorStyles
.
None
;
this
.
TitleLabel
.
Anchor
=
System
.
Windows
.
Forms
.
AnchorStyles
.
None
;
this
.
TitleLabel
.
AutoSize
=
true
;
this
.
TitleLabel
.
Font
=
new
System
.
Drawing
.
Font
(
"Segoe UI"
,
20.25F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
0
);
this
.
TitleLabel
.
Location
=
new
System
.
Drawing
.
Point
(
1
5
2
,
1
1
);
this
.
TitleLabel
.
Margin
=
new
Padding
(
0
);
this
.
TitleLabel
.
Font
=
new
System
.
Drawing
.
Font
(
"Segoe UI"
,
20.25F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
0
))
);
this
.
TitleLabel
.
Location
=
new
System
.
Drawing
.
Point
(
1
9
2
,
1
4
);
this
.
TitleLabel
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
TitleLabel
.
Name
=
"TitleLabel"
;
this
.
TitleLabel
.
Size
=
new
System
.
Drawing
.
Size
(
179
,
37
);
this
.
TitleLabel
.
Size
=
new
System
.
Drawing
.
Size
(
221
,
46
);
this
.
TitleLabel
.
TabIndex
=
0
;
this
.
TitleLabel
.
Text
=
"My Calendar"
;
//
// DatePanel
//
this
.
DatePanel
.
Anchor
=
AnchorStyles
.
None
;
this
.
DatePanel
.
Anchor
=
System
.
Windows
.
Forms
.
AnchorStyles
.
None
;
this
.
DatePanel
.
AutoSize
=
true
;
this
.
DatePanel
.
Controls
.
Add
(
this
.
DateLabel
);
this
.
DatePanel
.
Controls
.
Add
(
this
.
DatePicker
);
this
.
DatePanel
.
Controls
.
Add
(
this
.
SearchButton
);
this
.
DatePanel
.
Location
=
new
System
.
Drawing
.
Point
(
1
07
,
60
);
this
.
DatePanel
.
Margin
=
new
Padding
(
0
);
this
.
DatePanel
.
Location
=
new
System
.
Drawing
.
Point
(
1
34
,
77
);
this
.
DatePanel
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
DatePanel
.
Name
=
"DatePanel"
;
this
.
DatePanel
.
Size
=
new
System
.
Drawing
.
Size
(
270
,
39
);
this
.
DatePanel
.
Size
=
new
System
.
Drawing
.
Size
(
337
,
46
);
this
.
DatePanel
.
TabIndex
=
4
;
//
// DateLabel
//
this
.
DateLabel
.
Anchor
=
AnchorStyles
.
Right
;
this
.
DateLabel
.
Anchor
=
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
;
this
.
DateLabel
.
AutoSize
=
true
;
this
.
DateLabel
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
9
);
this
.
DateLabel
.
Margin
=
new
Padding
(
0
);
this
.
DateLabel
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
DateLabel
.
Name
=
"DateLabel"
;
this
.
DateLabel
.
Size
=
new
System
.
Drawing
.
Size
(
4
5
,
2
1
);
this
.
DateLabel
.
Size
=
new
System
.
Drawing
.
Size
(
5
7
,
2
8
);
this
.
DateLabel
.
TabIndex
=
3
;
this
.
DateLabel
.
Text
=
"Date:"
;
//
// DatePicker
//
this
.
DatePicker
.
Anchor
=
AnchorStyles
.
Left
;
this
.
DatePicker
.
Anchor
=
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
;
this
.
DatePicker
.
AutoSize
=
true
;
this
.
DatePicker
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
DatePicker
.
Font
=
new
System
.
Drawing
.
Font
(
"Segoe UI"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
0
);
this
.
DatePicker
.
Location
=
new
System
.
Drawing
.
Point
(
4
5
,
0
);
this
.
DatePicker
.
Margin
=
new
Padding
(
0
);
this
.
DatePicker
.
Font
=
new
System
.
Drawing
.
Font
(
"Segoe UI"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
0
))
);
this
.
DatePicker
.
Location
=
new
System
.
Drawing
.
Point
(
5
7
,
0
);
this
.
DatePicker
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
DatePicker
.
Name
=
"DatePicker"
;
this
.
DatePicker
.
Size
=
new
System
.
Drawing
.
Size
(
1
45
,
39
);
this
.
DatePicker
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
46
);
this
.
DatePicker
.
TabIndex
=
2
;
//
// SearchButton
//
this
.
SearchButton
.
Anchor
=
AnchorStyles
.
None
;
this
.
SearchButton
.
Anchor
=
System
.
Windows
.
Forms
.
AnchorStyles
.
None
;
this
.
SearchButton
.
AutoSize
=
true
;
this
.
SearchButton
.
Location
=
new
System
.
Drawing
.
Point
(
195
,
4
);
this
.
SearchButton
.
Margin
=
new
Padding
(
5
,
0
,
0
,
0
);
this
.
SearchButton
.
Location
=
new
System
.
Drawing
.
Point
(
243
,
3
);
this
.
SearchButton
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
6
,
0
,
0
,
0
);
this
.
SearchButton
.
Name
=
"SearchButton"
;
this
.
SearchButton
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
3
1
);
this
.
SearchButton
.
Size
=
new
System
.
Drawing
.
Size
(
94
,
3
9
);
this
.
SearchButton
.
TabIndex
=
4
;
this
.
SearchButton
.
Text
=
"Search"
;
this
.
SearchButton
.
UseVisualStyleBackColor
=
true
;
this
.
SearchButton
.
Click
+=
new
EventHandler
(
this
.
SearchButton_Click
);
this
.
SearchButton
.
Click
+=
new
System
.
EventHandler
(
this
.
SearchButton_Click
);
//
// CurrentDateLabel
//
this
.
CurrentDateLabel
.
Anchor
=
AnchorStyles
.
Left
;
this
.
CurrentDateLabel
.
Anchor
=
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
;
this
.
CurrentDateLabel
.
AutoSize
=
true
;
this
.
CurrentDateLabel
.
Font
=
new
System
.
Drawing
.
Font
(
"Segoe UI"
,
15.75F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
0
);
this
.
CurrentDateLabel
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
105
);
this
.
CurrentDateLabel
.
Font
=
new
System
.
Drawing
.
Font
(
"Segoe UI"
,
15.75F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
0
)));
this
.
CurrentDateLabel
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
131
);
this
.
CurrentDateLabel
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
0
,
4
,
0
);
this
.
CurrentDateLabel
.
Name
=
"CurrentDateLabel"
;
this
.
CurrentDateLabel
.
Size
=
new
System
.
Drawing
.
Size
(
0
,
3
0
);
this
.
CurrentDateLabel
.
Size
=
new
System
.
Drawing
.
Size
(
0
,
3
7
);
this
.
CurrentDateLabel
.
TabIndex
=
5
;
//
// TaskList
//
this
.
TaskList
.
Dock
=
DockStyle
.
Fill
;
this
.
TaskList
.
Font
=
new
System
.
Drawing
.
Font
(
"Courier New"
,
15.75F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
0
);
this
.
TaskList
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
TaskList
.
Font
=
new
System
.
Drawing
.
Font
(
"Courier New"
,
15.75F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
0
))
);
this
.
TaskList
.
FormattingEnabled
=
true
;
this
.
TaskList
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
1
40
);
this
.
TaskList
.
Margin
=
new
Padding
(
5
,
0
,
5
,
0
);
this
.
TaskList
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
1
75
);
this
.
TaskList
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
6
,
0
,
6
,
0
);
this
.
TaskList
.
Name
=
"TaskList"
;
this
.
TaskList
.
Size
=
new
System
.
Drawing
.
Size
(
474
,
581
);
this
.
TaskList
.
Size
=
new
System
.
Drawing
.
Size
(
593
,
726
);
this
.
TaskList
.
TabIndex
=
6
;
this
.
TaskList
.
MouseDown
+=
new
MouseEventHandler
(
this
.
TaskList_MouseDown
);
this
.
TaskList
.
MouseDown
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
TaskList_MouseDown
);
//
// ButtonsPanel
//
this
.
ButtonsPanel
.
Controls
.
Add
(
this
.
AddTaskButton
);
this
.
ButtonsPanel
.
Dock
=
DockStyle
.
Fill
;
this
.
ButtonsPanel
.
FlowDirection
=
FlowDirection
.
RightToLeft
;
this
.
ButtonsPanel
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
721
);
this
.
ButtonsPanel
.
Margin
=
new
Padding
(
0
);
this
.
ButtonsPanel
.
Controls
.
Add
(
this
.
setWorkingHours
);
this
.
ButtonsPanel
.
Controls
.
Add
(
this
.
workingHours
);
this
.
ButtonsPanel
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
ButtonsPanel
.
FlowDirection
=
System
.
Windows
.
Forms
.
FlowDirection
.
RightToLeft
;
this
.
ButtonsPanel
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
901
);
this
.
ButtonsPanel
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
ButtonsPanel
.
Name
=
"ButtonsPanel"
;
this
.
ButtonsPanel
.
Size
=
new
System
.
Drawing
.
Size
(
484
,
4
0
);
this
.
ButtonsPanel
.
Size
=
new
System
.
Drawing
.
Size
(
605
,
5
0
);
this
.
ButtonsPanel
.
TabIndex
=
7
;
//
// AddTaskButton
//
this
.
AddTaskButton
.
Anchor
=
AnchorStyles
.
None
;
this
.
AddTaskButton
.
Anchor
=
System
.
Windows
.
Forms
.
AnchorStyles
.
None
;
this
.
AddTaskButton
.
AutoSize
=
true
;
this
.
AddTaskButton
.
Location
=
new
System
.
Drawing
.
Point
(
3
98
,
5
);
this
.
AddTaskButton
.
Margin
=
new
Padding
(
5
);
this
.
AddTaskButton
.
Location
=
new
System
.
Drawing
.
Point
(
4
98
,
6
);
this
.
AddTaskButton
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
6
);
this
.
AddTaskButton
.
Name
=
"AddTaskButton"
;
this
.
AddTaskButton
.
Size
=
new
System
.
Drawing
.
Size
(
8
1
,
3
1
);
this
.
AddTaskButton
.
Size
=
new
System
.
Drawing
.
Size
(
10
1
,
3
9
);
this
.
AddTaskButton
.
TabIndex
=
0
;
this
.
AddTaskButton
.
Text
=
"Add Task"
;
this
.
AddTaskButton
.
UseVisualStyleBackColor
=
true
;
this
.
AddTaskButton
.
Click
+=
new
EventHandler
(
this
.
AddTaskButton_Click
);
this
.
AddTaskButton
.
Click
+=
new
System
.
EventHandler
(
this
.
AddTaskButton_Click
);
//
// setWorkingHours
//
this
.
setWorkingHours
.
ForeColor
=
System
.
Drawing
.
Color
.
DarkGray
;