From ec12e348237d743bd8785bb51290ff4c7957b322 Mon Sep 17 00:00:00 2001 From: conorm125 Date: Sun, 25 Oct 2020 19:52:14 +0000 Subject: [PATCH] added working tab system --- .vs/RGBController2/v16/.suo | Bin 65536 -> 102400 bytes RGBController2/Animation.xaml | 16 - RGBController2/Animation.xaml.cs | 26 -- RGBController2/App.xaml | 2 +- RGBController2/Boards/ArduinoBoard.cs | 47 ++ RGBController2/Boards/IBoards.cs | 28 ++ RGBController2/Commands/ActionCommand.cs | 85 ++++ RGBController2/MainWindow.xaml | 43 -- RGBController2/MainWindow.xaml.cs | 43 -- RGBController2/RGBController2.csproj | 9 +- RGBController2/RGBController2.csproj.user | 12 +- RGBController2/Static.xaml | 15 - RGBController2/ViewModels/BaseViewModel.cs | 10 + RGBController2/ViewModels/MainViewModel.cs | 56 +++ RGBController2/ViewModels/Tabs/ArduinoTab.cs | 82 ++++ RGBController2/ViewModels/Tabs/ITab.cs | 12 + RGBController2/ViewModels/Tabs/Tab.cs | 18 + .../ViewModels/Tabs/TabViewModel.cs | 10 + RGBController2/Views/MainWindow.xaml | 48 ++ RGBController2/Views/MainWindow.xaml.cs | 20 + RGBController2/Views/Tabs/ArduinoTabView.xaml | 23 + .../Tabs/ArduinoTabView.xaml.cs} | 15 +- .../obj/Debug/netcoreapp3.1/Animation.g.i.cs | 2 +- .../obj/Debug/netcoreapp3.1/App.g.i.cs | 4 +- .../obj/Debug/netcoreapp3.1/MainWindow.g.i.cs | 30 +- .../netcoreapp3.1/RGBController2.assets.cache | Bin 140 -> 6577 bytes ...RGBController2.csproj.FileListAbsolute.txt | 31 ++ ...BController2.csprojAssemblyReference.cache | Bin 424 -> 424 bytes .../RGBController2.designer.deps.json | 221 ++++++++- .../RGBController2_MarkupCompile.i.cache | 14 +- .../RGBController2_MarkupCompile.i.lref | 5 - .../RGBController2.csproj.nuget.dgspec.json | 16 +- RGBController2/obj/project.assets.json | 441 +++++++++++++++++- 33 files changed, 1174 insertions(+), 210 deletions(-) delete mode 100644 RGBController2/Animation.xaml delete mode 100644 RGBController2/Animation.xaml.cs create mode 100644 RGBController2/Boards/ArduinoBoard.cs create mode 100644 RGBController2/Boards/IBoards.cs create mode 100644 RGBController2/Commands/ActionCommand.cs delete mode 100644 RGBController2/MainWindow.xaml delete mode 100644 RGBController2/MainWindow.xaml.cs delete mode 100644 RGBController2/Static.xaml create mode 100644 RGBController2/ViewModels/BaseViewModel.cs create mode 100644 RGBController2/ViewModels/MainViewModel.cs create mode 100644 RGBController2/ViewModels/Tabs/ArduinoTab.cs create mode 100644 RGBController2/ViewModels/Tabs/ITab.cs create mode 100644 RGBController2/ViewModels/Tabs/Tab.cs create mode 100644 RGBController2/ViewModels/Tabs/TabViewModel.cs create mode 100644 RGBController2/Views/MainWindow.xaml create mode 100644 RGBController2/Views/MainWindow.xaml.cs create mode 100644 RGBController2/Views/Tabs/ArduinoTabView.xaml rename RGBController2/{Static.xaml.cs => Views/Tabs/ArduinoTabView.xaml.cs} (55%) delete mode 100644 RGBController2/obj/Debug/netcoreapp3.1/RGBController2_MarkupCompile.i.lref diff --git a/.vs/RGBController2/v16/.suo b/.vs/RGBController2/v16/.suo index 1bb7f6ef8a10ea0b0cbe54a33cd37643843d2c26..6f9610b1bc56b9a593800d35fb45d113b41a189f 100644 GIT binary patch literal 102400 zcmeHQ31Az=)s~#Zu@fjsfp8WCggaJz#j$hCvYnX3v5B1n5E$8#9mTR_Bsm8OHxwF< zwzN>7v|K$XP<|-oDCI~g(3bM2l+r*iN?ZDua+j-=w(x)7&W^NNOS@}HvE@W#KkYR; zZ{F;iH*ek?@0njred(sV5B!r&7Z%vY**^ZH)K;vyUxagl5~kQ}%WyId@bM>~e8PJ? zZvo)45XMLetgwag7qdBRjkXYu5!)tyO3PuIZ9@EePc?h%occ>A-oC>=9q|^OC?dB3 zW7xLN)(q@DIBT?RG)pDv`805(wy2XHrn#7Cx7onHN?2p-w*_r&Hm|MQ)`#C-o8Q)I z8$d|}keiS#nkEf-d%CU2PQI6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=K-=xzB5?N;paK9r5 z;m(gWM({(WG6F+ko}uazz}c-thGLAi2oxtMP%L9GgI%0KY=jqK7|g^BfMqF17zQ&j z17JnWFc`%p3IJnG+Te>gikDv=zLi{JN4=+rU&Jwx1H z*sAU0y5St5A2|Gkhhs<}ZTP9=5BQEf)*2J-O|Ro)IBqetT408rPCXKsJo1mK{};xF zrXG1+75^i75Nuwbq@I&G^wjZtrFEsG98OPgc0W3^fv@1YxNhmGERw?Gu}eR_ex~}R zse6b+6>=PJP{r4?)nK#1El_eo(MgzsOwe~P;i%z6Uhvt#Hw%-na&9Bn2lYMBl1NrNsSO3r zI#kk>i3F(QSqJKuE?D4D`)a#U`biZz9rt!JoGgQ?MchTHJB93^McEmdBNbgEJ9l^^ z$2t{V-GhAt>?24TZXqUe=}v72y88zA_6_z7Nkc6#ZQqNuO}|<1D1KUbWu#kG_dBUn6j?Kit^U=+ilA()Kp8 zTfP}nNJ)&{Y>{%4Nm}Y<*?zcdrl#=@;bQ2xV?_3*Q!u)P< zNR4nB1$PN%&Jm4-^smD1tFXI0a9zvB2dB#{Wc_%CAYYm({0KwB?TQl0q`+&f ztg5W4s5IGaJ$93Ac}2Hrh1FhZ@>bY-trZnso7IemMe;R0;9$&DyZrQ=lApVdu;(1e zzQpp6bbkuD?=~4Tny@enstM=%0!dT1c)=1#mQK0YnDmDelY_Lb`~|5IE~qr{hV{xDfyh<@jT4~G$MCu~oB@ZoT) ztt!2?ZHZ>n6?xw(y~dOB*wLY}5pQqTNbj%|NGHWAdCQo}i=Z%w-z{U(lUXEB>dYZQ z@+b-@e9(c@bI-}OhgXscutktg*~nSxg(~tcIUlYWCGXOQHYDk9XNrn&(nm4GW{Vnu z - - - - diff --git a/RGBController2/Animation.xaml.cs b/RGBController2/Animation.xaml.cs deleted file mode 100644 index 8530158..0000000 --- a/RGBController2/Animation.xaml.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -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 RGBController2 -{ - /// - /// Interaction logic for Animation.xaml - /// - public partial class Animation : Page - { - public Animation() - { - //InitializeComponent(); - } - } -} diff --git a/RGBController2/App.xaml b/RGBController2/App.xaml index 978c562..70b7706 100644 --- a/RGBController2/App.xaml +++ b/RGBController2/App.xaml @@ -2,7 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:RGBController2" - StartupUri="MainWindow.xaml"> + StartupUri="Views/MainWindow.xaml"> diff --git a/RGBController2/Boards/ArduinoBoard.cs b/RGBController2/Boards/ArduinoBoard.cs new file mode 100644 index 0000000..66d27c7 --- /dev/null +++ b/RGBController2/Boards/ArduinoBoard.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.IO.Ports; +using System.Text; + +namespace RGBController2.Boards +{ + public class ArduinoBoard : IBoard + { + private SerialPort _serialPort; + public bool Conected { get; } + + public ArduinoBoard(string portName, int baudRate = 9600) + { + Conected = false; + _serialPort = new SerialPort(); + _serialPort.PortName = portName; + _serialPort.BaudRate = baudRate; + _serialPort.Open(); + if (_serialPort.IsOpen) + Conected = true; + } + + public void SetAllLeds(byte red, byte green, byte blue) + { + string command = "a"; + command += ByteToHexString(red); + command += ByteToHexString(green); + command += ByteToHexString(blue); + command += ';'; + _serialPort.WriteLine(command); + } + + public void TurnOffAllLeds() + { + string command = "a000000;"; + _serialPort.WriteLine(command); + } + + private static string ByteToHexString(byte b) + { + StringBuilder hex = new StringBuilder(2); + hex.AppendFormat("{0:x2}", b); + return hex.ToString(); + } + } +} diff --git a/RGBController2/Boards/IBoards.cs b/RGBController2/Boards/IBoards.cs new file mode 100644 index 0000000..a5a6a26 --- /dev/null +++ b/RGBController2/Boards/IBoards.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace RGBController2.Boards +{ + public interface IBoard + { + /// + /// Sets all of the LEDs to the chosen RGB colour. + /// + /// The red value + /// The green value + /// The blue value + public void SetAllLeds(byte red, byte green, byte blue) + { + throw new NotImplementedException(); + } + + /// + /// Turns off all of the LEDs connected to the board. + /// + public void TurnOffAllLeds() + { + throw new NotImplementedException(); + } + } +} diff --git a/RGBController2/Commands/ActionCommand.cs b/RGBController2/Commands/ActionCommand.cs new file mode 100644 index 0000000..fda9d97 --- /dev/null +++ b/RGBController2/Commands/ActionCommand.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Input; + +namespace RGBController2.Commands +{ + public class ActionCommand : ICommand + { + private readonly Action action; + private readonly Predicate predicate; + + /// + /// Initializes a new instance of the class. + /// + /// The action to invoke on command. + public ActionCommand(Action action) : this(action, null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// The action to invoke on command. + /// The predicate that determines if the action can be invoked. + public ActionCommand(Action action, Predicate predicate) + { + if (action == null) + { + throw new ArgumentNullException(nameof(action), @"You must specify an Action."); + } + + this.action = action; + this.predicate = predicate; + } + + /// + /// Occurs when the detects conditions that might change the ability of a command to execute. + /// + public event EventHandler CanExecuteChanged + { + add + { + CommandManager.RequerySuggested += value; + } + remove + { + CommandManager.RequerySuggested -= value; + } + } + + /// + /// Determines whether the command can execute. + /// + /// A custom parameter object. + /// + /// Returns true if the command can execute, otherwise returns false. + /// + public bool CanExecute(object parameter) + { + if (this.predicate == null) + { + return true; + } + return this.predicate(parameter); + } + + /// + /// Executes the command. + /// + public void Execute() + { + Execute(null); + } + + /// + /// Executes the command. + /// + /// A custom parameter object. + public void Execute(object parameter) + { + this.action(parameter); + } + } +} diff --git a/RGBController2/MainWindow.xaml b/RGBController2/MainWindow.xaml deleted file mode 100644 index 58fbc37..0000000 --- a/RGBController2/MainWindow.xaml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/RGBController2/MainWindow.xaml.cs b/RGBController2/MainWindow.xaml.cs deleted file mode 100644 index 62fa5aa..0000000 --- a/RGBController2/MainWindow.xaml.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 RGBController2 -{ - /// - /// Interaction logic for MainWindow.xaml - /// - public partial class MainWindow : Window - { - - public MainWindow() - { - InitializeComponent(); - } - - private void LightingModeSelection_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - int selectedLightingMode = lightingModeSelectionComboBox.SelectedIndex; - switch (selectedLightingMode) - { - case 0: // Static - LightingModeFrame.Source = new Uri("Static.xaml", UriKind.Relative); - break; - case 1: // Animation - LightingModeFrame.Source = new Uri("Animation.xaml", UriKind.Relative); - break; - } - } - } -} diff --git a/RGBController2/RGBController2.csproj b/RGBController2/RGBController2.csproj index a2aabd8..00a3e27 100644 --- a/RGBController2/RGBController2.csproj +++ b/RGBController2/RGBController2.csproj @@ -7,7 +7,14 @@ - + + + + + + + + \ No newline at end of file diff --git a/RGBController2/RGBController2.csproj.user b/RGBController2/RGBController2.csproj.user index 73dcb39..873fd18 100644 --- a/RGBController2/RGBController2.csproj.user +++ b/RGBController2/RGBController2.csproj.user @@ -7,21 +7,15 @@ - - Code - - + Code - + Designer - - Designer - - + Designer diff --git a/RGBController2/Static.xaml b/RGBController2/Static.xaml deleted file mode 100644 index 257ffc6..0000000 --- a/RGBController2/Static.xaml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - diff --git a/RGBController2/ViewModels/BaseViewModel.cs b/RGBController2/ViewModels/BaseViewModel.cs new file mode 100644 index 0000000..8b36747 --- /dev/null +++ b/RGBController2/ViewModels/BaseViewModel.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace RGBController2.ViewModels +{ + class BaseViewModel + { + } +} diff --git a/RGBController2/ViewModels/MainViewModel.cs b/RGBController2/ViewModels/MainViewModel.cs new file mode 100644 index 0000000..327527a --- /dev/null +++ b/RGBController2/ViewModels/MainViewModel.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Collections.Specialized; +using System.Text; +using System.Windows.Input; +using RGBController2.Commands; +using RGBController2.ViewModels.Tabs; + +namespace RGBController2.ViewModels +{ + class MainViewModel + { + private readonly ObservableCollection _tabs; + public ICommand NewTabCommand { get; } + public ICollection Tabs { get; } + + public MainViewModel() + { + NewTabCommand = new ActionCommand(p => NewTab()); + + _tabs = new ObservableCollection(); + _tabs.CollectionChanged += Tabs_CollectionChanged; + + Tabs = _tabs; + } + + private void Tabs_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) + { + ITab tab; + + switch (e.Action) + { + case NotifyCollectionChangedAction.Add: + tab = (ITab) e.NewItems[0]; + tab.CloseRequested += OnTabCloseRequested; + break; + case NotifyCollectionChangedAction.Remove: + tab = (ITab) e.OldItems[0]; + tab.CloseRequested -= OnTabCloseRequested; + break; + } + + } + + private void OnTabCloseRequested(object sender, EventArgs e) + { + Tabs.Remove((ITab) sender); + } + + private void NewTab() + { + Tabs.Add(new ArduinoTab(DateTime.UtcNow.ToString())); + } + } +} diff --git a/RGBController2/ViewModels/Tabs/ArduinoTab.cs b/RGBController2/ViewModels/Tabs/ArduinoTab.cs new file mode 100644 index 0000000..c5d9460 --- /dev/null +++ b/RGBController2/ViewModels/Tabs/ArduinoTab.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.IO.Ports; +using RGBController2.Boards; +using System.ComponentModel; + +namespace RGBController2.ViewModels.Tabs +{ + public class ArduinoTab : Tab, INotifyPropertyChanged + { + public event PropertyChangedEventHandler PropertyChanged; + private enum LightingModes + { + StaticMode = 0, + AnimationMode, + QuakeMode + } + + private ArduinoBoard _arduinoBoard; + + private string[] _availablePorts; + public string[] AvailablePorts + { + get { return _availablePorts; } + set { _availablePorts = value; } + } + + private string _conntectionStatus; + public string ConnectionStatus + { + get { return _conntectionStatus; } + set { _conntectionStatus = value; } + } + + private string _selectedPort; + public string SelectedPort + { + get { return _selectedPort; } + set + { + if (value != _selectedPort) + { + _selectedPort = value; + // Connect to the port here + _arduinoBoard = new ArduinoBoard(_selectedPort); + if (_arduinoBoard.Conected) + ConnectionStatus = "Device Connected"; + else + ConnectionStatus = "Device Disconnected"; + OnPropertyChanged(nameof(ConnectionStatus)); + } + } + } + + private LightingModes _lightingMode; + public int LightingMode + { + get { return (int)_lightingMode; } + set { _lightingMode = (LightingModes) value; } + } + + public ArduinoTab(string name) + { + Name = name; + ConnectionStatus = "Device Disconnected"; + _selectedPort = ""; + + // Get a list of the available com ports + string[] ports = SerialPort.GetPortNames(); + _availablePorts = ports; + } + + protected void OnPropertyChanged(string propertyName) + { + if (PropertyChanged != null) + { + PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } +} diff --git a/RGBController2/ViewModels/Tabs/ITab.cs b/RGBController2/ViewModels/Tabs/ITab.cs new file mode 100644 index 0000000..58e00fc --- /dev/null +++ b/RGBController2/ViewModels/Tabs/ITab.cs @@ -0,0 +1,12 @@ +using System; +using System.Windows.Input; + +namespace RGBController2 +{ + public interface ITab + { + string Name { get; set;} + ICommand CloseCommand { get; } + event EventHandler CloseRequested; + } +} diff --git a/RGBController2/ViewModels/Tabs/Tab.cs b/RGBController2/ViewModels/Tabs/Tab.cs new file mode 100644 index 0000000..f102afc --- /dev/null +++ b/RGBController2/ViewModels/Tabs/Tab.cs @@ -0,0 +1,18 @@ +using System; +using System.Windows.Input; +using RGBController2.Commands; + +namespace RGBController2.ViewModels.Tabs +{ + public abstract class Tab : ITab + { + public Tab() + { + CloseCommand = new ActionCommand(p => CloseRequested?.Invoke(this, EventArgs.Empty)); + } + + public string Name { get; set; } + public ICommand CloseCommand { get; } + public event EventHandler CloseRequested; + } +} diff --git a/RGBController2/ViewModels/Tabs/TabViewModel.cs b/RGBController2/ViewModels/Tabs/TabViewModel.cs new file mode 100644 index 0000000..6069f02 --- /dev/null +++ b/RGBController2/ViewModels/Tabs/TabViewModel.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace RGBController2.ViewModels.Tabs +{ + class TabViewModel : BaseViewModel + { + } +} diff --git a/RGBController2/Views/MainWindow.xaml b/RGBController2/Views/MainWindow.xaml new file mode 100644 index 0000000..2ea745e --- /dev/null +++ b/RGBController2/Views/MainWindow.xaml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + X + + + + + + diff --git a/RGBController2/Views/MainWindow.xaml.cs b/RGBController2/Views/MainWindow.xaml.cs new file mode 100644 index 0000000..28e6201 --- /dev/null +++ b/RGBController2/Views/MainWindow.xaml.cs @@ -0,0 +1,20 @@ +using RGBController2.ViewModels; +using System.Collections.ObjectModel; +using System.Windows; + +namespace RGBController2.Views +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + // This allows the biniding to be done to the MainViewModel.cs class rather than this one. + // Why? Something to do with MVVM & good practice? + DataContext = new MainViewModel(); + } + } +} diff --git a/RGBController2/Views/Tabs/ArduinoTabView.xaml b/RGBController2/Views/Tabs/ArduinoTabView.xaml new file mode 100644 index 0000000..366b5d6 --- /dev/null +++ b/RGBController2/Views/Tabs/ArduinoTabView.xaml @@ -0,0 +1,23 @@ + + + + diff --git a/RGBController2/Static.xaml.cs b/RGBController2/Views/Tabs/ArduinoTabView.xaml.cs similarity index 55% rename from RGBController2/Static.xaml.cs rename to RGBController2/Views/Tabs/ArduinoTabView.xaml.cs index dd6d382..0c474ac 100644 --- a/RGBController2/Static.xaml.cs +++ b/RGBController2/Views/Tabs/ArduinoTabView.xaml.cs @@ -1,4 +1,5 @@ -using System; +using RGBController2.ViewModels.Tabs; +using System; using System.Collections.Generic; using System.Text; using System.Windows; @@ -11,16 +12,18 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -namespace RGBController2 +namespace RGBController2.Views.Tabs { /// - /// Interaction logic for Static.xaml + /// Interaction logic for ArduinoTabView.xaml /// - public partial class Static : Page + public partial class ArduinoTabView : UserControl { - public Static() + public ArduinoTabView() { - //InitializeComponent(); + InitializeComponent(); + + //DataContext = new ArduinoTab(); } } } diff --git a/RGBController2/obj/Debug/netcoreapp3.1/Animation.g.i.cs b/RGBController2/obj/Debug/netcoreapp3.1/Animation.g.i.cs index 2818c5d..43ade4f 100644 --- a/RGBController2/obj/Debug/netcoreapp3.1/Animation.g.i.cs +++ b/RGBController2/obj/Debug/netcoreapp3.1/Animation.g.i.cs @@ -53,7 +53,7 @@ namespace RGBController2.LightingModes { return; } _contentLoaded = true; - System.Uri resourceLocater = new System.Uri("/RGBController2;V1.0.0.0;component/animation.xaml", System.UriKind.Relative); + System.Uri resourceLocater = new System.Uri("/RGBController2;component/animation.xaml", System.UriKind.Relative); #line 1 "..\..\..\Animation.xaml" System.Windows.Application.LoadComponent(this, resourceLocater); diff --git a/RGBController2/obj/Debug/netcoreapp3.1/App.g.i.cs b/RGBController2/obj/Debug/netcoreapp3.1/App.g.i.cs index e85edcf..54d6e7c 100644 --- a/RGBController2/obj/Debug/netcoreapp3.1/App.g.i.cs +++ b/RGBController2/obj/Debug/netcoreapp3.1/App.g.i.cs @@ -1,4 +1,4 @@ -#pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "4306F17E8B0931D193E40C26765AEFFAC55CAA9D" +#pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "3EE2700C6B6204B7E9DA83258C64087CDEFFF848" //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -49,7 +49,7 @@ namespace RGBController2 { public void InitializeComponent() { #line 5 "..\..\..\App.xaml" - this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative); + this.StartupUri = new System.Uri("Views/MainWindow.xaml", System.UriKind.Relative); #line default #line hidden diff --git a/RGBController2/obj/Debug/netcoreapp3.1/MainWindow.g.i.cs b/RGBController2/obj/Debug/netcoreapp3.1/MainWindow.g.i.cs index 216f002..c6eef68 100644 --- a/RGBController2/obj/Debug/netcoreapp3.1/MainWindow.g.i.cs +++ b/RGBController2/obj/Debug/netcoreapp3.1/MainWindow.g.i.cs @@ -1,4 +1,4 @@ -#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "C8A797FD0FC9A2445483480306853F65E8FCAC1C" +#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "96DAE66E5A8430D5F07CBFB48E6D558881C308C8" //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -10,6 +10,9 @@ //------------------------------------------------------------------------------ using RGBController2; +using RGBController2.ViewModels; +using RGBController2.ViewModels.Tabs; +using RGBController2.Views.Tabs; using System; using System.Diagnostics; using System.Windows; @@ -42,17 +45,9 @@ namespace RGBController2 { public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { - #line 29 "..\..\..\MainWindow.xaml" + #line 31 "..\..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.ComboBox lightingModeSelectionComboBox; - - #line default - #line hidden - - - #line 38 "..\..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Frame LightingModeFrame; + internal System.Windows.Controls.TabControl tabcontrol; #line default #line hidden @@ -69,7 +64,7 @@ namespace RGBController2 { return; } _contentLoaded = true; - System.Uri resourceLocater = new System.Uri("/RGBController2;V1.0.0.0;component/mainwindow.xaml", System.UriKind.Relative); + System.Uri resourceLocater = new System.Uri("/RGBController2;component/mainwindow.xaml", System.UriKind.Relative); #line 1 "..\..\..\MainWindow.xaml" System.Windows.Application.LoadComponent(this, resourceLocater); @@ -88,16 +83,7 @@ namespace RGBController2 { switch (connectionId) { case 1: - this.lightingModeSelectionComboBox = ((System.Windows.Controls.ComboBox)(target)); - - #line 29 "..\..\..\MainWindow.xaml" - this.lightingModeSelectionComboBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.LightingModeSelection_SelectionChanged); - - #line default - #line hidden - return; - case 2: - this.LightingModeFrame = ((System.Windows.Controls.Frame)(target)); + this.tabcontrol = ((System.Windows.Controls.TabControl)(target)); return; } this._contentLoaded = true; diff --git a/RGBController2/obj/Debug/netcoreapp3.1/RGBController2.assets.cache b/RGBController2/obj/Debug/netcoreapp3.1/RGBController2.assets.cache index 21d19f030806c3f01b6cf61fdb7f68a1afc21e50..f951d3fa3662487c535598ad070758b38abda995 100644 GIT binary patch literal 6577 zcmb_gTT>iG6ea>ezz`Fn!Gr`z0$!QrvLP`h3IYg?`xpL6>A`kd}QJ=>pbtPJ(^^c*bD zu@1Y{=M;XwUcF;~5wak(SAEY9 zY|CrzvB+*Xm2aIr7TRGej9A@reXHRIQD~Q~Th^Q%uwC0@Q5ZR1)d{K#XxfPtH$S(w zNztm-YW>PMFW`SKqz^*vry(@{0EF804{^EtnOh0`(BF-$t@Veie!#5lniK8%K|Lh> zu}=S2uD7^gJz#ro7zHiroC}&>kgiU;wH`LB&V2sN#DW&-!XG;X4Pt{hS#M<3$*XKs)U~ zSK>gYPpcmNL;0a%Kd)gQ<=Ck`Yi=)~|4EnF8!`ov9h8E_@h7rZ>$?vYM~@&~AF}fo({gtQ@DjppTy8V`wXqq zt#YVUTiAI-el7r&%5D+Q#E#mt*p<;w>~2Dc-4f)RoYj|uzP-3i+sIC`ycF>D1N9bQ z5PWJ^;p+$fZS)iTcOeA-4&?Fi;A8TS3I08RC<6X2^a%Vt2!Veea!l|k8+aEp{{cW0 z0ly4A0zU~M@U(CLn71r==4943@^DqSRB&%_8V%)+Vy=U!Mi42b*EuTyNW}8$oDZQx z#8x4K*zesEODlXNIkj?-?B>NeB-t6OAi+?tg4TeT80J+$>(C*FA3=yARS>_OI73tT zj!AF>K#LH(4?QBd2@xU0-}dKYe2;83H(0bC-;Xz|`h9Cu?fw$?YS;Jr+n44u+fMX& z)8m#ixI&i>U!hBel{U=Px12f~;s3eU)Z1?fTf6Q$tEe1Y2}2e=Y&F;bPqD#OztQ^C zuQ;{7C}^_tYb=ahs&;&Dr}>C@jAuEVF#s@d8#T0LUscQLj%C&-?k$wMUNxWHQc+;}$ zvY?OP-xY=>tm1CDNMl>s0@T+`S$Q`pMou&Cg;VWaP5yhKMd1}(c;#P;EC0lTm6iYL zSV5Y0acQ_DhD+KEN&rWAPjyrH?a){%=Ms@t9W({X=5aBW$!b`#SSoA5FqHDz9wBFx zvw%e|2Wi966e;}mC@3~O3M$r=N?pTV7PC^~`Z>tkHM%siyD03(#7Mf)0Cyt88c!p> z6DNiSo;EXS6;C9-6EEltR@Wq$)Z)Is-6P{f^HUI#v>~Pi0d=;C6q{bOOUG%un1QLZ zN!x!6Hp^mm)Ny1{Hz&3jd441gFX=!XwBsOA6($@^2m~n()#dU>VksU8Zsr_{;zR-lZKL diff --git a/RGBController2/obj/Debug/netcoreapp3.1/RGBController2.csproj.FileListAbsolute.txt b/RGBController2/obj/Debug/netcoreapp3.1/RGBController2.csproj.FileListAbsolute.txt index e69de29..d10ec7b 100644 --- a/RGBController2/obj/Debug/netcoreapp3.1/RGBController2.csproj.FileListAbsolute.txt +++ b/RGBController2/obj/Debug/netcoreapp3.1/RGBController2.csproj.FileListAbsolute.txt @@ -0,0 +1,31 @@ +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\bin\Debug\netcoreapp3.1\RGBController2.exe +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\bin\Debug\netcoreapp3.1\RGBController2.deps.json +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\bin\Debug\netcoreapp3.1\RGBController2.runtimeconfig.json +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\bin\Debug\netcoreapp3.1\RGBController2.runtimeconfig.dev.json +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\bin\Debug\netcoreapp3.1\RGBController2.dll +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\bin\Debug\netcoreapp3.1\RGBController2.pdb +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\obj\Debug\netcoreapp3.1\RGBController2.csprojAssemblyReference.cache +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\obj\Debug\netcoreapp3.1\App.g.cs +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\obj\Debug\netcoreapp3.1\RGBController2_MarkupCompile.cache +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\obj\Debug\netcoreapp3.1\RGBController2_MarkupCompile.lref +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\obj\Debug\netcoreapp3.1\RGBController2.g.resources +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\obj\Debug\netcoreapp3.1\RGBController2.AssemblyInfoInputs.cache +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\obj\Debug\netcoreapp3.1\RGBController2.AssemblyInfo.cs +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\obj\Debug\netcoreapp3.1\RGBController2.dll +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\obj\Debug\netcoreapp3.1\RGBController2.pdb +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\obj\Debug\netcoreapp3.1\RGBController2.genruntimeconfig.cache +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\obj\Debug\netcoreapp3.1\GeneratedInternalTypeHelper.g.cs +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\obj\Debug\netcoreapp3.1\Views\Tabs\ArduinoTabView.g.cs +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\obj\Debug\netcoreapp3.1\Views\Tabs\ArduinoTabView.baml +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\bin\Debug\netcoreapp3.1\System.IO.Ports.dll +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\bin\Debug\netcoreapp3.1\runtimes\linux-arm\native\System.IO.Ports.Native.so +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\bin\Debug\netcoreapp3.1\runtimes\linux-arm64\native\System.IO.Ports.Native.so +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\bin\Debug\netcoreapp3.1\runtimes\linux-x64\native\System.IO.Ports.Native.so +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\bin\Debug\netcoreapp3.1\runtimes\osx-x64\native\System.IO.Ports.Native.dylib +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\bin\Debug\netcoreapp3.1\runtimes\linux\lib\netstandard2.0\System.IO.Ports.dll +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\bin\Debug\netcoreapp3.1\runtimes\osx\lib\netstandard2.0\System.IO.Ports.dll +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\bin\Debug\netcoreapp3.1\runtimes\win\lib\netstandard2.0\System.IO.Ports.dll +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\obj\Debug\netcoreapp3.1\RGBController2.csproj.CoreCompileInputs.cache +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\obj\Debug\netcoreapp3.1\RGBController2.csproj.CopyComplete +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\obj\Debug\netcoreapp3.1\Views\MainWindow.g.cs +C:\Users\Conor\Desktop\RGB Contorller Tabs Test\RGBController\RGBController2\obj\Debug\netcoreapp3.1\Views\MainWindow.baml diff --git a/RGBController2/obj/Debug/netcoreapp3.1/RGBController2.csprojAssemblyReference.cache b/RGBController2/obj/Debug/netcoreapp3.1/RGBController2.csprojAssemblyReference.cache index f0f9f49ebd980260c4991d27577787352fde2ec3..b28608e5755fc0ecbd342db4d8a2e903807aa10d 100644 GIT binary patch delta 14 VcmZ3%yn=ayKO@r;;mLuF;Q%7?1WW(` delta 14 VcmZ3%yn=ayKO<8c= 4.7.0" + ] }, "packageFolders": { "C:\\Users\\Conor\\.nuget\\packages\\": {} @@ -13,11 +436,11 @@ "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\Conor\\source\\repos\\RGBController2\\RGBController2\\RGBController2.csproj", + "projectUniqueName": "C:\\Users\\Conor\\Desktop\\RGB Contorller Tabs Test\\RGBController\\RGBController2\\RGBController2.csproj", "projectName": "RGBController2", - "projectPath": "C:\\Users\\Conor\\source\\repos\\RGBController2\\RGBController2\\RGBController2.csproj", + "projectPath": "C:\\Users\\Conor\\Desktop\\RGB Contorller Tabs Test\\RGBController\\RGBController2\\RGBController2.csproj", "packagesPath": "C:\\Users\\Conor\\.nuget\\packages\\", - "outputPath": "C:\\Users\\Conor\\source\\repos\\RGBController2\\RGBController2\\obj\\", + "outputPath": "C:\\Users\\Conor\\Desktop\\RGB Contorller Tabs Test\\RGBController\\RGBController2\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\Conor\\AppData\\Roaming\\NuGet\\NuGet.Config", @@ -43,6 +466,12 @@ }, "frameworks": { "netcoreapp3.1": { + "dependencies": { + "System.IO.Ports": { + "target": "Package", + "version": "[4.7.0, )" + } + }, "imports": [ "net461", "net462",