Skip to content

Commit

Permalink
Adding WPF and some logo image work
Browse files Browse the repository at this point in the history
  • Loading branch information
benrick committed May 26, 2019
1 parent 094a4c5 commit e6af57e
Show file tree
Hide file tree
Showing 19 changed files with 318 additions and 2 deletions.
Binary file added FF7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added FullLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added IconFullName.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added LogoWork.pdn
Binary file not shown.
Binary file added LogoWork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OrangeTextIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions src/InteractiveSeven.UI/InteractiveSeven.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
<HintPath>..\packages\System.Configuration.ConfigurationManager.4.5.0\lib\net461\System.Configuration.ConfigurationManager.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Data.OracleClient" />
<Reference Include="System.Drawing.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Drawing.Primitives.4.3.0\lib\net45\System.Drawing.Primitives.dll</HintPath>
<Private>True</Private>
Expand All @@ -110,7 +109,6 @@
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Net" />
<Reference Include="System.Net.Http, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Net.Http.4.3.3\lib\net46\System.Net.Http.dll</HintPath>
<Private>True</Private>
Expand Down
6 changes: 6 additions & 0 deletions src/InteractiveSeven.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InteractiveSeven.Twitch", "
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests", "UnitTests\UnitTests.csproj", "{D610871A-4B1B-42DC-94B4-56841A318702}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InteractiveSeven", "InteractiveSeven\InteractiveSeven.csproj", "{A666950C-E4FB-46C3-8FB6-71F2C5805540}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -33,6 +35,10 @@ Global
{D610871A-4B1B-42DC-94B4-56841A318702}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D610871A-4B1B-42DC-94B4-56841A318702}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D610871A-4B1B-42DC-94B4-56841A318702}.Release|Any CPU.Build.0 = Release|Any CPU
{A666950C-E4FB-46C3-8FB6-71F2C5805540}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A666950C-E4FB-46C3-8FB6-71F2C5805540}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A666950C-E4FB-46C3-8FB6-71F2C5805540}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A666950C-E4FB-46C3-8FB6-71F2C5805540}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
9 changes: 9 additions & 0 deletions src/InteractiveSeven/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Application x:Class="InteractiveSeven.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:InteractiveSeven"
StartupUri="MainWindow.xaml">
<Application.Resources>

</Application.Resources>
</Application>
17 changes: 17 additions & 0 deletions src/InteractiveSeven/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace InteractiveSeven
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}
Binary file added src/InteractiveSeven/Assets/BecomePatron.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/InteractiveSeven/Icon.ico
Binary file not shown.
26 changes: 26 additions & 0 deletions src/InteractiveSeven/InteractiveSeven.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<UseWPF>true</UseWPF>
<ApplicationIcon>logowork_X8u_icon.ico</ApplicationIcon>
</PropertyGroup>

<ItemGroup>
<None Remove="Assets\BecomePatron.png" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="MiqM.Xceed.Wpf.Toolkit.NETCore" Version="3.4.0.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\InteractiveSeven.Core\InteractiveSeven.Core.csproj" />
</ItemGroup>

<ItemGroup>
<Resource Include="Assets\BecomePatron.png" />
</ItemGroup>

</Project>
136 changes: 136 additions & 0 deletions src/InteractiveSeven/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
<Window x:Class="InteractiveSeven.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:local="clr-namespace:InteractiveSeven"
mc:Ignorable="d"
Title="Interactive Seven" Height="600" Width="600">
<Window.Resources>
<local:ColorBrushConverter x:Key="ColorBrushConverter" />
</Window.Resources>
<DockPanel>
<DockPanel DockPanel.Dock="Top" Height="50" Background="#CCC">
<StackPanel DockPanel.Dock="Left" Orientation="Horizontal" Height="30">
<TextBlock Text="Process Name" Margin="2" VerticalAlignment="Center" />
<TextBox Text="ff7_en" Width="100" Margin="2" VerticalAlignment="Center" />
<Button Margin="2" Content="Browse" Padding="5 0 5 0">
</Button>
</StackPanel>
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal" Height="30">
<Button Content="Connect" Margin="2" VerticalAlignment="Center" Padding="4" />
<TextBlock Text="Waiting" Margin="2" VerticalAlignment="Center" Padding="4" />
<Button Content="Disconnect" Margin="2" VerticalAlignment="Center" Padding="4" />
</StackPanel>
<Grid>
<TextBlock TextAlignment="Center" VerticalAlignment="Center">Interactive Seven</TextBlock>
</Grid>
</DockPanel>
<Grid DockPanel.Dock="Bottom" Height="50" Background="#666">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" FontSize="14" FontWeight="Bold" VerticalAlignment="Center" TextAlignment="Center"
Text="Built by Brendan Enrick (@Brendoneus/@DevChatter)" />
<Button Grid.Column="2" Margin="2 2 2 2">
<Hyperlink x:Name="PatreonLink" RequestNavigate="PatreonLink_RequestNavigate"
NavigateUri="https://www.patreon.com/DevChatter">
<Image Source="/Assets/BecomePatron.png" />
</Hyperlink>
</Button>
</Grid>
<Grid>
<TabControl TabStripPlacement="Top" HorizontalAlignment="Center"
Height="464" VerticalAlignment="Center" Width="580">
<TabItem Header="Dashboard">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<DockPanel>
<TextBlock DockPanel.Dock="Top" Text="Menu Preview" />
<Grid x:Name="ColorPreview" Background="#FFE5E5E5" Width="200" Height="100">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Rectangle Grid.Column="0" Grid.Row="0">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="{Binding TopLeft, Mode=OneWay}" Offset="0.0" />
<GradientStop Color="{Binding MidPoint, Mode=OneWay}" Offset="1.0" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Rectangle Grid.Column="1" Grid.Row="0">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="1,0" EndPoint="0,1">
<GradientStop Color="{Binding TopRight, Mode=OneWay}" Offset="0.0" />
<GradientStop Color="{Binding MidPoint, Mode=OneWay}" Offset="1.0" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Rectangle Grid.Column="0" Grid.Row="1">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,1" EndPoint="1,0">
<GradientStop Color="{Binding BotLeft, Mode=OneWay}" Offset="0.0" />
<GradientStop Color="{Binding MidPoint, Mode=OneWay}" Offset="1.0" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Rectangle Grid.Column="1" Grid.Row="1">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="1,1" EndPoint="0,0">
<GradientStop Color="{Binding BotRight, Mode=OneWay}" Offset="0.0" />
<GradientStop Color="{Binding MidPoint, Mode=OneWay}" Offset="1.0" />
</LinearGradientBrush>
</Rectangle.Fill>

</Rectangle>
</Grid>
</DockPanel>
</Grid>
</TabItem>
<TabItem Header="Menu Colors">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid Background="#FFE5E5E5" x:Name="MenuColorGrid">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<xctk:ColorCanvas x:Name="ColorTL" Grid.Column="0" Grid.Row="0" UsingAlphaChannel="false" SelectedColor="{Binding Path = TopLeft, Mode = TwoWay}" />
<xctk:ColorCanvas x:Name="ColorTR" Grid.Column="1" Grid.Row="0" UsingAlphaChannel="false" SelectedColor="{Binding Path = TopRight, Mode = TwoWay}" />
<xctk:ColorCanvas x:Name="ColorBL" Grid.Column="0" Grid.Row="1" UsingAlphaChannel="false" SelectedColor="{Binding Path = BotLeft, Mode = TwoWay}" />
<xctk:ColorCanvas x:Name="ColorBR" Grid.Column="1" Grid.Row="1" UsingAlphaChannel="false" SelectedColor="{Binding Path = BotRight, Mode = TwoWay}" />
</Grid>
</ScrollViewer>
</TabItem>
<TabItem Header="Name Bidding">
<Grid Background="#FFE5E5E5">

</Grid>
</TabItem>
<TabItem Header="Settings">
<Grid Background="#FFE5E5E5">

</Grid>
</TabItem>
</TabControl>
</Grid>
</DockPanel>
</Window>
53 changes: 53 additions & 0 deletions src/InteractiveSeven/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
using InteractiveSeven.ViewModels;
using System;
using System.Diagnostics;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
using System.Windows.Media;
using System.Windows.Navigation;

namespace InteractiveSeven
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
MenuColorViewModel menuColorViewModel = new MenuColorViewModel();
MenuColorGrid.DataContext = menuColorViewModel;
ColorPreview.DataContext = menuColorViewModel;
}

private void PatreonLink_RequestNavigate(object sender, RequestNavigateEventArgs e)
{
ProcessStartInfo psi = new ProcessStartInfo
{
FileName = e.Uri.AbsoluteUri,
UseShellExecute = true
};
Process.Start(psi);
e.Handled = true;
}
}

public class ColorBrushConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is Color color)
{
return new SolidColorBrush(color);
}
throw new ArgumentException($"Argument must be a {typeof(Color).FullName}", nameof(value));
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}
71 changes: 71 additions & 0 deletions src/InteractiveSeven/ViewModels/MenuColorViewModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows.Media;
using System.Linq;

namespace InteractiveSeven.ViewModels
{
public class MenuColorViewModel : INotifyPropertyChanged
{
private Color topLeft = Color.FromRgb(0, 88, 176);
private Color botLeft = Color.FromRgb(0, 0, 80);
private Color topRight = Color.FromRgb(0, 0, 128);
private Color botRight = Color.FromRgb(0, 0, 32);

public Color TopLeft
{
get => topLeft;
set
{
topLeft = value;
OnPropertyChanged();
OnPropertyChanged("MidPoint");
}
}
public Color BotLeft
{
get => botLeft;
set
{
botLeft = value;
OnPropertyChanged();
OnPropertyChanged("MidPoint");
}
}
public Color TopRight
{
get => topRight;
set
{
topRight = value;
OnPropertyChanged();
OnPropertyChanged("MidPoint");
}
}
public Color BotRight
{
get => botRight;
set
{
botRight = value;
OnPropertyChanged();
OnPropertyChanged("MidPoint");
}
}
public Color MidPoint
{
get => Color.FromRgb((byte)AverageRed(), (byte)AverageGreen(), (byte)AverageBlue());
}

private int AverageRed() => (int)(new int[] { topLeft.R, topRight.R, botLeft.R, botRight.R }).Average();
private int AverageGreen() => (int)(new int[] { topLeft.G, topRight.G, botLeft.G, botRight.G }).Average();
private int AverageBlue() => (int)(new int[] { topLeft.B, topRight.B, botLeft.B, botRight.B }).Average();

public event PropertyChangedEventHandler PropertyChanged;

protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}
Binary file added src/InteractiveSeven/logowork_X8u_icon.ico
Binary file not shown.
Binary file added src/LogoWork.ico
Binary file not shown.
Binary file added src/logowork_X8u_icon.ico
Binary file not shown.

0 comments on commit e6af57e

Please sign in to comment.