Skip to content
Snippets Groups Projects
Commit 7e569ea2 authored by Philipp Müller's avatar Philipp Müller
Browse files

added a seperate view for the programs list

parent c9b946b3
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,8 @@ using System.IO; ...@@ -13,6 +13,8 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
using InnoLabProjektDektopApp.Services;
using System.Diagnostics;
namespace InnoLabProjektDektopApp namespace InnoLabProjektDektopApp
...@@ -148,6 +150,30 @@ namespace InnoLabProjektDektopApp ...@@ -148,6 +150,30 @@ namespace InnoLabProjektDektopApp
private void LoadCategoryItems() private void LoadCategoryItems()
{ {
try try
{
if(_category == "Other Programs")
{
Debug.WriteLine("Loading installed programs");
LoadProgramList();
} else
{
LoadWebsiteList();
}
}
catch (Exception ex)
{
MessageBox.Show($"Error loading items: {ex.Message}");
}
}
public void LoadProgramList()
{
ProcessMonitor processMonitor = new();
}
public void LoadWebsiteList()
{ {
// JSON-Datei lesen // JSON-Datei lesen
string jsonContent = File.ReadAllText(_jsonFilePath); string jsonContent = File.ReadAllText(_jsonFilePath);
...@@ -189,11 +215,6 @@ namespace InnoLabProjektDektopApp ...@@ -189,11 +215,6 @@ namespace InnoLabProjektDektopApp
MessageBox.Show($"No items found for category '{_category}'."); MessageBox.Show($"No items found for category '{_category}'.");
} }
} }
catch (Exception ex)
{
MessageBox.Show($"Error loading items: {ex.Message}");
}
}
private void CheckBox_CheckedChanged(object sender, RoutedEventArgs e) private void CheckBox_CheckedChanged(object sender, RoutedEventArgs e)
{ {
... ...
......
...@@ -126,7 +126,9 @@ namespace InnoLabProjektDektopApp ...@@ -126,7 +126,9 @@ namespace InnoLabProjektDektopApp
// Ereignis-Handler für den "Edit Profile"-Button // Ereignis-Handler für den "Edit Profile"-Button
private void EditProfile_Click(object sender, RoutedEventArgs e) private void EditProfile_Click(object sender, RoutedEventArgs e)
{ {
MessageBox.Show("Edit Profile clicked!"); var distractions = new Distractions();
distractions.Show();
this.Close();
} }
// Ereignis-Handler für den "Add Profile"-Button // Ereignis-Handler für den "Add Profile"-Button
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment