more stylish stuff

This commit is contained in:
Bitl 2021-09-18 17:56:05 -07:00
parent 21af979cad
commit 84b18e2a0d
9 changed files with 2716 additions and 19 deletions

View File

@ -181,7 +181,7 @@ namespace NovetusLauncher
}
catch (Exception ex2)
{
GlobalFuncs.LogExceptions(ex);
GlobalFuncs.LogExceptions(ex2);
GraphicsShadows2007.Enabled = false;
}
}

View File

@ -23,7 +23,6 @@ namespace NovetusLauncher
public List<TreeNode> CurrentNodeMatches = new List<TreeNode>();
public int LastNodeIndex = 0;
public string LastSearchText;
bool isWPF = false;
//CONTROLS
public Form Parent = null;
@ -43,14 +42,6 @@ namespace NovetusLauncher
public string TabPageHost, TabPageMaps, TabPageClients, TabPageSaved = "";
#endregion
#region Constructor
public LauncherFormShared(bool WPF = false)
{
//TODO: add WPF support...
isWPF = WPF;
}
#endregion
#region UPnP
public void InitUPnP()
{

View File

@ -0,0 +1,71 @@

namespace NovetusLauncher
{
partial class LauncherFormStylish
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LauncherFormStylish));
this.elementHost1 = new System.Windows.Forms.Integration.ElementHost();
this.launcherFormStylishInterface1 = new LauncherFormStylishInterface();
this.SuspendLayout();
//
// elementHost1
//
this.elementHost1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.elementHost1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(78)))), ((int)(((byte)(100)))));
this.elementHost1.Location = new System.Drawing.Point(0, 57);
this.elementHost1.Name = "elementHost1";
this.elementHost1.Size = new System.Drawing.Size(707, 303);
this.elementHost1.TabIndex = 0;
this.elementHost1.Text = "elementHost1";
this.elementHost1.Child = this.launcherFormStylishInterface1;
//
// LauncherFormStylish
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(78)))), ((int)(((byte)(100)))));
this.ClientSize = new System.Drawing.Size(707, 361);
this.Controls.Add(this.elementHost1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "LauncherFormStylish";
this.Text = "Novetus";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Integration.ElementHost elementHost1;
private LauncherFormStylishInterface launcherFormStylishInterface1;
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.Integration;
namespace NovetusLauncher
{
public partial class LauncherFormStylish : Form
{
public LauncherFormStylish()
{
InitializeComponent();
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,177 @@
<UserControl x:Class="NovetusLauncher.LauncherFormStylishInterface"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
Height="299.569" Width="695.158">
<UserControl.Resources>
<Style x:Key="TabItemStyleSeperators" TargetType="{x:Type TabItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
<Border x:Name="Border" BorderThickness="0,0,2,0" HorizontalAlignment="Center" BorderBrush="White" >
<Border x:Name="Border2" BorderThickness="6,1,6,1" HorizontalAlignment="Center">
<Grid Name="Panel">
<ContentPresenter x:Name="ContentSite" ContentSource="Header" />
</Grid>
</Border>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="TextElement.Foreground" TargetName="ContentSite" Value="White"/>
<Setter TargetName="Border" Property="Background" Value="#FF142732"/>
</Trigger>
<Trigger Property="IsSelected" Value="False">
<Setter Property="TextElement.Foreground" TargetName="ContentSite" Value="White"/>
<Setter TargetName="Border" Property="Background" Value="#FF294E64" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="TabItemStyleNoSeperators" TargetType="{x:Type TabItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
<Border x:Name="Border" BorderThickness="6,1,6,1" HorizontalAlignment="Center">
<Grid Name="Panel">
<ContentPresenter x:Name="ContentSite" ContentSource="Header" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="TextElement.Foreground" TargetName="ContentSite" Value="White"/>
<Setter TargetName="Border" Property="Background" Value="#FF142732"/>
</Trigger>
<Trigger Property="IsSelected" Value="False">
<Setter Property="TextElement.Foreground" TargetName="ContentSite" Value="White"/>
<Setter TargetName="Border" Property="Background" Value="#FF294E64" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ButtonStyle1" TargetType="{x:Type Button}">
<Setter Property="Background" Value="#F4CC35" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="FontSize" Value="18" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border CornerRadius="4" Background="{TemplateBinding Background}" BorderBrush="Black" BorderThickness="1">
<Grid>
<ContentPresenter x:Name="MyContentPresenter" Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,0,0" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#FFF7DF80" />
<Setter Property="Foreground" Value="Black" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#FF93770C" />
<Setter Property="Foreground" Value="Black" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="TextBoxStyle1" TargetType="{x:Type TextBox}">
<Setter Property="FontSize" Value="12" />
<Setter Property="FontFamily" Value="Helvetica" />
<Setter Property="TextAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBoxBase}">
<Border BorderThickness="2">
<Border.BorderBrush>
<VisualBrush>
<VisualBrush.Visual>
<Rectangle StrokeDashArray="4 2" Stroke="Gray" StrokeThickness="2"
Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}"/>
</VisualBrush.Visual>
</VisualBrush>
</Border.BorderBrush>
<ScrollViewer Margin="0" x:Name="PART_ContentHost" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="CheckBoxStyle1" TargetType="{x:Type CheckBox}">
<Setter Property="FontSize" Value="12" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
</Style>
</UserControl.Resources>
<TabControl x:Name="tabControl" HorizontalAlignment="Center" Height="295" Margin="0,0
,0,0" Width="689" BorderBrush="{x:Null}" Background="#FF294E64">
<TabItem Header="PLAY" Style="{DynamicResource TabItemStyleSeperators}" BorderBrush="{x:Null}" Background="#FF294E64" Foreground="White" IsSelected="True" FontSize="18" FontFamily="Comic Sans MS">
<Grid Background="#FFEDEDED" Margin="0,0,-2,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="101*"/>
<ColumnDefinition Width="584*"/>
</Grid.ColumnDefinitions>
<Rectangle Fill="#FFDEDCDC" HorizontalAlignment="Left" Height="237" Margin="10,10,0,0" Stroke="Black" VerticalAlignment="Top" Width="665" Grid.ColumnSpan="2"/>
<Button x:Name="buttonTest" Style="{DynamicResource ButtonStyle1}" Content="Button" HorizontalAlignment="Left" Margin="78,95,0,0" VerticalAlignment="Top" Width="75" Grid.ColumnSpan="2"/>
<TextBox x:Name="textBox" Style="{DynamicResource TextBoxStyle1}" HorizontalAlignment="Left" Height="20" Margin="78,54,0,0" TextWrapping="Wrap" Text="Bitl" VerticalAlignment="Top" Width="95" Grid.ColumnSpan="2"/>
<CheckBox x:Name="checkBox" Style="{DynamicResource CheckBoxStyle1}" Content="TestCheck" HorizontalAlignment="Left" Margin="78,127,0,0" VerticalAlignment="Top" Width="83" Grid.ColumnSpan="2"/>
</Grid>
</TabItem>
<TabItem Header="HOST" Style="{DynamicResource TabItemStyleSeperators}" BorderBrush="{x:Null}" Background="#FF294E64" Foreground="White" IsSelected="True" FontSize="18" FontFamily="Comic Sans MS">
<Grid Background="#FFEDEDED">
<Rectangle Fill="#FFDEDCDC" HorizontalAlignment="Left" Height="237" Margin="10,10,0,0" Stroke="Black" VerticalAlignment="Top" Width="665"/>
</Grid>
</TabItem>
<TabItem Header="VERSIONS" Style="{DynamicResource TabItemStyleSeperators}" BorderBrush="{x:Null}" Background="#FF294E64" Foreground="White" IsSelected="True" FontSize="18" FontFamily="Comic Sans MS">
<Grid Background="#FFEDEDED">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="274*"/>
<ColumnDefinition Width="409*"/>
</Grid.ColumnDefinitions>
<Rectangle Fill="#FFDEDCDC" HorizontalAlignment="Left" Height="237" Margin="10,10,0,0" Stroke="Black" VerticalAlignment="Top" Width="665" Grid.ColumnSpan="2"/>
</Grid>
</TabItem>
<TabItem Header="MAPS" Style="{DynamicResource TabItemStyleSeperators}" BorderBrush="{x:Null}" Background="#FF294E64" Foreground="White" IsSelected="True" FontSize="18" FontFamily="Comic Sans MS">
<Grid Background="#FFEDEDED">
<Rectangle Fill="#FFDEDCDC" HorizontalAlignment="Left" Height="237" Margin="10,10,0,0" Stroke="Black" VerticalAlignment="Top" Width="665"/>
</Grid>
</TabItem>
<TabItem Header="SAVED" Style="{DynamicResource TabItemStyleSeperators}" BorderBrush="{x:Null}" Background="#FF294E64" Foreground="White" IsSelected="True" FontSize="18" FontFamily="Comic Sans MS">
<Grid Background="#FFEDEDED">
<Rectangle Fill="#FFDEDCDC" HorizontalAlignment="Left" Height="237" Margin="10,10,0,0" Stroke="Black" VerticalAlignment="Top" Width="665"/>
</Grid>
</TabItem>
<TabItem Header="CONSOLE" Style="{DynamicResource TabItemStyleSeperators}" BorderBrush="{x:Null}" Background="#FF294E64" Foreground="White" IsSelected="True" FontSize="18" FontFamily="Comic Sans MS">
<Grid Background="#FFEDEDED">
<Rectangle Fill="#FFDEDCDC" HorizontalAlignment="Left" Height="237" Margin="10,10,0,0" Stroke="Black" VerticalAlignment="Top" Width="665"/>
</Grid>
</TabItem>
<TabItem Header="CHANGES" Style="{DynamicResource TabItemStyleSeperators}" BorderBrush="{x:Null}" Background="#FF294E64" Foreground="White" IsSelected="True" FontSize="18" FontFamily="Comic Sans MS">
<Grid Background="#FFEDEDED">
<Rectangle Fill="#FFDEDCDC" HorizontalAlignment="Left" Height="237" Margin="10,10,0,0" Stroke="Black" VerticalAlignment="Top" Width="665"/>
</Grid>
</TabItem>
<TabItem Header="OPTIONS" Style="{DynamicResource TabItemStyleNoSeperators}" BorderBrush="{x:Null}" Background="#FF294E64" Foreground="White" IsSelected="True" FontSize="18" FontFamily="Comic Sans MS">
<Grid Background="#FFEDEDED">
<Rectangle Fill="#FFDEDCDC" HorizontalAlignment="Left" Height="237" Margin="10,10,0,0" Stroke="Black" VerticalAlignment="Top" Width="665"/>
</Grid>
</TabItem>
</TabControl>
</UserControl>

View File

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace NovetusLauncher
{
/// <summary>
/// Interaction logic for LauncherFormStylishInterface.xaml
/// </summary>
public partial class LauncherFormStylishInterface : UserControl
{
public LauncherFormStylishInterface()
{
InitializeComponent();
}
}
}

View File

@ -97,6 +97,9 @@
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.7.2\lib\net40-client\NLog.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="ReachFramework" />
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core">
@ -125,10 +128,14 @@
<Reference Include="System.Transactions" />
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="UIAutomationProvider" />
<Reference Include="WindowsBase" />
<Reference Include="WindowsFormsIntegration" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\NovetusCore\CharCustom\CharacterCustomizationShared.cs">
@ -181,6 +188,15 @@
<Compile Include="Forms\LauncherFormSettings.Designer.cs">
<DependentUpon>LauncherFormSettings.cs</DependentUpon>
</Compile>
<Compile Include="Forms\LauncherForm\Stylish\LauncherFormStylish.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\LauncherForm\Stylish\LauncherFormStylish.Designer.cs">
<DependentUpon>LauncherFormStylish.cs</DependentUpon>
</Compile>
<Compile Include="Forms\LauncherForm\Stylish\LauncherFormStylishInterface.xaml.cs">
<DependentUpon>LauncherFormStylishInterface.xaml</DependentUpon>
</Compile>
<Compile Include="Forms\SDK\AssetSDK.cs">
<SubType>Form</SubType>
</Compile>
@ -273,6 +289,9 @@
<EmbeddedResource Include="Forms\LauncherForm\Extended\LauncherFormExtended.resx">
<DependentUpon>LauncherFormExtended.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\LauncherForm\Stylish\LauncherFormStylish.resx">
<DependentUpon>LauncherFormStylish.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\SDK\AssetSDK.resx">
<DependentUpon>AssetSDK.cs</DependentUpon>
</EmbeddedResource>
@ -332,7 +351,12 @@
<None Include="Resources\NOVETUS_small.png" />
<None Include="Resources\N.png" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Page Include="Forms\LauncherForm\Stylish\LauncherFormStylishInterface.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<Import Project="..\NovetusCore\NovetusCore.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>

View File

@ -1,8 +1,6 @@
#region Usings
using NLog;
using System;
using System.Threading;
using System.Windows.Forms;
#endregion
namespace NovetusLauncher
@ -21,8 +19,8 @@ namespace NovetusLauncher
config.AddRule(LogLevel.Info, LogLevel.Fatal, logfile);
LogManager.Configuration = config;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
System.Windows.Forms.Application.EnableVisualStyles();
System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false);
GlobalFuncs.ReadInfoFile(GlobalPaths.ConfigDir + "\\" + GlobalPaths.InfoName);
GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
@ -31,11 +29,11 @@ namespace NovetusLauncher
switch (GlobalVars.UserConfiguration.LauncherStyle)
{
case Settings.Style.Compact:
Application.Run(new LauncherFormCompact());
System.Windows.Forms.Application.Run(new LauncherFormCompact());
break;
case Settings.Style.Extended:
default:
Application.Run(new LauncherFormExtended());
System.Windows.Forms.Application.Run(new LauncherFormExtended());
break;
}
}
@ -43,12 +41,17 @@ namespace NovetusLauncher
{
CommandLineArguments.Arguments CommandLine = new CommandLineArguments.Arguments(args);
if (CommandLine["StylishTest"] != null)
{
System.Windows.Forms.Application.Run(new LauncherFormStylish());
}
if (CommandLine["sdk"] != null)
{
Application.Run(new NovetusSDK());
System.Windows.Forms.Application.Run(new NovetusSDK());
}
}
}
}
#endregion
#endregion
}