mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
It seemed to me that it would make more sense to separate tht two main tasks completely and have them independent from each other in the program. So I created a new MainForm that opens up either a 'Setup Display Profiles' or 'Setup Game Shortcuts' window depending on what the user clicks. The idea is that Display Profile setup only happens when the app is first installed, and after that it's just the game shortcut that gets updated. Also created a first attempt at a new HeliosPlus Icon.
60 lines
1.7 KiB
C#
60 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
using HeliosPlus.GameLibraries;
|
|
using System.Threading;
|
|
|
|
namespace HeliosPlus.UIForms
|
|
{
|
|
public partial class MainForm : Form
|
|
{
|
|
public MainForm()
|
|
{
|
|
InitializeComponent();
|
|
btn_setup_display_profiles.Parent = splitContainer1.Panel1;
|
|
btn_setup_game_shortcuts.Parent = splitContainer1.Panel2;
|
|
}
|
|
|
|
private void btn_exit_Click(object sender, EventArgs e)
|
|
{
|
|
Application.Exit();
|
|
}
|
|
|
|
private void pb_display_profile_Click(object sender, EventArgs e)
|
|
{
|
|
var displayProfileForm = new DisplayProfileForm();
|
|
displayProfileForm.ShowDialog(this);
|
|
}
|
|
|
|
private void btn_setup_display_profiles_Click(object sender, EventArgs e)
|
|
{
|
|
var displayProfileForm = new DisplayProfileForm();
|
|
displayProfileForm.ShowDialog(this);
|
|
}
|
|
|
|
private void pb_game_shortcut_Click(object sender, EventArgs e)
|
|
{
|
|
var shortcutForm = new ShortcutForm();
|
|
shortcutForm.ShowDialog(this);
|
|
}
|
|
|
|
private void btn_setup_game_shortcuts_Click(object sender, EventArgs e)
|
|
{
|
|
var shortcutForm = new ShortcutForm();
|
|
shortcutForm.ShowDialog(this);
|
|
}
|
|
|
|
private void MainForm_Load(object sender, EventArgs e)
|
|
{
|
|
// Start loading the Steam Games just after the Main form opens
|
|
SteamGame.GetAllInstalledGames();
|
|
}
|
|
}
|
|
}
|