-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathListCourses.cs
63 lines (60 loc) · 1.51 KB
/
ListCourses.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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Coders_Space
{
public partial class ListCourses : UserControl
{
public ListCourses()
{
InitializeComponent();
}
private Image _coursePicture;
public Image CoursePicture
{
get { return _coursePicture; }
set
{
_coursePicture = value;
picture.Image = value;
}
}
private string _courseTitle;
public string CourseTitle
{
get { return _courseTitle; }
set
{
_courseTitle = value;
courseTitle.Text = value;
}
}
public event EventHandler viewCourseBTNClick
{
add { viewCourseBTN.Click += value; }
remove { viewCourseBTN.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}");
}
}
}
}