HeadMeld 0.0.0.1
- Initial submit, functionality is incomplete
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
|
||||
namespace HeadMeld
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
ConfigManager configManager = new();
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
foreach (var item in configManager.configFile)
|
||||
{
|
||||
btnRadioProfiles.Items.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnExit_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Application.Current.Shutdown();
|
||||
}
|
||||
|
||||
private void Window_Activated(object sender, System.EventArgs e)
|
||||
{
|
||||
// Set window position based on taskbar location
|
||||
var desktopWorkArea = SystemParameters.WorkArea;
|
||||
Left = desktopWorkArea.Right - Width - 15;
|
||||
Top = desktopWorkArea.Bottom - Height - 15;
|
||||
}
|
||||
|
||||
private void toggleAPOEnabled_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
configManager.ToggleProfiles(new List<string>
|
||||
{
|
||||
"# Include: ATH-M50x.txt",
|
||||
"Include: 900ProX.txt"
|
||||
},
|
||||
toggleAPOEnabled.IsOn);
|
||||
configManager.Write();
|
||||
}
|
||||
|
||||
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
Visibility = Visibility.Collapsed;
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user