diff --git a/Assets/Consoles.psd b/Assets/Consoles.psd new file mode 100644 index 0000000..a783039 Binary files /dev/null and b/Assets/Consoles.psd differ diff --git a/Assets/Neighborhood/Consoles/Fat.png b/Assets/Neighborhood/Consoles/Fat.png new file mode 100644 index 0000000..92731a1 Binary files /dev/null and b/Assets/Neighborhood/Consoles/Fat.png differ diff --git a/Assets/Neighborhood/Consoles/Pro.png b/Assets/Neighborhood/Consoles/Pro.png new file mode 100644 index 0000000..27c7cdc Binary files /dev/null and b/Assets/Neighborhood/Consoles/Pro.png differ diff --git a/Assets/Neighborhood/Consoles/Slim.png b/Assets/Neighborhood/Consoles/Slim.png new file mode 100644 index 0000000..3921fdf Binary files /dev/null and b/Assets/Neighborhood/Consoles/Slim.png differ diff --git a/Windows/OrbisNeighborHood/Controls/NewTargetView.xaml b/Windows/OrbisNeighborHood/Controls/NewTargetView.xaml new file mode 100644 index 0000000..2b953f6 --- /dev/null +++ b/Windows/OrbisNeighborHood/Controls/NewTargetView.xaml @@ -0,0 +1,30 @@ + + + + + + + + + + + + diff --git a/Windows/OrbisNeighborHood/Controls/NewTargetView.xaml.cs b/Windows/OrbisNeighborHood/Controls/NewTargetView.xaml.cs new file mode 100644 index 0000000..3c05894 --- /dev/null +++ b/Windows/OrbisNeighborHood/Controls/NewTargetView.xaml.cs @@ -0,0 +1,28 @@ +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 OrbisNeighborHood.Controls +{ + /// + /// Interaction logic for NewTargetView.xaml + /// + public partial class NewTargetView : UserControl + { + public NewTargetView() + { + InitializeComponent(); + } + } +} diff --git a/Windows/OrbisNeighborHood/Controls/TargetView.xaml b/Windows/OrbisNeighborHood/Controls/TargetView.xaml new file mode 100644 index 0000000..f20519b --- /dev/null +++ b/Windows/OrbisNeighborHood/Controls/TargetView.xaml @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Windows/OrbisNeighborHood/Controls/TargetView.xaml.cs b/Windows/OrbisNeighborHood/Controls/TargetView.xaml.cs new file mode 100644 index 0000000..b96ea70 --- /dev/null +++ b/Windows/OrbisNeighborHood/Controls/TargetView.xaml.cs @@ -0,0 +1,182 @@ +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 OrbisNeighborHood.Controls +{ + /// + /// Interaction logic for TargetView.xaml + /// + public partial class TargetView : UserControl + { + public TargetView() + { + InitializeComponent(); + } + + private enum TargetStatusType + { + Offline, + Online, + APIAvailable + }; + + // Target Info + public int TargetStatus + { + get { return (int)GetValue(TargetStatusProperty); } + set + { + SetValue(TargetStatusProperty, value); + switch (value) + { + case (int)TargetStatusType.Offline: + TargetStatusElement.Fill = new SolidColorBrush(Color.FromRgb(255, 0, 0)); + TargetStatusElement.ToolTip = "Offline"; + break; + + case (int)TargetStatusType.Online: + TargetStatusElement.Fill = new SolidColorBrush(Color.FromRgb(255, 140, 0)); + TargetStatusElement.ToolTip = "Online"; + break; + + case (int)TargetStatusType.APIAvailable: + TargetStatusElement.Fill = new SolidColorBrush(Color.FromRgb(0, 128, 0)); + TargetStatusElement.ToolTip = "Online & API Available"; + break; + + default: + TargetStatusElement.Fill = new SolidColorBrush(Color.FromRgb(255, 0, 0)); + TargetStatusElement.ToolTip = "Unknown"; + break; + } + } + } + + public static readonly DependencyProperty TargetStatusProperty = + DependencyProperty.Register("TargetStatus", typeof(int), typeof(TargetView), new PropertyMetadata(0)); + + public string TargetName + { + get { return (string)GetValue(TargetNameProperty); } + set { SetValue(TargetNameProperty, value); } + } + + public static readonly DependencyProperty TargetNameProperty = + DependencyProperty.Register("TargetName", typeof(string), typeof(TargetView), new PropertyMetadata(string.Empty)); + + public bool IsDefault + { + get { return (bool)GetValue(IsDefaultProperty); } + set + { + SetValue(IsDefaultProperty, value); + if (value) + DefaultTargetElement.Source = new BitmapImage(new Uri("pack://application:,,,/OrbisNeighborHood;component/Images/Default.ico")); + else + DefaultTargetElement.Source = new BitmapImage(new Uri("pack://application:,,,/OrbisNeighborHood;component/Images/NotDefault.ico")); + } + } + + public static readonly DependencyProperty IsDefaultProperty = + DependencyProperty.Register("IsDefault", typeof(bool), typeof(TargetView), new PropertyMetadata(false)); + + + // Info Field + private enum ConsoleModelType + { + Fat, + Slim, + Pro + }; + + public int ConsoleModel + { + get { return (int)GetValue(ConsoleModelProperty); } + set + { + SetValue(ConsoleModelProperty, value); + switch (value) + { + case (int)ConsoleModelType.Fat: + ConsoleImageElement.Source = new BitmapImage(new Uri("pack://application:,,,/OrbisNeighborHood;component/Images/Consoles/Fat.png")); + break; + + case (int)ConsoleModelType.Slim: + ConsoleImageElement.Source = new BitmapImage(new Uri("pack://application:,,,/OrbisNeighborHood;component/Images/Consoles/Slim.png")); + break; + + case (int)ConsoleModelType.Pro: + ConsoleImageElement.Source = new BitmapImage(new Uri("pack://application:,,,/OrbisNeighborHood;component/Images/Consoles/Pro.png")); + break; + + default: + ConsoleImageElement.Source = new BitmapImage(new Uri("pack://application:,,,/OrbisNeighborHood;component/Images/Consoles/Fat.png")); + break; + } + } + } + + public static readonly DependencyProperty ConsoleModelProperty = + DependencyProperty.Register("ConsoleModel", typeof(int), typeof(TargetView), new PropertyMetadata(0)); + + public string FirmwareVersion + { + get { return (string)GetValue(FirmwareVersionProperty); } + set + { + SetValue(FirmwareVersionProperty, value); + } + } + + public static readonly DependencyProperty FirmwareVersionProperty = + DependencyProperty.Register("FirmwareVersion", typeof(string), typeof(TargetView), new PropertyMetadata(string.Empty)); + + public string SDKVersion + { + get { return (string)GetValue(SDKVersionProperty); } + set { SetValue(SDKVersionProperty, value); } + } + + public static readonly DependencyProperty SDKVersionProperty = + DependencyProperty.Register("SDKVersion", typeof(string), typeof(TargetView), new PropertyMetadata(string.Empty)); + + public string IPAddress + { + get { return (string)GetValue(IPAddressProperty); } + set { SetValue(IPAddressProperty, value); } + } + + public static readonly DependencyProperty IPAddressProperty = + DependencyProperty.Register("IPAddress", typeof(string), typeof(TargetView), new PropertyMetadata(string.Empty)); + + public string ConsoleName + { + get { return (string)GetValue(ConsoleNameProperty); } + set { SetValue(ConsoleNameProperty, value); } + } + + public static readonly DependencyProperty ConsoleNameProperty = + DependencyProperty.Register("ConsoleName", typeof(string), typeof(TargetView), new PropertyMetadata(string.Empty)); + + public string ConsoleType + { + get { return (string)GetValue(ConsoleTypeProperty); } + set { SetValue(ConsoleTypeProperty, value); } + } + + public static readonly DependencyProperty ConsoleTypeProperty = + DependencyProperty.Register("ConsoleType", typeof(string), typeof(TargetView), new PropertyMetadata(string.Empty)); + } +} diff --git a/Windows/OrbisNeighborHood/Images/Consoles/Fat.png b/Windows/OrbisNeighborHood/Images/Consoles/Fat.png new file mode 100644 index 0000000..92731a1 Binary files /dev/null and b/Windows/OrbisNeighborHood/Images/Consoles/Fat.png differ diff --git a/Windows/OrbisNeighborHood/Images/Consoles/Pro.png b/Windows/OrbisNeighborHood/Images/Consoles/Pro.png new file mode 100644 index 0000000..27c7cdc Binary files /dev/null and b/Windows/OrbisNeighborHood/Images/Consoles/Pro.png differ diff --git a/Windows/OrbisNeighborHood/Images/Consoles/Slim.png b/Windows/OrbisNeighborHood/Images/Consoles/Slim.png new file mode 100644 index 0000000..3921fdf Binary files /dev/null and b/Windows/OrbisNeighborHood/Images/Consoles/Slim.png differ diff --git a/Windows/OrbisNeighborHood/Images/Default.ico b/Windows/OrbisNeighborHood/Images/Default.ico new file mode 100644 index 0000000..03cf147 Binary files /dev/null and b/Windows/OrbisNeighborHood/Images/Default.ico differ diff --git a/Windows/OrbisNeighborHood/Images/Locate.png b/Windows/OrbisNeighborHood/Images/Locate.png new file mode 100644 index 0000000..7257562 Binary files /dev/null and b/Windows/OrbisNeighborHood/Images/Locate.png differ diff --git a/Windows/OrbisNeighborHood/Images/NotDefault.ico b/Windows/OrbisNeighborHood/Images/NotDefault.ico new file mode 100644 index 0000000..78add61 Binary files /dev/null and b/Windows/OrbisNeighborHood/Images/NotDefault.ico differ diff --git a/Windows/OrbisNeighborHood/Images/Plus.png b/Windows/OrbisNeighborHood/Images/Plus.png new file mode 100644 index 0000000..106faf6 Binary files /dev/null and b/Windows/OrbisNeighborHood/Images/Plus.png differ diff --git a/Windows/OrbisNeighborHood/Images/RestMode.png b/Windows/OrbisNeighborHood/Images/RestMode.png new file mode 100644 index 0000000..c0d42be Binary files /dev/null and b/Windows/OrbisNeighborHood/Images/RestMode.png differ diff --git a/Windows/OrbisNeighborHood/Images/Restart.png b/Windows/OrbisNeighborHood/Images/Restart.png new file mode 100644 index 0000000..44fb5d3 Binary files /dev/null and b/Windows/OrbisNeighborHood/Images/Restart.png differ diff --git a/Windows/OrbisNeighborHood/Images/Send.png b/Windows/OrbisNeighborHood/Images/Send.png new file mode 100644 index 0000000..2272ca5 Binary files /dev/null and b/Windows/OrbisNeighborHood/Images/Send.png differ diff --git a/Windows/OrbisNeighborHood/Images/Shutdown.png b/Windows/OrbisNeighborHood/Images/Shutdown.png new file mode 100644 index 0000000..bf3aae0 Binary files /dev/null and b/Windows/OrbisNeighborHood/Images/Shutdown.png differ diff --git a/Windows/OrbisNeighborHood/MVVM/View/TargetView.xaml b/Windows/OrbisNeighborHood/MVVM/View/TargetView.xaml index a6fe394..d180c5b 100644 --- a/Windows/OrbisNeighborHood/MVVM/View/TargetView.xaml +++ b/Windows/OrbisNeighborHood/MVVM/View/TargetView.xaml @@ -4,9 +4,77 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:OrbisNeighborHood.MVVM.View" + xmlns:controls="clr-namespace:OrbisNeighborHood.Controls" mc:Ignorable="d" - d:DesignHeight="450" d:DesignWidth="800"> - - - + d:DesignHeight="585" d:DesignWidth="700"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Windows/OrbisNeighborHood/MVVM/View/TargetView.xaml.cs b/Windows/OrbisNeighborHood/MVVM/View/TargetView.xaml.cs index 17cbf64..a3eea5f 100644 --- a/Windows/OrbisNeighborHood/MVVM/View/TargetView.xaml.cs +++ b/Windows/OrbisNeighborHood/MVVM/View/TargetView.xaml.cs @@ -23,6 +23,19 @@ namespace OrbisNeighborHood.MVVM.View public TargetView() { InitializeComponent(); + + Target1.TargetStatus = 2; + Target1.IsDefault = true; + Target1.ConsoleModel = 0; + + Target2.TargetStatus = 0; + Target2.IsDefault = false; + Target2.ConsoleModel = 2; + + Target3.TargetStatus = 1; + Target3.IsDefault = false; + Target3.ConsoleModel = 1; + } } } diff --git a/Windows/OrbisNeighborHood/NeighborHood.xaml b/Windows/OrbisNeighborHood/NeighborHood.xaml index 8beab80..6f8870b 100644 --- a/Windows/OrbisNeighborHood/NeighborHood.xaml +++ b/Windows/OrbisNeighborHood/NeighborHood.xaml @@ -124,7 +124,7 @@ - @@ -139,10 +139,10 @@ Height="1" Fill="#515151"/> - + --> - @@ -162,7 +162,7 @@ Height="26" Width="110" Content="Set Default Target"/> - + --> net6.0-windows enable true + OrbisNeighborhood.ico + + + + @@ -15,6 +20,17 @@ + + + + + + + + + + + @@ -27,6 +43,18 @@ + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + PreserveNewest @@ -48,6 +76,27 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + diff --git a/Windows/OrbisNeighborHood/OrbisNeighborhood.ico b/Windows/OrbisNeighborHood/OrbisNeighborhood.ico new file mode 100644 index 0000000..820c3ca Binary files /dev/null and b/Windows/OrbisNeighborHood/OrbisNeighborhood.ico differ