diff --git a/README.md b/README.md index 55487c4..25ba262 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,14 @@ +# for Lib please replace the Lib folder from this repo with the one linked below +[WhackerLinkLib/Fork](https://github.com/DeathSoulYTDev/WhackerLinkLib) + # WhackerLink Console V2 ### WhackerLink Dispatch Console -![console](./images/consolehome.JPG) +image + ## Setup - Download the packaged release from the releases or clone and build yourself - Modify the codeplug file - Select the codeplug once opening the app ## Features - Custumizable widgets -- Auto saved and transferable user settings \ No newline at end of file +- Auto saved and transferable user settings diff --git a/WhackerLinkConsoleV2/Assets/dualpage.png b/WhackerLinkConsoleV2/Assets/dualpage.png new file mode 100644 index 0000000..7ab2bf5 Binary files /dev/null and b/WhackerLinkConsoleV2/Assets/dualpage.png differ diff --git a/WhackerLinkConsoleV2/Assets/pager.png b/WhackerLinkConsoleV2/Assets/pager.png new file mode 100644 index 0000000..b5f4353 Binary files /dev/null and b/WhackerLinkConsoleV2/Assets/pager.png differ diff --git a/WhackerLinkConsoleV2/ChannelBox.xaml b/WhackerLinkConsoleV2/ChannelBox.xaml index 705ec69..544c98c 100644 --- a/WhackerLinkConsoleV2/ChannelBox.xaml +++ b/WhackerLinkConsoleV2/ChannelBox.xaml @@ -34,7 +34,7 @@ - + @@ -100,7 +100,7 @@ - + + - + + @@ -70,151 +260,63 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WhackerLinkConsoleV2/ToneSet.xaml.cs b/WhackerLinkConsoleV2/ToneSet.xaml.cs new file mode 100644 index 0000000..ce37511 --- /dev/null +++ b/WhackerLinkConsoleV2/ToneSet.xaml.cs @@ -0,0 +1,101 @@ +using System; +using System.ComponentModel; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; +using System.Windows.Media; + +namespace WhackerLinkConsoleV2.Controls +{ + public partial class ToneSet : UserControl, INotifyPropertyChanged + { + public event PropertyChangedEventHandler PropertyChanged; + + internal LinearGradientBrush grayGradient; + internal LinearGradientBrush orangeGradient; + + public string ToneName { get; set; } + public double ToneA { get; set; } + public double ToneB { get; set; } + + public bool IsEditMode { get; set; } + + public event EventHandler PlayClicked; + public event EventHandler SelectToggled; + + private bool _isSelected = false; + + public ToneSet(string toneName, double toneA, double toneB) + { + InitializeComponent(); + UpdateBackground(); + + grayGradient = new LinearGradientBrush + { + StartPoint = new Point(0.5, 0), + EndPoint = new Point(0.5, 1) + }; + + grayGradient.GradientStops.Add(new GradientStop((Color)ColorConverter.ConvertFromString("#888888"), 0.485)); + grayGradient.GradientStops.Add(new GradientStop((Color)ColorConverter.ConvertFromString("#888888"), 0.517)); + + orangeGradient = new LinearGradientBrush + { + StartPoint = new Point(0.5, 0), + EndPoint = new Point(0.5, 1) + }; + + orangeGradient.GradientStops.Add(new GradientStop((Color)ColorConverter.ConvertFromString("#FFFFAF00"), 0.485)); + orangeGradient.GradientStops.Add(new GradientStop((Color)ColorConverter.ConvertFromString("#FFEEA400"), 0.517)); + ToneSetSelectBtn.Background = grayGradient; + + ToneName = toneName; + ToneA = toneA; + ToneB = toneB; + + MouseLeftButtonDown += ToneSet_MouseLeftButtonDown; + + DataContext = this; + } + + private void ToneSet_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) + { + if (IsEditMode) return; + } + + + private void ToneSetPlayBtn_Click(object sender, RoutedEventArgs e) + { + PlayClicked?.Invoke(this, EventArgs.Empty); + } + + private void ToneSetSelectBtn_Click(object sender, RoutedEventArgs e) + { + SelectToggled?.Invoke(this, EventArgs.Empty); + } + + public void SetSelected(bool selected) + { + _isSelected = selected; + UpdateSelectButton(); + if (selected) + this.Background = System.Windows.Media.Brushes.LightBlue; + else + this.Background = System.Windows.Media.Brushes.Transparent; + } + + private void UpdateSelectButton() + { + if (ToneSetSelectBtn != null) + { + //ToneSetSelectBtn.Content = _isSelected ? "Deselect" : "Select"; + ToneSetSelectBtn.Background = _isSelected ? orangeGradient : grayGradient; + } + } + + private void UpdateBackground() + { + Background = _isSelected ? (Brush)new BrushConverter().ConvertFrom("#FF0B004B") : Brushes.DarkGray; + } + } +} diff --git a/WhackerLinkConsoleV2/WhackerLinkConsoleV2.csproj b/WhackerLinkConsoleV2/WhackerLinkConsoleV2.csproj index 5441dd9..77f5a9e 100644 --- a/WhackerLinkConsoleV2/WhackerLinkConsoleV2.csproj +++ b/WhackerLinkConsoleV2/WhackerLinkConsoleV2.csproj @@ -13,6 +13,8 @@ + + @@ -71,6 +73,8 @@ + + diff --git a/WhackerLinkConsoleV2/WhackerLinkConsoleV2.csproj.user b/WhackerLinkConsoleV2/WhackerLinkConsoleV2.csproj.user new file mode 100644 index 0000000..0f14913 --- /dev/null +++ b/WhackerLinkConsoleV2/WhackerLinkConsoleV2.csproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/WhackerLinkConsoleV2/WidgetSelectionWindow.xaml b/WhackerLinkConsoleV2/WidgetSelectionWindow.xaml index d2cd7e3..183fa9a 100644 --- a/WhackerLinkConsoleV2/WidgetSelectionWindow.xaml +++ b/WhackerLinkConsoleV2/WidgetSelectionWindow.xaml @@ -7,6 +7,7 @@ +