Small UI and code improvements

This commit is contained in:
Stone-Red-Code
2021-07-18 17:37:39 +02:00
parent 23a31ae5d0
commit 4ea42f21de
68 changed files with 247 additions and 215 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
-2
View File
@@ -12,8 +12,6 @@ namespace DesktopMagic
{ {
internal class CalendarManagment internal class CalendarManagment
{ {
// If Pluginifying these scopes, delete your previously saved credentials
// at ~/.credentials/calendar-dotnet-quickstart.json
private static string[] Scopes = { CalendarService.Scope.CalendarReadonly }; private static string[] Scopes = { CalendarService.Scope.CalendarReadonly };
private static string ApplicationName = "Google Calendar API .NET " + MainWindow.AppName; private static string ApplicationName = "Google Calendar API .NET " + MainWindow.AppName;
+8 -4
View File
@@ -8,9 +8,13 @@
Title="InputDialog" Height="152.812" Width="322.812" Title="InputDialog" Height="152.812" Width="322.812"
ResizeMode="NoResize"> ResizeMode="NoResize">
<Grid> <Grid>
<Button x:Name="okButton" Content="Ok" HorizontalAlignment="Left" Margin="126,76,0,0" VerticalAlignment="Top" Width="76" Click="okButton_Click"/> <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10">
<Button x:Name="cancelButton" Content="Abbrechen" HorizontalAlignment="Left" Margin="213,76,0,0" VerticalAlignment="Top" Width="76" Click="cancelButton_Click"/> <Label x:Name="label" Content="Label" HorizontalAlignment="Left" VerticalAlignment="Top"/>
<Label x:Name="label" Content="Label" HorizontalAlignment="Left" Margin="10,15,0,0" VerticalAlignment="Top" Padding="0"/> <TextBox x:Name="textBox" HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" VerticalAlignment="Top" Width="279" VerticalContentAlignment="Center"/>
<TextBox x:Name="textBox" HorizontalAlignment="Left" Height="23" Margin="10,36,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="279" VerticalContentAlignment="Center"/> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,0,0">
<Button x:Name="okButton" Content="{DynamicResource ok }" HorizontalAlignment="Left" Margin="0,0,10,0" VerticalAlignment="Top" Width="100" Click="OkButton_Click" Cursor="Hand"/>
<Button x:Name="cancelButton" Content="{DynamicResource cancel }" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Top" Width="100" Click="CancelButton_Click"/>
</StackPanel>
</StackPanel>
</Grid> </Grid>
</Window> </Window>
+22 -3
View File
@@ -1,4 +1,6 @@
using System.Windows; using System;
using System.Threading;
using System.Windows;
namespace DesktopMagic namespace DesktopMagic
{ {
@@ -12,6 +14,7 @@ namespace DesktopMagic
InitializeComponent(); InitializeComponent();
label.Content = content; label.Content = content;
this.Title = title; this.Title = title;
SetLanguageDictionary();
} }
public string ResponseText public string ResponseText
@@ -20,14 +23,30 @@ namespace DesktopMagic
set { textBox.Text = value; } set { textBox.Text = value; }
} }
private void okButton_Click(object sender, RoutedEventArgs e) private void OkButton_Click(object sender, RoutedEventArgs e)
{ {
DialogResult = true; DialogResult = true;
} }
private void cancelButton_Click(object sender, RoutedEventArgs e) private void CancelButton_Click(object sender, RoutedEventArgs e)
{ {
DialogResult = false; DialogResult = false;
} }
private void SetLanguageDictionary()
{
ResourceDictionary dict = new ResourceDictionary();
string currentCulture = Thread.CurrentThread.CurrentCulture.ToString();
if (currentCulture.Contains("de"))
{
dict.Source = new Uri("..\\Resources\\StringResources.de.xaml", UriKind.Relative);
}
else
{
dict.Source = new Uri("..\\Resources\\StringResources.en.xaml", UriKind.Relative);
}
this.Resources.MergedDictionaries.Add(dict);
}
} }
} }
+5 -5
View File
@@ -12,11 +12,11 @@
Width="550" Width="550"
MinHeight="520" MinHeight="520"
MinWidth="500" MinWidth="500"
WindowState="Minimized"
StateChanged="Window_StateChanged" StateChanged="Window_StateChanged"
Loaded="Window_Loaded"> Loaded="Window_Loaded">
<Grid x:Name="grid"> <Grid x:Name="grid">
<!--<tb:TaskbarIcon x:Name="taskbarIcon" Visibility="Visible" ToolTipText="Helfer V4" TrayLeftMouseUp="TaskbarIcon_TrayLeftMouseUp" IconSource="icons8_volunteering_26_85L_icon.ico" Grid.RowSpan="2" />-->
<TextBlock x:Name="textBlock" TextWrapping="Wrap" Text="0" VerticalAlignment="Top" FontFamily="Comic Sans MS" Loaded="TextBlock_Loaded" Foreground="Transparent" /> <TextBlock x:Name="textBlock" TextWrapping="Wrap" Text="0" VerticalAlignment="Top" FontFamily="Comic Sans MS" Loaded="TextBlock_Loaded" Foreground="Transparent" />
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
@@ -30,8 +30,8 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<DockPanel Margin="0,0,2.5,0"> <DockPanel Margin="0,0,2.5,0">
<Grid DockPanel.Dock="Top"> <Grid DockPanel.Dock="Top">
<Rectangle Grid.Row="1" Fill="#FFECECEC" Height="22" /> <Rectangle Grid.Row="1" Fill="#FFECECEC" Height="24" />
<CheckBox x:Name="EditCheckBox" VerticalAlignment="Center" Grid.Row="1" Content="{DynamicResource edit}" Click="EditCheckBox_Click" Foreground="Black" BorderBrush="#FF323232" Style="{StaticResource MaterialDesignDarkCheckBox}" IsChecked="True" /> <CheckBox x:Name="EditCheckBox" VerticalAlignment="Center" Grid.Row="1" Content="{DynamicResource edit}" Click="EditCheckBox_Click" Foreground="Black" BorderBrush="#FF323232" Style="{StaticResource MaterialDesignDarkCheckBox}" IsChecked="True"/>
</Grid> </Grid>
<ScrollViewer Background="#FFBBBBBB" PreviewMouseWheel="ScrollViewer_PreviewMouseWheel"> <ScrollViewer Background="#FFBBBBBB" PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
<StackPanel x:Name="stackPanel"> <StackPanel x:Name="stackPanel">
@@ -45,7 +45,7 @@
</DockPanel> </DockPanel>
<DockPanel Grid.Column="1" Margin="2.5,0,0,0"> <DockPanel Grid.Column="1" Margin="2.5,0,0,0">
<ComboBox x:Name="optionsComboBox" DockPanel.Dock="Top" Height="22" SelectedIndex="0" DisplayMemberPath="Item1" SelectionChanged="OptionsComboBox_SelectionChanged" Background="#FFECECEC" /> <ComboBox x:Name="optionsComboBox" DockPanel.Dock="Top" Height="24" SelectedIndex="0" DisplayMemberPath="Item1" SelectionChanged="OptionsComboBox_SelectionChanged" Background="#FFECECEC" />
<ScrollViewer Background="#FFBBBBBB"> <ScrollViewer Background="#FFBBBBBB">
<Grid> <Grid>
<StackPanel x:Name="optionsPanel" Margin="3,3,3,0" Visibility="Collapsed"> <StackPanel x:Name="optionsPanel" Margin="3,3,3,0" Visibility="Collapsed">
@@ -61,7 +61,7 @@
<CheckBox x:Name="mirrorPlugineCheckBox" Content="{DynamicResource mirrorPlugine}" Click="MirrorPlugineCheckBox_Click" Style="{StaticResource MaterialDesignDarkCheckBox}" /> <CheckBox x:Name="mirrorPlugineCheckBox" Content="{DynamicResource mirrorPlugine}" Click="MirrorPlugineCheckBox_Click" Style="{StaticResource MaterialDesignDarkCheckBox}" />
<CheckBox x:Name="linePlugineCheckBox" Content="{DynamicResource linePlugine}" Click="LinePlugineCheckBox_Click" Style="{StaticResource MaterialDesignDarkCheckBox}" /> <CheckBox x:Name="linePlugineCheckBox" Content="{DynamicResource linePlugine}" Click="LinePlugineCheckBox_Click" Style="{StaticResource MaterialDesignDarkCheckBox}" />
<Label Content="{DynamicResource amplifier}" HorizontalAlignment="Left" VerticalAlignment="Top" Padding="0,1" /> <Label Content="{DynamicResource amplifier}" HorizontalAlignment="Left" VerticalAlignment="Top" Padding="0,1" />
<Slider x:Name="amplifierLevelSlider" Margin="-2,0,10,0" HorizontalAlignment="Stretch" VerticalAlignment="Top" ValueChanged="AmplifierLevelSlider_ValueChanged" Maximum="99" SmallChange="1" LargeChange="5" Foreground="Gray" /> <Slider x:Name="amplifierLevelSlider" Margin="-2,0,10,0" HorizontalAlignment="Stretch" VerticalAlignment="Top" ValueChanged="AmplifierLevelSlider_ValueChanged" Maximum="50" Minimum="-50" SmallChange="1" LargeChange="5" Foreground="Gray" />
<Label x:Name="amplifierLevelLabel" Content="Label" HorizontalAlignment="Left" VerticalAlignment="Top" Padding="0,1" /> <Label x:Name="amplifierLevelLabel" Content="Label" HorizontalAlignment="Left" VerticalAlignment="Top" Padding="0,1" />
</StackPanel> </StackPanel>
</Grid> </Grid>
+68 -53
View File
@@ -43,11 +43,7 @@ namespace DesktopMagic
#endregion Plugins settings #endregion Plugins settings
#region App Name public const string AppName = "Desktop Magic";
public static string AppName { get; } = "Desktop Magic";
#endregion App Name
public static List<Window> Windows { get; protected set; } = new List<Window>(); public static List<Window> Windows { get; protected set; } = new List<Window>();
public static List<string> WindowNames { get; protected set; } = new List<string>(); public static List<string> WindowNames { get; protected set; } = new List<string>();
@@ -118,17 +114,6 @@ namespace DesktopMagic
{ {
string PluginsPath = applicationDataPath + "\\Plugins"; string PluginsPath = applicationDataPath + "\\Plugins";
foreach (string fileName in Directory.GetFiles(PluginsPath, "*.cs"))
{
string PluginName = fileName[(fileName.LastIndexOf("\\", StringComparison.InvariantCulture) + 1)..].Replace(fileName[fileName.LastIndexOf(".", StringComparison.InvariantCulture)..], "");
try
{
_ = Directory.CreateDirectory(PluginsPath + "\\" + PluginName);
File.Move(fileName, $"{PluginsPath}\\{PluginName}\\{PluginName}.cs");
}
catch (Exception ex) { Console.WriteLine(ex); }
}
foreach (string fileName in Directory.GetFiles(PluginsPath, "*.dll")) foreach (string fileName in Directory.GetFiles(PluginsPath, "*.dll"))
{ {
string PluginName = fileName[(fileName.LastIndexOf("\\", StringComparison.InvariantCulture) + 1)..].Replace(fileName[fileName.LastIndexOf(".", StringComparison.InvariantCulture)..], ""); string PluginName = fileName[(fileName.LastIndexOf("\\", StringComparison.InvariantCulture) + 1)..].Replace(fileName[fileName.LastIndexOf(".", StringComparison.InvariantCulture)..], "");
@@ -226,20 +211,27 @@ namespace DesktopMagic
{ {
Dispatcher.Invoke(() => Dispatcher.Invoke(() =>
{ {
/* if (window is PluginWindow pluginWindow)
for (int i = 0; i < OptionsList.Count; i++)
{ {
if (OptionsList[i].Item1 == checkBox.Content.ToString()) Action onPluginLoaded = null;
onPluginLoaded = () =>
{ {
if (!optionsComboBox.Items.Contains(new Tuple<string, int>(checkBox.Content.ToString(), i))) Dispatcher.Invoke(() =>
optionsComboBox.Items.Add(new Tuple<string, int>(checkBox.Content.ToString(), i)); {
} if (!optionsComboBox.Items.Contains(new Tuple<string, int>(checkBox.Content.ToString(), 0)))
{
_ = optionsComboBox.Items.Add(new Tuple<string, int>(checkBox.Content.ToString(), 0));
}
optionsComboBox.SelectedIndex = -1;
optionsComboBox.SelectedIndex = optionsComboBox.Items.IndexOf(new Tuple<string, int>(checkBox.Content.ToString(), 0));
pluginWindow.PluginLoaded -= onPluginLoaded;
});
};
pluginWindow.PluginLoaded += onPluginLoaded;
} }
*/ else if (window is MusicVisualizerWindow musicVisualizerWindow)
if (!optionsComboBox.Items.Contains(checkBox.Content.ToString()))
{ {
_ = optionsComboBox.Items.Add(new Tuple<string, int>(checkBox.Content.ToString(), 0)); optionsComboBox.SelectedIndex = optionsComboBox.Items.IndexOf(new Tuple<string, int>(checkBox.Content.ToString(), 0));
} }
window.ShowInTaskbar = false; window.ShowInTaskbar = false;
@@ -282,7 +274,6 @@ namespace DesktopMagic
{ {
window.Hide(); window.Hide();
} }
//taskbarIcon.Visibility = Visibility.Collapsed;
Environment.Exit(0); Environment.Exit(0);
} }
@@ -303,9 +294,9 @@ namespace DesktopMagic
private void AmplifierLevelSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e) private void AmplifierLevelSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{ {
amplifierLevelLabel.Content = (int)amplifierLevelSlider.Value + 1; amplifierLevelLabel.Content = (int)amplifierLevelSlider.Value;
AmplifierLevel = (int)amplifierLevelSlider.Value; AmplifierLevel = (int)amplifierLevelSlider.Value;
key.SetValue("AmplifierLevel", (int)amplifierLevelSlider.Value); key.SetValue("AmplifierLevel", AmplifierLevel);
SaveLayout(); SaveLayout();
} }
@@ -430,7 +421,8 @@ namespace DesktopMagic
TextBlock label = new() TextBlock label = new()
{ {
Text = settingElement.Name, Text = settingElement.Name,
Padding = new Thickness(0, 0, 3, 0) Padding = new Thickness(0, 0, 3, 0),
VerticalAlignment = VerticalAlignment.Center
}; };
_ = stackPanel.Children.Add(label); _ = stackPanel.Children.Add(label);
@@ -444,12 +436,24 @@ namespace DesktopMagic
label.FontWeight = FontWeights.Bold; label.FontWeight = FontWeights.Bold;
label.Width = optionsPanel.ActualWidth; label.Width = optionsPanel.ActualWidth;
label.TextWrapping = TextWrapping.WrapWithOverflow; label.TextWrapping = TextWrapping.WrapWithOverflow;
eHeading.OnValueChanged += () =>
{
Dispatcher.Invoke(() =>
{
label.Text = eHeading.Value;
Option_ValueChanged();
});
};
} }
else if (settingElement.Element is DesktopMagicPluginAPI.Inputs.CheckBox eCheckBox) else if (settingElement.Element is DesktopMagicPluginAPI.Inputs.CheckBox eCheckBox)
{ {
CheckBox checkBox = new(); CheckBox checkBox = new()
checkBox.IsChecked = eCheckBox.Value; {
checkBox.Width = optionsPanel.ActualWidth - label.ActualWidth; IsChecked = eCheckBox.Value,
Width = optionsPanel.ActualWidth - label.ActualWidth,
Style = (Style)FindResource("MaterialDesignDarkCheckBox"),
VerticalAlignment = VerticalAlignment.Center
};
checkBox.Click += (_s, _e) => checkBox.Click += (_s, _e) =>
{ {
eCheckBox.Value = checkBox.IsChecked.GetValueOrDefault(); eCheckBox.Value = checkBox.IsChecked.GetValueOrDefault();
@@ -471,7 +475,8 @@ namespace DesktopMagic
{ {
Text = eTextBox.Value, Text = eTextBox.Value,
TextWrapping = TextWrapping.Wrap, TextWrapping = TextWrapping.Wrap,
Width = optionsPanel.ActualWidth - label.ActualWidth Width = optionsPanel.ActualWidth - label.ActualWidth,
VerticalAlignment = VerticalAlignment.Center
}; };
textBox.TextChanged += (_s, _e) => textBox.TextChanged += (_s, _e) =>
{ {
@@ -489,12 +494,14 @@ namespace DesktopMagic
} }
else if (settingElement.Element is DesktopMagicPluginAPI.Inputs.IntegerUpDown eIntegerUpDown) else if (settingElement.Element is DesktopMagicPluginAPI.Inputs.IntegerUpDown eIntegerUpDown)
{ {
Xceed.Wpf.Toolkit.IntegerUpDown integerUpDown = new(); Xceed.Wpf.Toolkit.IntegerUpDown integerUpDown = new()
{
integerUpDown.Value = eIntegerUpDown.Value; Value = eIntegerUpDown.Value,
integerUpDown.Minimum = eIntegerUpDown.Minimum; Minimum = eIntegerUpDown.Minimum,
integerUpDown.Maximum = eIntegerUpDown.Maximum; Maximum = eIntegerUpDown.Maximum,
integerUpDown.Width = optionsPanel.ActualWidth - label.ActualWidth; Width = optionsPanel.ActualWidth - label.ActualWidth,
VerticalAlignment = VerticalAlignment.Center
};
integerUpDown.ValueChanged += (_s, _e) => integerUpDown.ValueChanged += (_s, _e) =>
{ {
eIntegerUpDown.Value = integerUpDown.Value.GetValueOrDefault(); eIntegerUpDown.Value = integerUpDown.Value.GetValueOrDefault();
@@ -511,14 +518,16 @@ namespace DesktopMagic
} }
else if (settingElement.Element is DesktopMagicPluginAPI.Inputs.Slider eSlider) else if (settingElement.Element is DesktopMagicPluginAPI.Inputs.Slider eSlider)
{ {
Slider slider = new(); Slider slider = new()
{
slider.Value = eSlider.Value; Value = eSlider.Value,
slider.Minimum = eSlider.Minimum; Minimum = eSlider.Minimum,
slider.Maximum = eSlider.Maximum; Maximum = eSlider.Maximum,
slider.TickFrequency = 1; TickFrequency = 1,
slider.IsSnapToTickEnabled = true; IsSnapToTickEnabled = true,
slider.Width = optionsPanel.ActualWidth - label.ActualWidth; Width = optionsPanel.ActualWidth - label.ActualWidth,
VerticalAlignment = VerticalAlignment.Center
};
slider.ValueChanged += (_s, _e) => slider.ValueChanged += (_s, _e) =>
{ {
eSlider.Value = slider.Value; eSlider.Value = slider.Value;
@@ -541,8 +550,12 @@ namespace DesktopMagic
private void Option_ValueChanged() private void Option_ValueChanged()
{ {
string pluginName = ((Tuple<string, int>)optionsComboBox.SelectedItem).Item1.ToString(); string pluginName = ((Tuple<string, int>)optionsComboBox.SelectedItem).Item1.ToString();
string jsonSettings = JsonSerializer.Serialize(PluginsSettings[pluginName]);
File.WriteAllText($"{applicationDataPath}\\Plugins\\{pluginName}\\{pluginName}.save", jsonSettings); if (PluginsSettings.ContainsKey(pluginName))
{
string jsonSettings = JsonSerializer.Serialize(PluginsSettings[pluginName]);
File.WriteAllText($"{applicationDataPath}\\Plugins\\{pluginName}\\{pluginName}.save", jsonSettings);
}
} }
#endregion options #endregion options
@@ -550,7 +563,7 @@ namespace DesktopMagic
private void TextBlock_Loaded(object sender, RoutedEventArgs e) private void TextBlock_Loaded(object sender, RoutedEventArgs e)
{ {
int index = 0; int index = 0;
char[] chars = { '1', '0' }; char[] chars = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
foreach (FontFamily ff in Fonts.SystemFontFamilies) foreach (FontFamily ff in Fonts.SystemFontFamilies)
{ {
double charWidth = -1; double charWidth = -1;
@@ -712,7 +725,9 @@ namespace DesktopMagic
content += inputDialog.ResponseText + "\n"; content += inputDialog.ResponseText + "\n";
File.AppendAllText(applicationDataPath + "\\layouts.save", content); File.AppendAllText(applicationDataPath + "\\layouts.save", content);
key.SetValue("SelectedLayout", -1);
LoadLayoutNames(); LoadLayoutNames();
layoutsComboBox.SelectedIndex = layoutsComboBox.Items.Count - 1;
} }
} }
@@ -882,8 +897,8 @@ namespace DesktopMagic
private void SetLanguageDictionary() private void SetLanguageDictionary()
{ {
ResourceDictionary dict = new(); ResourceDictionary dict = new ResourceDictionary();
string currentCulture = (Thread.CurrentThread.CurrentCulture.ToString()); string currentCulture = Thread.CurrentThread.CurrentCulture.ToString();
if (currentCulture.Contains("de")) if (currentCulture.Contains("de"))
{ {
+12 -7
View File
@@ -5,6 +5,7 @@ using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Drawing; using System.Drawing;
using System.Drawing.Drawing2D; using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Linq; using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Timers; using System.Timers;
@@ -132,9 +133,13 @@ namespace DesktopMagic
{ {
int v = i; int v = i;
if (v < 20) if (v < 20)
{
v = 20; v = 20;
}
fft.Add(Math.Abs(e.Result[i].Y * v / (100 - MainWindow.AmplifierLevel))); int multiplier = 100 - MainWindow.AmplifierLevel * 2;
multiplier = multiplier == 0 ? 1 : multiplier;
fft.Add(Math.Abs(e.Result[i].Y * v / multiplier));
} }
if (lastFft.Count != 0) if (lastFft.Count != 0)
@@ -246,8 +251,8 @@ namespace DesktopMagic
if (!fftIndexReverse) if (!fftIndexReverse)
{ {
points[pointIndex + 1] = new PointF(bm.Width - 15 - 4 * pointIndex, bm.Height / 2 + value); points[pointIndex + 1] = new PointF(bm.Width - 4 * pointIndex, bm.Height / 2 + value);
points[points.Length / 2 + pointIndex + 1] = new PointF(bm.Width - 15 - 4 * pointIndex, bm.Height / 2 - value); points[points.Length / 2 + pointIndex + 1] = new PointF(bm.Width - 4 * pointIndex, bm.Height / 2 - value);
} }
break; break;
@@ -337,11 +342,11 @@ namespace DesktopMagic
private BitmapSource BitmapToImageSource(Bitmap bitmap) private BitmapSource BitmapToImageSource(Bitmap bitmap)
{ {
var bitmapData = bitmap.LockBits( BitmapData bitmapData = bitmap.LockBits(
new Rectangle(0, 0, bitmap.Width, bitmap.Height), new Rectangle(0, 0, bitmap.Width, bitmap.Height),
System.Drawing.Imaging.ImageLockMode.ReadOnly, bitmap.PixelFormat); ImageLockMode.ReadOnly, bitmap.PixelFormat);
var bitmapSource = BitmapSource.Create( BitmapSource bitmapSource = BitmapSource.Create(
bitmapData.Width, bitmapData.Height, bitmapData.Width, bitmapData.Height,
bitmap.HorizontalResolution, bitmap.VerticalResolution, bitmap.HorizontalResolution, bitmap.VerticalResolution,
System.Windows.Media.PixelFormats.Bgra32, null, System.Windows.Media.PixelFormats.Bgra32, null,
+5 -2
View File
@@ -32,7 +32,9 @@ namespace DesktopMagic
private string pluginFolderPath = ""; private string pluginFolderPath = "";
private bool stop = false; private bool stop = false;
public PluginWindow(string _PluginName) public event Action PluginLoaded;
public PluginWindow(string pluginName)
{ {
InitializeComponent(); InitializeComponent();
@@ -55,7 +57,7 @@ namespace DesktopMagic
t.Elapsed += Elapsed; t.Elapsed += Elapsed;
t.Start(); t.Start();
pluginName = _PluginName; this.pluginName = pluginName;
key = Registry.CurrentUser.CreateSubKey(@"Software\" + MainWindow.AppName); key = Registry.CurrentUser.CreateSubKey(@"Software\" + MainWindow.AppName);
this.Top = double.Parse(key.GetValue(pluginName + "WindowTop", 100).ToString()); this.Top = double.Parse(key.GetValue(pluginName + "WindowTop", 100).ToString());
@@ -146,6 +148,7 @@ namespace DesktopMagic
MessageBox.Show("File execution error:\n" + e, "Error", MessageBoxButton.OK, MessageBoxImage.Error); MessageBox.Show("File execution error:\n" + e, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return; return;
} }
PluginLoaded?.Invoke();
} }
private void ExecuteSource(string sourceText) private void ExecuteSource(string sourceText)
@@ -21,6 +21,8 @@
<system:String x:Key="amplifier">Signalverstärkung:</system:String> <system:String x:Key="amplifier">Signalverstärkung:</system:String>
<system:String x:Key="newLayout">Neues Layout</system:String> <system:String x:Key="newLayout">Neues Layout</system:String>
<system:String x:Key="deleteLayout">Layout Löschen</system:String> <system:String x:Key="deleteLayout">Layout Löschen</system:String>
<system:String x:Key="ok">Ok</system:String>
<system:String x:Key="cancel">Abbrechen</system:String>
<col:ArrayList x:Key="musicVisualizerOptionsComboboxItems"> <col:ArrayList x:Key="musicVisualizerOptionsComboboxItems">
<system:String>Unten</system:String> <system:String>Unten</system:String>
<system:String>Mitte</system:String> <system:String>Mitte</system:String>
@@ -21,6 +21,8 @@
<system:String x:Key="amplifier">Signal Amplification:</system:String> <system:String x:Key="amplifier">Signal Amplification:</system:String>
<system:String x:Key="newLayout">New Layout</system:String> <system:String x:Key="newLayout">New Layout</system:String>
<system:String x:Key="deleteLayout">Delete Layout</system:String> <system:String x:Key="deleteLayout">Delete Layout</system:String>
<system:String x:Key="ok">Ok</system:String>
<system:String x:Key="cancel">Cancel</system:String>
<col:ArrayList x:Key="musicVisualizerOptionsComboboxItems"> <col:ArrayList x:Key="musicVisualizerOptionsComboboxItems">
<system:String>Bottom</system:String> <system:String>Bottom</system:String>
<system:String>Middle</system:String> <system:String>Middle</system:String>
@@ -62,7 +62,7 @@ namespace DesktopMagic {
#line default #line default
#line hidden #line hidden
System.Uri resourceLocater = new System.Uri("/DesktopMagic;component/app.xaml", System.UriKind.Relative); System.Uri resourceLocater = new System.Uri("/DesktopMagic;V1.0.0.0;component/app.xaml", System.UriKind.Relative);
#line 1 "..\..\..\App.xaml" #line 1 "..\..\..\App.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); System.Windows.Application.LoadComponent(this, resourceLocater);
@@ -85,7 +85,7 @@ namespace DesktopMagic {
return; return;
} }
_contentLoaded = true; _contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/DesktopMagic;component/calendarwindow.xaml", System.UriKind.Relative); System.Uri resourceLocater = new System.Uri("/DesktopMagic;V1.0.0.0;component/calendarwindow.xaml", System.UriKind.Relative);
#line 1 "..\..\..\CalendarWindow.xaml" #line 1 "..\..\..\CalendarWindow.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); System.Windows.Application.LoadComponent(this, resourceLocater);
@@ -85,7 +85,7 @@ namespace DesktopMagic {
return; return;
} }
_contentLoaded = true; _contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/DesktopMagic;component/cpuusagewindow.xaml", System.UriKind.Relative); System.Uri resourceLocater = new System.Uri("/DesktopMagic;V1.0.0.0;component/cpuusagewindow.xaml", System.UriKind.Relative);
#line 1 "..\..\..\CpuUsageWindow.xaml" #line 1 "..\..\..\CpuUsageWindow.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); System.Windows.Application.LoadComponent(this, resourceLocater);
@@ -85,7 +85,7 @@ namespace DesktopMagic {
return; return;
} }
_contentLoaded = true; _contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/DesktopMagic;component/datewindow.xaml", System.UriKind.Relative); System.Uri resourceLocater = new System.Uri("/DesktopMagic;V1.0.0.0;component/datewindow.xaml", System.UriKind.Relative);
#line 1 "..\..\..\DateWindow.xaml" #line 1 "..\..\..\DateWindow.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); System.Windows.Application.LoadComponent(this, resourceLocater);
@@ -16,5 +16,5 @@ C:\Users\David\Programmieren\DesktopMagic\src\DesktopMagic\App.xaml
2261183705467 2261183705467
CalendarWindow.xaml;CpuUsageWindow.xaml;DateWindow.xaml;InputDialog.xaml;MainWindow.xaml;MusicVisualizerWindow.xaml;Plugin\PluginWindow.xaml;Resources\StringResources.de.xaml;Resources\StringResources.en.xaml;TimeWindow.xaml; CalendarWindow.xaml;CpuUsageWindow.xaml;DateWindow.xaml;InputDialog.xaml;MainWindow.xaml;MusicVisualizerWindow.xaml;Plugin\PluginWindow.xaml;Resources\StringResources.de.xaml;Resources\StringResources.en.xaml;TimeWindow.xaml;
False True
@@ -16,5 +16,5 @@ C:\Users\David\Programmieren\DesktopMagic\src\DesktopMagic\App.xaml
2261183705467 2261183705467
CalendarWindow.xaml;CpuUsageWindow.xaml;DateWindow.xaml;InputDialog.xaml;MainWindow.xaml;MusicVisualizerWindow.xaml;Plugin\PluginWindow.xaml;Resources\StringResources.de.xaml;Resources\StringResources.en.xaml;TimeWindow.xaml; CalendarWindow.xaml;CpuUsageWindow.xaml;DateWindow.xaml;InputDialog.xaml;MainWindow.xaml;MusicVisualizerWindow.xaml;Plugin\PluginWindow.xaml;Resources\StringResources.de.xaml;Resources\StringResources.en.xaml;TimeWindow.xaml;
False True
@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "56A04FC33DFC60D7E526BF21765D414E7492102A" #pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "F5EB8084736888948EF9EB2517B77A7CB9FE6BDF"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// Dieser Code wurde von einem Tool generiert. // Dieser Code wurde von einem Tool generiert.
@@ -288,7 +288,7 @@ namespace DesktopMagic {
return; return;
} }
_contentLoaded = true; _contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/DesktopMagic;component/mainwindow.xaml", System.UriKind.Relative); System.Uri resourceLocater = new System.Uri("/DesktopMagic;V1.0.0.0;component/mainwindow.xaml", System.UriKind.Relative);
#line 1 "..\..\..\MainWindow.xaml" #line 1 "..\..\..\MainWindow.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); System.Windows.Application.LoadComponent(this, resourceLocater);
@@ -93,7 +93,7 @@ namespace DesktopMagic {
return; return;
} }
_contentLoaded = true; _contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/DesktopMagic;component/musicvisualizerwindow.xaml", System.UriKind.Relative); System.Uri resourceLocater = new System.Uri("/DesktopMagic;V1.0.0.0;component/musicvisualizerwindow.xaml", System.UriKind.Relative);
#line 1 "..\..\..\MusicVisualizerWindow.xaml" #line 1 "..\..\..\MusicVisualizerWindow.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); System.Windows.Application.LoadComponent(this, resourceLocater);
@@ -85,7 +85,7 @@ namespace DesktopMagic {
return; return;
} }
_contentLoaded = true; _contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/DesktopMagic;component/timewindow.xaml", System.UriKind.Relative); System.Uri resourceLocater = new System.Uri("/DesktopMagic;V1.0.0.0;component/timewindow.xaml", System.UriKind.Relative);
#line 1 "..\..\..\TimeWindow.xaml" #line 1 "..\..\..\TimeWindow.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); System.Windows.Application.LoadComponent(this, resourceLocater);
@@ -62,7 +62,7 @@ namespace DesktopMagic {
#line default #line default
#line hidden #line hidden
System.Uri resourceLocater = new System.Uri("/DesktopMagic;component/app.xaml", System.UriKind.Relative); System.Uri resourceLocater = new System.Uri("/DesktopMagic;V1.0.0.0;component/app.xaml", System.UriKind.Relative);
#line 1 "..\..\..\App.xaml" #line 1 "..\..\..\App.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); System.Windows.Application.LoadComponent(this, resourceLocater);
@@ -85,7 +85,7 @@ namespace DesktopMagic {
return; return;
} }
_contentLoaded = true; _contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/DesktopMagic;component/calendarwindow.xaml", System.UriKind.Relative); System.Uri resourceLocater = new System.Uri("/DesktopMagic;V1.0.0.0;component/calendarwindow.xaml", System.UriKind.Relative);
#line 1 "..\..\..\CalendarWindow.xaml" #line 1 "..\..\..\CalendarWindow.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); System.Windows.Application.LoadComponent(this, resourceLocater);
@@ -85,7 +85,7 @@ namespace DesktopMagic {
return; return;
} }
_contentLoaded = true; _contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/DesktopMagic;component/cpuusagewindow.xaml", System.UriKind.Relative); System.Uri resourceLocater = new System.Uri("/DesktopMagic;V1.0.0.0;component/cpuusagewindow.xaml", System.UriKind.Relative);
#line 1 "..\..\..\CpuUsageWindow.xaml" #line 1 "..\..\..\CpuUsageWindow.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); System.Windows.Application.LoadComponent(this, resourceLocater);
@@ -85,7 +85,7 @@ namespace DesktopMagic {
return; return;
} }
_contentLoaded = true; _contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/DesktopMagic;component/datewindow.xaml", System.UriKind.Relative); System.Uri resourceLocater = new System.Uri("/DesktopMagic;V1.0.0.0;component/datewindow.xaml", System.UriKind.Relative);
#line 1 "..\..\..\DateWindow.xaml" #line 1 "..\..\..\DateWindow.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); System.Windows.Application.LoadComponent(this, resourceLocater);
@@ -16,5 +16,5 @@ C:\Users\David\Programmieren\DesktopMagic\src\DesktopMagic\App.xaml
226-1364174901 226-1364174901
CalendarWindow.xaml;CpuUsageWindow.xaml;DateWindow.xaml;InputDialog.xaml;MainWindow.xaml;MusicVisualizerWindow.xaml;Plugin\PluginWindow.xaml;Resources\StringResources.de.xaml;Resources\StringResources.en.xaml;TimeWindow.xaml; CalendarWindow.xaml;CpuUsageWindow.xaml;DateWindow.xaml;InputDialog.xaml;MainWindow.xaml;MusicVisualizerWindow.xaml;Plugin\PluginWindow.xaml;Resources\StringResources.de.xaml;Resources\StringResources.en.xaml;TimeWindow.xaml;
False True
@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\InputDialog.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "69003CAB3985612DB9AB987164994394DEC44BA3" #pragma checksum "..\..\..\InputDialog.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "E92EE63B86C66ACB37E5EDABBB5EC243DBD1F651"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// Dieser Code wurde von einem Tool generiert. // Dieser Code wurde von einem Tool generiert.
@@ -43,37 +43,37 @@ namespace DesktopMagic {
public partial class InputDialog : System.Windows.Window, System.Windows.Markup.IComponentConnector { public partial class InputDialog : System.Windows.Window, System.Windows.Markup.IComponentConnector {
#line 11 "..\..\..\InputDialog.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button okButton;
#line default
#line hidden
#line 12 "..\..\..\InputDialog.xaml" #line 12 "..\..\..\InputDialog.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button cancelButton;
#line default
#line hidden
#line 13 "..\..\..\InputDialog.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Label label; internal System.Windows.Controls.Label label;
#line default #line default
#line hidden #line hidden
#line 14 "..\..\..\InputDialog.xaml" #line 13 "..\..\..\InputDialog.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox textBox; internal System.Windows.Controls.TextBox textBox;
#line default #line default
#line hidden #line hidden
#line 15 "..\..\..\InputDialog.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button okButton;
#line default
#line hidden
#line 16 "..\..\..\InputDialog.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button cancelButton;
#line default
#line hidden
private bool _contentLoaded; private bool _contentLoaded;
/// <summary> /// <summary>
@@ -105,29 +105,29 @@ namespace DesktopMagic {
switch (connectionId) switch (connectionId)
{ {
case 1: case 1:
this.okButton = ((System.Windows.Controls.Button)(target));
#line 11 "..\..\..\InputDialog.xaml"
this.okButton.Click += new System.Windows.RoutedEventHandler(this.okButton_Click);
#line default
#line hidden
return;
case 2:
this.cancelButton = ((System.Windows.Controls.Button)(target));
#line 12 "..\..\..\InputDialog.xaml"
this.cancelButton.Click += new System.Windows.RoutedEventHandler(this.cancelButton_Click);
#line default
#line hidden
return;
case 3:
this.label = ((System.Windows.Controls.Label)(target)); this.label = ((System.Windows.Controls.Label)(target));
return; return;
case 4: case 2:
this.textBox = ((System.Windows.Controls.TextBox)(target)); this.textBox = ((System.Windows.Controls.TextBox)(target));
return; return;
case 3:
this.okButton = ((System.Windows.Controls.Button)(target));
#line 15 "..\..\..\InputDialog.xaml"
this.okButton.Click += new System.Windows.RoutedEventHandler(this.OkButton_Click);
#line default
#line hidden
return;
case 4:
this.cancelButton = ((System.Windows.Controls.Button)(target));
#line 16 "..\..\..\InputDialog.xaml"
this.cancelButton.Click += new System.Windows.RoutedEventHandler(this.CancelButton_Click);
#line default
#line hidden
return;
} }
this._contentLoaded = true; this._contentLoaded = true;
} }
@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\InputDialog.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "69003CAB3985612DB9AB987164994394DEC44BA3" #pragma checksum "..\..\..\InputDialog.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "E92EE63B86C66ACB37E5EDABBB5EC243DBD1F651"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// Dieser Code wurde von einem Tool generiert. // Dieser Code wurde von einem Tool generiert.
@@ -43,37 +43,37 @@ namespace DesktopMagic {
public partial class InputDialog : System.Windows.Window, System.Windows.Markup.IComponentConnector { public partial class InputDialog : System.Windows.Window, System.Windows.Markup.IComponentConnector {
#line 11 "..\..\..\InputDialog.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button okButton;
#line default
#line hidden
#line 12 "..\..\..\InputDialog.xaml" #line 12 "..\..\..\InputDialog.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button cancelButton;
#line default
#line hidden
#line 13 "..\..\..\InputDialog.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Label label; internal System.Windows.Controls.Label label;
#line default #line default
#line hidden #line hidden
#line 14 "..\..\..\InputDialog.xaml" #line 13 "..\..\..\InputDialog.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox textBox; internal System.Windows.Controls.TextBox textBox;
#line default #line default
#line hidden #line hidden
#line 15 "..\..\..\InputDialog.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button okButton;
#line default
#line hidden
#line 16 "..\..\..\InputDialog.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button cancelButton;
#line default
#line hidden
private bool _contentLoaded; private bool _contentLoaded;
/// <summary> /// <summary>
@@ -105,29 +105,29 @@ namespace DesktopMagic {
switch (connectionId) switch (connectionId)
{ {
case 1: case 1:
this.okButton = ((System.Windows.Controls.Button)(target));
#line 11 "..\..\..\InputDialog.xaml"
this.okButton.Click += new System.Windows.RoutedEventHandler(this.okButton_Click);
#line default
#line hidden
return;
case 2:
this.cancelButton = ((System.Windows.Controls.Button)(target));
#line 12 "..\..\..\InputDialog.xaml"
this.cancelButton.Click += new System.Windows.RoutedEventHandler(this.cancelButton_Click);
#line default
#line hidden
return;
case 3:
this.label = ((System.Windows.Controls.Label)(target)); this.label = ((System.Windows.Controls.Label)(target));
return; return;
case 4: case 2:
this.textBox = ((System.Windows.Controls.TextBox)(target)); this.textBox = ((System.Windows.Controls.TextBox)(target));
return; return;
case 3:
this.okButton = ((System.Windows.Controls.Button)(target));
#line 15 "..\..\..\InputDialog.xaml"
this.okButton.Click += new System.Windows.RoutedEventHandler(this.OkButton_Click);
#line default
#line hidden
return;
case 4:
this.cancelButton = ((System.Windows.Controls.Button)(target));
#line 16 "..\..\..\InputDialog.xaml"
this.cancelButton.Click += new System.Windows.RoutedEventHandler(this.CancelButton_Click);
#line default
#line hidden
return;
} }
this._contentLoaded = true; this._contentLoaded = true;
} }
@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "56A04FC33DFC60D7E526BF21765D414E7492102A" #pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "E2A0CEAB1CE4E799C8F11878BEEF4140351A3388"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// Dieser Code wurde von einem Tool generiert. // Dieser Code wurde von einem Tool generiert.
@@ -45,7 +45,7 @@ namespace DesktopMagic {
public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
#line 18 "..\..\..\MainWindow.xaml" #line 19 "..\..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Grid grid; internal System.Windows.Controls.Grid grid;
@@ -320,13 +320,13 @@ namespace DesktopMagic {
#line default #line default
#line hidden #line hidden
#line 15 "..\..\..\MainWindow.xaml" #line 16 "..\..\..\MainWindow.xaml"
((DesktopMagic.MainWindow)(target)).StateChanged += new System.EventHandler(this.Window_StateChanged); ((DesktopMagic.MainWindow)(target)).StateChanged += new System.EventHandler(this.Window_StateChanged);
#line default #line default
#line hidden #line hidden
#line 16 "..\..\..\MainWindow.xaml" #line 17 "..\..\..\MainWindow.xaml"
((DesktopMagic.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); ((DesktopMagic.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);
#line default #line default
@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "56A04FC33DFC60D7E526BF21765D414E7492102A" #pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "E2A0CEAB1CE4E799C8F11878BEEF4140351A3388"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// Dieser Code wurde von einem Tool generiert. // Dieser Code wurde von einem Tool generiert.
@@ -45,7 +45,7 @@ namespace DesktopMagic {
public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
#line 18 "..\..\..\MainWindow.xaml" #line 19 "..\..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Grid grid; internal System.Windows.Controls.Grid grid;
@@ -320,13 +320,13 @@ namespace DesktopMagic {
#line default #line default
#line hidden #line hidden
#line 15 "..\..\..\MainWindow.xaml" #line 16 "..\..\..\MainWindow.xaml"
((DesktopMagic.MainWindow)(target)).StateChanged += new System.EventHandler(this.Window_StateChanged); ((DesktopMagic.MainWindow)(target)).StateChanged += new System.EventHandler(this.Window_StateChanged);
#line default #line default
#line hidden #line hidden
#line 16 "..\..\..\MainWindow.xaml" #line 17 "..\..\..\MainWindow.xaml"
((DesktopMagic.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); ((DesktopMagic.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);
#line default #line default
@@ -93,7 +93,7 @@ namespace DesktopMagic {
return; return;
} }
_contentLoaded = true; _contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/DesktopMagic;component/musicvisualizerwindow.xaml", System.UriKind.Relative); System.Uri resourceLocater = new System.Uri("/DesktopMagic;V1.0.0.0;component/musicvisualizerwindow.xaml", System.UriKind.Relative);
#line 1 "..\..\..\MusicVisualizerWindow.xaml" #line 1 "..\..\..\MusicVisualizerWindow.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); System.Windows.Application.LoadComponent(this, resourceLocater);
@@ -85,7 +85,7 @@ namespace DesktopMagic {
return; return;
} }
_contentLoaded = true; _contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/DesktopMagic;component/timewindow.xaml", System.UriKind.Relative); System.Uri resourceLocater = new System.Uri("/DesktopMagic;V1.0.0.0;component/timewindow.xaml", System.UriKind.Relative);
#line 1 "..\..\..\TimeWindow.xaml" #line 1 "..\..\..\TimeWindow.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); System.Windows.Application.LoadComponent(this, resourceLocater);
+7 -2
View File
@@ -9,7 +9,7 @@ namespace DesktopMagicPlugin.Test
public class PluginScript : Plugin public class PluginScript : Plugin
{ {
[Element("Heading")] [Element("Heading")]
private Heading heading = new Heading("test"); private Heading heading = new Heading("");
[Element("Slider:")] [Element("Slider:")]
private Slider slider = new Slider(1, 23, 4); private Slider slider = new Slider(1, 23, 4);
@@ -35,11 +35,16 @@ namespace DesktopMagicPlugin.Test
public override Bitmap Main() public override Bitmap Main()
{ {
string str = $"{textBox.Value}: {slider.Value}";
Bitmap bmp = new Bitmap(100, 100); Bitmap bmp = new Bitmap(100, 100);
using Graphics g = Graphics.FromImage(bmp); using Graphics g = Graphics.FromImage(bmp);
g.Clear(Application.Color); g.Clear(Application.Color);
g.DrawString(slider.Value.ToString(), new Font("arial", 10), Brushes.Black, new PointF(0, 0)); g.DrawString(str, new Font("arial", 10), Brushes.Black, new PointF(0, 0));
heading.Value = str;
slider.Value++; slider.Value++;
return bmp; return bmp;
} }
} }
+1 -7
View File
@@ -1,10 +1,4 @@
using System; namespace DesktopMagicPluginAPI.Inputs
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DesktopMagicPluginAPI.Inputs
{ {
public class CheckBox : Element public class CheckBox : Element
{ {
@@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DesktopMagicPluginAPI.Inputs namespace DesktopMagicPluginAPI.Inputs
{ {
@@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DesktopMagicPluginAPI.Inputs namespace DesktopMagicPluginAPI.Inputs
{ {
+15 -8
View File
@@ -1,14 +1,21 @@
using System; namespace DesktopMagicPluginAPI.Inputs
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DesktopMagicPluginAPI.Inputs
{ {
public class Heading : Element public class Heading : Element
{ {
public string Value { get; } private string _value;
public string Value
{
get => _value;
set
{
if (_value != value)
{
_value = value;
ValueChanged();
}
}
}
public Heading(string value) public Heading(string value)
{ {
@@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DesktopMagicPluginAPI.Inputs namespace DesktopMagicPluginAPI.Inputs
{ {
@@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DesktopMagicPluginAPI.Inputs namespace DesktopMagicPluginAPI.Inputs
{ {
+1 -7
View File
@@ -1,10 +1,4 @@
using System; namespace DesktopMagicPluginAPI.Inputs
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DesktopMagicPluginAPI.Inputs
{ {
public class TextBox : Element public class TextBox : Element
{ {