-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathListJobs.cs
88 lines (80 loc) · 2.22 KB
/
ListJobs.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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Coders_Space
{
public partial class ListJobs : UserControl
{
public ListJobs()
{
InitializeComponent();
}
public Image CompanyLogo
{
get { return companyLogo.Image; }
set { companyLogo.Image = value; }
}
public string JobTitle
{
get { return labelJobTitle.Text; }
set { labelJobTitle.Text = value; }
}
public string CompanyName
{
get { return labelCompanyName.Text; }
set { labelCompanyName.Text = value; }
}
public string Address
{
get { return labelAddress.Text; }
set { labelAddress.Text = value; }
}
public string Salary
{
get { return labelSalary.Text; }
set { labelSalary.Text = value; }
}
public string Benefits
{
get { return labelBenefits.Text; }
set { labelBenefits.Text = value; }
}
public DateTime ApplyLastDate
{
get { return DateTime.ParseExact(labelDeadLine.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture); }
set
{
labelDeadLine.Text = value.ToString("dd/MM/yyyy");
applyNowBtn.Enabled = DateTime.Now < value;
}
}
public event EventHandler ApplyNowButtonClick
{
add { applyNowBtn.Click += value; }
remove { applyNowBtn.Click -= value; }
}
public void OpenBrowser(string link)
{
try
{
System.Diagnostics.Process.Start(new ProcessStartInfo
{
FileName = link,
UseShellExecute = true
});
}
catch (Win32Exception ex)
{
Console.WriteLine($"Error opening browser: {ex.Message}");
}
}
}
}