Browse Source

Added open startup window menu item to view

CPKreuz 4 years ago
parent
commit
13bda6aac4

+ 8 - 0
PixiEditor/ViewModels/SubViewModels/Main/MiscViewModel.cs

@@ -17,6 +17,8 @@ namespace PixiEditor.ViewModels.SubViewModels.Main
 
 
         public RelayCommand OpenShortcutWindowCommand { get; set; }
         public RelayCommand OpenShortcutWindowCommand { get; set; }
 
 
+        public RelayCommand OpenHelloThereWindowCommand { get; set; }
+
         public ShortcutPopup ShortcutPopup { get; set; }
         public ShortcutPopup ShortcutPopup { get; set; }
 
 
         public MiscViewModel(ViewModelMain owner)
         public MiscViewModel(ViewModelMain owner)
@@ -25,6 +27,7 @@ namespace PixiEditor.ViewModels.SubViewModels.Main
             OpenHyperlinkCommand = new RelayCommand(OpenHyperlink);
             OpenHyperlinkCommand = new RelayCommand(OpenHyperlink);
             OpenSettingsWindowCommand = new RelayCommand(OpenSettingsWindow);
             OpenSettingsWindowCommand = new RelayCommand(OpenSettingsWindow);
             OpenShortcutWindowCommand = new RelayCommand(OpenShortcutWindow);
             OpenShortcutWindowCommand = new RelayCommand(OpenShortcutWindow);
+            OpenHelloThereWindowCommand = new RelayCommand(OpenHelloThereWindow);
 
 
             ShortcutPopup = new ShortcutPopup(owner.ShortcutController);
             ShortcutPopup = new ShortcutPopup(owner.ShortcutController);
         }
         }
@@ -55,5 +58,10 @@ namespace PixiEditor.ViewModels.SubViewModels.Main
         {
         {
             ShortcutPopup.Show();
             ShortcutPopup.Show();
         }
         }
+
+        private void OpenHelloThereWindow(object parameter)
+        {
+            new HelloTherePopup(Owner.FileSubViewModel).Show();
+        }
     }
     }
 }
 }

+ 7 - 12
PixiEditor/Views/Dialogs/HelloTherePopup.xaml

@@ -16,6 +16,13 @@
             <Setter Property="Foreground" Value="White"/>
             <Setter Property="Foreground" Value="White"/>
             <Setter Property="FontSize" Value="16"/>
             <Setter Property="FontSize" Value="16"/>
         </Style>
         </Style>
+
+        <Style TargetType="Button" BasedOn="{StaticResource DarkRoundButton}" x:Key="SocialMediaButton">
+            <Setter Property="Width" Value="150"/>
+            <Setter Property="Margin" Value="5,0,5,0"/>
+            <Setter Property="FontSize" Value="18"/>
+            <Setter Property="Height" Value="28"/>
+        </Style>
     </Window.Resources>
     </Window.Resources>
 
 
     <WindowChrome.WindowChrome>
     <WindowChrome.WindowChrome>
@@ -98,18 +105,6 @@
                 </StackPanel>
                 </StackPanel>
 
 
                 <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,18">
                 <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,18">
-                    <StackPanel.Style>
-                        <Style TargetType="StackPanel">
-                            <Style.Resources>
-                                <Style TargetType="Button" BasedOn="{StaticResource DarkRoundButton}" x:Key="SocialMediaButton">
-                                    <Setter Property="Width" Value="150"/>
-                                    <Setter Property="Margin" Value="5,0,5,0"/>
-                                    <Setter Property="FontSize" Value="18"/>
-                                    <Setter Property="Height" Value="28"/>
-                                </Style>
-                            </Style.Resources>
-                        </Style>
-                    </StackPanel.Style>
                     <Button Command="{Binding OpenHyperlinkCommand}" CommandParameter="https://discord.gg/tzkQFDkqQS"
                     <Button Command="{Binding OpenHyperlinkCommand}" CommandParameter="https://discord.gg/tzkQFDkqQS"
                             Content="Discord">
                             Content="Discord">
                         <Button.Style>
                         <Button.Style>

+ 2 - 0
PixiEditor/Views/MainWindow.xaml

@@ -134,6 +134,8 @@
                 <MenuItem Header="_View">
                 <MenuItem Header="_View">
                     <MenuItem Header="_Show Grid Lines" IsChecked="{Binding ViewportSubViewModel.GridLinesEnabled, Mode=TwoWay}"
                     <MenuItem Header="_Show Grid Lines" IsChecked="{Binding ViewportSubViewModel.GridLinesEnabled, Mode=TwoWay}"
                               IsCheckable="True" InputGestureText="Ctrl+`"/>
                               IsCheckable="True" InputGestureText="Ctrl+`"/>
+                    <MenuItem Header="_Open Startup Window" ToolTip="Hello there!"
+                              Command="{Binding MiscSubViewModel.OpenHelloThereWindowCommand}"/>
                 </MenuItem>
                 </MenuItem>
                 <MenuItem Header="_Help">
                 <MenuItem Header="_Help">
                     <MenuItem Header="_Documentation" Command="{Binding MiscSubViewModel.OpenHyperlinkCommand}"
                     <MenuItem Header="_Documentation" Command="{Binding MiscSubViewModel.OpenHyperlinkCommand}"