forked from DevChatter/InteractiveSeven
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
318 additions
and
2 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
{ | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.
Binary file not shown.