Skip to content

Commit

Permalink
Settings Page Work
Browse files Browse the repository at this point in the history
  • Loading branch information
Offline-R503B committed Jan 27, 2021
1 parent da5286c commit 7998624
Show file tree
Hide file tree
Showing 42 changed files with 589 additions and 34 deletions.
30 changes: 27 additions & 3 deletions WolvenKit/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,35 @@ protected override async void OnStartup(StartupEventArgs e)
viewModelLocator.Register(typeof(Views.HomePage.TopicView), typeof(ViewModels.HomePage.TopicViewModel));
viewModelLocator.Register(typeof(Views.HomePage.Pages.AboutPageView), typeof(ViewModels.HomePage.Pages.AboutPageViewModel));
viewModelLocator.Register(typeof(Views.HomePage.Pages.GithubPageView), typeof(ViewModels.HomePage.Pages.GithubPageViewModel));
viewModelLocator.Register(typeof(Views.HomePage.Pages.RecentProjectView), typeof(ViewModels.HomePage.Pages.RecentProjectViewModel));
viewModelLocator.Register(typeof(Views.HomePage.Pages.SettingsPageView), typeof(ViewModels.HomePage.Pages.SettingsPageViewModel));
viewModelLocator.Register(typeof(Views.HomePage.Pages.RecentProjectView), typeof(ViewModels.HomePage.Pages.RecentProjectViewModel));
viewModelLocator.Register(typeof(Views.HomePage.Pages.WikiPageView), typeof(ViewModels.HomePage.Pages.WikiPageViewModel));
viewModelLocator.Register(typeof(Views.HomePage.Pages.WelcomePageView), typeof(ViewModels.HomePage.Pages.WelcomePageViewModel));
viewModelLocator.Register(typeof(Views.HomePage.Pages.WebsitePageView), typeof(ViewModels.HomePage.Pages.WebsitePageViewModel));
viewModelLocator.Register(typeof(Views.HomePage.Pages.SettingsPageView), typeof(ViewModels.HomePage.Pages.SettingsPageViewModel));

//-- Category : Settings Pages
viewModelLocator.Register(typeof(Views.SettingsPages.GeneralSettingsView), typeof(ViewModels.SettingsPages.GeneralSettingsViewModel));
viewModelLocator.Register(typeof(Views.SettingsPages.SubPages.General.GlobalSubSettingsView), typeof(ViewModels.SettingsPages.SubPages.General.GlobalSubSettingsViewModel));
viewModelLocator.Register(typeof(Views.SettingsPages.SubPages.General.AccountSubSettingsView), typeof(ViewModels.SettingsPages.SubPages.General.AccountSubSettingsViewModel));
viewModelLocator.Register(typeof(Views.SettingsPages.SubPages.General.LanguageSubSettingsView), typeof(ViewModels.SettingsPages.SubPages.General.LanguageSubSettingsViewModel));
viewModelLocator.Register(typeof(Views.SettingsPages.SubPages.General.UpdatesSubSettingsView), typeof(ViewModels.SettingsPages.SubPages.General.UpdatesSubSettingsViewModel));
viewModelLocator.Register(typeof(Views.SettingsPages.SubPages.General.ThemeSubSettingsView), typeof(ViewModels.SettingsPages.SubPages.General.ThemeSubSettingsViewModel));
viewModelLocator.Register(typeof(Views.SettingsPages.SubPages.General.LoggingSubSettingsView), typeof(ViewModels.SettingsPages.SubPages.General.LoggingSubSettingsViewModel));


viewModelLocator.Register(typeof(Views.SettingsPages.ToolSettingsView), typeof(ViewModels.SettingsPages.ToolSettingsViewModel));


viewModelLocator.Register(typeof(Views.SettingsPages.EditorSettingsView), typeof(ViewModels.SettingsPages.EditorSettingsViewModel));


viewModelLocator.Register(typeof(Views.SettingsPages.PackagingSettingsView), typeof(ViewModels.SettingsPages.PackagingSettingsViewModel));


viewModelLocator.Register(typeof(Views.SettingsPages.IntegrationsSettingsView), typeof(ViewModels.SettingsPages.IntegrationsSettingsViewModel));





// ---- HeadCategory : Wizards
Expand Down Expand Up @@ -154,7 +178,7 @@ protected override async void OnStartup(StartupEventArgs e)

ControlzEx.Theming.ThemeManager.Current.ChangeTheme(Application.Current, "Dark.Red");
HandyControl.Tools.ThemeManager.Current.SetCurrentValue(HandyControl.Tools.ThemeManager.ApplicationThemeProperty, HandyControl.Tools.ApplicationTheme.Dark);

Log.Info("Calling base.OnStartup");


Expand Down
13 changes: 13 additions & 0 deletions WolvenKit/ViewModels/SettingsPages/EditorSettingsViewModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Catel.MVVM;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WolvenKit.ViewModels.SettingsPages
{
class EditorSettingsViewModel : ViewModelBase
{
}
}
13 changes: 13 additions & 0 deletions WolvenKit/ViewModels/SettingsPages/GeneralSettingsViewModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Catel.MVVM;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WolvenKit.ViewModels.SettingsPages
{
class GeneralSettingsViewModel : ViewModelBase
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Catel.MVVM;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WolvenKit.ViewModels.SettingsPages
{
class IntegrationsSettingsViewModel : ViewModelBase
{
}
}
13 changes: 13 additions & 0 deletions WolvenKit/ViewModels/SettingsPages/PackagingSettingsViewModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Catel.MVVM;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WolvenKit.ViewModels.SettingsPages
{
class PackagingSettingsViewModel : ViewModelBase
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WolvenKit.ViewModels.SettingsPages.SubPages.General
{
class AccountSubSettingsViewModel
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WolvenKit.ViewModels.SettingsPages.SubPages.General
{
class GlobalSubSettingsViewModel
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WolvenKit.ViewModels.SettingsPages.SubPages.General
{
class LanguageSubSettingsViewModel
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WolvenKit.ViewModels.SettingsPages.SubPages.General
{
class LoggingSubSettingsViewModel
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WolvenKit.ViewModels.SettingsPages.SubPages.General
{
class ThemeSubSettingsViewModel
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WolvenKit.ViewModels.SettingsPages.SubPages.General
{
class UpdatesSubSettingsViewModel
{
}
}
13 changes: 13 additions & 0 deletions WolvenKit/ViewModels/SettingsPages/ToolSettingsViewModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Catel.MVVM;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WolvenKit.ViewModels.SettingsPages
{
class ToolSettingsViewModel : ViewModelBase
{
}
}
3 changes: 2 additions & 1 deletion WolvenKit/Views/HomePage/HomePageView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

<hc:TransitioningContentControl Margin="0,60,0,0">

<hc:SideMenu x:Name="LeftSideMenu" SideBrush="{DynamicResource MahApps.Brushes.ThemeBackground}" Background="{DynamicResource MahApps.Brushes.ThemeBackground}" BorderThickness="0" Width="200" SubSideBrush="{DynamicResource MahApps.Brushes.Accent}">
<hc:SideMenu x:Name="LeftSideMenu" SideBrush="{DynamicResource MahApps.Brushes.AccentBase}" Background="{DynamicResource MahApps.Brushes.ThemeBackground}" BorderThickness="0" Width="200" SubSideBrush="{DynamicResource MahApps.Brushes.Accent2}">
<hc:Interaction.Triggers>
<hc:EventTrigger EventName="SelectionChanged">
<hc:EventToCommand Command="{Binding SwitchItemCmd}" PassEventArgsToCommand="True" />
Expand Down Expand Up @@ -110,6 +110,7 @@
<iconPacks:PackIconCodicons Height="13" Kind="Cloud" Width="13" HorizontalAlignment="Center"/>
</hc:SideMenuItem.Icon>
</hc:SideMenuItem>

</hc:SideMenuItem>
</hc:SideMenu>

Expand Down
36 changes: 16 additions & 20 deletions WolvenKit/Views/HomePage/Pages/SettingsPageView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,66 +3,62 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"

xmlns:catel="http://schemas.catelproject.com" xmlns:hc="https://handyorg.github.io/handycontrol">
xmlns:catel="http://schemas.catelproject.com" xmlns:hc="https://handyorg.github.io/handycontrol" xmlns:sp="clr-namespace:WolvenKit.Views.SettingsPages">


<Grid hc:ThemeManager.AccentColorElement="{DynamicResource MahApps.Brushes.Accent3}" Background="{DynamicResource MahApps.Brushes.ThemeBackground}" MinWidth="300" MinHeight="300" >
<Grid Margin="3,75,3,0">
<hc:TabControl x:Name="TabControlDemo" IsAnimationEnabled="True" ShowCloseButton="False" IsDraggable="False" IsTabFillEnabled="True" Margin="0,0,0,0" >
<hc:TabItem IsSelected="True" >
<hc:TabControl x:Name="TabControlDemo" IsAnimationEnabled="True" ShowCloseButton="False" IsDraggable="False" IsTabFillEnabled="True" Margin="0,0,0,0" SelectionChanged="TabControlDemo_SelectionChanged" >
<hc:TabItem x:Name="GeneralTabItem" IsSelected="True" >
<hc:TabItem.Header>
<StackPanel Orientation="Horizontal">
<iconPacks:PackIconCodicons Kind="VM"></iconPacks:PackIconCodicons>
<TextBlock Text="General" Margin="10,0,0,0"></TextBlock>
</StackPanel>
</hc:TabItem.Header>
<hc:SimplePanel Background="{DynamicResource RegionBrush}"/>
<sp:GeneralSettingsView/>
</hc:TabItem>


<hc:TabItem IsSelected="True" >
<hc:TabItem x:Name="ToolsTabItems" IsSelected="True" >
<hc:TabItem.Header>
<StackPanel Orientation="Horizontal">
<iconPacks:PackIconCodicons Kind="Code"></iconPacks:PackIconCodicons>
<TextBlock Text="Project" Margin="10,0,0,0"></TextBlock>
<TextBlock Text="Tools" Margin="10,0,0,0"></TextBlock>
</StackPanel>
</hc:TabItem.Header>
<hc:SimplePanel Background="{DynamicResource RegionBrush}">
<sp:ToolSettingsView/>

</hc:SimplePanel>
</hc:TabItem>
<hc:TabItem IsSelected="True" >
<hc:TabItem x:Name="EditorTabItem" IsSelected="True" >
<hc:TabItem.Header>
<StackPanel Orientation="Horizontal">
<iconPacks:PackIconCodicons Kind="Code"></iconPacks:PackIconCodicons>
<TextBlock Text="Tools" Margin="10,0,0,0"></TextBlock>
<TextBlock Text="Editor" Margin="10,0,0,0"></TextBlock>
</StackPanel>
</hc:TabItem.Header>
<hc:SimplePanel Background="{DynamicResource RegionBrush}">
<sp:EditorSettingsView/>

</hc:SimplePanel>
</hc:TabItem>
<hc:TabItem IsSelected="True" >
<hc:TabItem x:Name="PackagingTabItem" IsSelected="True" >
<hc:TabItem.Header>
<StackPanel Orientation="Horizontal">
<iconPacks:PackIconCodicons Kind="Code"></iconPacks:PackIconCodicons>
<TextBlock Text="Cyberpunk 2077" Margin="10,0,0,0"></TextBlock>
<TextBlock Text="Packaging" Margin="10,0,0,0"></TextBlock>
</StackPanel>
</hc:TabItem.Header>
<hc:SimplePanel Background="{DynamicResource RegionBrush}">
<sp:PackagingSettingsView/>

</hc:SimplePanel>
</hc:TabItem>
<hc:TabItem IsSelected="True" >
<hc:TabItem x:Name="IntegrationsTabItem" IsSelected="True" >
<hc:TabItem.Header>
<StackPanel Orientation="Horizontal">
<iconPacks:PackIconCodicons Kind="Code"></iconPacks:PackIconCodicons>
<TextBlock Text="The Witcher 3" Margin="10,0,0,0"></TextBlock>
<TextBlock Text="Integrations" Margin="10,0,0,0"></TextBlock>
</StackPanel>
</hc:TabItem.Header>
<hc:SimplePanel Background="{DynamicResource RegionBrush}">
<sp:IntegrationsSettingsView/>

</hc:SimplePanel>
</hc:TabItem>

</hc:TabControl>
Expand Down
9 changes: 9 additions & 0 deletions WolvenKit/Views/HomePage/Pages/SettingsPageView.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

using HandyControl.Controls;

namespace WolvenKit.Views.HomePage.Pages
{
public partial class SettingsPageView
Expand All @@ -7,5 +9,12 @@ public SettingsPageView()
{
InitializeComponent();
}

private void TabControlDemo_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
{
// I wanted to add logic that the selected tab item moves to be the first in the row but I am not sure it works with the HC tabcontrol. If someone feels liek testing this later go ahead :D


}
}
}
17 changes: 16 additions & 1 deletion WolvenKit/Views/HomePage/Pages/WebsitePageView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,22 @@
xmlns:catel="http://schemas.catelproject.com" xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf" xmlns:hc="https://handyorg.github.io/handycontrol">

<Grid hc:ThemeManager.AccentColorElement="{DynamicResource MahApps.Brushes.Accent3}" Background="{DynamicResource MahApps.Brushes.ThemeBackground}" MinWidth="300" MinHeight="300" >



<Grid Margin="3,75,3,0">

<wv2:WebView2 Source="https://wolvenkit.red/"/>

</Grid>

<Grid HorizontalAlignment="Right" Width="3" Background="{DynamicResource MahApps.HamburgerMenu.Pane.Background}"></Grid>

<Grid HorizontalAlignment="left" Width="3" Background="{DynamicResource MahApps.HamburgerMenu.Pane.Background}"></Grid>
<Grid VerticalAlignment="Top" HorizontalAlignment="Right" Width="30" Height="3" Background="{DynamicResource MahApps.HamburgerMenu.Pane.Background}"></Grid>
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Top" Margin="5" Orientation="Horizontal">

<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center " FontSize="20" Text="Official Website"></TextBlock>
<TextBlock HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center " FontSize="20" Text="Website"></TextBlock>
<hc:Divider Margin="15" Orientation="Vertical" Height="45" HorizontalAlignment="Center" VerticalAlignment="Center"></hc:Divider>
<hc:AnimationPath Height="45" Width="45" Data="{DynamicResource WikiGeo}"
Duration="00:00:08"
Expand All @@ -30,6 +36,15 @@
</hc:AnimationPath>
</StackPanel>


<hc:ComboBox HorizontalContentAlignment="Right" x:Name="SelectWebsiteTypeCombo" Background="Transparent" Width="200" Margin="0,20,155,0" SelectedIndex="0" HorizontalAlignment="Right" VerticalAlignment="Top" FontSize="20" Height="45">
<ComboBoxItem Content="Project"/>
<ComboBoxItem Content="Organization"/>
</hc:ComboBox>




</Grid>

</catel:UserControl>
2 changes: 1 addition & 1 deletion WolvenKit/Views/PluginManager/PluginManagerView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<catel:DataWindow.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<hc:ThemeResources AccentColor="{DynamicResource MahApps.Brushes.Accent3}"/>
<hc:ThemeResources/>
<hc:Theme/>
</ResourceDictionary.MergedDictionaries>

Expand Down
25 changes: 25 additions & 0 deletions WolvenKit/Views/SettingsPages/EditorSettingsView.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<catel:UserControl x:Class="WolvenKit.Views.SettingsPages.EditorSettingsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:catel="http://schemas.catelproject.com" xmlns:hc="https://handyorg.github.io/handycontrol">

<Grid hc:ThemeManager.AccentColorElement="{DynamicResource MahApps.Brushes.Accent3}" Background="{DynamicResource Fluent.Ribbon.Brushes.Backstage.Background}">
<hc:SideMenu Width="150" SideBrush="{DynamicResource MahApps.Brushes.Accent}" HorizontalAlignment="Left" >

<hc:SideMenuItem >
<hc:SideMenuItem.Header>
<TextBlock Text="Global" FontSize="10.5"/>
</hc:SideMenuItem.Header>
</hc:SideMenuItem>
<hc:SideMenuItem >
<hc:SideMenuItem.Header>
<TextBlock Text="Personalize" FontSize="10.5"/>
</hc:SideMenuItem.Header>
</hc:SideMenuItem>
</hc:SideMenu>



</Grid>

</catel:UserControl>
Loading

0 comments on commit 7998624

Please sign in to comment.