Fix views.

- Verbessert: Technische Verbesserungen bei Dialogen.
This commit is contained in:
daniel 2017-03-02 15:27:37 +01:00
parent acbd3833ed
commit 3a1559c4a3
13 changed files with 36 additions and 28 deletions

View File

@ -20,6 +20,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using Bovender.Extensions;
using zaaReloaded2.Controller; using zaaReloaded2.Controller;
using zaaReloaded2.Controller.Comments; using zaaReloaded2.Controller.Comments;
using zaaReloaded2.Formatter; using zaaReloaded2.Formatter;
@ -74,7 +75,7 @@ namespace zaaReloaded2
DoFormat(settings); DoFormat(settings);
UserSettings.Default.LastSettings = settings.Uid; UserSettings.Default.LastSettings = settings.Uid;
}; };
vm.InjectInto<SettingsRepositoryView>().ShowDialog(); vm.InjectInto<SettingsRepositoryView>().ShowDialogInForm();
} }
/// <summary> /// <summary>
@ -121,13 +122,13 @@ namespace zaaReloaded2
public static void ShowAbout() public static void ShowAbout()
{ {
ViewModels.AboutViewModel vm = new ViewModels.AboutViewModel(); ViewModels.AboutViewModel vm = new ViewModels.AboutViewModel();
vm.InjectInto<Views.AboutView>().ShowDialog(); vm.InjectInto<Views.AboutView>().ShowDialogInForm();
} }
public static void ShowPreferences() public static void ShowPreferences()
{ {
ViewModels.PreferencesViewModel vm = new PreferencesViewModel(); ViewModels.PreferencesViewModel vm = new PreferencesViewModel();
vm.InjectInto<Views.PreferencesView>().ShowDialog(); vm.InjectInto<Views.PreferencesView>().ShowDialogInForm();
} }
public static void ApplyDanielsStyle() public static void ApplyDanielsStyle()
@ -263,7 +264,7 @@ namespace zaaReloaded2
{ {
Logger.Info("CommentPool_FillInComment: Requesting user interaction"); Logger.Info("CommentPool_FillInComment: Requesting user interaction");
ItemCommentViewModel vm = new ItemCommentViewModel(e.Comment); ItemCommentViewModel vm = new ItemCommentViewModel(e.Comment);
vm.InjectInto<ItemCommentView>().ShowDialog(); vm.InjectInto<ItemCommentView>().ShowDialogInForm();
} }
} }

View File

@ -25,8 +25,8 @@
xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
xmlns:settings="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender" xmlns:settings="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender"
xmlns:converter="clr-namespace:Bovender.Mvvm.Converters;assembly=Bovender" xmlns:converter="clr-namespace:Bovender.Mvvm.Converters;assembly=Bovender"
SizeToContent="Height" Width="700" ShowInTaskbar="False" SizeToContent="Height" Width="720"
WindowStyle="ToolWindow" Topmost="True" ResizeMode="CanResizeWithGrip" ShowInTaskbar="False" ResizeMode="NoResize"
x:Name="exceptionDetailView" x:Name="exceptionDetailView"
Title="Technische Fehlerdetails" Title="Technische Fehlerdetails"
settings:WindowState.Save="True" settings:WindowState.Save="True"

View File

@ -26,8 +26,8 @@
xmlns:ex="clr-namespace:zaaReloaded2.ExceptionHandler" xmlns:ex="clr-namespace:zaaReloaded2.ExceptionHandler"
xmlns:actions="clr-namespace:Bovender.Mvvm.Actions;assembly=Bovender" xmlns:actions="clr-namespace:Bovender.Mvvm.Actions;assembly=Bovender"
xmlns:settings="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender" xmlns:settings="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender"
SizeToContent="WidthAndHeight" ResizeMode="CanResizeWithGrip" SizeToContent="WidthAndHeight" ResizeMode="NoResize"
WindowStyle="ToolWindow" ShowInTaskbar="False" Topmost="True" ShowInTaskbar="False"
WindowStartupLocation="CenterScreen" WindowStartupLocation="CenterScreen"
Title="zaaReloaded2: Fehler!" Title="zaaReloaded2: Fehler!"
settings:WindowState.Save="True" settings:WindowState.Save="True"

View File

@ -19,6 +19,7 @@ using System;
using System.IO; using System.IO;
using Bovender.Versioning; using Bovender.Versioning;
using Bovender.Mvvm.Messaging; using Bovender.Mvvm.Messaging;
using Bovender.Extensions;
using zaaReloaded2.ExceptionHandler; using zaaReloaded2.ExceptionHandler;
using System.Windows; using System.Windows;
using System.Windows.Input; using System.Windows.Input;
@ -71,7 +72,8 @@ namespace zaaReloaded2
Bovender.ExceptionHandler.CentralHandler.ManageExceptionCallback += CentralHandler_ManageExceptionCallback; Bovender.ExceptionHandler.CentralHandler.ManageExceptionCallback += CentralHandler_ManageExceptionCallback;
Bovender.Win32Window.MainWindowHandleProvider = () => Bovender.Win32Window.MainWindowHandleProvider = () =>
{ {
return IntPtr.Zero; return System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle;
// return IntPtr.Zero;
}; };
Bovender.WpfHelpers.RegisterTextBoxSelectAll(); Bovender.WpfHelpers.RegisterTextBoxSelectAll();
UserSettings userSettings = UserSettings.Default; UserSettings userSettings = UserSettings.Default;
@ -172,7 +174,7 @@ namespace zaaReloaded2
{ {
e.IsHandled = true; e.IsHandled = true;
ExceptionViewModel vm = new ExceptionViewModel(e.Exception); ExceptionViewModel vm = new ExceptionViewModel(e.Exception);
vm.InjectInto<ExceptionView>().ShowDialog(); vm.InjectInto<ExceptionView>().ShowDialogInForm();
} }
#endregion #endregion

View File

@ -23,6 +23,7 @@
Width="360" SizeToContent="Height" ResizeMode="NoResize" ShowInTaskbar="False" Width="360" SizeToContent="Height" ResizeMode="NoResize" ShowInTaskbar="False"
b:WindowState.CenterScreen="True" b:WindowState.CenterScreen="True"
Title="Über..." Title="Über..."
Icon="pack://application:,,,/zaaReloaded2;component/Icons/icon.png"
> >
<Window.Resources> <Window.Resources>
<ResourceDictionary Source="/Bovender;component/Style.xaml" /> <ResourceDictionary Source="/Bovender;component/Style.xaml" />

View File

@ -21,11 +21,12 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:b="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender" xmlns:b="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender"
Width="280" Height="320" ResizeMode="CanResizeWithGrip" ShowInTaskbar="False" Width="360" Height="320"
WindowStyle="ToolWindow" Topmost="True" ShowInTaskbar="False" ResizeMode="NoResize"
b:WindowState.CenterScreen="True" b:WindowState.Save="True" b:WindowState.CenterScreen="True" b:WindowState.Save="True"
Title="Neues Element auswählen" Title="Neues Element auswählen"
FocusManager.FocusedElement="{Binding ElementName=treeview}" FocusManager.FocusedElement="{Binding ElementName=treeview}"
Icon="pack://application:,,,/zaaReloaded2;component/Icons/icon.png"
> >
<Window.Resources> <Window.Resources>
<ResourceDictionary Source="/Bovender;component/Style.xaml" /> <ResourceDictionary Source="/Bovender;component/Style.xaml" />

View File

@ -21,13 +21,13 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:b="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender" xmlns:b="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender"
ResizeMode="CanResizeWithGrip" ShowInTaskbar="False" ResizeMode="NoResize" ShowInTaskbar="False"
WindowStyle="ToolWindow" Topmost="True" Width="460" Height="180" MinWidth="280" MinHeight="180"
Width="280" Height="180" MinWidth="280" MinHeight="180"
b:WindowState.CenterScreen="True" b:WindowState.Save="True" b:WindowState.CenterScreen="True" b:WindowState.Save="True"
Title="Element bearbeiten" Title="Element bearbeiten"
FocusManager.FocusedElement="{Binding ElementName=ContentTextBox}" FocusManager.FocusedElement="{Binding ElementName=ContentTextBox}"
> Icon="pack://application:,,,/zaaReloaded2;component/Icons/icon.png"
>
<Window.Resources> <Window.Resources>
<ResourceDictionary Source="/Bovender;component/Style.xaml" /> <ResourceDictionary Source="/Bovender;component/Style.xaml" />
</Window.Resources> </Window.Resources>

View File

@ -23,10 +23,11 @@
xmlns:b="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender" xmlns:b="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:action="clr-namespace:Bovender.Mvvm.Actions;assembly=Bovender" xmlns:action="clr-namespace:Bovender.Mvvm.Actions;assembly=Bovender"
ResizeMode="NoResize" ShowInTaskbar="False" Topmost="True" ResizeMode="NoResize" ShowInTaskbar="False"
SizeToContent="Height" Width="480" SizeToContent="Height" Width="480"
b:WindowState.CenterScreen="True" b:WindowState.CenterScreen="True"
Title="Willkommen bei zaaReloaded" Title="Willkommen bei zaaReloaded"
Icon="pack://application:,,,/zaaReloaded2;component/Icons/icon.png"
> >
<Window.Resources> <Window.Resources>
<ResourceDictionary Source="/Bovender;component/Style.xaml" /> <ResourceDictionary Source="/Bovender;component/Style.xaml" />

View File

@ -22,10 +22,10 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:b="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender" xmlns:b="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender"
SizeToContent="WidthAndHeight" MaxWidth="480" SizeToContent="WidthAndHeight" MaxWidth="480"
WindowStyle="ToolWindow" Topmost="True"
ResizeMode="NoResize" ShowInTaskbar="False" ResizeMode="NoResize" ShowInTaskbar="False"
b:WindowState.CenterScreen="True" b:WindowState.CenterScreen="True"
Title="Import/Export-Fehler" Title="Import/Export-Fehler"
Icon="pack://application:,,,/zaaReloaded2;component/Icons/icon.png"
> >
<Window.Resources> <Window.Resources>
<ResourceDictionary Source="/Bovender;component/Style.xaml" /> <ResourceDictionary Source="/Bovender;component/Style.xaml" />

View File

@ -21,12 +21,12 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:b="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender" xmlns:b="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender"
ResizeMode="CanResizeWithGrip" ShowInTaskbar="False" ResizeMode="NoResize" ShowInTaskbar="False"
WindowStyle="ToolWindow" Topmost="True"
SizeToContent="WidthAndHeight" MaxWidth="500" SizeToContent="WidthAndHeight" MaxWidth="500"
b:WindowState.CenterScreen="True" b:WindowState.Save="True" b:WindowState.CenterScreen="True" b:WindowState.Save="True"
Title="Kommentar angeben" Title="Kommentar angeben"
FocusManager.FocusedElement="{Binding ElementName=ValueTextBox}" FocusManager.FocusedElement="{Binding ElementName=ValueTextBox}"
Icon="pack://application:,,,/zaaReloaded2;component/Icons/icon.png"
> >
<Window.Resources> <Window.Resources>
<ResourceDictionary Source="/Bovender;component/Style.xaml" /> <ResourceDictionary Source="/Bovender;component/Style.xaml" />
@ -42,7 +42,7 @@
<TextBlock DockPanel.Dock="Left" Text="{Binding Prefix}" VerticalAlignment="Center" /> <TextBlock DockPanel.Dock="Left" Text="{Binding Prefix}" VerticalAlignment="Center" />
<TextBlock DockPanel.Dock="Right" Text="{Binding Suffix}" VerticalAlignment="Center" /> <TextBlock DockPanel.Dock="Right" Text="{Binding Suffix}" VerticalAlignment="Center" />
<TextBox Text="{Binding Value,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" <TextBox Text="{Binding Value,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
MinWidth="120" MaxWidth="240" VerticalAlignment="Center" MinWidth="240" MaxWidth="240" VerticalAlignment="Center"
x:Name="ValueTextBox" Margin="5 0 5 0" /> x:Name="ValueTextBox" />
</DockPanel> </DockPanel>
</Window> </Window>

View File

@ -24,9 +24,10 @@
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:action="clr-namespace:Bovender.Mvvm.Actions;assembly=Bovender" xmlns:action="clr-namespace:Bovender.Mvvm.Actions;assembly=Bovender"
SizeToContent="WidthAndHeight" ResizeMode="NoResize" SizeToContent="WidthAndHeight" ResizeMode="NoResize"
ShowInTaskbar="False" Topmost="True" ShowInTaskbar="False"
b:WindowState.CenterScreen="True" b:WindowState.Save="True" b:WindowState.CenterScreen="True" b:WindowState.Save="True"
Title="Einstellungen" Title="Einstellungen"
Icon="pack://application:,,,/zaaReloaded2;component/Icons/icon.png"
> >
<Window.Resources> <Window.Resources>
<ResourceDictionary Source="/Bovender;component/Style.xaml" /> <ResourceDictionary Source="/Bovender;component/Style.xaml" />

View File

@ -23,9 +23,9 @@
xmlns:b="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender" xmlns:b="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:action="clr-namespace:Bovender.Mvvm.Actions;assembly=Bovender" xmlns:action="clr-namespace:Bovender.Mvvm.Actions;assembly=Bovender"
Width="480" Height="340" Width="520" Height="320"
MinWidth="420" MinHeight="340" WindowStyle="ToolWindow" Icon="pack://application:,,,/zaaReloaded2;component/Icons/icon.png"
ResizeMode="CanResizeWithGrip" ShowInTaskbar="False" ShowInTaskbar="False" ResizeMode="NoResize"
b:WindowState.CenterScreen="True" b:WindowState.Save="True" b:WindowState.CenterScreen="True" b:WindowState.Save="True"
Title="Stil auswählen" Title="Stil auswählen"
FocusManager.FocusedElement="{Binding ElementName=settingsList}" FocusManager.FocusedElement="{Binding ElementName=settingsList}"

View File

@ -23,12 +23,13 @@
xmlns:b="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender" xmlns:b="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:action="clr-namespace:Bovender.Mvvm.Actions;assembly=Bovender" xmlns:action="clr-namespace:Bovender.Mvvm.Actions;assembly=Bovender"
Width="460" Height="400" ResizeMode="CanResizeWithGrip" ShowInTaskbar="False" Width="600" Height="420"
ResizeMode="CanResizeWithGrip" ShowInTaskbar="True"
MinWidth="460" MinHeight="400" MinWidth="460" MinHeight="400"
WindowStyle="ToolWindow" Topmost="True"
b:WindowState.CenterScreen="True" b:WindowState.Save="True" b:WindowState.CenterScreen="True" b:WindowState.Save="True"
Title="Stil bearbeiten" Title="Stil bearbeiten"
FocusManager.FocusedElement="{Binding ElementName=NameTextBox}" FocusManager.FocusedElement="{Binding ElementName=NameTextBox}"
Icon="pack://application:,,,/zaaReloaded2;component/Icons/icon.png"
> >
<Window.Resources> <Window.Resources>
<ResourceDictionary Source="/Bovender;component/Style.xaml" /> <ResourceDictionary Source="/Bovender;component/Style.xaml" />