-
Notifications
You must be signed in to change notification settings - Fork 0
/
Activity.cs
45 lines (42 loc) · 1.25 KB
/
Activity.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
using System;
using System.Windows.Forms;
using System.Drawing;
namespace Instagram
{
public partial class Activity : Form
{
DBHandlingUtilities dbHandler;
Main main;
public Activity(Main main)
{
InitializeComponent();
this.main = main;
dbHandler = new DBHandlingUtilities();
Configure_Theme();
Display_Activity();
}
private void Configure_Theme()
{
Color backColor;
if (main.lightModeOn)
backColor = Color.FromArgb(209, 209, 209);
else
backColor = Color.FromArgb(31, 31, 31);
this.BackColor = backColor;
}
private void Display_Activity()
{
ActivityRow[] activityList = dbHandler.Generate_Activity(main.userID, main.userName, main.lightModeOn);
activityFeed.AutoScroll = true;
if(activityList != null)
{
for (int i = 0; i < activityList.Length; i++)
{
activityList[i].TopLevel = false;
activityFeed.Controls.Add(activityList[i]);
activityList[i].Show();
}
}
}
}
}