diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-03-14 10:34:23 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-03-14 10:34:23 +0200 |
| commit | 9d04bbb2b4a2eb2eb14cc813103c856b7bde975a (patch) | |
| tree | 093b1cdcd808e600f44fd8ccd5465978c572822e /Software/Visual_Studio/MachineStudio | |
| parent | 5652ed578179a7221b443d11855d555dc6ae05cd (diff) | |
| parent | 37b740c1d128d694b9dcbc3669808435b5d88fec (diff) | |
| download | Tango-9d04bbb2b4a2eb2eb14cc813103c856b7bde975a.tar.gz Tango-9d04bbb2b4a2eb2eb14cc813103c856b7bde975a.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio')
89 files changed, 4035 insertions, 344 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ColorLabModule.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ColorLabModule.cs index 41cd13cc4..3e63051ee 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ColorLabModule.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ColorLabModule.cs @@ -50,7 +50,7 @@ namespace Tango.MachineStudio.ColorLab { get { - return Permissions.RunDeveloperModule; + return Permissions.RunColorLabModule; } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj index 91bc51933..5a53e77a0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj @@ -25,7 +25,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> + <OutputPath>..\..\..\Build\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> @@ -89,6 +89,7 @@ <Compile Include="ViewModels\CalibrationDataVM.cs" /> <Compile Include="ViewModels\LiquidVolumeVM.cs" /> <Compile Include="ViewModels\MainViewVM.cs" /> + <Compile Include="ViewModels\RgbVM.cs" /> <Compile Include="Views\MainView.xaml.cs"> <DependentUpon>MainView.xaml</DependentUpon> </Compile> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/CalibrationDataVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/CalibrationDataVM.cs index 1bcb29835..87bbacab5 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/CalibrationDataVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/CalibrationDataVM.cs @@ -4,6 +4,7 @@ using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; +using Tango.BL.Entities; using Tango.SharedUI; namespace Tango.MachineStudio.ColorLab.ViewModels @@ -26,6 +27,14 @@ namespace Tango.MachineStudio.ColorLab.ViewModels set { _color = value; RaisePropertyChangedAuto(); } } + private IdsPack _idsPack; + + public IdsPack IdsPack + { + get { return _idsPack; } + set { _idsPack = value; RaisePropertyChangedAuto(); } + } + private ObservableCollection<CalibrationDataPointVM> _calibrationPoints; public ObservableCollection<CalibrationDataPointVM> CalibrationPoints diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/LiquidVolumeVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/LiquidVolumeVM.cs index a804d628b..a9d46f142 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/LiquidVolumeVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/LiquidVolumeVM.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using Tango.BL.Entities; using Tango.SharedUI; namespace Tango.MachineStudio.ColorLab.ViewModels @@ -32,5 +33,13 @@ namespace Tango.MachineStudio.ColorLab.ViewModels get { return _color; } set { _color = value; RaisePropertyChangedAuto(); } } + + private IdsPack _idsPack; + + public IdsPack IdsPack + { + get { return _idsPack; } + set { _idsPack = value; RaisePropertyChangedAuto(); } + } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs index 8260f000a..e09b57e11 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs @@ -1,19 +1,33 @@ -using System; +using Google.Protobuf; +using Microsoft.Win32; +using System; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.IO; using System.Linq; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; +using System.Windows.Media; using Tango.BL; using Tango.BL.Entities; +using Tango.Core.Commands; +using Tango.MachineStudio.Common.Controls; +using Tango.PMR; +using Tango.PMR.ColorLab; using Tango.SharedUI; +using Tango.SharedUI.Controls; namespace Tango.MachineStudio.ColorLab.ViewModels { public class MainViewVM : ViewModel { + [DllImport("Tango.ColorLib.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "Convert")] + public static extern int GetColorAdjust(IntPtr data, int size, ref IntPtr output); + private ObservablesContext _dbContext; + private HiveComboControl _hiveCombo; #region Properties @@ -27,11 +41,11 @@ namespace Tango.MachineStudio.ColorLab.ViewModels set { _machines = value; RaisePropertyChangedAuto(); } } - private ObservableCollection<ColorSpace> _colorSpaces; + private ObservableCollection<BL.Entities.ColorSpace> _colorSpaces; /// <summary> /// Gets or sets the color spaces. /// </summary> - public ObservableCollection<ColorSpace> ColorSpaces + public ObservableCollection<BL.Entities.ColorSpace> ColorSpaces { get { return _colorSpaces; } set { _colorSpaces = value; RaisePropertyChangedAuto(); } @@ -57,6 +71,7 @@ namespace Tango.MachineStudio.ColorLab.ViewModels set { _selectedMachine = value; RaisePropertyChangedAuto(); + OnSelectedMachineChanged(); } } @@ -70,7 +85,7 @@ namespace Tango.MachineStudio.ColorLab.ViewModels set { _selectedRML = value; - InvalidateLiquidFactorsAndProcessTables(); + InvalidateLiquidFactorsCalibrationData(); RaisePropertyChangedAuto(); } } @@ -86,7 +101,9 @@ namespace Tango.MachineStudio.ColorLab.ViewModels } private ObservableCollection<LiquidVolumeVM> _liquidVolumes; - + /// <summary> + /// Gets or sets the liquid volumes. + /// </summary> public ObservableCollection<LiquidVolumeVM> LiquidVolumes { get { return _liquidVolumes; } @@ -94,43 +111,220 @@ namespace Tango.MachineStudio.ColorLab.ViewModels } private ObservableCollection<CalibrationDataVM> _liquidsCalibrationData; - + /// <summary> + /// Gets or sets the liquids calibration data. + /// </summary> public ObservableCollection<CalibrationDataVM> LiquidsCalibrationData { get { return _liquidsCalibrationData; } set { _liquidsCalibrationData = value; RaisePropertyChangedAuto(); } } + private RgbVM _sourceColor; + /// <summary> + /// Gets or sets the color of the source. + /// </summary> + public RgbVM SourceColor + { + get { return _sourceColor; } + set { _sourceColor = value; RaisePropertyChangedAuto(); } + } + + private HexagonControl _selectedHexagon; + /// <summary> + /// Gets or sets the selected hexagon. + /// </summary> + public HexagonControl SelectedHexagon + { + get { return _selectedHexagon; } + set { _selectedHexagon = value; RaisePropertyChangedAuto(); } + } + + private Cct _cct; + /// <summary> + /// Gets or sets the CCT. + /// </summary> + public Cct CCT + { + get { return _cct; } + set { _cct = value; RaisePropertyChangedAuto(); } + } + + private int _deltaChroma; + /// <summary> + /// Gets or sets the delta chroma. + /// </summary> + public int DeltaChroma + { + get { return _deltaChroma; } + set { _deltaChroma = value; RaisePropertyChangedAuto(); } + } + + private int _deltaL; + /// <summary> + /// Gets or sets the delta l. + /// </summary> + public int DeltaL + { + get { return _deltaL; } + set { _deltaL = value; RaisePropertyChangedAuto(); } + } + + + #endregion + + #region Commands + + public RelayCommand ImportForwardDataCommand { get; set; } + + public RelayCommand ImportInverseDataCommand { get; set; } + #endregion public MainViewVM() : base() { _dbContext = ObservablesContext.CreateDefault(); + CCT = new Cct(); + + SourceColor = new RgbVM(); + SourceColor.ColorChanged += SourceColor_ColorChanged; Machines = _dbContext.Machines.ToObservableCollection(); ColorSpaces = _dbContext.ColorSpaces.ToObservableCollection(); Rmls = _dbContext.Rmls.ToObservableCollection(); + + ImportForwardDataCommand = new RelayCommand(ImportForwardData, () => SelectedRML != null); + ImportInverseDataCommand = new RelayCommand(ImportInverseData, () => SelectedRML != null); + } + + private void SourceColor_ColorChanged(object sender, Color color) + { + if (_hiveCombo != null) + { + GetHiveSuggestions(); + _hiveCombo.GenerateDemoModeHiveColors(color); + _hiveCombo.SelectHeagon(_hiveCombo.CenterHexagon); + } + } + + public void PutComboHiveControl(HiveComboControl hiveCombo) + { + _hiveCombo = hiveCombo; + } + + #region ColorLab + + private void GetHiveSuggestions() + { + ConversionInput input = new ConversionInput(); + input.ColorSpace = PMR.ColorLab.ColorSpace.Rgb; + input.DeltaChroma = DeltaChroma; + input.DeltaL = DeltaL; + input.ForwardData = ByteString.CopyFrom(CCT.ForwardData); + input.InverseData = ByteString.CopyFrom(CCT.InverseData); + input.InputCoordinates.Red = (int)SourceColor.Red; + input.InputCoordinates.Green = (int)SourceColor.Green; + input.InputCoordinates.Blue = (int)SourceColor.Blue; + input.ThreadL = SelectedRML.MediaColor.L; + input.ThreadA = SelectedRML.MediaColor.A; + input.ThreadB = SelectedRML.MediaColor.B; + + foreach (var vm in LiquidsCalibrationData) + { + InputLiquid inputLiquid = new InputLiquid(); + + CalibrationData calData = new CalibrationData(); + calData.LiquidType = (PMR.ColorLab.LiquidType)vm.IdsPack.LiquidType.Code; + calData.CalibrationPoints.AddRange(vm.CalibrationPoints.Select(x => new CalibrationPoint() { X = x.X, Y = x.Y })); + inputLiquid.CalibrationData = calData; + + inputLiquid.LiquidType = (PMR.ColorLab.LiquidType)vm.IdsPack.LiquidType.Code; + inputLiquid.MaxNanoliterPerCentimeter = LiquidTypesRmls.SingleOrDefault(x => x.LiquidType.Code == vm.IdsPack.LiquidType.Code).MaxNlPerCm; + + input.InputCoordinates.InputLiquids.Add(inputLiquid); + } + + NativePMR<ConversionInput, ConversionOutput> nativePMR = new NativePMR<ConversionInput, ConversionOutput>(GetColorAdjust); + ConversionOutput output = nativePMR.Invoke(input); + + //Fill Hive ! + } + + #endregion + + #region Import / Export Color Adjustment Data + + private void ImportForwardData() + { + String file = GetCCTFile(); + if (file != null) + { + CCT.ForwardFileName = Path.GetFileName(file); + CCT.ForwardData = File.ReadAllBytes(file); + } } + private void ImportInverseData() + { + String file = GetCCTFile(); + if (file != null) + { + CCT.InverseFileName = Path.GetFileName(file); + CCT.InverseData = File.ReadAllBytes(file); + } + } + + private String GetCCTFile() + { + OpenFileDialog dlg = new OpenFileDialog(); + dlg.Title = "Select color adjustment file"; + dlg.Filter = "Color Conversion Table|*.cct"; + if (dlg.ShowDialogCenter()) + { + return dlg.FileName; + } + + return null; + } + + #endregion + + #region Liquid Volumes + + private void OnSelectedMachineChanged() + { + if (SelectedMachine != null) + { + LiquidVolumes = SelectedMachine.Configuration.IdsPacks.OrderBy(x => x.PackIndex).Select(x => new LiquidVolumeVM() + { + Color = x.LiquidType.Color, + Name = x.LiquidType.Name, + IdsPack = x, + }).ToObservableCollection(); + } + } + + #endregion + #region RML - private void InvalidateLiquidFactorsAndProcessTables() + private void InvalidateLiquidFactorsCalibrationData() { if (SelectedRML != null && SelectedMachine != null) { LiquidTypesRmls = SelectedMachine.Configuration.IdsPacks.OrderBy(x => x.PackIndex).Select(x => x.LiquidType).SelectMany(x => x.LiquidTypesRmls).Where(x => x.Rml.Guid == SelectedRML.Guid).ToList(); //RmlProcessParametersTableGroup = SelectedRML.ProcessParametersTablesGroups.ToList().SingleOrDefault(x => x.Active); - LiquidVolumes = SelectedMachine.Configuration.IdsPacks.OrderBy(x => x.PackIndex).Select(x => new LiquidVolumeVM() { Color = x.LiquidType.Color, Name = x.LiquidType.Name }).ToObservableCollection(); LiquidsCalibrationData = new ObservableCollection<CalibrationDataVM>(); - foreach (var liquidType in SelectedMachine.Configuration.IdsPacks.OrderBy(x => x.PackIndex).Select(x => x.LiquidType)) + foreach (var idsPack in SelectedMachine.Configuration.IdsPacks.OrderBy(x => x.PackIndex)) { CalibrationDataVM vm = new CalibrationDataVM(); - vm.Name = liquidType.Name; - vm.Color = liquidType.Color; + vm.Name = idsPack.LiquidType.Name; + vm.Color = idsPack.LiquidType.Color; + vm.IdsPack = idsPack; - var cat = liquidType.Cats.FirstOrDefault(x => x.Machine == SelectedMachine); + var cat = idsPack.LiquidType.Cats.FirstOrDefault(x => x.Machine == SelectedMachine); if (cat != null) { @@ -140,6 +334,13 @@ namespace Tango.MachineStudio.ColorLab.ViewModels LiquidsCalibrationData.Add(vm); } + + CCT = SelectedRML.Ccts.FirstOrDefault(); + + if (CCT == null) + { + CCT = new Cct(); + } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/RgbVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/RgbVM.cs new file mode 100644 index 000000000..badb238fb --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/RgbVM.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media; +using Tango.SharedUI; + +namespace Tango.MachineStudio.ColorLab.ViewModels +{ + public class RgbVM : ViewModel + { + public event EventHandler<Color> ColorChanged; + + public RgbVM() + { + Color = Colors.DimGray; + } + + private double _red; + public double Red + { + get { return _red; } + set { _red = value; SynchronizeColor(); RaisePropertyChangedAuto(); } + } + + private double _green; + public double Green + { + get { return _green; } + set { _green = value; SynchronizeColor(); RaisePropertyChangedAuto(); } + } + + private double _blue; + public double Blue + { + get { return _blue; } + set { _blue = value; SynchronizeColor(); RaisePropertyChangedAuto(); } + } + + private Color _color; + public Color Color + { + get { return _color; } + set { _color = value; RaisePropertyChanged(nameof(Color)); SynchronizeComponents(); } + } + + private void SynchronizeColor() + { + _color = Color.FromRgb((byte)Red, (byte)Green, (byte)Blue); + RaisePropertyChanged(nameof(Color)); + ColorChanged?.Invoke(this, _color); + } + + private void SynchronizeComponents() + { + _red = Color.R; + _green = Color.G; + _blue = Color.B; + + RaisePropertyChanged(nameof(Red)); + RaisePropertyChanged(nameof(Green)); + RaisePropertyChanged(nameof(Blue)); + RaisePropertyChanged(nameof(Color)); + + ColorChanged?.Invoke(this, Color); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml index 92ef15231..c0f2912f3 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml @@ -8,6 +8,7 @@ xmlns:observables="clr-namespace:Tango.BL.Entities;assembly=Tango.BL" xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" + xmlns:commonControls="clr-namespace:Tango.MachineStudio.Common.Controls;assembly=Tango.MachineStudio.Common" xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:vm="clr-namespace:Tango.MachineStudio.ColorLab.ViewModels" xmlns:brushPicker="clr-namespace:Tango.BrushPicker;assembly=Tango.BrushPicker" @@ -164,9 +165,9 @@ <Grid Grid.Row="1" Margin="0 40 0 0" HorizontalAlignment="Center"> <Grid> <Grid.ColumnDefinitions> - <ColumnDefinition Width="300" /> + <ColumnDefinition Width="250" /> + <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> - <ColumnDefinition Width="300" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="1*" /> </Grid.ColumnDefinitions> @@ -179,41 +180,33 @@ <StackPanel VerticalAlignment="Center" Grid.Row="1"> <Border BorderThickness="1" BorderBrush="#545454" Margin="0" Padding="2 2 2 0"> - <brushPicker:BrushPicker x:Name="picker" Background="Transparent" BorderThickness="0" Height="150" BrushTypeVisibility="Collapsed"> - <brushPicker:BrushPicker.Color> - <MultiBinding Converter="{StaticResource ColorToComponentsConverter}" Mode="TwoWay"> - <Binding ElementName="sliderR" Path="Value" Mode="TwoWay"></Binding> - <Binding ElementName="sliderG" Path="Value" Mode="TwoWay"></Binding> - <Binding ElementName="sliderB" Path="Value" Mode="TwoWay"></Binding> - </MultiBinding> - </brushPicker:BrushPicker.Color> - </brushPicker:BrushPicker> + <brushPicker:BrushPicker x:Name="picker" Color="{Binding SourceColor.Color,Mode=TwoWay}" Background="Transparent" BorderThickness="0" Height="150" BrushTypeVisibility="Collapsed"></brushPicker:BrushPicker> </Border> <DockPanel Margin="0 10 0 0"> <TextBlock DockPanel.Dock="Left" Text="R" VerticalAlignment="Center" /> - <TextBlock DockPanel.Dock="Right" Text="{Binding ElementName=picker,Path=Color.R}"></TextBlock> - <Slider x:Name="sliderR" Margin="10 0" Maximum="255"></Slider> + <TextBlock DockPanel.Dock="Right" Text="{Binding SourceColor.Red}"></TextBlock> + <Slider x:Name="sliderR" Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Maximum="255" Value="{Binding SourceColor.Red,Mode=TwoWay}"></Slider> </DockPanel> <DockPanel Margin="0 10 0 0"> <TextBlock DockPanel.Dock="Left" Text="G" VerticalAlignment="Center" /> - <TextBlock DockPanel.Dock="Right" Text="{Binding ElementName=picker,Path=Color.G}"></TextBlock> - <Slider x:Name="sliderG" Margin="10 0" Maximum="255"></Slider> + <TextBlock DockPanel.Dock="Right" Text="{Binding SourceColor.Green}"></TextBlock> + <Slider x:Name="sliderG" Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Maximum="255" Value="{Binding SourceColor.Green,Mode=TwoWay}"></Slider> </DockPanel> <DockPanel Margin="0 10 0 0"> <TextBlock DockPanel.Dock="Left" Text="B" VerticalAlignment="Center" /> - <TextBlock DockPanel.Dock="Right" Text="{Binding ElementName=picker,Path=Color.B}"></TextBlock> - <Slider x:Name="sliderB" Margin="10 0" Maximum="255"></Slider> + <TextBlock DockPanel.Dock="Right" Text="{Binding SourceColor.Blue}"></TextBlock> + <Slider x:Name="sliderB" Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Maximum="255" Value="{Binding SourceColor.Blue,Mode=TwoWay}"></Slider> </DockPanel> </StackPanel> <TextBlock FontStyle="Italic" HorizontalAlignment="Center">SOURCE / INVERSE RGB</TextBlock> - <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="2">SUGGESTIONS</TextBlock> + <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="2" Margin="-120 0 0 0">SUGGESTIONS</TextBlock> <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="4">LIQUID VOLUMES</TextBlock> <Image Source="../Images/arrow-long-right.png" Grid.Column="1" Grid.Row="1" Width="140" Opacity="0.8" Margin="20 0 0 0"></Image> - <controls:HiveControl Width="200" Height="200" Grid.Column="2" Grid.Row="1" /> + <commonControls:HiveComboControl x:Name="hiveCombo" Grid.Column="2" Grid.Row="1" Resolution="{Binding DeltaChroma,Mode=OneWayToSource}" LAxisValue="{Binding DeltaL,Mode=OneWayToSource}" /> <Image Source="../Images/arrow-long-right.png" Grid.Column="3" Grid.Row="1" Width="140" Opacity="0.8" Margin="0 0 20 0"></Image> @@ -281,7 +274,7 @@ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">COMPOSITE</TextBlock> <Ellipse Height="70" Margin="0 5 0 0" Stroke="#202020"> <Ellipse.Fill> - <SolidColorBrush Color="{Binding ElementName=picker,Path=Color}"></SolidColorBrush> + <SolidColorBrush Color="{Binding SourceColor.Color}"></SolidColorBrush> </Ellipse.Fill> </Ellipse> </DockPanel> @@ -352,7 +345,7 @@ <TextBlock Text="{Binding Name}" HorizontalAlignment="Center" Foreground="Black"></TextBlock> </Border> - <Grid> + <Grid Margin="0 0 0 5"> <DataGrid Background="#BBFFFFFF" AlternatingRowBackground="#CCE1E1E1" BorderThickness="1" BorderBrush="#202020" Margin="5 0" ItemsSource="{Binding CalibrationPoints}" CanUserResizeColumns="False" CanUserReorderColumns="False" AutoGenerateColumns="False" CanUserAddRows="True" CanUserDeleteRows="True" CanUserSortColumns="True"> <DataGrid.CellStyle> <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml.cs index 1a96386f6..d78750050 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml.cs @@ -12,6 +12,7 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; +using Tango.MachineStudio.ColorLab.ViewModels; namespace Tango.MachineStudio.ColorLab.Views { @@ -20,9 +21,19 @@ namespace Tango.MachineStudio.ColorLab.Views /// </summary> public partial class MainView : UserControl { + private MainViewVM _vm; + public MainView() { InitializeComponent(); + + this.Loaded += MainView_Loaded; + } + + private void MainView_Loaded(object sender, RoutedEventArgs e) + { + _vm = DataContext as MainViewVM; + _vm.PutComboHiveControl(hiveCombo); } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj index be8503199..cefaac6f3 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj @@ -25,7 +25,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> + <OutputPath>..\..\..\Build\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorView.xaml index a88add000..9fcfc5a89 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorView.xaml @@ -27,8 +27,12 @@ <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox> <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock> <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox> - <TextBlock Text="Color:" FontWeight="Bold"></TextBlock> - <colorPicker:ColorPickerCombo SelectedColor="{Binding EditEntity.Color,Mode=TwoWay,Converter={StaticResource ColorToIntegerConverter},UpdateSourceTrigger=PropertyChanged}"></colorPicker:ColorPickerCombo> + <TextBlock Text="L:" FontWeight="Bold"></TextBlock> + <mahapps:NumericUpDown Minimum="0" Maximum="100" Value="{Binding EditEntity.L,Mode=TwoWay}" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left"></mahapps:NumericUpDown> + <TextBlock Text="A:" FontWeight="Bold"></TextBlock> + <mahapps:NumericUpDown Minimum="-128" Maximum="128" Value="{Binding EditEntity.A,Mode=TwoWay}" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left"></mahapps:NumericUpDown> + <TextBlock Text="B:" FontWeight="Bold"></TextBlock> + <mahapps:NumericUpDown Minimum="-128" Maximum="128" Value="{Binding EditEntity.B,Mode=TwoWay}" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left"></mahapps:NumericUpDown> </controls:TableGrid> </Grid> </UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorsView.xaml index 644c865da..57adda44d 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorsView.xaml @@ -20,12 +20,16 @@ <DataGrid.Columns> <DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn> <DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn> + <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn> + <DataGridTextColumn Header="L" Binding="{Binding L}"></DataGridTextColumn> + <DataGridTextColumn Header="A" Binding="{Binding A}"></DataGridTextColumn> + <DataGridTextColumn Header="B" Binding="{Binding B}"></DataGridTextColumn> <DataGridTemplateColumn Header="Color"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <Rectangle Width="50"> <Rectangle.Fill> - <SolidColorBrush Color="{Binding Color,Converter={StaticResource ColorToIntegerConverter},Mode=TwoWay}"></SolidColorBrush> + <SolidColorBrush Color="{Binding Color}"></SolidColorBrush> </Rectangle.Fill> </Rectangle> </DataTemplate> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Tango.MachineStudio.DataCapture.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Tango.MachineStudio.DataCapture.csproj index c8f15e9c9..d4df08651 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Tango.MachineStudio.DataCapture.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Tango.MachineStudio.DataCapture.csproj @@ -25,7 +25,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> + <OutputPath>..\..\..\Build\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj index 0e64872f7..920dfd922 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj @@ -25,7 +25,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> + <OutputPath>..\..\..\Build\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index 566dc7a16..b2dded955 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -40,7 +40,7 @@ namespace Tango.MachineStudio.Developer.ViewModels /// Represents the developer module main view, view model. /// </summary> /// <seealso cref="Tango.SharedUI.ViewModel" /> - public class MainViewVM : ViewModel<IMainView>, IShutdownRequestBlocker, IShutdownListener + public class MainViewVM : ViewModel, IShutdownRequestBlocker, IShutdownListener { private static object _syncLock = new object(); private const string EMB_FORMATS_EXPORT = "Baby Lock (PES)|*.pes|Tajima (DST)|*.dst|EXP|*.exp|PCS|*.pcs|HUS|*.hus|KSM|*.ksm"; @@ -596,18 +596,9 @@ namespace Tango.MachineStudio.Developer.ViewModels /// <summary> /// Initializes a new instance of the <see cref="MainViewVM"/> class. /// </summary> - public MainViewVM(IMainView view) : base(view, true) - { - - } - - /// <summary> - /// Initializes a new instance of the <see cref="MainViewVM"/> class. - /// </summary> /// <param name="applicationManager">The application manager.</param> /// <param name="notificationProvider">The notification provider.</param> - [PreferredConstructor] - public MainViewVM(IMainView view, IStudioApplicationManager applicationManager, INotificationProvider notificationProvider, IDiagnosticsFrameProvider diagnosticsFrameProvider, IVideoCaptureProvider videoCaptureProvider, DeveloperNavigationManager navigation, IAuthenticationProvider authentication) : this(view) + public MainViewVM(IStudioApplicationManager applicationManager, INotificationProvider notificationProvider, IDiagnosticsFrameProvider diagnosticsFrameProvider, IVideoCaptureProvider videoCaptureProvider, DeveloperNavigationManager navigation, IAuthenticationProvider authentication) { SelectedJobs = new ObservableCollection<Job>(); @@ -1710,7 +1701,7 @@ namespace Tango.MachineStudio.Developer.ViewModels Red = stop.Color.R, Green = stop.Color.G, Blue = stop.Color.B, - OffsetPercent = stop.Offset, + OffsetPercent = stop.Offset * 100d, ColorSpace = _machineDbContext.ColorSpaces.ToList().SingleOrDefault(x => x.Code == BL.Enumerations.ColorSpaces.RGB.ToInt32()), }); } @@ -1799,14 +1790,5 @@ namespace Tango.MachineStudio.Developer.ViewModels } #endregion - - #region IMainView - - protected override void OnViewAttached() - { - base.OnViewAttached(); - } - - #endregion } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/EmbroideryImportView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/EmbroideryImportView.xaml index 42d0bb106..8d25719e8 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/EmbroideryImportView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/EmbroideryImportView.xaml @@ -46,7 +46,7 @@ <StackPanel> <TextBlock Margin="5">Region Brush</TextBlock> <Border Margin="5" BorderThickness="1" BorderBrush="Silver"> - <brushPicker:BrushPicker Background="White" BorderThickness="0" Brush="{Binding ElementName=editor,Path=SelectedPath.Brush,Mode=TwoWay}" /> + <brushPicker:BrushPicker Background="White" BorderThickness="0" Brush="{Binding ElementName=editor,Path=SelectedPath.Brush,Mode=TwoWay}" Height="220" /> </Border> <Border BorderThickness="1" BorderBrush="Silver" Padding="5 0 5 5" Margin="5"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml index 1dea01de7..4c0784d1d 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml @@ -157,13 +157,13 @@ </StackPanel> </ToggleButton> <Popup x:Name="Popup" MouseDown="Popup_MouseDown" PopupAnimation="Fade" StaysOpen="False" PlacementTarget="{Binding ElementName=PopupButton}" Placement="Bottom" AllowsTransparency="True"> - <Border Background="#E6FFFFFF" Height="250" Width="550" CornerRadius="5" Margin="10"> + <Border Background="#E6FFFFFF" CornerRadius="5" Margin="10"> <Border.Effect> <DropShadowEffect ShadowDepth="0" BlurRadius="10" /> </Border.Effect> <Grid> <Grid Margin="10"> - <commonControls:HiveColorPickerControl SelectedColorChanged="HiveColorPickerControl_SelectedColorChanged" SelectedColor="{Binding Color,Mode=TwoWay}" DemoMode="True" /> + <commonControls:HiveColorPickerControl SelectedHiveColorChanged="HiveColorPickerControl_SelectedColorChanged" SelectedColor="{Binding Color,Mode=OneWay}" SelectedHiveColor="{Binding Color,Mode=OneWayToSource}" DemoMode="True" /> </Grid> </Grid> </Border> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs index 905caa96d..044046450 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs @@ -82,6 +82,7 @@ namespace Tango.MachineStudio.Developer.Views } jobBrushList.ItemsSource = segments; + UpdateGradientBrushDisplay(); } } @@ -125,7 +126,7 @@ namespace Tango.MachineStudio.Developer.Views } - private void HiveColorPickerControl_SelectedColorChanged(object sender, Color e) + private void HiveColorPickerControl_SelectedColorChanged(object sender, Color color) { UpdateGradientBrushDisplay(); } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner.csproj index 458a9f853..af3a76c0b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner.csproj @@ -25,7 +25,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> + <OutputPath>..\..\..\Build\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj index 3b0e1d1cc..c329685c6 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj @@ -25,7 +25,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> + <OutputPath>..\..\..\Build\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj index 87b159c0e..85928cb0c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj @@ -25,7 +25,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> + <OutputPath>..\..\..\Build\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj index 631997fc8..1b827f001 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj @@ -27,7 +27,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> + <OutputPath>..\..\..\Build\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ControllerElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ControllerElementEditor.xaml new file mode 100644 index 000000000..60b96bc9d --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ControllerElementEditor.xaml @@ -0,0 +1,140 @@ +<local:ElementEditor x:Class="Tango.MachineStudio.Technician.Editors.ControllerElementEditor" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" + xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems" + xmlns:gauge="clr-namespace:Tango.CircularGauge;assembly=Tango.CircularGauge" + xmlns:converters="clr-namespace:Tango.Editors.Converters;assembly=Tango.Editors" + xmlns:visuals="clr-namespace:Tango.Visuals;assembly=Tango.Visuals" + xmlns:local="clr-namespace:Tango.Editors;assembly=Tango.Editors" + mc:Ignorable="d" Background="Transparent" ClipToBounds="False" BorderThickness="0" MinWidth="1" MinHeight="1" RenderTransformOrigin="0.5,0.5" d:DataContext="{d:DesignInstance Type=items:ControllerItem, IsDesignTimeCreatable=False}" Height="245.074" Width="321.75"> + + <UserControl.Resources> + <converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"></converters:BoolToVisibilityConverter> + <sharedConverters:BooleanInverseConverter x:Key="BooleanInverseConverter" /> + + <!--Theme--> + <SolidColorBrush x:Key="BorderBrush" Color="Transparent"></SolidColorBrush> + <SolidColorBrush x:Key="CornersBrush" Color="Red"></SolidColorBrush> + </UserControl.Resources> + + <UserControl.RenderTransform> + <RotateTransform Angle="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=Angle}"></RotateTransform> + </UserControl.RenderTransform> + + <Grid ClipToBounds="False"> + + + <!--Content--> + <Grid ClipToBounds="False" IsHitTestVisible="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=IsEditable,Converter={StaticResource BooleanInverseConverter}}"> + <Border> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="1*" /> + <ColumnDefinition Width="100" /> + </Grid.ColumnDefinitions> + <Viewbox> + <Grid> + <gauge:CircularGaugeControl + Margin="10" + Radius="150" + ScaleRadius="110" + ScaleStartAngle="120" + ScaleSweepAngle="300" + PointerLength="85" + PointerCapRadius="35" + MinValue="{Binding TechController.Min}" + MaxValue="{Binding TechController.Max}" + MajorDivisionsCount="10" + MinorDivisionsCount="5" + CurrentValue="{Binding EffectiveValue}" + ImageSize="40,50" + RangeIndicatorThickness="8" + RangeIndicatorRadius="120" + RangeIndicatorLightRadius="10" + RangeIndicatorLightOffset="80" + ScaleLabelRadius="90" + ScaleLabelSize="40,20" + ScaleLabelFontSize="10" + ScaleLabelForeground="LightGray" + MajorTickSize="10,3" + MinorTickSize="3,1" + MajorTickColor="LightGray" + MinorTickColor="LightGray" + ImageOffset="-50" + GaugeBackgroundColor="Black" + PointerThickness ="16" + OptimalRangeStartValue="300" + OptimalRangeEndValue="700" + DialTextOffset="40" + DialTextColor="Black" + > + + </gauge:CircularGaugeControl> + </Grid> + </Viewbox> + + <Grid Grid.Column="1" HorizontalAlignment="Right"> + <Slider Orientation="Vertical" Margin="15" TickPlacement="None" Minimum="{Binding TechController.Min}" Maximum="{Binding TechController.Max}" Value="{Binding Value,Delay=1000}"> + <Slider.Foreground> + <SolidColorBrush Color="{Binding Color}" /> + </Slider.Foreground> + </Slider> + + <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" FontFamily="../Fonts/#digital-7" TextAlignment="Right" Margin="-80 10 0 0" FontSize="30" Text="{Binding Value,StringFormat=0.00}"> + <TextBlock.Foreground> + <SolidColorBrush Color="{Binding Color}" /> + </TextBlock.Foreground> + </TextBlock> + </Grid> + </Grid> + </Border> + + <Border Margin="0 0 0 -23" VerticalAlignment="Bottom"> + <TextBlock Text="{Binding TechController.Description}" FontSize="14" Foreground="DimGray" HorizontalAlignment="Center"></TextBlock> + </Border> + </Grid> + <!--Content--> + + + <Border BorderThickness="1" BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=BorderBrush,TargetNullValue={StaticResource BorderBrush},FallbackValue={StaticResource BorderBrush}}" Visibility="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=(local:ElementsEditor.IsSelected),Converter={StaticResource BoolToVisibilityConverter}}"> + <Grid> + <ContentPresenter Content="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=InnerContent}"></ContentPresenter> + + <Thumb Opacity="0" DragDelta="MoveDrag" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb> + <Thumb HorizontalAlignment="Left" Cursor="SizeWE" Opacity="0" DragDelta="DragLeft" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb> + <Thumb HorizontalAlignment="Right" Cursor="SizeWE" Opacity="0" DragDelta="DragRight" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb> + <Thumb VerticalAlignment="Top" Cursor="SizeNS" Opacity="0" DragDelta="DragTop" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb> + <Thumb VerticalAlignment="Bottom" Cursor="SizeNS" Opacity="0" DragDelta="DragBottom" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb> + + <Grid ClipToBounds="False" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0 -20 0 0" Width="10" Height="10"> + <Ellipse Stroke="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" StrokeThickness="2"></Ellipse> + <Rectangle HorizontalAlignment="Center" VerticalAlignment="Stretch" Margin="0 10 0 -8" StrokeThickness="1" Stroke="Red"></Rectangle> + <Thumb Opacity="0" DragDelta="DragAngle" DragStarted="DragStarted" Cursor="Arrow" DragCompleted="OnDragEnded"></Thumb> + </Grid> + + <Grid Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-8 -8 0 0"> + <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="2 2 0 0"></Border> + <Thumb Opacity="0" DragDelta="DragTopLeft" DragStarted="DragStarted" Cursor="SizeNWSE" DragCompleted="OnDragEnded"></Thumb> + </Grid> + + <Grid Width="10" Height="10" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 -8 -8 0"> + <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="0 2 2 0"></Border> + <Thumb Opacity="0" DragDelta="DragTopRight" DragStarted="DragStarted" Cursor="SizeNESW" DragCompleted="OnDragEnded"></Thumb> + </Grid> + + <Grid Width="10" Height="10" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 -8 -8"> + <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="0 0 2 2"></Border> + <Thumb Opacity="0" DragDelta="DragBottomRight" DragStarted="DragStarted" Cursor="SizeNWSE" DragCompleted="OnDragEnded"></Thumb> + </Grid> + + <Grid Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="-8 0 0 -8"> + <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="2 0 0 2"></Border> + <Thumb Opacity="0" DragDelta="DragBottomLeft" DragStarted="DragStarted" Cursor="SizeNESW" DragCompleted="OnDragEnded"></Thumb> + </Grid> + </Grid> + </Border> + </Grid> +</local:ElementEditor> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ControllerElementEditor.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ControllerElementEditor.xaml.cs new file mode 100644 index 000000000..4d183dac6 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ControllerElementEditor.xaml.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using Tango.Editors; +using Tango.BL.Entities; +using Tango.MachineStudio.Technician.TechItems; + +namespace Tango.MachineStudio.Technician.Editors +{ + [ContentProperty("InnerContent")] + public partial class ControllerElementEditor : ElementEditor + { + public ControllerElementEditor() + : base() + { + InitializeComponent(); + } + + public ControllerElementEditor(ControllerItem controllerItem) + : this() + { + ControllerItem = controllerItem; + DataContext = ControllerItem; + } + + public ControllerElementEditor(ControllerItem controllerItem, Rect bounds) + : this(controllerItem) + { + Left = bounds.Left; + Top = bounds.Top; + Width = bounds.Width; + Height = bounds.Height; + } + + private ControllerItem _controllerItem; + + public ControllerItem ControllerItem + { + get { return _controllerItem; } + set { _controllerItem = value; RaisePropertyChanged(nameof(ControllerItem)); } + } + + + /// <summary> + /// Clones this instance. + /// </summary> + /// <returns></returns> + public override IElementEditor Clone() + { + try + { + var clonedItem = ControllerItem.Clone() as ControllerItem; + ControllerElementEditor cloned = new ControllerElementEditor(clonedItem); + cloned.Top = Top; + cloned.Left = Left; + cloned.Width = Width; + cloned.Height = Height; + cloned.Angle = Angle; + return cloned; + } + catch (Exception ex) + { + throw new InvalidOperationException("Could not clone this editor. You may have to create a custom editor and implement a custom Clone method.", ex); + } + } + + /// <summary> + /// Gets the hosted element. + /// </summary> + [ParameterIgnore] + public override Object HostedElement + { + get { return ControllerItem; } + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/controller.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/controller.png Binary files differnew file mode 100644 index 000000000..5794f6cd8 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/controller.png diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/ControllerTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/ControllerTemplate.xaml new file mode 100644 index 000000000..57d807b09 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/ControllerTemplate.xaml @@ -0,0 +1,41 @@ +<UserControl x:Class="Tango.MachineStudio.Technician.PropertiesTemplates.ControllerTemplate" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:converters="clr-namespace:Tango.MachineStudio.Technician.Converters" + xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems" + xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker" + xmlns:local="clr-namespace:Tango.MachineStudio.Technician.PropertiesTemplates" + mc:Ignorable="d" + d:DesignHeight="500" d:DesignWidth="200" d:DataContext="{d:DesignInstance Type=items:ControllerItem, IsDesignTimeCreatable=False}"> + + <UserControl.Resources> + <Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}"> + <Setter Property="mahapps:ControlsHelper.HeaderFontSize" Value="14" /> + <Setter Property="Margin" Value="2" /> + </Style> + </UserControl.Resources> + + <Grid> + <StackPanel> + <GroupBox Header="INPUT"> + <StackPanel> + <TextBlock FontSize="10">Selected Input</TextBlock> + <ComboBox Margin="0 5 0 0" ItemsSource="{Binding Adapter.TechControllers}" SelectedItem="{Binding TechController,Mode=TwoWay}" DisplayMemberPath="Description" /> + + <TextBlock FontSize="10" Margin="0 20 0 0"><Run>Update Interval</Run> <Run Text="{Binding UpdateInterval,StringFormat={}{0:N0} ms,FallbackValue=0}"></Run></TextBlock> + <Slider Margin="0 5 0 0" Minimum="1" Maximum="1000" Value="{Binding UpdateInterval,Mode=TwoWay}"></Slider> + </StackPanel> + </GroupBox> + <GroupBox Header="COLOR" Margin="0 10 0 0"> + <StackPanel> + <Viewbox Margin="0 5 0 0"> + <colorPicker:ColorCanvas SelectedColor="{Binding Color,Mode=TwoWay}" Background="Transparent" /> + </Viewbox> + </StackPanel> + </GroupBox> + </StackPanel> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/ControllerTemplate.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/ControllerTemplate.xaml.cs new file mode 100644 index 000000000..624eef296 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/ControllerTemplate.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 Tango.MachineStudio.Technician.PropertiesTemplates +{ + /// <summary> + /// Interaction logic for MonitorTemplate.xaml + /// </summary> + public partial class ControllerTemplate : UserControl + { + public ControllerTemplate() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj index 7a497710b..ecc235d02 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj @@ -25,7 +25,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> + <OutputPath>..\..\..\Build\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> @@ -102,6 +102,9 @@ <Compile Include="Converters\TechIosToDigitalInsConverter.cs" /> <Compile Include="Converters\TechIosToDigitalOutsConverter.cs" /> <Compile Include="Converters\TransitionLinkConverter.cs" /> + <Compile Include="Editors\ControllerElementEditor.xaml.cs"> + <DependentUpon>ControllerElementEditor.xaml</DependentUpon> + </Compile> <Compile Include="Editors\DigitalInElementEditor.xaml.cs"> <DependentUpon>DigitalInElementEditor.xaml</DependentUpon> </Compile> @@ -146,6 +149,9 @@ <Compile Include="PropertiesTemplates\DispenserTemplate.xaml.cs"> <DependentUpon>DispenserTemplate.xaml</DependentUpon> </Compile> + <Compile Include="PropertiesTemplates\ControllerTemplate.xaml.cs"> + <DependentUpon>ControllerTemplate.xaml</DependentUpon> + </Compile> <Compile Include="PropertiesTemplates\MotorGroupTemplate.xaml.cs"> <DependentUpon>MotorGroupTemplate.xaml</DependentUpon> </Compile> @@ -164,6 +170,7 @@ <Compile Include="PropertiesTemplates\SingleGraphTemplate.xaml.cs"> <DependentUpon>SingleGraphTemplate.xaml</DependentUpon> </Compile> + <Compile Include="TechItems\ControllerItem.cs" /> <Compile Include="TechItems\DigitalInItem.cs" /> <Compile Include="TechItems\DigitalOutItem.cs" /> <Compile Include="TechItems\MeterItem.cs" /> @@ -202,6 +209,10 @@ <Compile Include="..\..\..\Versioning\GlobalVersionInfo.cs"> <Link>GlobalVersionInfo.cs</Link> </Compile> + <Page Include="Editors\ControllerElementEditor.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> <Page Include="Editors\DigitalInElementEditor.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> @@ -258,6 +269,10 @@ <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> + <Page Include="PropertiesTemplates\ControllerTemplate.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> <Page Include="PropertiesTemplates\MotorGroupTemplate.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> @@ -342,6 +357,10 @@ <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project> <Name>Tango.BL</Name> </ProjectReference> + <ProjectReference Include="..\..\..\Tango.CircularGauge\Tango.CircularGauge.csproj"> + <Project>{6efd5895-177b-4bbb-af52-29f4d53b3fbd}</Project> + <Name>Tango.CircularGauge</Name> + </ProjectReference> <ProjectReference Include="..\..\..\Tango.ColorPicker\Tango.ColorPicker.csproj"> <Project>{a2f5af44-29ff-45d6-9d25-ecda5cce88b5}</Project> <Name>Tango.ColorPicker</Name> @@ -460,5 +479,8 @@ <ItemGroup> <Resource Include="Images\digital-in.png" /> </ItemGroup> + <ItemGroup> + <Resource Include="Images\controller.png" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ControllerItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ControllerItem.cs new file mode 100644 index 000000000..67266ee66 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ControllerItem.cs @@ -0,0 +1,121 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media; +using System.Xml.Serialization; +using Tango.BL.Entities; +using Tango.SharedUI.Helpers; + +namespace Tango.MachineStudio.Technician.TechItems +{ + /// <summary> + /// Represents a single component value controller and monitor. + /// </summary> + /// <seealso cref="TechItem" /> + [TechItem(10)] + public class ControllerItem : TechItem + { + /// <summary> + /// Occurs when the controller value has changed. + /// </summary> + public event EventHandler<double> ValueChanged; + + private TechController _techController; + /// <summary> + /// Gets or sets the DB controller item. + /// </summary> + [XmlIgnore] + public TechController TechController + { + get { return _techController; } + set { _techController = value; RaisePropertyChangedAuto(); TechName = _techController != null ? _techController.Description : null; ItemGuid = value != null ? value.Guid : null; } + } + + private double _value; + /// <summary> + /// Gets or sets the component value. + /// </summary> + [XmlIgnore] + public double Value + { + get { return _value; } + set + { + _value = value; RaisePropertyChangedAuto(); + ValueChanged?.Invoke(this, _value); + } + } + + private int _updateInterval; + /// <summary> + /// Gets or sets the update interval. + /// </summary> + public int UpdateInterval + { + get { return _updateInterval; } + set { _updateInterval = value; RaisePropertyChangedAuto(); } + } + + /// <summary> + /// Gets or sets the last update time. + /// </summary> + [XmlIgnore] + public DateTime LastUpdateTime { get; set; } + + + private double _effectiveValue; + /// <summary> + /// Gets or sets the effective value received from the embedded device. + /// </summary> + [XmlIgnore] + public double EffectiveValue + { + get { return _effectiveValue; } + set + { + LastUpdateTime = DateTime.Now; + + if (_effectiveValue != value) + { + _effectiveValue = value; + RaisePropertyChangedAuto(); + } + } + } + + /// <summary> + /// Initializes a new instance of the <see cref="ControllerItem"/> class. + /// </summary> + public ControllerItem() : base() + { + Name = "Value Controller"; + Description = "Single component value controller"; + Image = ResourceHelper.GetImageFromResources("Images/controller.png"); + Color = Colors.DodgerBlue; + LastUpdateTime = DateTime.Now; + UpdateInterval = 10; + } + + /// <summary> + /// Initializes a new instance of the <see cref="ControllerItem"/> class. + /// </summary> + /// <param name="techController">The db tech controller.</param> + public ControllerItem(TechController techController) : this() + { + TechController = techController; + } + + /// <summary> + /// Clones this instance. + /// </summary> + /// <returns></returns> + public override TechItem Clone() + { + ControllerItem cloned = base.Clone() as ControllerItem; + cloned.TechController = TechController; + return cloned; + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs index 44d5d2c5a..e18250594 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs @@ -29,6 +29,7 @@ namespace Tango.MachineStudio.Technician.TechItems [XmlInclude(typeof(ThreadMotionItem))] [XmlInclude(typeof(MotorGroupItem))] [XmlInclude(typeof(DigitalInItem))] + [XmlInclude(typeof(ControllerItem))] public abstract class TechItem : ExtendedObject { /// <summary> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs index a5a95fc35..63aca3e70 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs @@ -39,7 +39,7 @@ namespace Tango.MachineStudio.Technician.ViewModels /// <seealso cref="Tango.MachineStudio.Common.StudioApplication.IShutdownListener" /> public class MachineTechViewVM : ViewModel, IShutdownListener { - private List<PropertyInfo> _diagnoticsDataProperties; + private List<PropertyInfo> _diagnoticsMonitorsDataProperties; private Dictionary<SingleGraphItem, GraphController> _singleControllers; private Dictionary<MultiGraphItem, GraphMultiController> _multiControllers; private static object _elementsLock = new object(); @@ -178,7 +178,7 @@ namespace Tango.MachineStudio.Technician.ViewModels _multiControllers = new Dictionary<MultiGraphItem, GraphMultiController>(); AvailableTechItems = TechItem.GetAvailableTechItems().ToObservableCollection(); SelectedTechItem = AvailableTechItems.FirstOrDefault(); - _diagnoticsDataProperties = typeof(PushDiagnosticsResponse).GetProperties(BindingFlags.Public | BindingFlags.Instance).ToList(); + _diagnoticsMonitorsDataProperties = typeof(DiagnosticsMonitors).GetProperties(BindingFlags.Public | BindingFlags.Instance).ToList(); ApplicationManager = applicationManager; ApplicationManager.ConnectedMachineChanged += ApplicationManager_ConnectedMachineChanged; @@ -252,11 +252,11 @@ namespace Tango.MachineStudio.Technician.ViewModels if (DateTime.Now > monitorItem.LastUpdateTime.AddMilliseconds(monitorItem.UpdateInterval)) { - var prop = _diagnoticsDataProperties.SingleOrDefault(x => x.Name == monitorItem.TechMonitor.Name); + var prop = _diagnoticsMonitorsDataProperties.SingleOrDefault(x => x.Name == monitorItem.TechMonitor.Name); if (prop != null) { - monitorItem.Value = GetDataLastValue(monitorItem.TechMonitor, prop.GetValue(data)); + monitorItem.Value = GetDataLastValue(monitorItem.TechMonitor, prop.GetValue(data.Monitors)); } } } @@ -266,11 +266,11 @@ namespace Tango.MachineStudio.Technician.ViewModels if (DateTime.Now > meterItem.LastUpdateTime.AddMilliseconds(meterItem.UpdateInterval)) { - var prop = _diagnoticsDataProperties.SingleOrDefault(x => x.Name == meterItem.TechMonitor.Name); + var prop = _diagnoticsMonitorsDataProperties.SingleOrDefault(x => x.Name == meterItem.TechMonitor.Name); if (prop != null) { - meterItem.Value = GetDataLastValue(meterItem.TechMonitor, prop.GetValue(data)); + meterItem.Value = GetDataLastValue(meterItem.TechMonitor, prop.GetValue(data.Monitors)); } } } @@ -278,7 +278,7 @@ namespace Tango.MachineStudio.Technician.ViewModels { SingleGraphItem graphItem = item as SingleGraphItem; - var prop = _diagnoticsDataProperties.SingleOrDefault(x => x.Name == graphItem.TechMonitor.Name); + var prop = _diagnoticsMonitorsDataProperties.SingleOrDefault(x => x.Name == graphItem.TechMonitor.Name); if (prop != null) { @@ -286,7 +286,7 @@ namespace Tango.MachineStudio.Technician.ViewModels if (_singleControllers.TryGetValue(graphItem, out controller)) { - controller.PushData(GetDataArray(graphItem.TechMonitor, prop.GetValue(data))); + controller.PushData(GetDataArray(graphItem.TechMonitor, prop.GetValue(data.Monitors))); } } } @@ -294,7 +294,7 @@ namespace Tango.MachineStudio.Technician.ViewModels { MultiGraphItem graphItem = item as MultiGraphItem; - var prop = _diagnoticsDataProperties.SingleOrDefault(x => x.Name == graphItem.TechMonitor.Name); + var prop = _diagnoticsMonitorsDataProperties.SingleOrDefault(x => x.Name == graphItem.TechMonitor.Name); if (prop != null) { @@ -302,7 +302,7 @@ namespace Tango.MachineStudio.Technician.ViewModels if (_multiControllers.TryGetValue(graphItem, out controller)) { - controller.PushData(GetDataMatrix(graphItem.TechMonitor, prop.GetValue(data))); + controller.PushData(GetDataMatrix(graphItem.TechMonitor, prop.GetValue(data.Monitors))); } } } @@ -328,6 +328,20 @@ namespace Tango.MachineStudio.Technician.ViewModels digitalInItem.Value = digitalPin.Value; } } + else if (item.GetType() == typeof(ControllerItem)) + { + ControllerItem controllerItem = item as ControllerItem; + + if (DateTime.Now > controllerItem.LastUpdateTime.AddMilliseconds(controllerItem.UpdateInterval)) + { + var componentState = data.ComponentsStates.SingleOrDefault(x => (int)x.Component == controllerItem.TechController.Code); + + if (componentState != null) + { + controllerItem.EffectiveValue = componentState.Value; + } + } + } } } } @@ -466,6 +480,11 @@ namespace Tango.MachineStudio.Technician.ViewModels { CreateElement<DigitalInElementEditor, DigitalInItem, TechIo>(bounds, Adapter.TechIos.Where(x => x.Type == IOType.DigitalInput.ToInt32()).FirstOrDefault()); } + else if (item is ControllerItem) + { + var editor = CreateElement<ControllerElementEditor, ControllerItem, TechController>(bounds, Adapter.TechControllers.FirstOrDefault()); + InitControllerItem(editor.ControllerItem); + } } /// <summary> @@ -559,6 +578,11 @@ namespace Tango.MachineStudio.Technician.ViewModels (item as DigitalInItem).TechIo = Adapter.TechIos.FirstOrDefault(x => x.Guid == item.ItemGuid); CreateElement<DigitalInElementEditor>(item); } + else if (item is ControllerItem) + { + (item as ControllerItem).TechController = Adapter.TechControllers.FirstOrDefault(x => x.Guid == item.ItemGuid); + CreateElement<ControllerElementEditor>(item); + } } /// <summary> @@ -651,6 +675,11 @@ namespace Tango.MachineStudio.Technician.ViewModels var motorGroupItem = element.HostedElement as MotorGroupItem; InitMotorGroupItem(motorGroupItem); } + else if (element is ControllerItem) + { + var controllerItem = element.HostedElement as ControllerItem; + InitControllerItem(controllerItem); + } } } @@ -971,6 +1000,29 @@ namespace Tango.MachineStudio.Technician.ViewModels }; } + /// <summary> + /// Initializes the controller item. + /// </summary> + /// <param name="item">The controller item.</param> + private void InitControllerItem(ControllerItem item) + { + item.ValueChanged += async (x, value) => + { + try + { + await MachineOperator.SetComponentValue(new SetComponentValueRequest() + { + Component = (ValueComponent)item.TechController.Code, + Value = value + }); + } + catch (Exception ex) + { + //TODO: Show Exception. + } + }; + } + #endregion #region Public Methods diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml index 5996c351b..3d4ecdac1 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml @@ -364,6 +364,9 @@ <DataTemplate DataType="{x:Type sys:Nullable}"> </DataTemplate> + <DataTemplate DataType="{x:Type items:ControllerItem}"> + <templates:ControllerTemplate/> + </DataTemplate> <DataTemplate DataType="{x:Type items:MonitorItem}"> <templates:MonitorTemplate/> </DataTemplate> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Images/organization.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Images/organization.png Binary files differnew file mode 100644 index 000000000..9f7ee9851 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Images/organization.png diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Images/roles.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Images/roles.png Binary files differnew file mode 100644 index 000000000..e7955be04 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Images/roles.png diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Images/user.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Images/user.png Binary files differnew file mode 100644 index 000000000..c8b7a3b40 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Images/user.png diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Images/users-and-roles.jpg b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Images/users-and-roles.jpg Binary files differnew file mode 100644 index 000000000..2304e25b6 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Images/users-and-roles.jpg diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Images/users.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Images/users.png Binary files differnew file mode 100644 index 000000000..805700c66 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Images/users.png diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Navigation/UsersAndRolesNavigationManager.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Navigation/UsersAndRolesNavigationManager.cs new file mode 100644 index 000000000..b335f2d69 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Navigation/UsersAndRolesNavigationManager.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Logging; +using Tango.MachineStudio.Common.Navigation; +using Tango.MachineStudio.UsersAndRoles.Views; + +namespace Tango.MachineStudio.UsersAndRoles.Navigation +{ + public class UsersAndRolesNavigationManager + { + private LogManager LogManager = LogManager.Default; + + public void NavigateTo(UsersAndRolesNavigationView view) + { + LogManager.Log(String.Format("Navigating to view {0}...", view.ToString())); + MainView.Instance.TransitionControl.AutoNavigate(view.ToString()); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Navigation/UsersAndRolesNavigationView.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Navigation/UsersAndRolesNavigationView.cs new file mode 100644 index 000000000..1e266926e --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Navigation/UsersAndRolesNavigationView.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.MachineStudio.UsersAndRoles.Navigation +{ + public enum UsersAndRolesNavigationView + { + OrganizationSelectionView, + OrganizationManagementView, + UserManagementView, + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..aeb6b6c4d --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Properties/AssemblyInfo.cs @@ -0,0 +1,18 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +[assembly: AssemblyTitle("Tango - Machine Studio Users & Roles Module")] + +[assembly: ComVisible(false)] + +[assembly:ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Properties/Resources.Designer.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Properties/Resources.Designer.cs new file mode 100644 index 000000000..5148a36ea --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Properties/Resources.Designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.MachineStudio.UsersAndRoles.Properties { + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if ((resourceMan == null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.MachineStudio.UsersAndRoles.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Properties/Resources.resx b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Properties/Resources.resx @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Properties/Settings.Designer.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Properties/Settings.Designer.cs new file mode 100644 index 000000000..77bb41a9c --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.MachineStudio.UsersAndRoles.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Properties/Settings.settings b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Properties/Settings.settings new file mode 100644 index 000000000..033d7a5e9 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Properties/Settings.settings @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='utf-8'?> +<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)"> + <Profiles> + <Profile Name="(Default)" /> + </Profiles> + <Settings /> +</SettingsFile>
\ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Providers/Place.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Providers/Place.cs new file mode 100644 index 000000000..a2ac2a9b7 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Providers/Place.cs @@ -0,0 +1,31 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace Tango.MachineStudio.UsersAndRoles.Providers +{ + public class Place + { + [XmlElement("address")] + [JsonProperty("address")] + public PlaceAddress Address { get; set; } + + [XmlAttribute("display_name")] + [JsonProperty("display_name")] + public String DisplayName { get; set; } + + public Place() + { + Address = new PlaceAddress(); + } + + public override string ToString() + { + return DisplayName; + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Providers/PlaceAddress.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Providers/PlaceAddress.cs new file mode 100644 index 000000000..5b25794d1 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Providers/PlaceAddress.cs @@ -0,0 +1,53 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace Tango.MachineStudio.UsersAndRoles.Providers +{ + public class PlaceAddress + { + [XmlElement("road")] + [JsonProperty("road")] + public String Road { get; set; } + + [XmlElement("village")] + [JsonProperty("village")] + public String Village + { + get { return City; } + set { City = value; } + } + + [XmlElement("town")] + [JsonProperty("town")] + public String Town + { + get { return City; } + set { City = value; } + } + + [XmlElement("city")] + [JsonProperty("city")] + public String City { get; set; } + + [XmlElement("state")] + [JsonProperty("state")] + public String State { get; set; } + + [XmlElement("postcode")] + [JsonProperty("postcode")] + public String PostalCode { get; set; } + + [XmlElement("country")] + [JsonProperty("country")] + public String Country { get; set; } + + [XmlElement("country_code")] + [JsonProperty("country_code")] + public String CountryCode { get; set; } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Providers/PlacesProvider.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Providers/PlacesProvider.cs new file mode 100644 index 000000000..681815d4c --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Providers/PlacesProvider.cs @@ -0,0 +1,47 @@ +using Newtonsoft.Json; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using Tango.AutoComplete.Editors; +using Tango.Logging; + +namespace Tango.MachineStudio.UsersAndRoles.Providers +{ + public class PlacesProvider : ISuggestionProvider + { + public IEnumerable GetSuggestions(string filter) + { + List<Place> places = new List<Place>(); + + using (WebClient web = new WebClient()) + { + try + { + String json = null; + + web.Headers.Add(HttpRequestHeader.UserAgent, "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0"); + web.Headers.Add(HttpRequestHeader.ContentType, "application/json"); + web.Headers.Add(HttpRequestHeader.AcceptLanguage, "en-US"); + + json = web.DownloadString(String.Format("https://nominatim.openstreetmap.org/search?q={0}&format=json&addressdetails=1", filter)); + + if (json != null) + { + List<Place> results = JsonConvert.DeserializeObject<List<Place>>(json); + places.AddRange(results); + } + } + catch (Exception ex) + { + LogManager.Default.Log(ex, LogCategory.Debug); + } + } + + return places; + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Tango.MachineStudio.UsersAndRoles.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Tango.MachineStudio.UsersAndRoles.csproj new file mode 100644 index 000000000..9064519c0 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Tango.MachineStudio.UsersAndRoles.csproj @@ -0,0 +1,222 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{88028F14-0028-4DED-B119-19B8EE23CF32}</ProjectGuid> + <OutputType>library</OutputType> + <RootNamespace>Tango.MachineStudio.UsersAndRoles</RootNamespace> + <AssemblyName>Tango.MachineStudio.UsersAndRoles</AssemblyName> + <TargetFrameworkVersion>v4.6</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\..\..\Build\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>..\..\..\Build\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll</HintPath> + </Reference> + <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll</HintPath> + </Reference> + <Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath> + </Reference> + <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath> + </Reference> + <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath> + </Reference> + <Reference Include="MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath> + </Reference> + <Reference Include="MaterialDesignColors, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\MaterialDesignColors.1.1.2\lib\net45\MaterialDesignColors.dll</HintPath> + </Reference> + <Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath> + </Reference> + <Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.ComponentModel.DataAnnotations" /> + <Reference Include="System.Data" /> + <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath> + </Reference> + <Reference Include="System.Xml" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xaml"> + <RequiredTargetFramework>4.0</RequiredTargetFramework> + </Reference> + <Reference Include="WindowsBase" /> + <Reference Include="PresentationCore" /> + <Reference Include="PresentationFramework" /> + </ItemGroup> + <ItemGroup> + <Compile Include="..\..\..\Versioning\GlobalVersionInfo.cs"> + <Link>GlobalVersionInfo.cs</Link> + </Compile> + <Compile Include="Navigation\UsersAndRolesNavigationManager.cs" /> + <Compile Include="Navigation\UsersAndRolesNavigationView.cs" /> + <Compile Include="Providers\PlaceAddress.cs" /> + <Compile Include="Providers\PlacesProvider.cs" /> + <Compile Include="Providers\Place.cs" /> + <Compile Include="UsersAndRolesModule.cs" /> + <Compile Include="ViewModelLocator.cs" /> + <Compile Include="ViewModels\MainViewVM.cs" /> + <Compile Include="Views\AddressView.xaml.cs"> + <DependentUpon>AddressView.xaml</DependentUpon> + </Compile> + <Compile Include="Views\ContactView.xaml.cs"> + <DependentUpon>ContactView.xaml</DependentUpon> + </Compile> + <Compile Include="Views\MainView.xaml.cs"> + <DependentUpon>MainView.xaml</DependentUpon> + </Compile> + <Compile Include="Views\OrganizationManagementView.xaml.cs"> + <DependentUpon>OrganizationManagementView.xaml</DependentUpon> + </Compile> + <Compile Include="Views\OrganizationSelectionView.xaml.cs"> + <DependentUpon>OrganizationSelectionView.xaml</DependentUpon> + </Compile> + <Compile Include="Views\UserManagementView.xaml.cs"> + <DependentUpon>UserManagementView.xaml</DependentUpon> + </Compile> + <Compile Include="Views\UserView.xaml.cs"> + <DependentUpon>UserView.xaml</DependentUpon> + </Compile> + </ItemGroup> + <ItemGroup> + <Compile Include="Properties\AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + </EmbeddedResource> + <None Include="app.config" /> + <None Include="packages.config" /> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\SideChains\Tango.AutoComplete\Tango.AutoComplete.csproj"> + <Project>{bb2abb74-ba58-4812-83aa-ec8171f42df4}</Project> + <Name>Tango.AutoComplete</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Tango.BL\Tango.BL.csproj"> + <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project> + <Name>Tango.BL</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Tango.Core\Tango.Core.csproj"> + <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project> + <Name>Tango.Core</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Tango.DragAndDrop\Tango.DragAndDrop.csproj"> + <Project>{b112d89a-a106-41ae-a0c1-4abc84c477f5}</Project> + <Name>Tango.DragAndDrop</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Tango.Logging\Tango.Logging.csproj"> + <Project>{bc932dbd-7cdb-488c-99e4-f02cf441f55e}</Project> + <Name>Tango.Logging</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Tango.Settings\Tango.Settings.csproj"> + <Project>{d8f1ad85-526a-4f50-b6dc-d437af63d8d8}</Project> + <Name>Tango.Settings</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Tango.SharedUI\Tango.SharedUI.csproj"> + <Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project> + <Name>Tango.SharedUI</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.MachineStudio.Common\Tango.MachineStudio.Common.csproj"> + <Project>{cb0b0aa2-bb24-4bca-a720-45e397684e12}</Project> + <Name>Tango.MachineStudio.Common</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <Page Include="Views\AddressView.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="Views\ContactView.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="Views\MainView.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="Views\OrganizationManagementView.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="Views\OrganizationSelectionView.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="Views\UserManagementView.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="Views\UserView.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\organization.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\users-and-roles.jpg" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\users.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\user.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\roles.png" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/UsersAndRolesModule.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/UsersAndRolesModule.cs new file mode 100644 index 000000000..c0d1326cf --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/UsersAndRolesModule.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media.Imaging; +using Tango.BL.Enumerations; +using Tango.MachineStudio.Common; +using Tango.MachineStudio.UsersAndRoles.Views; +using Tango.SharedUI.Helpers; + +namespace Tango.MachineStudio.UsersAndRoles +{ + public class UsersAndRolesModule : StudioModuleBase + { + public override string Name + { + get + { + return "Users & Roles"; + } + } + + public override string Description + { + get + { + return "Manage organizations users and their roles."; + } + } + + public override BitmapSource Image + { + get + { + return ResourceHelper.GetImageFromResources("Images/users-and-roles.jpg"); + } + } + + public override FrameworkElement MainView + { + get + { + return new MainView(); + } + } + + public override Permissions Permission + { + get + { + return Permissions.RunUsersAndRolesModule; + } + } + + public override void Dispose() + { + + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/ViewModelLocator.cs new file mode 100644 index 000000000..588d2db09 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/ViewModelLocator.cs @@ -0,0 +1,36 @@ +using GalaSoft.MvvmLight; +using GalaSoft.MvvmLight.Ioc; +using Microsoft.Practices.ServiceLocation; +using Tango.MachineStudio.UsersAndRoles.Navigation; +using Tango.MachineStudio.UsersAndRoles.ViewModels; + +namespace Tango.MachineStudio.UsersAndRoles +{ + /// <summary> + /// This class contains static references to all the view models in the + /// application and provides an entry point for the bindings. + /// </summary> + public static class ViewModelLocator + { + /// <summary> + /// Initializes a new instance of the ViewModelLocator class. + /// </summary> + static ViewModelLocator() + { + ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); + + SimpleIoc.Default.Register<MainViewVM>(); + + SimpleIoc.Default.Unregister<UsersAndRolesNavigationManager>(); + SimpleIoc.Default.Register<UsersAndRolesNavigationManager>(() => new UsersAndRolesNavigationManager()); + } + + public static MainViewVM MainViewVM + { + get + { + return ServiceLocator.Current.GetInstance<MainViewVM>(); + } + } + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/ViewModels/MainViewVM.cs new file mode 100644 index 000000000..7d82cbbbc --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/ViewModels/MainViewVM.cs @@ -0,0 +1,370 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; +using Tango.BL; +using Tango.BL.Entities; +using Tango.Core.Commands; +using Tango.MachineStudio.Common.Notifications; +using Tango.MachineStudio.UsersAndRoles.Navigation; +using Tango.MachineStudio.UsersAndRoles.Providers; +using Tango.SharedUI; + +namespace Tango.MachineStudio.UsersAndRoles.ViewModels +{ + public class MainViewVM : ViewModel + { + private ObservablesContext _organizationsContext; + private ObservablesContext _manageContext; + private ObservablesContext _userContext; + private UsersAndRolesNavigationManager _navigation; + private INotificationProvider _notification; + + private ObservableCollection<Organization> _organizations; + public ObservableCollection<Organization> Organizations + { + get { return _organizations; } + set { _organizations = value; RaisePropertyChangedAuto(); } + } + + private Organization _selectedOrganization; + public Organization SelectedOrganization + { + get { return _selectedOrganization; } + set { _selectedOrganization = value; RaisePropertyChangedAuto(); } + } + + private Organization _managedOrganization; + public Organization ManagedOrganization + { + get { return _managedOrganization; } + set { _managedOrganization = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection<Role> _roles; + public ObservableCollection<Role> Roles + { + get { return _roles; } + set { _roles = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection<Role> _managedUserRoles; + public ObservableCollection<Role> ManagedUserRoles + { + get { return _managedUserRoles; } + set { _managedUserRoles = value; RaisePropertyChangedAuto(); } + } + + private User _selectedUser; + public User SelectedUser + { + get { return _selectedUser; } + set { _selectedUser = value; RaisePropertyChangedAuto(); } + } + + private User _managedUser; + public User ManagedUser + { + get { return _managedUser; } + set { _managedUser = value; RaisePropertyChangedAuto(); } + } + + private Place _selectedUserPlace; + public Place SelectedUserPlace + { + get { return _selectedUserPlace; } + set + { + _selectedUserPlace = value; + + if (_selectedUserPlace != null && _selectedUserPlace.Address != null) + { + SetUserPlace(value); + } + } + } + + private Place _selectedOrganizationPlace; + public Place SelectedOrganizationPlace + { + get { return _selectedOrganizationPlace; } + set + { + _selectedOrganizationPlace = value; + + if (_selectedOrganizationPlace != null && _selectedOrganizationPlace.Address != null) + { + SetOrganizationPlace(value); + } + } + } + + public RelayCommand ManageOrganizationCommand { get; set; } + + public RelayCommand BackToOrganizationsCommand { get; set; } + + public RelayCommand ManageUserCommand { get; set; } + + public RelayCommand SaveOrganizationCommand { get; set; } + + public RelayCommand AddOrganizationCommand { get; set; } + + public RelayCommand RemoveOrganizationCommand { get; set; } + + public RelayCommand BackToManagedOrganizationCommand { get; set; } + + public RelayCommand<Role> RemoveRoleCommand { get; set; } + + public RelayCommand SaveManagedUserCommand { get; set; } + + public RelayCommand AddUserCommand { get; set; } + + public RelayCommand RemoveUserCommand { get; set; } + + public MainViewVM(UsersAndRolesNavigationManager navigation, INotificationProvider notification) + { + _navigation = navigation; + _notification = notification; + + LoadOrganizations(); + + ManageOrganizationCommand = new RelayCommand(LoadSelectedOrganization, () => SelectedOrganization != null); + BackToOrganizationsCommand = new RelayCommand(BackToOrganizations); + ManageUserCommand = new RelayCommand(LoadSelectedUser, () => SelectedUser != null); + SaveOrganizationCommand = new RelayCommand(SaveOrganization); + AddOrganizationCommand = new RelayCommand(AddOrganization); + RemoveOrganizationCommand = new RelayCommand(RemoveOrganization, () => SelectedOrganization != null); + BackToManagedOrganizationCommand = new RelayCommand(BackToManagedOrganization); + RemoveRoleCommand = new RelayCommand<Role>(RemoveUserRole); + SaveManagedUserCommand = new RelayCommand(SaveManagedUser); + AddUserCommand = new RelayCommand(AddNewUser); + RemoveUserCommand = new RelayCommand(RemoveSelectedUser, () => SelectedUser != null); + } + + private async void AddOrganization() + { + String name = _notification.ShowTextInput("Enter organization name", "Name"); + + if (!String.IsNullOrWhiteSpace(name)) + { + using (_notification.PushTaskItem("Adding new organization...")) + { + Organization org = new Organization(); + org.Name = name; + org.Address = new Address(); + org.Contact = new Contact(); + _organizationsContext.Organizations.Add(org); + await org.SaveAsync(_organizationsContext); + Organizations = _organizationsContext.Organizations.ToObservableCollection(); + SelectedOrganization = org; + LoadSelectedOrganization(); + } + } + } + + private async void RemoveOrganization() + { + if (_notification.ShowQuestion("Are you sure you want to remove " + SelectedOrganization.Name + " organization?")) + { + using (_notification.PushTaskItem("Removing organization...")) + { + await SelectedOrganization.DeleteCascadeAsync(_organizationsContext); + LoadOrganizations(); + } + } + } + + private async void SaveOrganization() + { + using (_notification.PushTaskItem("Saving organization address and contact...")) + { + await ManagedOrganization.SaveAsync(_manageContext); + LoadOrganizations(); + SelectedOrganization = Organizations.SingleOrDefault(x => x.Guid == ManagedOrganization.Guid); + } + } + + private void LoadSelectedUser() + { + using (_notification.PushTaskItem("Loading user details...")) + { + Task.Factory.StartNew(() => + { + _userContext = ObservablesContext.CreateDefault(); + Roles = _userContext.Roles.ToObservableCollection(); + ManagedUser = _userContext.Users.SingleOrDefault(x => x.Guid == SelectedUser.Guid); + ManagedUserRoles = ManagedUser.Roles.ToObservableCollection(); + + InvokeUI(() => _navigation.NavigateTo(UsersAndRolesNavigationView.UserManagementView)); + }); + } + } + + private void BackToOrganizations() + { + _navigation.NavigateTo(UsersAndRolesNavigationView.OrganizationSelectionView); + } + + private void BackToManagedOrganization() + { + _navigation.NavigateTo(UsersAndRolesNavigationView.OrganizationManagementView); + } + + private void RemoveUserRole(Role role) + { + ManagedUserRoles.Remove(role); + + foreach (var userRole in ManagedUser.UsersRoles.Where(x => x.Role == role).ToList()) + { + userRole.DefferedDelete(_userContext); + } + } + + private async void SaveManagedUser() + { + try + { + ManagedUser.Validate(_userContext); + } + catch (Exception ex) + { + _notification.ShowError(ex.Message); + return; + } + + using (_notification.PushTaskItem("Saving user details...")) + { + await ManagedUser.SaveAsync(_userContext); + LoadSelectedOrganization(); + } + } + + private void LoadSelectedOrganization() + { + using (_notification.PushTaskItem("Loading organization...")) + { + Task.Factory.StartNew(() => + { + _manageContext = ObservablesContext.CreateDefault(); + ManagedOrganization = _manageContext.Organizations.SingleOrDefault(x => x.Guid == SelectedOrganization.Guid); + + InvokeUI(() => _navigation.NavigateTo(UsersAndRolesNavigationView.OrganizationManagementView)); + }); + } + } + + private void LoadOrganizations() + { + _organizationsContext = ObservablesContext.CreateDefault(); + _organizationsContext.Configuration.LazyLoadingEnabled = false; + + _organizationsContext.Users.ToList(); + _organizationsContext.Contacts.ToList(); + _organizationsContext.Addresses.ToList(); + _organizationsContext.Machines.ToList(); + + Organizations = _organizationsContext.Organizations.ToObservableCollection(); + } + + public void OnDropRole(Role role) + { + ManagedUser.UsersRoles.Add(new UsersRole() + { + Role = role, + RoleGuid = role.Guid, + User = ManagedUser, + UserGuid = ManagedUser.Guid, + }); + + ManagedUserRoles.Add(role); + } + + private async void RemoveSelectedUser() + { + if (_notification.ShowQuestion("Are you sure you want to remove the selected user?")) + { + using (_notification.PushTaskItem("Removing user...")) + { + await SelectedUser.DeleteCascadeAsync(_manageContext); + LoadSelectedOrganization(); + } + } + } + + private async void AddNewUser() + { + String email = _notification.ShowTextInput("Enter user email", "email"); + + if (!String.IsNullOrWhiteSpace(email)) + { + User user = new User(); + user.Email = email; + user.Password = "1111"; + user.Contact = new Contact() + { + FirstName = "Twine", + LastName = "User", + Email = email, + }; + + user.UsersRoles.Add(new UsersRole() + { + User = user, + Role = _manageContext.Roles.SingleOrDefault(x => x.Code == (int)BL.Enumerations.Roles.User) + }); + + try + { + user.Validate(_manageContext); + } + catch (Exception ex) + { + _notification.ShowError(ex.Message); + return; + } + + user.Address = new Address(); + + ManagedOrganization.Users.Add(user); + + using (_notification.PushTaskItem("Adding new user...")) + { + await ManagedOrganization.SaveAsync(_manageContext); + LoadOrganizations(); + SelectedOrganization = Organizations.SingleOrDefault(x => x.Guid == ManagedOrganization.Guid); + } + } + } + + private void SetUserPlace(Place place) + { + ManagedUser.Address.AddressString = place.Address.Road; + ManagedUser.Address.City = place.Address.City; + ManagedUser.Address.Country = place.Address.Country; + ManagedUser.Address.CountryCode = place.Address.CountryCode; + ManagedUser.Address.Locality = place.Address.CountryCode; + ManagedUser.Address.PostalCode = place.Address.PostalCode; + ManagedUser.Address.State = place.Address.State; + } + + private void SetOrganizationPlace(Place place) + { + ManagedOrganization.Address.AddressString = place.Address.Road; + ManagedOrganization.Address.City = place.Address.City; + ManagedOrganization.Address.Country = place.Address.Country; + ManagedOrganization.Address.CountryCode = place.Address.CountryCode; + ManagedOrganization.Address.Locality = place.Address.CountryCode; + ManagedOrganization.Address.PostalCode = place.Address.PostalCode; + ManagedOrganization.Address.State = place.Address.State; + } + + protected override void RaisePropertyChangedAuto([CallerMemberName] string caller = null) + { + base.RaisePropertyChangedAuto(caller); + InvalidateRelayCommands(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/AddressView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/AddressView.xaml new file mode 100644 index 000000000..937cf14dd --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/AddressView.xaml @@ -0,0 +1,33 @@ +<UserControl x:Class="Tango.MachineStudio.UsersAndRoles.Views.AddressView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:vm="clr-namespace:Tango.MachineStudio.UsersAndRoles.ViewModels" + xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" + xmlns:autoComplete="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete" + xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" + xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local="clr-namespace:Tango.MachineStudio.UsersAndRoles.Views" + mc:Ignorable="d" + d:DesignHeight="300" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=entities:Address, IsDesignTimeCreatable=False}"> + <Grid> + <controls:TableGrid> + <TextBlock Text="COUNTRY"></TextBlock> + <TextBox Text="{Binding Country}" /> + <TextBlock Text="COUNTRY CODE"></TextBlock> + <TextBox IsReadOnly="True" Text="{Binding CountryCode}"></TextBox> + <TextBlock Text="STATE"></TextBlock> + <TextBox Text="{Binding State}"></TextBox> + <TextBlock Text="CITY"></TextBlock> + <TextBox Text="{Binding City}" /> + <TextBlock Text="POSTAL CODE"></TextBlock> + <TextBox Text="{Binding PostalCode}"></TextBox> + <TextBlock Text="LOCALITY"></TextBlock> + <TextBox Text="{Binding Locality}" /> + <TextBlock Text="ADDRESS"></TextBlock> + <TextBox Text="{Binding AddressString}"></TextBox> + </controls:TableGrid> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/AddressView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/AddressView.xaml.cs new file mode 100644 index 000000000..e5d644626 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/AddressView.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 Tango.MachineStudio.UsersAndRoles.Views +{ + /// <summary> + /// Interaction logic for AddressView.xaml + /// </summary> + public partial class AddressView : UserControl + { + public AddressView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/ContactView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/ContactView.xaml new file mode 100644 index 000000000..cdfa28c50 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/ContactView.xaml @@ -0,0 +1,29 @@ +<UserControl x:Class="Tango.MachineStudio.UsersAndRoles.Views.ContactView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:vm="clr-namespace:Tango.MachineStudio.UsersAndRoles.ViewModels" + xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" + xmlns:autoComplete="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete" + xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" + xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local="clr-namespace:Tango.MachineStudio.UsersAndRoles.Views" + mc:Ignorable="d" + d:DesignHeight="300" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=entities:Contact, IsDesignTimeCreatable=False}"> + <Grid> + <controls:TableGrid> + <TextBlock>FIRST NAME</TextBlock> + <TextBox Text="{Binding FirstName}"></TextBox> + <TextBlock>LAST NAME</TextBlock> + <TextBox Text="{Binding LastName}"></TextBox> + <TextBlock>EMAIL</TextBlock> + <TextBox Text="{Binding Email}"></TextBox> + <TextBlock>PHONE NUMBER</TextBlock> + <TextBox Text="{Binding PhoneNumber}"></TextBox> + <TextBlock>FAX</TextBlock> + <TextBox Text="{Binding Fax}"></TextBox> + </controls:TableGrid> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/ContactView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/ContactView.xaml.cs new file mode 100644 index 000000000..fad93d63d --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/ContactView.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 Tango.MachineStudio.UsersAndRoles.Views +{ + /// <summary> + /// Interaction logic for ContactView.xaml + /// </summary> + public partial class ContactView : UserControl + { + public ContactView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/MainView.xaml new file mode 100644 index 000000000..90166f445 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/MainView.xaml @@ -0,0 +1,28 @@ +<UserControl x:Class="Tango.MachineStudio.UsersAndRoles.Views.MainView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:global="clr-namespace:Tango.MachineStudio.UsersAndRoles" + xmlns:vm="clr-namespace:Tango.MachineStudio.UsersAndRoles.ViewModels" + xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" + xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" + xmlns:local="clr-namespace:Tango.MachineStudio.UsersAndRoles.Views" + mc:Ignorable="d" + d:DesignHeight="1080" d:DesignWidth="1920" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> + <Grid> + <controls:MultiTransitionControl x:Name="TransitionControl" TransitionType="Slide"> + <controls:MultiTransitionControl.Controls> + <ContentControl Tag="OrganizationSelectionView"> + <local:OrganizationSelectionView/> + </ContentControl> + <ContentControl Tag="OrganizationManagementView"> + <local:OrganizationManagementView/> + </ContentControl> + <ContentControl Tag="UserManagementView"> + <local:UserManagementView/> + </ContentControl> + </controls:MultiTransitionControl.Controls> + </controls:MultiTransitionControl> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/MainView.xaml.cs new file mode 100644 index 000000000..9fe030a3a --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/MainView.xaml.cs @@ -0,0 +1,31 @@ +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 Tango.MachineStudio.UsersAndRoles.Views +{ + /// <summary> + /// Interaction logic for MainView.xaml + /// </summary> + public partial class MainView : UserControl + { + public static MainView Instance { get; set; } + + public MainView() + { + InitializeComponent(); + Instance = this; + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationManagementView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationManagementView.xaml new file mode 100644 index 000000000..64b05769a --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationManagementView.xaml @@ -0,0 +1,151 @@ +<UserControl x:Class="Tango.MachineStudio.UsersAndRoles.Views.OrganizationManagementView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:global="clr-namespace:Tango.MachineStudio.UsersAndRoles" + xmlns:vm="clr-namespace:Tango.MachineStudio.UsersAndRoles.ViewModels" + xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" + xmlns:autoComplete="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete" + xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" + xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:providers="clr-namespace:Tango.MachineStudio.UsersAndRoles.Providers" + xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL" + xmlns:local="clr-namespace:Tango.MachineStudio.UsersAndRoles.Views" + xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" + mc:Ignorable="d" + d:DesignHeight="1080" d:DesignWidth="1920" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}" Background="Transparent"> + + <UserControl.Resources> + <converters:DateTimeUTCToShortDateTimeConverter x:Key="DateTimeUTCToShortDateTimeConverter" /> + <providers:PlacesProvider x:Key="PlacesProvider" /> + </UserControl.Resources> + + <Grid> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="400"/> + <ColumnDefinition Width="1*"/> + </Grid.ColumnDefinitions> + + <Border Background="#A6FFFFFF" BorderBrush="Gray" BorderThickness="0 0 1 0"> + <Grid Margin="10 20 10 10"> + <StackPanel HorizontalAlignment="Center"> + + <StackPanel Orientation="Horizontal" Margin="-30 0 0 30"> + <Image Source="../Images/organization.png" Width="58" /> + <TextBlock Margin="10 0 0 0" FontSize="40" VerticalAlignment="Center" Text="{Binding ManagedOrganization.Name}"></TextBlock> + </StackPanel> + + <TextBlock FontSize="14" FontWeight="SemiBold">ADDRESS</TextBlock> + + <Border BorderBrush="Gray" BorderThickness="1" Width="300" HorizontalAlignment="Left" Padding="5" Margin="0 10 0 0" Background="#A9FFFFFF" Height="300"> + <DockPanel> + <DockPanel DockPanel.Dock="Top"> + <materialDesign:PackIcon Kind="Magnify" DockPanel.Dock="Left" Width="24" Height="24" /> + <autoComplete:AutoCompleteTextBox x:Name="address_auto" Margin="5 0 0 0" Delay="500" DisplayMember="DisplayName" SelectedItem="{Binding SelectedOrganizationPlace,Mode=OneWayToSource}" Provider="{StaticResource PlacesProvider}" materialDesign:HintAssist.Hint="Find address" /> + </DockPanel> + <local:AddressView DataContext="{Binding ManagedOrganization.Address}" /> + </DockPanel> + </Border> + + <TextBlock FontSize="14" FontWeight="SemiBold" Margin="0 40 0 0">CONTACT</TextBlock> + + <Border BorderBrush="Gray" BorderThickness="1" Width="300" HorizontalAlignment="Left" Padding="5" Margin="0 10 0 0" Background="#A9FFFFFF" Height="250"> + <local:ContactView DataContext="{Binding ManagedOrganization.Contact}" /> + </Border> + + <Button Margin="0 40 0 0" MinWidth="160" Height="50" Command="{Binding SaveOrganizationCommand}" Background="Gray" BorderBrush="Gray"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="ContentSave" Width="20" Height="20" /> + <TextBlock Margin="5 0 0 0" FontSize="16">SAVE</TextBlock> + </StackPanel> + </Button> + + </StackPanel> + </Grid> + </Border> + + <Grid Grid.Column="1"> + <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="30" FontStyle="Italic" Margin="150 40"> + <Run Text="{Binding ManagedOrganization.Name}"></Run> <Run Text="Users"></Run> + </TextBlock> + <DockPanel Margin="100" MaxWidth="1200"> + <Grid DockPanel.Dock="Top"> + <StackPanel> + <Image Source="../Images/users.png" Width="300" Height="250" /> + <Button Margin="0 -210 0 0" MinWidth="160" Height="50" Command="{Binding BackToOrganizationsCommand}" HorizontalAlignment="Left"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="KeyboardBackspace" Width="20" Height="20" /> + <TextBlock Margin="5 0 0 0" FontSize="16">BACK</TextBlock> + </StackPanel> + </Button> + </StackPanel> + </Grid> + <Grid DockPanel.Dock="Bottom"> + <StackPanel VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Left" Margin="0 0 0 0"> + <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="#FF7575" BorderBrush="#FF7575" Command="{Binding RemoveUserCommand}"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="Delete" Width="20" Height="20" /> + <TextBlock Margin="5 0 0 0" FontSize="16">DELETE</TextBlock> + </StackPanel> + </Button> + <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="#65C682" BorderBrush="#65C682" Command="{Binding AddUserCommand}"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="Plus" Width="20" Height="20" /> + <TextBlock Margin="5 0 0 0" FontSize="16">NEW USER</TextBlock> + </StackPanel> + </Button> + </StackPanel> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Right"> + <Button Margin="50 0 0 0" MinWidth="200" Height="60" Command="{Binding ManageUserCommand}"> + <StackPanel Orientation="Horizontal"> + <TextBlock FontSize="18" VerticalAlignment="Center">MANAGE</TextBlock> + <materialDesign:PackIcon Margin="5 0 0 0" Kind="ChevronRight" Width="30" Height="30" /> + </StackPanel> + </Button> + </StackPanel> + </Grid> + <Grid> + <DataGrid Margin="0 0 0 10" ItemsSource="{Binding ManagedOrganization.Users}" SelectedItem="{Binding SelectedUser}" d:DataContext="{d:DesignInstance Type=entities:User, IsDesignTimeCreatable=False}" BorderBrush="Silver" BorderThickness="1" Background="#93FFFFFF" AlternatingRowBackground="#C9F6F6F6" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" IsReadOnly="True"> + <DataGrid.CellStyle> + <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> + <Setter Property="BorderThickness" Value="0"/> + <Setter Property="FocusVisualStyle" Value="{x:Null}"/> + <Setter Property="VerticalContentAlignment" Value="Center"></Setter> + </Style> + </DataGrid.CellStyle> + <DataGrid.Columns> + <DataGridTextColumn Header="LAST UPDATED" Binding="{Binding LastUpdated,Converter={StaticResource DateTimeUTCToShortDateTimeConverter}}" Width="1*" /> + <DataGridTextColumn Header="NAME" Binding="{Binding Contact.FullName}" Width="1*" /> + <DataGridTextColumn Header="LOGIN EMAIL" Binding="{Binding Email}" Width="1*" /> + <DataGridTextColumn Header="CONTACT EMAIL" Binding="{Binding Contact.Email}" Width="1*" /> + <DataGridTextColumn Header="ADDRESS" Binding="{Binding Address.AddressString}" Width="1*" /> + <DataGridTemplateColumn Header="ROLES" Width="1*"> + <DataGridTemplateColumn.CellTemplate> + <DataTemplate> + <TextBlock Text="{Binding Roles[0].Name}" TextTrimming="CharacterEllipsis"> + <TextBlock.ToolTip> + <ItemsControl ItemsSource="{Binding Roles}"> + <ItemsControl.ItemTemplate> + <DataTemplate> + <StackPanel Orientation="Horizontal" Margin="2"> + <materialDesign:PackIcon Kind="AccountKey" Width="16" Height="16" /> + <TextBlock Margin="5 0 0 0" Text="{Binding Name}"></TextBlock> + </StackPanel> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + </TextBlock.ToolTip> + </TextBlock> + </DataTemplate> + </DataGridTemplateColumn.CellTemplate> + </DataGridTemplateColumn> + </DataGrid.Columns> + </DataGrid> + </Grid> + </DockPanel> + </Grid> + </Grid> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationManagementView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationManagementView.xaml.cs new file mode 100644 index 000000000..e2c44a584 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationManagementView.xaml.cs @@ -0,0 +1,34 @@ +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; +using static Tango.SharedUI.Controls.MultiTransitionControl; + +namespace Tango.MachineStudio.UsersAndRoles.Views +{ + /// <summary> + /// Interaction logic for OrganizationManagementView.xaml + /// </summary> + public partial class OrganizationManagementView : UserControl , ITransitionView + { + public OrganizationManagementView() + { + InitializeComponent(); + } + + public void OnTransitionCompleted() + { + address_auto.Text = ""; + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationSelectionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationSelectionView.xaml new file mode 100644 index 000000000..16dd36360 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationSelectionView.xaml @@ -0,0 +1,69 @@ +<UserControl x:Class="Tango.MachineStudio.UsersAndRoles.Views.OrganizationSelectionView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local="clr-namespace:Tango.MachineStudio.UsersAndRoles.Views" + xmlns:global="clr-namespace:Tango.MachineStudio.UsersAndRoles" + xmlns:vm="clr-namespace:Tango.MachineStudio.UsersAndRoles.ViewModels" + xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" + xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" + xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" + mc:Ignorable="d" + d:DesignHeight="1080" d:DesignWidth="1920" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}" Background="Transparent"> + + <UserControl.Resources> + <converters:DateTimeUTCToShortDateTimeConverter x:Key="DateTimeUTCToShortDateTimeConverter" /> + </UserControl.Resources> + + <Grid> + <DockPanel Margin="100" MaxWidth="1200"> + <Grid DockPanel.Dock="Top"> + <Image Source="../Images/organization.png" Width="300" /> + </Grid> + <Grid DockPanel.Dock="Bottom"> + <StackPanel VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Left" Margin="0 0 0 0"> + <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="#FF7575" BorderBrush="#FF7575" Command="{Binding RemoveOrganizationCommand}"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="Delete" Width="20" Height="20" /> + <TextBlock Margin="5 0 0 0" FontSize="16">DELETE</TextBlock> + </StackPanel> + </Button> + <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="#65C682" BorderBrush="#65C682" Command="{Binding AddOrganizationCommand}"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="Plus" Width="20" Height="20" /> + <TextBlock Margin="5 0 0 0" FontSize="16">NEW ORGANIZATION</TextBlock> + </StackPanel> + </Button> + </StackPanel> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Right"> + <Button Margin="50 0 0 0" MinWidth="200" Height="60" Command="{Binding ManageOrganizationCommand}"> + <StackPanel Orientation="Horizontal"> + <TextBlock FontSize="18" VerticalAlignment="Center">MANAGE</TextBlock> + <materialDesign:PackIcon Margin="5 0 0 0" Kind="ChevronRight" Width="30" Height="30" /> + </StackPanel> + </Button> + </StackPanel> + </Grid> + <Grid> + <DataGrid Margin="0 0 0 10" BorderBrush="Silver" IsReadOnly="True" BorderThickness="1" Background="#93FFFFFF" AlternatingRowBackground="#C9F6F6F6" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding Organizations}" SelectedItem="{Binding SelectedOrganization}"> + <DataGrid.CellStyle> + <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> + <Setter Property="BorderThickness" Value="0"/> + <Setter Property="FocusVisualStyle" Value="{x:Null}"/> + <Setter Property="VerticalContentAlignment" Value="Center"></Setter> + </Style> + </DataGrid.CellStyle> + <DataGrid.Columns> + <DataGridTextColumn Header="NAME" Binding="{Binding Name}" Width="1*" /> + <DataGridTextColumn Header="LAST UPDATED" Binding="{Binding LastUpdated,Converter={StaticResource DateTimeUTCToShortDateTimeConverter}}" Width="1*" /> + <DataGridTextColumn Header="CONTACT" Binding="{Binding Contact.FullName}" Width="1*" /> + <DataGridTextColumn Header="ADDRESS" Binding="{Binding Address.AddressString}" Width="1*" /> + <DataGridTextColumn Header="MACHINES" Binding="{Binding Machines.Count}" Width="1*" /> + <DataGridTextColumn Header="USERS" Binding="{Binding Users.Count}" Width="1*" /> + </DataGrid.Columns> + </DataGrid> + </Grid> + </DockPanel> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationSelectionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationSelectionView.xaml.cs new file mode 100644 index 000000000..16c8b2b24 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationSelectionView.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 Tango.MachineStudio.UsersAndRoles.Views +{ + /// <summary> + /// Interaction logic for OrganizationSelectionView.xaml + /// </summary> + public partial class OrganizationSelectionView : UserControl + { + public OrganizationSelectionView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/UserManagementView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/UserManagementView.xaml new file mode 100644 index 000000000..ccb38b198 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/UserManagementView.xaml @@ -0,0 +1,243 @@ +<UserControl x:Class="Tango.MachineStudio.UsersAndRoles.Views.UserManagementView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:global="clr-namespace:Tango.MachineStudio.UsersAndRoles" + xmlns:vm="clr-namespace:Tango.MachineStudio.UsersAndRoles.ViewModels" + xmlns:providers="clr-namespace:Tango.MachineStudio.UsersAndRoles.Providers" + xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" + xmlns:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop" + xmlns:autoComplete="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete" + xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" + xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL" + xmlns:local="clr-namespace:Tango.MachineStudio.UsersAndRoles.Views" + xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" + mc:Ignorable="d" + d:DesignHeight="1080" d:DesignWidth="1920" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> + + <UserControl.Resources> + <providers:PlacesProvider x:Key="PlacesProvider" /> + </UserControl.Resources> + + <Grid> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="1*"/> + <ColumnDefinition Width="400"/> + </Grid.ColumnDefinitions> + + <Grid Margin="10"> + <DockPanel Margin="100" MaxWidth="1200"> + <Grid DockPanel.Dock="Top"> + <Grid> + <StackPanel> + <StackPanel Orientation="Horizontal"> + <Button MinWidth="160" Height="50" Command="{Binding BackToManagedOrganizationCommand}" HorizontalAlignment="Left"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="KeyboardBackspace" Width="20" Height="20" /> + <TextBlock Margin="5 0 0 0" FontSize="16">BACK</TextBlock> + </StackPanel> + </Button> + <Image Source="../Images/user.png" Width="100" RenderOptions.BitmapScalingMode="Fant" Margin="130 0 0 0"></Image> + <TextBlock Text="{Binding ManagedUser.Contact.FullName,FallbackValue='Roy Ben Shabat'}" VerticalAlignment="Center" FontSize="25" Margin="10 0 0 0"></TextBlock> + </StackPanel> + + <StackPanel Orientation="Horizontal" Margin="0 20 0 0" HorizontalAlignment="Right"> + <StackPanel> + <TextBlock FontSize="16" FontWeight="SemiBold">LOGIN</TextBlock> + <Border Width="300" BorderThickness="1" BorderBrush="Gray" Margin="0 5 0 0" Padding="15 5" Height="150" Background="#8EFFFFFF"> + <local:UserView FontSize="10" DataContext="{Binding ManagedUser}" /> + </Border> + </StackPanel> + <StackPanel Margin="10 0 0 0"> + <TextBlock FontSize="16" FontWeight="SemiBold">CONTACT</TextBlock> + <Border Width="300" BorderThickness="1" BorderBrush="Gray" Margin="0 5 0 0" Padding="15 5" Height="250" Background="#8EFFFFFF"> + <local:ContactView FontSize="10" DataContext="{Binding ManagedUser.Contact}" /> + </Border> + </StackPanel> + <StackPanel Margin="10 0 0 0"> + <TextBlock FontSize="16" FontWeight="SemiBold">ADDRESS</TextBlock> + <Border Width="300" BorderThickness="1" BorderBrush="Gray" Margin="0 5 0 0" Padding="15 5" Height="300" Background="#8EFFFFFF"> + <DockPanel> + <DockPanel DockPanel.Dock="Top"> + <materialDesign:PackIcon Kind="Magnify" DockPanel.Dock="Left" Width="24" Height="24" /> + <autoComplete:AutoCompleteTextBox x:Name="address_auto" Margin="5 0 0 0" Delay="500" DisplayMember="DisplayName" SelectedItem="{Binding SelectedUserPlace,Mode=OneWayToSource}" Provider="{StaticResource PlacesProvider}" materialDesign:HintAssist.Hint="Find address" /> + </DockPanel> + <local:AddressView FontSize="10" DataContext="{Binding ManagedUser.Address}" /> + </DockPanel> + </Border> + </StackPanel> + </StackPanel> + </StackPanel> + </Grid> + </Grid> + <Grid DockPanel.Dock="Bottom"> + <Button Margin="0 10 0 0" MinWidth="200" Height="60" Command="{Binding SaveManagedUserCommand}" HorizontalAlignment="Right"> + <StackPanel Orientation="Horizontal"> + <TextBlock FontSize="18" VerticalAlignment="Center">SAVE</TextBlock> + <materialDesign:PackIcon Margin="5 0 0 0" Kind="ContentSave" Width="30" Height="30" /> + </StackPanel> + </Button> + </Grid> + <Grid> + <DockPanel Margin="0 20 0 0"> + <TextBlock DockPanel.Dock="Top" FontSize="16" FontWeight="SemiBold">ROLES</TextBlock> + <Grid Margin="0 5 0 0" Style="{StaticResource droppableGrid}" dragAndDrop:DragAndDropService.Drop="OnDropRole" Background="#7BFFFFFF"> + <TextBlock HorizontalAlignment="Center" VerticalAlignment="Top" Foreground="Silver" FontSize="20">DRAG & DROP ROLES</TextBlock> + <Border BorderBrush="Gray" BorderThickness="1" Padding="10"> + <ListBox ItemsSource="{Binding ManagedUserRoles}" ItemContainerStyle="{StaticResource basicListBoxItem}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled"> + <ListBox.ItemsPanel> + <ItemsPanelTemplate> + <WrapPanel Orientation="Horizontal" /> + </ItemsPanelTemplate> + </ListBox.ItemsPanel> + <ListBox.ItemTemplate> + <DataTemplate DataType="{x:Type entities:Role}"> + <Grid> + <Grid.ToolTip> + <StackPanel> + <TextBlock Text="{Binding Description}" FontSize="10" Margin="0 0 0 10"></TextBlock> + <ItemsControl ItemsSource="{Binding RolesPermissions}"> + <ItemsControl.ItemTemplate> + <DataTemplate> + <Grid> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="Security" Width="12" /> + <TextBlock Margin="5 0 0 0" FontSize="10" Text="{Binding Permission.Name}"></TextBlock> + </StackPanel> + </Grid> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + </StackPanel> + </Grid.ToolTip> + <Border Margin="5" CornerRadius="5" Width="100" Height="100" BorderThickness="1" Padding="2"> + <Border.Style> + <Style TargetType="Border"> + <Setter Property="BorderBrush" Value="Silver"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected}" Value="True"> + <Setter Property="BorderBrush" Value="{StaticResource AccentColorBrush}"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Border.Style> + <Border.Background> + <LinearGradientBrush> + <GradientStop Color="White"/> + <GradientStop Color="#FFD6D6D6" Offset="1"/> + </LinearGradientBrush> + </Border.Background> + <Grid> + <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"> + <Image Source="../Images/roles.png" Width="32" RenderOptions.BitmapScalingMode="Fant"></Image> + <TextBlock Text="{Binding Name}" TextWrapping="Wrap" HorizontalAlignment="Center" TextAlignment="Center" FontSize="13" Margin="5"></TextBlock> + </StackPanel> + </Grid> + </Border> + + <Button HorizontalAlignment="Right" VerticalAlignment="Top" Margin="10" Cursor="Hand" ToolTip="Remove Role" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.RemoveRoleCommand}" CommandParameter="{Binding}"> + <Button.Style> + <Style TargetType="Button" BasedOn="{StaticResource emptyButton}"> + <Setter Property="Visibility" Value="Hidden"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Grid},Path=IsMouseOver}" Value="True"> + <Setter Property="Visibility" Value="Visible"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Button.Style> + <materialDesign:PackIcon Kind="Delete" Foreground="#FF5C5C" Width="16" Height="16" /> + </Button> + </Grid> + </DataTemplate> + </ListBox.ItemTemplate> + </ListBox> + </Border> + </Grid> + </DockPanel> + </Grid> + </DockPanel> + </Grid> + + <Grid Grid.Column="1" Background="White"> + <DockPanel Margin="10"> + <StackPanel Orientation="Horizontal" DockPanel.Dock="Top"> + <Image Source="../Images/roles.png" Width="70" RenderOptions.BitmapScalingMode="Fant"></Image> + <TextBlock FontSize="16" FontWeight="SemiBold" VerticalAlignment="Center" Margin="10 0 0 0">AVAILABLE ROLES</TextBlock> + </StackPanel> + + <Grid> + <ListBox ItemsSource="{Binding Roles}" ItemContainerStyle="{StaticResource basicListBoxItem}" HorizontalContentAlignment="Stretch" Background="Transparent"> + <ListBox.ItemTemplate> + <DataTemplate> + <Grid Background="Transparent" IsHitTestVisible="True" Style="{StaticResource draggableGrid}" dragAndDrop:DragAndDropService.DraggableBorderBrush="{StaticResource AccentColorBrush}" dragAndDrop:DragAndDropService.Draggable="True" dragAndDrop:DragAndDropService.DraggingSurface="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DraggingSurface}"> + <Grid.ToolTip> + <StackPanel> + <TextBlock Text="{Binding Description}" FontSize="10" Margin="0 0 0 10"></TextBlock> + <ItemsControl ItemsSource="{Binding RolesPermissions}"> + <ItemsControl.ItemTemplate> + <DataTemplate> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="Security" Width="12" /> + <TextBlock Margin="5 0 0 0" FontSize="10" Text="{Binding Permission.Name}"></TextBlock> + </StackPanel> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + </StackPanel> + </Grid.ToolTip> + <DockPanel> + <Border DockPanel.Dock="Left" Width="100" Height="100" IsHitTestVisible="False" BorderBrush="Silver" BorderThickness="1" CornerRadius="5" Margin="5" Padding="2"> + <Border.Background> + <LinearGradientBrush> + <GradientStop Color="White"/> + <GradientStop Color="#FFD6D6D6" Offset="1"/> + </LinearGradientBrush> + </Border.Background> + <Grid> + <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"> + <Image Source="../Images/roles.png" Width="32" RenderOptions.BitmapScalingMode="Fant"></Image> + <TextBlock Text="{Binding Name}" TextWrapping="Wrap" HorizontalAlignment="Center" TextAlignment="Center" FontSize="13" Margin="5"></TextBlock> + </StackPanel> + </Grid> + </Border> + + <Grid MaxHeight="85" HorizontalAlignment="Left" Margin="20 0 0 0"> + <ItemsControl ItemsSource="{Binding RolesPermissions}"> + <ItemsControl.ItemTemplate> + <DataTemplate> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="Security" Width="12" /> + <TextBlock Margin="5 0 0 0" FontSize="10" TextTrimming="CharacterEllipsis" MaxWidth="150" Text="{Binding Permission.Name}"></TextBlock> + </StackPanel> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + + <Grid> + <Grid.Background> + <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1"> + <GradientStop/> + <GradientStop Color="White" Offset="1"/> + </LinearGradientBrush> + </Grid.Background> + </Grid> + </Grid> + </DockPanel> + </Grid> + </DataTemplate> + </ListBox.ItemTemplate> + </ListBox> + </Grid> + </DockPanel> + + <Rectangle HorizontalAlignment="Left" Stroke="#BBBBBB" StrokeThickness="1"></Rectangle> + </Grid> + </Grid> + + <dragAndDrop:DraggingSurface x:Name="dragSurface" /> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/UserManagementView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/UserManagementView.xaml.cs new file mode 100644 index 000000000..f2ff25637 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/UserManagementView.xaml.cs @@ -0,0 +1,57 @@ +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; +using Tango.BL.Entities; +using Tango.DragAndDrop; +using Tango.MachineStudio.UsersAndRoles.ViewModels; +using static Tango.SharedUI.Controls.MultiTransitionControl; + +namespace Tango.MachineStudio.UsersAndRoles.Views +{ + /// <summary> + /// Interaction logic for UserManagementView.xaml + /// </summary> + public partial class UserManagementView : UserControl, ITransitionView + { + private MainViewVM _vm; + + public DraggingSurface DraggingSurface + { + get { return (DraggingSurface)GetValue(DraggingSurfaceProperty); } + set { SetValue(DraggingSurfaceProperty, value); } + } + public static readonly DependencyProperty DraggingSurfaceProperty = + DependencyProperty.Register("DraggingSurface", typeof(DraggingSurface), typeof(UserManagementView), new PropertyMetadata(null)); + + public UserManagementView() + { + InitializeComponent(); + DraggingSurface = dragSurface; + Loaded += (_, __) => _vm = DataContext as MainViewVM; + } + + private void OnDropRole(object sender, DropEventArgs e) + { + if (e.Draggable.DataContext is Role) + { + _vm.OnDropRole(e.Draggable.DataContext as Role); + } + } + + public void OnTransitionCompleted() + { + address_auto.Text = ""; + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/UserView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/UserView.xaml new file mode 100644 index 000000000..6c7596015 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/UserView.xaml @@ -0,0 +1,23 @@ +<UserControl x:Class="Tango.MachineStudio.UsersAndRoles.Views.UserView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL" + xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" + xmlns:pass="clr-namespace:Tango.SharedUI.Helpers;assembly=Tango.SharedUI" + xmlns:local="clr-namespace:Tango.MachineStudio.UsersAndRoles.Views" + mc:Ignorable="d" + d:DesignHeight="300" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=entities:User, IsDesignTimeCreatable=False}"> + + + + <Grid> + <controls:TableGrid> + <TextBlock Text="EMAIL"></TextBlock> + <TextBox Text="{Binding Email}"></TextBox> + <TextBlock Text="PASSWORD"></TextBlock> + <PasswordBox MaxLength="30" pass:PasswordHelper.Attach="True" pass:PasswordHelper.Password="{Binding Password,Mode=TwoWay}"></PasswordBox> + </controls:TableGrid> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/UserView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/UserView.xaml.cs new file mode 100644 index 000000000..b617bdbc4 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/UserView.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 Tango.MachineStudio.UsersAndRoles.Views +{ + /// <summary> + /// Interaction logic for UserView.xaml + /// </summary> + public partial class UserView : UserControl + { + public UserView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/app.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/app.config new file mode 100644 index 000000000..cacd4cd77 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/app.config @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<configuration> + <runtime> + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> + <dependentAssembly> + <assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" /> + </dependentAssembly> + </assemblyBinding> + </runtime> +</configuration>
\ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/packages.config new file mode 100644 index 000000000..6b8afad69 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/packages.config @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="CommonServiceLocator" version="1.3" targetFramework="net46" /> + <package id="EntityFramework" version="6.0.0" targetFramework="net46" /> + <package id="MahApps.Metro" version="1.5.0" targetFramework="net46" /> + <package id="MaterialDesignColors" version="1.1.2" targetFramework="net46" /> + <package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net46" /> + <package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net46" /> + <package id="Newtonsoft.Json" version="10.0.3" targetFramework="net46" /> +</packages>
\ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveColorPickerControl.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveColorPickerControl.xaml index 2aa11c63c..d65bd5d8f 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveColorPickerControl.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveColorPickerControl.xaml @@ -6,46 +6,19 @@ xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" + xmlns:commonControls="clr-namespace:Tango.MachineStudio.Common.Controls" xmlns:shapes="clr-namespace:Tango.SharedUI.Shapes;assembly=Tango.SharedUI" xmlns:local="clr-namespace:Tango.MachineStudio.Common.Controls" mc:Ignorable="d" - d:DesignHeight="250" d:DesignWidth="550" Background="White"> + Height="250" Width="650" Background="White"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="235"/> <ColumnDefinition Width="1*"/> - <ColumnDefinition Width="50"/> </Grid.ColumnDefinitions> - <colorPicker:ColorCanvas SelectedColor="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=SelectedColor,Mode=TwoWay}" Background="Transparent" BorderThickness="0" UsingAlphaChannel="False" /> + <colorPicker:ColorCanvas x:Name="colorCanvas" SelectedColor="{x:Null}" SelectedColorChanged="ColorCanvas_SelectedColorChanged" Background="Transparent" BorderThickness="0" UsingAlphaChannel="False" /> - <Viewbox Stretch="Uniform" Grid.Column="1" Margin="5"> - <controls:HiveControl x:Name="hive" Height="250" HexagonSelected="hive_HexagonSelected" MaxSelections="1" Width="250" BorderThickness="1" /> - </Viewbox> - - <Grid Grid.Column="2"> - <Grid> - <Grid.RowDefinitions> - <RowDefinition Height="1*"/> - <RowDefinition Height="45"/> - <RowDefinition Height="1*"/> - </Grid.RowDefinitions> - <Button ToolTip="Increase Delta Resolution" Click="OnResolutionUpClicked" Style="{StaticResource MaterialDesignFlatButton}" Height="50" Padding="0" Foreground="#202020" VerticalAlignment="Bottom"> - <materialDesign:PackIcon Kind="ArrowUp" Width="24" Height="24" /> - </Button> - - <Grid Grid.Row="1"> - <shapes:Hexagon Stroke="#202020" StrokeThickness="1" Margin="5" /> - <TextBlock TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="Bold" FontStyle="Italic" FontSize="10"> - <Run Text="Δ"></Run> - <Run Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Resolution,FallbackValue=1}"></Run> - </TextBlock> - </Grid> - - <Button ToolTip="Decrease Delta Resolution" Click="OnResolutionDownClicked" Grid.Row="2" Style="{StaticResource MaterialDesignFlatButton}" Height="50" Padding="0" Foreground="#202020" VerticalAlignment="Top"> - <materialDesign:PackIcon Kind="ArrowDown" Width="24" Height="24" /> - </Button> - </Grid> - </Grid> + <commonControls:HiveComboControl x:Name="hiveCombo" Grid.Column="1" SelectedHexagonChanged="hiveCombo_SelectedHexagonChanged" /> </Grid> </UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveColorPickerControl.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveColorPickerControl.xaml.cs index 7d1a1dc81..41b362889 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveColorPickerControl.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveColorPickerControl.xaml.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -12,6 +13,7 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; +using Tango.SharedUI.Controls; namespace Tango.MachineStudio.Common.Controls { @@ -21,7 +23,12 @@ namespace Tango.MachineStudio.Common.Controls public partial class HiveColorPickerControl : UserControl { public event EventHandler<Color> SelectedColorChanged; - private bool _preventHiveSelectedColorChange; + public event EventHandler<Color> SelectedHiveColorChanged; + public event EventHandler<HexagonControl> SelectedHexagonChanged; + public event EventHandler<int> LAxisValueChanged; + public event EventHandler<int> ResolutionChanged; + + private bool _preventColorCanvasEvent; public bool DemoMode { @@ -39,93 +46,112 @@ namespace Tango.MachineStudio.Common.Controls public static readonly DependencyProperty ResolutionProperty = DependencyProperty.Register("Resolution", typeof(int), typeof(HiveColorPickerControl), new PropertyMetadata(1, (d, e) => (d as HiveColorPickerControl).OnResolutionChanged())); - public Color SelectedColor + public Color? SelectedColor { - get { return (Color)GetValue(SelectedColorProperty); } + get { return (Color?)GetValue(SelectedColorProperty); } set { SetValue(SelectedColorProperty, value); } } public static readonly DependencyProperty SelectedColorProperty = - DependencyProperty.Register("SelectedColor", typeof(Color), typeof(HiveColorPickerControl), new PropertyMetadata(Colors.Red, (d, e) => (d as HiveColorPickerControl).OnSelectedColorChanged())); + DependencyProperty.Register("SelectedColor", typeof(Color?), typeof(HiveColorPickerControl), new PropertyMetadata(null, (d, e) => (d as HiveColorPickerControl).OnSelectedColorChanged())); + + public HexagonControl SelectedHexagon + { + get { return (HexagonControl)GetValue(SelectedHexagonProperty); } + set { SetValue(SelectedHexagonProperty, value); } + } + public static readonly DependencyProperty SelectedHexagonProperty = + DependencyProperty.Register("SelectedHexagon", typeof(HexagonControl), typeof(HiveColorPickerControl), new PropertyMetadata(null, (d, e) => (d as HiveColorPickerControl).OnSelectedHexagonChanged())); - public Color SelectedHiveColor + public Color? SelectedHiveColor { - get { return (Color)GetValue(SelectedHiveColorProperty); } + get { return (Color?)GetValue(SelectedHiveColorProperty); } set { SetValue(SelectedHiveColorProperty, value); } } public static readonly DependencyProperty SelectedHiveColorProperty = - DependencyProperty.Register("SelectedHiveColor", typeof(Color), typeof(HiveColorPickerControl), new PropertyMetadata(Colors.Red)); + DependencyProperty.Register("SelectedHiveColor", typeof(Color?), typeof(HiveColorPickerControl), new PropertyMetadata(null, (d, e) => (d as HiveColorPickerControl).OnSelectedHiveColorChanged())); + + public int LAxisValue + { + get { return (int)GetValue(LAxisValueProperty); } + set { SetValue(LAxisValueProperty, value); } + } + public static readonly DependencyProperty LAxisValueProperty = + DependencyProperty.Register("LAxisValue", typeof(int), typeof(HiveColorPickerControl), new PropertyMetadata(0, (d, e) => (d as HiveColorPickerControl).OnLAxisValueChanged())); + public HiveColorPickerControl() { InitializeComponent(); - hive.Loaded += Hive_Loaded; + this.Bind(ResolutionProperty, hiveCombo, HiveComboControl.ResolutionProperty, BindingMode.TwoWay); + this.Bind(SelectedHexagonProperty, hiveCombo, HiveComboControl.SelectedHexagonProperty, BindingMode.OneWay); + this.Bind(LAxisValueProperty, hiveCombo, HiveComboControl.LAxisValueProperty, BindingMode.OneWay); + + + hiveCombo.HiveGenerated += HiveCombo_HiveGenerated; } - private void Hive_Loaded(object sender, RoutedEventArgs e) + private void HiveCombo_HiveGenerated(object sender, EventArgs e) { - OnSelectedColorChanged(); + hiveCombo.GenerateDemoModeHiveColors(SelectedColor.Value); + } + + private void OnSelectedHiveColorChanged() + { + //_preventColorCanvasEvent = true; + //colorCanvas.SelectedColor = SelectedHiveColor; + //_preventColorCanvasEvent = false; + + SelectedHiveColorChanged?.Invoke(this, SelectedHiveColor.Value); } private void OnSelectedColorChanged() { - if (DemoMode) + if (SelectedColor != null) { - if (!_preventHiveSelectedColorChange) + _preventColorCanvasEvent = true; + colorCanvas.SelectedColor = SelectedColor; + _preventColorCanvasEvent = false; + + if (DemoMode) { - GenerateDemoModeHiveColors(); + hiveCombo.GenerateDemoModeHiveColors(SelectedColor.Value); } - SelectedColorChanged?.Invoke(this, SelectedColor); + + SelectedColorChanged?.Invoke(this, SelectedColor.Value); } } - private void hive_HexagonSelected(object sender, SharedUI.Controls.HexagonControl hexagon) + private void OnSelectedHexagonChanged() { - SelectedHiveColor = (hexagon.Fill as SolidColorBrush).Color; - - _preventHiveSelectedColorChange = true; - SelectedColor = SelectedHiveColor; - _preventHiveSelectedColorChange = false; + SelectedHexagonChanged?.Invoke(this, SelectedHexagon); + SelectedHiveColor = (SelectedHexagon.Fill as SolidColorBrush).Color; } - private void OnResolutionChanged() + private void OnLAxisValueChanged() { - GenerateDemoModeHiveColors(); + LAxisValueChanged?.Invoke(this, LAxisValue); } - private void GenerateDemoModeHiveColors() + private void OnResolutionChanged() { - if (hive.CenterHexagon != null) - { - Random rnd = new Random(); - - (hive.CenterHexagon.Fill as SolidColorBrush).Color = SelectedColor; - - int counter = 0; - - foreach (var hexagon in hive.Hexagons.Where(x => x != hive.CenterHexagon).OrderBy(x => rnd.Next())) - { - (hexagon.Fill as SolidColorBrush).Color = Color.FromRgb((byte)Math.Min(SelectedColor.R + counter++, 255), (byte)Math.Min((SelectedColor.G + counter++), 255), (byte)Math.Min((SelectedColor.B + counter++), 255)); - - counter += (int)(4d * ((double)Resolution / 4d)); - } - } + hiveCombo.GenerateDemoModeHiveColors(SelectedColor.Value); } - private void OnResolutionUpClicked(object sender, RoutedEventArgs e) + private void ColorCanvas_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs<Color?> e) { - if (Resolution < 10) + if (!_preventColorCanvasEvent) { - Resolution++; + SelectedColor = e.NewValue.Value; + hiveCombo.SelectHeagon(hiveCombo.CenterHexagon); } } - private void OnResolutionDownClicked(object sender, RoutedEventArgs e) + private void hiveCombo_SelectedHexagonChanged(object sender, HexagonControl e) { - if (Resolution > 1) - { - Resolution--; - } + SelectedHexagon = e; + SelectedHiveColor = (SelectedHexagon.Fill as SolidColorBrush).Color; + SelectedHexagonChanged?.Invoke(this, SelectedHexagon); } } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveComboControl.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveComboControl.xaml new file mode 100644 index 000000000..692b3f818 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveComboControl.xaml @@ -0,0 +1,54 @@ +<UserControl x:Class="Tango.MachineStudio.Common.Controls.HiveComboControl" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" + xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" + xmlns:shapes="clr-namespace:Tango.SharedUI.Shapes;assembly=Tango.SharedUI" + xmlns:local="clr-namespace:Tango.MachineStudio.Common.Controls" + mc:Ignorable="d" + Height="250" Width="415"> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="1*"/> + <ColumnDefinition Width="70"/> + <ColumnDefinition Width="50"/> + </Grid.ColumnDefinitions> + + <Viewbox Stretch="Uniform" Grid.Column="0" Margin="5"> + <controls:HiveControl x:Name="hive" x:FieldModifier="public" Height="250" HexagonSelected="OnHexagonSelected" MaxSelections="1" Width="250" BorderThickness="1" /> + </Viewbox> + + <Grid Grid.Column="1" ClipToBounds="True"> + <Viewbox Stretch="Fill" Width="160" Height="200" HorizontalAlignment="Right" Margin="0 0 -20 0"> + <controls:HiveControl Height="290" HexagonSelected="OnRowHiveHexagonSelected" MaxSelections="1" Width="100" Margin="0 0 50 0" HiveWidth="1" HiveHeight="5" BorderThickness="1" /> + </Viewbox> + </Grid> + + <Grid Grid.Column="2"> + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="1*"/> + <RowDefinition Height="45"/> + <RowDefinition Height="1*"/> + </Grid.RowDefinitions> + <Button ToolTip="Increase Delta Resolution" Click="OnResolutionUpClicked" Style="{StaticResource MaterialDesignFlatButton}" Height="50" Padding="0" Foreground="#202020" VerticalAlignment="Bottom"> + <materialDesign:PackIcon Kind="ArrowUp" Width="24" Height="24" /> + </Button> + + <Grid Grid.Row="1"> + <shapes:Hexagon Stroke="#202020" StrokeThickness="1" Margin="5" /> + <TextBlock TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="Bold" FontStyle="Italic" FontSize="10"> + <Run Text="Δ"></Run> + <Run Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Resolution,FallbackValue=1}"></Run> + </TextBlock> + </Grid> + + <Button ToolTip="Decrease Delta Resolution" Click="OnResolutionDownClicked" Grid.Row="2" Style="{StaticResource MaterialDesignFlatButton}" Height="50" Padding="0" Foreground="#202020" VerticalAlignment="Top"> + <materialDesign:PackIcon Kind="ArrowDown" Width="24" Height="24" /> + </Button> + </Grid> + </Grid> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveComboControl.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveComboControl.xaml.cs new file mode 100644 index 000000000..ceba52826 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveComboControl.xaml.cs @@ -0,0 +1,135 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +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; +using Tango.Logging; +using Tango.SharedUI.Controls; + +namespace Tango.MachineStudio.Common.Controls +{ + /// <summary> + /// Interaction logic for HiveComboControl.xaml + /// </summary> + public partial class HiveComboControl : UserControl + { + public event EventHandler<Color> SelectedColorChanged; + public event EventHandler<HexagonControl> SelectedHexagonChanged; + public event EventHandler<int> LAxisValueChanged; + public event EventHandler<int> ResolutionChanged; + public event EventHandler HiveGenerated; + + public int Resolution + { + get { return (int)GetValue(ResolutionProperty); } + set { SetValue(ResolutionProperty, value); } + } + public static readonly DependencyProperty ResolutionProperty = + DependencyProperty.Register("Resolution", typeof(int), typeof(HiveComboControl), new PropertyMetadata(1, (d, e) => (d as HiveComboControl).OnResolutionChanged())); + + public HexagonControl SelectedHexagon + { + get { return (HexagonControl)GetValue(SelectedHexagonProperty); } + set { SetValue(SelectedHexagonProperty, value); } + } + public static readonly DependencyProperty SelectedHexagonProperty = + DependencyProperty.Register("SelectedHexagon", typeof(HexagonControl), typeof(HiveComboControl), new PropertyMetadata(null, (d, e) => (d as HiveComboControl).OnSelectedHexagonChanged())); + + public int LAxisValue + { + get { return (int)GetValue(LAxisValueProperty); } + set { SetValue(LAxisValueProperty, value); } + } + public static readonly DependencyProperty LAxisValueProperty = + DependencyProperty.Register("LAxisValue", typeof(int), typeof(HiveComboControl), new PropertyMetadata(0, (d, e) => (d as HiveComboControl).OnLAxisValueChanged())); + + public HexagonControl CenterHexagon + { + get { return hive.CenterHexagon; } + } + + + public HiveComboControl() + { + InitializeComponent(); + + hive.HiveGenerated += (x, e) => HiveGenerated?.Invoke(this, new EventArgs()); + } + + private void OnLAxisValueChanged() + { + LAxisValueChanged?.Invoke(this, LAxisValue); + } + + private void OnSelectedHexagonChanged() + { + SelectedHexagonChanged?.Invoke(this, SelectedHexagon); + } + + private void OnResolutionChanged() + { + ResolutionChanged?.Invoke(this, Resolution); + } + + public void GenerateDemoModeHiveColors(Color originalColor) + { + if (hive.CenterHexagon != null) + { + Random rnd = new Random(); + + (hive.CenterHexagon.Fill as SolidColorBrush).Color = originalColor; + + int counter = 0; + + foreach (var hexagon in hive.Hexagons.Where(x => x != hive.CenterHexagon).OrderBy(x => rnd.Next())) + { + (hexagon.Fill as SolidColorBrush).Color = Color.FromRgb((byte)Math.Min(originalColor.R + counter++, 255), (byte)Math.Min((originalColor.G + counter++), 255), (byte)Math.Min((originalColor.B + counter++), 255)); + + counter += (int)(4d * ((double)Resolution / 4d)); + } + } + } + + private void OnResolutionUpClicked(object sender, RoutedEventArgs e) + { + if (Resolution < 10) + { + Resolution++; + } + } + + private void OnResolutionDownClicked(object sender, RoutedEventArgs e) + { + if (Resolution > 1) + { + Resolution--; + } + } + + private void OnRowHiveHexagonSelected(object sender, HexagonControl hexagon) + { + LAxisValue = 2 - hexagon.Row; + } + + private void OnHexagonSelected(object sender, HexagonControl e) + { + SelectedHexagon = e; + } + + public void SelectHeagon(HexagonControl hexagon) + { + hive.SelectHexagon(hexagon); + SelectedHexagonChanged?.Invoke(this, hexagon); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj index 457646223..6dfc72c7f 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj @@ -25,7 +25,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> + <OutputPath>..\..\Build\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> @@ -76,6 +76,9 @@ <Compile Include="Controls\HiveColorPickerControl.xaml.cs"> <DependentUpon>HiveColorPickerControl.xaml</DependentUpon> </Compile> + <Compile Include="Controls\HiveComboControl.xaml.cs"> + <DependentUpon>HiveComboControl.xaml</DependentUpon> + </Compile> <Compile Include="Controls\IRealTimeGraph.cs" /> <Compile Include="Controls\RealTimeGraphMultiControl.xaml.cs"> <DependentUpon>RealTimeGraphMultiControl.xaml</DependentUpon> @@ -114,6 +117,10 @@ <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> + <Page Include="Controls\HiveComboControl.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> <Page Include="Controls\MdiContainerControl.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> @@ -212,6 +219,10 @@ <Project>{4206ac58-3b57-4699-8835-90bf6db01a61}</Project> <Name>Tango.Integration</Name> </ProjectReference> + <ProjectReference Include="..\..\Tango.Logging\Tango.Logging.csproj"> + <Project>{BC932DBD-7CDB-488C-99E4-F02CF441F55E}</Project> + <Name>Tango.Logging</Name> + </ProjectReference> <ProjectReference Include="..\..\Tango.PMR\Tango.PMR.csproj"> <Project>{e4927038-348d-4295-aaf4-861c58cb3943}</Project> <Name>Tango.PMR</Name> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Installer/Tango.MachineStudio.Installer.vdproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Installer/Tango.MachineStudio.Installer.vdproj index f37b50669..1bd8adac7 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Installer/Tango.MachineStudio.Installer.vdproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Installer/Tango.MachineStudio.Installer.vdproj @@ -46,7 +46,13 @@ "Entry" { "MsmKey" = "8:_0D2EC478B8B5A060121B647E6BA3DE05" - "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" + "OwnerKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_0D2EC478B8B5A060121B647E6BA3DE05" + "OwnerKey" = "8:_87C6E2B736587D3682C48BA78EC097DD" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -88,6 +94,12 @@ "Entry" { "MsmKey" = "8:_0D2EC478B8B5A060121B647E6BA3DE05" + "OwnerKey" = "8:_882DC187F2FE507EF9AF44F399908E5F" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_0D2EC478B8B5A060121B647E6BA3DE05" "OwnerKey" = "8:_E700A1A13A5B6DB314933FC1205AFDAB" "MsmSig" = "8:_UNDEFINED" } @@ -118,6 +130,12 @@ "Entry" { "MsmKey" = "8:_0D2EC478B8B5A060121B647E6BA3DE05" + "OwnerKey" = "8:_CD3DBAF01E467DD4CC12AA88CE8A65C6" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_0D2EC478B8B5A060121B647E6BA3DE05" "OwnerKey" = "8:_2F23291F311EE9576449E5628A5702AE" "MsmSig" = "8:_UNDEFINED" } @@ -130,11 +148,23 @@ "Entry" { "MsmKey" = "8:_0D2EC478B8B5A060121B647E6BA3DE05" + "OwnerKey" = "8:_228BC2A283BAB0C236CE404E2766753A" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_0D2EC478B8B5A060121B647E6BA3DE05" "OwnerKey" = "8:_5A8B326A4A0607AFC366F8FD9657A87A" "MsmSig" = "8:_UNDEFINED" } "Entry" { + "MsmKey" = "8:_0D2EC478B8B5A060121B647E6BA3DE05" + "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_136196DD2763419D959721C2BA143498" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -153,6 +183,12 @@ } "Entry" { + "MsmKey" = "8:_164D74DB92C311B5B1C4DE16DFFBF6B1" + "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_173C4B05CE04BA34E920DC64B25A8670" "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" "MsmSig" = "8:_UNDEFINED" @@ -160,13 +196,13 @@ "Entry" { "MsmKey" = "8:_1910D5B276479C48B4F7762A638405F5" - "OwnerKey" = "8:_732A3EC12F10FF1A5DA8EE301EB14539" + "OwnerKey" = "8:_89624A3865EAD179277FE5905CBE627D" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_1910D5B276479C48B4F7762A638405F5" - "OwnerKey" = "8:_89624A3865EAD179277FE5905CBE627D" + "OwnerKey" = "8:_732A3EC12F10FF1A5DA8EE301EB14539" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -178,13 +214,13 @@ "Entry" { "MsmKey" = "8:_1AC47588060EAA9F2B7A13EC07359D10" - "OwnerKey" = "8:_732A3EC12F10FF1A5DA8EE301EB14539" + "OwnerKey" = "8:_89624A3865EAD179277FE5905CBE627D" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_1AC47588060EAA9F2B7A13EC07359D10" - "OwnerKey" = "8:_89624A3865EAD179277FE5905CBE627D" + "OwnerKey" = "8:_732A3EC12F10FF1A5DA8EE301EB14539" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -202,13 +238,13 @@ "Entry" { "MsmKey" = "8:_2444D22B50272EAE03F2B5D2457335EC" - "OwnerKey" = "8:_732A3EC12F10FF1A5DA8EE301EB14539" + "OwnerKey" = "8:_89624A3865EAD179277FE5905CBE627D" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_2444D22B50272EAE03F2B5D2457335EC" - "OwnerKey" = "8:_89624A3865EAD179277FE5905CBE627D" + "OwnerKey" = "8:_732A3EC12F10FF1A5DA8EE301EB14539" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -358,6 +394,12 @@ "Entry" { "MsmKey" = "8:_42250239B4791E8133657256CCE3506C" + "OwnerKey" = "8:_CD3DBAF01E467DD4CC12AA88CE8A65C6" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_42250239B4791E8133657256CCE3506C" "OwnerKey" = "8:_75D29198D3E03B5554EF1C7382CF5B14" "MsmSig" = "8:_UNDEFINED" } @@ -370,6 +412,18 @@ "Entry" { "MsmKey" = "8:_42250239B4791E8133657256CCE3506C" + "OwnerKey" = "8:_BEF81681FFB4A3D9146381DB58646485" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_42250239B4791E8133657256CCE3506C" + "OwnerKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_42250239B4791E8133657256CCE3506C" "OwnerKey" = "8:_DF6FFF88157E7FBCFB7E188431AAF4CF" "MsmSig" = "8:_UNDEFINED" } @@ -412,7 +466,13 @@ "Entry" { "MsmKey" = "8:_51C4508525FA0604A9CD727897EBD530" - "OwnerKey" = "8:_8D3497DF2885B15B643A20537C75D67E" + "OwnerKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_51C4508525FA0604A9CD727897EBD530" + "OwnerKey" = "8:_87C6E2B736587D3682C48BA78EC097DD" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -448,6 +508,12 @@ "Entry" { "MsmKey" = "8:_51C4508525FA0604A9CD727897EBD530" + "OwnerKey" = "8:_882DC187F2FE507EF9AF44F399908E5F" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_51C4508525FA0604A9CD727897EBD530" "OwnerKey" = "8:_E700A1A13A5B6DB314933FC1205AFDAB" "MsmSig" = "8:_UNDEFINED" } @@ -460,7 +526,7 @@ "Entry" { "MsmKey" = "8:_51C4508525FA0604A9CD727897EBD530" - "OwnerKey" = "8:_75D29198D3E03B5554EF1C7382CF5B14" + "OwnerKey" = "8:_CD3DBAF01E467DD4CC12AA88CE8A65C6" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -471,6 +537,12 @@ } "Entry" { + "MsmKey" = "8:_51C4508525FA0604A9CD727897EBD530" + "OwnerKey" = "8:_8D3497DF2885B15B643A20537C75D67E" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_55B682D249F24BD9069F5CC33AAB44F0" "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" "MsmSig" = "8:_UNDEFINED" @@ -502,6 +574,12 @@ "Entry" { "MsmKey" = "8:_5A8B326A4A0607AFC366F8FD9657A87A" + "OwnerKey" = "8:_87C6E2B736587D3682C48BA78EC097DD" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_5A8B326A4A0607AFC366F8FD9657A87A" "OwnerKey" = "8:_FAAD9E9C9BB571F4E45C5C7C5DFD626A" "MsmSig" = "8:_UNDEFINED" } @@ -526,6 +604,12 @@ "Entry" { "MsmKey" = "8:_5A8B326A4A0607AFC366F8FD9657A87A" + "OwnerKey" = "8:_882DC187F2FE507EF9AF44F399908E5F" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_5A8B326A4A0607AFC366F8FD9657A87A" "OwnerKey" = "8:_E700A1A13A5B6DB314933FC1205AFDAB" "MsmSig" = "8:_UNDEFINED" } @@ -544,6 +628,12 @@ "Entry" { "MsmKey" = "8:_5A8B326A4A0607AFC366F8FD9657A87A" + "OwnerKey" = "8:_CD3DBAF01E467DD4CC12AA88CE8A65C6" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_5A8B326A4A0607AFC366F8FD9657A87A" "OwnerKey" = "8:_69F60BE42927314554CD235D3185D2CE" "MsmSig" = "8:_UNDEFINED" } @@ -568,19 +658,19 @@ "Entry" { "MsmKey" = "8:_5D31D40A55F64C363A1DE193E24D604B" - "OwnerKey" = "8:_75D29198D3E03B5554EF1C7382CF5B14" + "OwnerKey" = "8:_69CC8DD07F81DD7EA883434F53157FBC" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_5D31D40A55F64C363A1DE193E24D604B" - "OwnerKey" = "8:_69CC8DD07F81DD7EA883434F53157FBC" + "OwnerKey" = "8:_0D2EC478B8B5A060121B647E6BA3DE05" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_5D31D40A55F64C363A1DE193E24D604B" - "OwnerKey" = "8:_0D2EC478B8B5A060121B647E6BA3DE05" + "OwnerKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -658,12 +748,24 @@ "Entry" { "MsmKey" = "8:_67EAE4B6E14417FC2BF4F4EBF4473A1E" + "OwnerKey" = "8:_87C6E2B736587D3682C48BA78EC097DD" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_67EAE4B6E14417FC2BF4F4EBF4473A1E" "OwnerKey" = "8:_197CAF3FE1DF1DC0514D774674A3F0FF" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_67EAE4B6E14417FC2BF4F4EBF4473A1E" + "OwnerKey" = "8:_882DC187F2FE507EF9AF44F399908E5F" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_67EAE4B6E14417FC2BF4F4EBF4473A1E" "OwnerKey" = "8:_E700A1A13A5B6DB314933FC1205AFDAB" "MsmSig" = "8:_UNDEFINED" } @@ -694,7 +796,13 @@ "Entry" { "MsmKey" = "8:_69F60BE42927314554CD235D3185D2CE" - "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" + "OwnerKey" = "8:_CD3DBAF01E467DD4CC12AA88CE8A65C6" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_69F60BE42927314554CD235D3185D2CE" + "OwnerKey" = "8:_87C6E2B736587D3682C48BA78EC097DD" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -724,6 +832,12 @@ "Entry" { "MsmKey" = "8:_69F60BE42927314554CD235D3185D2CE" + "OwnerKey" = "8:_882DC187F2FE507EF9AF44F399908E5F" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_69F60BE42927314554CD235D3185D2CE" "OwnerKey" = "8:_E700A1A13A5B6DB314933FC1205AFDAB" "MsmSig" = "8:_UNDEFINED" } @@ -741,12 +855,24 @@ } "Entry" { + "MsmKey" = "8:_69F60BE42927314554CD235D3185D2CE" + "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_6D9156D5DBF08959BE20FE18FA09E71A" "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" "MsmSig" = "8:_UNDEFINED" } "Entry" { + "MsmKey" = "8:_705F2A9700A0B6F6A5308537C5F876EA" + "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_709D007D7E89A10E63C141E3A08311FD" "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" "MsmSig" = "8:_UNDEFINED" @@ -778,7 +904,7 @@ "Entry" { "MsmKey" = "8:_732A3EC12F10FF1A5DA8EE301EB14539" - "OwnerKey" = "8:_608148D4375F3E888DDCA94C5D3D141D" + "OwnerKey" = "8:_CD3DBAF01E467DD4CC12AA88CE8A65C6" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -790,6 +916,12 @@ "Entry" { "MsmKey" = "8:_732A3EC12F10FF1A5DA8EE301EB14539" + "OwnerKey" = "8:_87C6E2B736587D3682C48BA78EC097DD" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_732A3EC12F10FF1A5DA8EE301EB14539" "OwnerKey" = "8:_FAAD9E9C9BB571F4E45C5C7C5DFD626A" "MsmSig" = "8:_UNDEFINED" } @@ -814,6 +946,12 @@ "Entry" { "MsmKey" = "8:_732A3EC12F10FF1A5DA8EE301EB14539" + "OwnerKey" = "8:_882DC187F2FE507EF9AF44F399908E5F" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_732A3EC12F10FF1A5DA8EE301EB14539" "OwnerKey" = "8:_E700A1A13A5B6DB314933FC1205AFDAB" "MsmSig" = "8:_UNDEFINED" } @@ -825,6 +963,12 @@ } "Entry" { + "MsmKey" = "8:_732A3EC12F10FF1A5DA8EE301EB14539" + "OwnerKey" = "8:_608148D4375F3E888DDCA94C5D3D141D" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_73674B32069839371DC47411D1B7EBE0" "OwnerKey" = "8:_75D29198D3E03B5554EF1C7382CF5B14" "MsmSig" = "8:_UNDEFINED" @@ -862,49 +1006,67 @@ "Entry" { "MsmKey" = "8:_75D29198D3E03B5554EF1C7382CF5B14" - "OwnerKey" = "8:_197CAF3FE1DF1DC0514D774674A3F0FF" + "OwnerKey" = "8:_E700A1A13A5B6DB314933FC1205AFDAB" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_75D29198D3E03B5554EF1C7382CF5B14" - "OwnerKey" = "8:_E700A1A13A5B6DB314933FC1205AFDAB" + "OwnerKey" = "8:_608148D4375F3E888DDCA94C5D3D141D" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_75D29198D3E03B5554EF1C7382CF5B14" - "OwnerKey" = "8:_61BCA14057E1BA0AB03D4576CBA56A88" + "OwnerKey" = "8:_69F60BE42927314554CD235D3185D2CE" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_75D29198D3E03B5554EF1C7382CF5B14" - "OwnerKey" = "8:_608148D4375F3E888DDCA94C5D3D141D" + "MsmKey" = "8:_7A0D754929705CC64EF84E26BD75D642" + "OwnerKey" = "8:_69F60BE42927314554CD235D3185D2CE" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_75D29198D3E03B5554EF1C7382CF5B14" - "OwnerKey" = "8:_69F60BE42927314554CD235D3185D2CE" + "MsmKey" = "8:_7A0D754929705CC64EF84E26BD75D642" + "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_7A0D754929705CC64EF84E26BD75D642" - "OwnerKey" = "8:_69F60BE42927314554CD235D3185D2CE" + "OwnerKey" = "8:_FAAD9E9C9BB571F4E45C5C7C5DFD626A" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_7A0D754929705CC64EF84E26BD75D642" + "MsmKey" = "8:_7D0EE03E89D3891AF49E51B7A20399FD" + "OwnerKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_7D0EE03E89D3891AF49E51B7A20399FD" + "OwnerKey" = "8:_306834653E086F12A2AAEA2DB03BEFCF" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_7D0EE03E89D3891AF49E51B7A20399FD" + "OwnerKey" = "8:_DF75A431ACC8C9748E6FA8D8B926D6D8" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_7D0EE03E89D3891AF49E51B7A20399FD" "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_7A0D754929705CC64EF84E26BD75D642" - "OwnerKey" = "8:_FAAD9E9C9BB571F4E45C5C7C5DFD626A" + "MsmKey" = "8:_7D0EE03E89D3891AF49E51B7A20399FD" + "OwnerKey" = "8:_BA97AA5828837180D47BBD44C338D695" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -939,6 +1101,18 @@ } "Entry" { + "MsmKey" = "8:_87C6E2B736587D3682C48BA78EC097DD" + "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_882DC187F2FE507EF9AF44F399908E5F" + "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_89624A3865EAD179277FE5905CBE627D" "OwnerKey" = "8:_69F60BE42927314554CD235D3185D2CE" "MsmSig" = "8:_UNDEFINED" @@ -1060,7 +1234,7 @@ "Entry" { "MsmKey" = "8:_9758638AABE50C72FFA87E6544F6D70F" - "OwnerKey" = "8:_38A402C026B59AE31D2CBB0235AF3368" + "OwnerKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -1119,6 +1293,12 @@ } "Entry" { + "MsmKey" = "8:_9758638AABE50C72FFA87E6544F6D70F" + "OwnerKey" = "8:_38A402C026B59AE31D2CBB0235AF3368" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_983D79DC449AD65746DD38E6468BD886" "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" "MsmSig" = "8:_UNDEFINED" @@ -1204,13 +1384,25 @@ "Entry" { "MsmKey" = "8:_AF79FC974C2F42D24D74E5313E475E87" - "OwnerKey" = "8:_732A3EC12F10FF1A5DA8EE301EB14539" + "OwnerKey" = "8:_89624A3865EAD179277FE5905CBE627D" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_AF79FC974C2F42D24D74E5313E475E87" - "OwnerKey" = "8:_89624A3865EAD179277FE5905CBE627D" + "OwnerKey" = "8:_732A3EC12F10FF1A5DA8EE301EB14539" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_AFB29AE66E7A8C8B6FD1B50745BEBCFA" + "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_AFB29AE66E7A8C8B6FD1B50745BEBCFA" + "OwnerKey" = "8:_CD3DBAF01E467DD4CC12AA88CE8A65C6" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -1251,6 +1443,18 @@ } "Entry" { + "MsmKey" = "8:_BEF81681FFB4A3D9146381DB58646485" + "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_BEF81681FFB4A3D9146381DB58646485" + "OwnerKey" = "8:_E700A1A13A5B6DB314933FC1205AFDAB" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_BF01A029E83A968C697506DFA469C90B" "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" "MsmSig" = "8:_UNDEFINED" @@ -1264,7 +1468,7 @@ "Entry" { "MsmKey" = "8:_BF01A029E83A968C697506DFA469C90B" - "OwnerKey" = "8:_75D29198D3E03B5554EF1C7382CF5B14" + "OwnerKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -1281,50 +1485,44 @@ } "Entry" { - "MsmKey" = "8:_CBF3A46BFE914D8E4658EABB5A204074" + "MsmKey" = "8:_CC07BBC3C44CE424AA0EF90844590E4E" "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_CBF3A46BFE914D8E4658EABB5A204074" - "OwnerKey" = "8:_306834653E086F12A2AAEA2DB03BEFCF" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_CBF3A46BFE914D8E4658EABB5A204074" - "OwnerKey" = "8:_DF75A431ACC8C9748E6FA8D8B926D6D8" + "MsmKey" = "8:_CC07BBC3C44CE424AA0EF90844590E4E" + "OwnerKey" = "8:_732A3EC12F10FF1A5DA8EE301EB14539" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_CBF3A46BFE914D8E4658EABB5A204074" - "OwnerKey" = "8:_BA97AA5828837180D47BBD44C338D695" + "MsmKey" = "8:_CC7BD04781686DE3403908303698199D" + "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_CC07BBC3C44CE424AA0EF90844590E4E" + "MsmKey" = "8:_CCD49B330E05F963B5AE73E3D04F5762" "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_CC07BBC3C44CE424AA0EF90844590E4E" - "OwnerKey" = "8:_732A3EC12F10FF1A5DA8EE301EB14539" + "MsmKey" = "8:_CD3DBAF01E467DD4CC12AA88CE8A65C6" + "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_CC7BD04781686DE3403908303698199D" + "MsmKey" = "8:_D03482576128D28FB1FC54FC473F59E3" "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_CCD49B330E05F963B5AE73E3D04F5762" - "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" + "MsmKey" = "8:_D03482576128D28FB1FC54FC473F59E3" + "OwnerKey" = "8:_69F60BE42927314554CD235D3185D2CE" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -1360,6 +1558,12 @@ "Entry" { "MsmKey" = "8:_D50E7D146D0988E066CF588364E8E12F" + "OwnerKey" = "8:_87C6E2B736587D3682C48BA78EC097DD" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_D50E7D146D0988E066CF588364E8E12F" "OwnerKey" = "8:_FAAD9E9C9BB571F4E45C5C7C5DFD626A" "MsmSig" = "8:_UNDEFINED" } @@ -1384,6 +1588,12 @@ "Entry" { "MsmKey" = "8:_D50E7D146D0988E066CF588364E8E12F" + "OwnerKey" = "8:_882DC187F2FE507EF9AF44F399908E5F" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_D50E7D146D0988E066CF588364E8E12F" "OwnerKey" = "8:_E700A1A13A5B6DB314933FC1205AFDAB" "MsmSig" = "8:_UNDEFINED" } @@ -1396,13 +1606,19 @@ "Entry" { "MsmKey" = "8:_D50E7D146D0988E066CF588364E8E12F" + "OwnerKey" = "8:_608148D4375F3E888DDCA94C5D3D141D" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_D50E7D146D0988E066CF588364E8E12F" "OwnerKey" = "8:_732A3EC12F10FF1A5DA8EE301EB14539" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_D50E7D146D0988E066CF588364E8E12F" - "OwnerKey" = "8:_608148D4375F3E888DDCA94C5D3D141D" + "OwnerKey" = "8:_CD3DBAF01E467DD4CC12AA88CE8A65C6" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -1413,6 +1629,12 @@ } "Entry" { + "MsmKey" = "8:_D947550594E2BF53BED76C7D7F9747D7" + "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_D9C852C126C7F540922D946114717E3C" "OwnerKey" = "8:_25CA87997CBA1F923E61CE5BB20D3891" "MsmSig" = "8:_UNDEFINED" @@ -1432,6 +1654,12 @@ "Entry" { "MsmKey" = "8:_DB4941BAFA45E5921E7072990000621E" + "OwnerKey" = "8:_87C6E2B736587D3682C48BA78EC097DD" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_DB4941BAFA45E5921E7072990000621E" "OwnerKey" = "8:_BA97AA5828837180D47BBD44C338D695" "MsmSig" = "8:_UNDEFINED" } @@ -1479,6 +1707,12 @@ } "Entry" { + "MsmKey" = "8:_DB4941BAFA45E5921E7072990000621E" + "OwnerKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_DC627D829804D2AC4A3984133840F2D5" "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" "MsmSig" = "8:_UNDEFINED" @@ -1510,7 +1744,7 @@ "Entry" { "MsmKey" = "8:_DF6FFF88157E7FBCFB7E188431AAF4CF" - "OwnerKey" = "8:_75D29198D3E03B5554EF1C7382CF5B14" + "OwnerKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -1558,6 +1792,12 @@ "Entry" { "MsmKey" = "8:_DF6FFF88157E7FBCFB7E188431AAF4CF" + "OwnerKey" = "8:_CD3DBAF01E467DD4CC12AA88CE8A65C6" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_DF6FFF88157E7FBCFB7E188431AAF4CF" "OwnerKey" = "8:_69F60BE42927314554CD235D3185D2CE" "MsmSig" = "8:_UNDEFINED" } @@ -1569,6 +1809,18 @@ } "Entry" { + "MsmKey" = "8:_DF6FFF88157E7FBCFB7E188431AAF4CF" + "OwnerKey" = "8:_75D29198D3E03B5554EF1C7382CF5B14" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_DF6FFF88157E7FBCFB7E188431AAF4CF" + "OwnerKey" = "8:_BEF81681FFB4A3D9146381DB58646485" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_DF75A431ACC8C9748E6FA8D8B926D6D8" "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" "MsmSig" = "8:_UNDEFINED" @@ -1582,13 +1834,13 @@ "Entry" { "MsmKey" = "8:_E0FCEE9366306B5A88DC7CF29E913A4B" - "OwnerKey" = "8:_732A3EC12F10FF1A5DA8EE301EB14539" + "OwnerKey" = "8:_89624A3865EAD179277FE5905CBE627D" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_E0FCEE9366306B5A88DC7CF29E913A4B" - "OwnerKey" = "8:_89624A3865EAD179277FE5905CBE627D" + "OwnerKey" = "8:_732A3EC12F10FF1A5DA8EE301EB14539" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -1647,6 +1899,12 @@ } "Entry" { + "MsmKey" = "8:_EF2898B0C9AAB2E33674325B9F86943B" + "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_F07A99EB8EC845750208F557C91D5A84" "OwnerKey" = "8:_69F60BE42927314554CD235D3185D2CE" "MsmSig" = "8:_UNDEFINED" @@ -1737,6 +1995,84 @@ } "Entry" { + "MsmKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" + "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" + "OwnerKey" = "8:_87C6E2B736587D3682C48BA78EC097DD" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" + "OwnerKey" = "8:_FAAD9E9C9BB571F4E45C5C7C5DFD626A" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" + "OwnerKey" = "8:_B7F1A99B13057B9195F587E580BA16AE" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" + "OwnerKey" = "8:_25CA87997CBA1F923E61CE5BB20D3891" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" + "OwnerKey" = "8:_197CAF3FE1DF1DC0514D774674A3F0FF" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" + "OwnerKey" = "8:_882DC187F2FE507EF9AF44F399908E5F" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" + "OwnerKey" = "8:_E700A1A13A5B6DB314933FC1205AFDAB" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" + "OwnerKey" = "8:_61BCA14057E1BA0AB03D4576CBA56A88" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" + "OwnerKey" = "8:_608148D4375F3E888DDCA94C5D3D141D" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" + "OwnerKey" = "8:_69F60BE42927314554CD235D3185D2CE" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" + "OwnerKey" = "8:_CD3DBAF01E467DD4CC12AA88CE8A65C6" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" + "OwnerKey" = "8:_75D29198D3E03B5554EF1C7382CF5B14" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_136196DD2763419D959721C2BA143498" "MsmSig" = "8:_UNDEFINED" @@ -1744,19 +2080,19 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_306834653E086F12A2AAEA2DB03BEFCF" + "OwnerKey" = "8:_90D408142B1F2A9F72CBF42FC38348F0" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_DF75A431ACC8C9748E6FA8D8B926D6D8" + "OwnerKey" = "8:_306834653E086F12A2AAEA2DB03BEFCF" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_90D408142B1F2A9F72CBF42FC38348F0" + "OwnerKey" = "8:_DF75A431ACC8C9748E6FA8D8B926D6D8" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -1786,12 +2122,24 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_705F2A9700A0B6F6A5308537C5F876EA" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_847DE93907D7F6B17C0694F74120086B" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_EF2898B0C9AAB2E33674325B9F86943B" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_709D007D7E89A10E63C141E3A08311FD" "MsmSig" = "8:_UNDEFINED" } @@ -1804,6 +2152,18 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_87C6E2B736587D3682C48BA78EC097DD" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_164D74DB92C311B5B1C4DE16DFFBF6B1" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_FAAD9E9C9BB571F4E45C5C7C5DFD626A" "MsmSig" = "8:_UNDEFINED" } @@ -1852,6 +2212,12 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_882DC187F2FE507EF9AF44F399908E5F" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_E700A1A13A5B6DB314933FC1205AFDAB" "MsmSig" = "8:_UNDEFINED" } @@ -1870,6 +2236,18 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_CD3DBAF01E467DD4CC12AA88CE8A65C6" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_3C71904C35BED6686835B5A1C74768BE" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_69F60BE42927314554CD235D3185D2CE" "MsmSig" = "8:_UNDEFINED" } @@ -1882,12 +2260,30 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_1AC47588060EAA9F2B7A13EC07359D10" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_C6BFB4DAD78C1798616508141EF1234E" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_1910D5B276479C48B4F7762A638405F5" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_2444D22B50272EAE03F2B5D2457335EC" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_637E851F9FB315C0C0E9FD781D57341F" "MsmSig" = "8:_UNDEFINED" } @@ -1900,6 +2296,18 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_AF79FC974C2F42D24D74E5313E475E87" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_E0FCEE9366306B5A88DC7CF29E913A4B" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_EB38C1BD04FDFE44579B9868D6D1E139" "MsmSig" = "8:_UNDEFINED" } @@ -1948,7 +2356,7 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_DF6FFF88157E7FBCFB7E188431AAF4CF" + "OwnerKey" = "8:_BEF81681FFB4A3D9146381DB58646485" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -1978,109 +2386,97 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_9758638AABE50C72FFA87E6544F6D70F" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_69CC8DD07F81DD7EA883434F53157FBC" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_8D3497DF2885B15B643A20537C75D67E" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_51C4508525FA0604A9CD727897EBD530" + "OwnerKey" = "8:_D03482576128D28FB1FC54FC473F59E3" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_0D2EC478B8B5A060121B647E6BA3DE05" + "OwnerKey" = "8:_AFB29AE66E7A8C8B6FD1B50745BEBCFA" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_A1336C0121F3132E09400329ACD12B30" + "OwnerKey" = "8:_FC7C3735446215F02CF0C477948EAAFC" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_42250239B4791E8133657256CCE3506C" + "OwnerKey" = "8:_7D0EE03E89D3891AF49E51B7A20399FD" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_D50E7D146D0988E066CF588364E8E12F" + "OwnerKey" = "8:_51C4508525FA0604A9CD727897EBD530" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_DB4941BAFA45E5921E7072990000621E" + "OwnerKey" = "8:_9758638AABE50C72FFA87E6544F6D70F" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_F3FFF4D4A0414ACC9A1C44596F7A5728" + "OwnerKey" = "8:_69CC8DD07F81DD7EA883434F53157FBC" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_CBF3A46BFE914D8E4658EABB5A204074" + "OwnerKey" = "8:_DF6FFF88157E7FBCFB7E188431AAF4CF" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_5D31D40A55F64C363A1DE193E24D604B" + "OwnerKey" = "8:_0D2EC478B8B5A060121B647E6BA3DE05" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_2444D22B50272EAE03F2B5D2457335EC" + "OwnerKey" = "8:_A1336C0121F3132E09400329ACD12B30" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_1AC47588060EAA9F2B7A13EC07359D10" + "OwnerKey" = "8:_42250239B4791E8133657256CCE3506C" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_1910D5B276479C48B4F7762A638405F5" + "OwnerKey" = "8:_D50E7D146D0988E066CF588364E8E12F" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_3C71904C35BED6686835B5A1C74768BE" + "OwnerKey" = "8:_DB4941BAFA45E5921E7072990000621E" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_AF79FC974C2F42D24D74E5313E475E87" + "OwnerKey" = "8:_F3FFF4D4A0414ACC9A1C44596F7A5728" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_E0FCEE9366306B5A88DC7CF29E913A4B" + "OwnerKey" = "8:_5D31D40A55F64C363A1DE193E24D604B" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -2110,6 +2506,12 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_D947550594E2BF53BED76C7D7F9747D7" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_B8EE1FC78F28FD0B62389E8796D603FB" "MsmSig" = "8:_UNDEFINED" } @@ -2465,7 +2867,7 @@ "DisplayName" = "8:Release" "IsDebugOnly" = "11:FALSE" "IsReleaseOnly" = "11:TRUE" - "OutputFilename" = "8:Release\\Tango.MachineStudio.Installer.msi" + "OutputFilename" = "8:..\\..\\Build\\Release\\Installers\\Machine Studio Installer v1.0.msi" "PackageFilesAs" = "3:2" "PackageFileSize" = "3:-2147483648" "CabType" = "3:1" @@ -2530,7 +2932,7 @@ "_018A2A1E8555CACB14EEBBCFE003E82A" { "Name" = "8:System.Collections.dll" - "Attributes" = "3:0" + "Attributes" = "3:512" } } "SourcePath" = "8:System.Collections.dll" @@ -2539,7 +2941,7 @@ "Folder" = "8:_C15E39669002469F98F297C08D55903C" "Condition" = "8:" "Transitive" = "11:FALSE" - "Vital" = "11:FALSE" + "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" @@ -2547,7 +2949,7 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:TRUE" + "Exclude" = "11:FALSE" "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } @@ -2592,7 +2994,7 @@ "_04D23F89470123BB32E04152B3DA36A5" { "Name" = "8:System.Linq.Expressions.dll" - "Attributes" = "3:0" + "Attributes" = "3:512" } } "SourcePath" = "8:System.Linq.Expressions.dll" @@ -2601,7 +3003,7 @@ "Folder" = "8:_C15E39669002469F98F297C08D55903C" "Condition" = "8:" "Transitive" = "11:FALSE" - "Vital" = "11:FALSE" + "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" @@ -2609,7 +3011,7 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:TRUE" + "Exclude" = "11:FALSE" "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } @@ -2623,7 +3025,7 @@ "_08C7D6D7EF105161BD48E61BBEBBF002" { "Name" = "8:System.Reflection.dll" - "Attributes" = "3:0" + "Attributes" = "3:512" } } "SourcePath" = "8:System.Reflection.dll" @@ -2632,7 +3034,7 @@ "Folder" = "8:_C15E39669002469F98F297C08D55903C" "Condition" = "8:" "Transitive" = "11:FALSE" - "Vital" = "11:FALSE" + "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" @@ -2640,7 +3042,7 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:TRUE" + "Exclude" = "11:FALSE" "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } @@ -2768,6 +3170,37 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_164D74DB92C311B5B1C4DE16DFFBF6B1" + { + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:Tango.MachineStudio.Updater, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_164D74DB92C311B5B1C4DE16DFFBF6B1" + { + "Name" = "8:Tango.MachineStudio.Updater.exe" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:Tango.MachineStudio.Updater.exe" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_C15E39669002469F98F297C08D55903C" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_173C4B05CE04BA34E920DC64B25A8670" { "AssemblyRegister" = "3:1" @@ -2809,7 +3242,7 @@ "_1910D5B276479C48B4F7762A638405F5" { "Name" = "8:System.Runtime.dll" - "Attributes" = "3:0" + "Attributes" = "3:512" } } "SourcePath" = "8:System.Runtime.dll" @@ -2818,7 +3251,7 @@ "Folder" = "8:_C15E39669002469F98F297C08D55903C" "Condition" = "8:" "Transitive" = "11:FALSE" - "Vital" = "11:FALSE" + "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" @@ -2826,7 +3259,7 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:TRUE" + "Exclude" = "11:FALSE" "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } @@ -2871,7 +3304,7 @@ "_1AC47588060EAA9F2B7A13EC07359D10" { "Name" = "8:System.Threading.dll" - "Attributes" = "3:0" + "Attributes" = "3:512" } } "SourcePath" = "8:System.Threading.dll" @@ -2880,7 +3313,7 @@ "Folder" = "8:_C15E39669002469F98F297C08D55903C" "Condition" = "8:" "Transitive" = "11:FALSE" - "Vital" = "11:FALSE" + "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" @@ -2888,7 +3321,7 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:TRUE" + "Exclude" = "11:FALSE" "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } @@ -2933,7 +3366,7 @@ "_2444D22B50272EAE03F2B5D2457335EC" { "Name" = "8:System.Reflection.dll" - "Attributes" = "3:0" + "Attributes" = "3:512" } } "SourcePath" = "8:System.Reflection.dll" @@ -2942,7 +3375,7 @@ "Folder" = "8:_C15E39669002469F98F297C08D55903C" "Condition" = "8:" "Transitive" = "11:FALSE" - "Vital" = "11:FALSE" + "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" @@ -2950,7 +3383,7 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:TRUE" + "Exclude" = "11:FALSE" "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } @@ -3274,7 +3707,7 @@ "_3C71904C35BED6686835B5A1C74768BE" { "Name" = "8:System.Globalization.dll" - "Attributes" = "3:0" + "Attributes" = "3:512" } } "SourcePath" = "8:System.Globalization.dll" @@ -3283,7 +3716,7 @@ "Folder" = "8:_C15E39669002469F98F297C08D55903C" "Condition" = "8:" "Transitive" = "11:FALSE" - "Vital" = "11:FALSE" + "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" @@ -3291,7 +3724,7 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:TRUE" + "Exclude" = "11:FALSE" "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } @@ -3790,7 +4223,7 @@ "_637E851F9FB315C0C0E9FD781D57341F" { "Name" = "8:System.ObjectModel.dll" - "Attributes" = "3:0" + "Attributes" = "3:512" } } "SourcePath" = "8:System.ObjectModel.dll" @@ -3799,7 +4232,7 @@ "Folder" = "8:_C15E39669002469F98F297C08D55903C" "Condition" = "8:" "Transitive" = "11:FALSE" - "Vital" = "11:FALSE" + "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" @@ -3807,7 +4240,7 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:TRUE" + "Exclude" = "11:FALSE" "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } @@ -3966,6 +4399,37 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_705F2A9700A0B6F6A5308537C5F876EA" + { + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_705F2A9700A0B6F6A5308537C5F876EA" + { + "Name" = "8:Ionic.Zip.dll" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:Ionic.Zip.dll" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_C15E39669002469F98F297C08D55903C" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_709D007D7E89A10E63C141E3A08311FD" { "AssemblyRegister" = "3:1" @@ -4152,6 +4616,37 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_7D0EE03E89D3891AF49E51B7A20399FD" + { + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:System.Data.SQLite, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_7D0EE03E89D3891AF49E51B7A20399FD" + { + "Name" = "8:System.Data.SQLite.dll" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:System.Data.SQLite.dll" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_C15E39669002469F98F297C08D55903C" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_7E765F76FDFC3DCF4EAEB59B5546B063" { "AssemblyRegister" = "3:1" @@ -4245,6 +4740,68 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_87C6E2B736587D3682C48BA78EC097DD" + { + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:Tango.MachineStudio.UsersAndRoles, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_87C6E2B736587D3682C48BA78EC097DD" + { + "Name" = "8:Tango.MachineStudio.UsersAndRoles.dll" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:Tango.MachineStudio.UsersAndRoles.dll" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_C15E39669002469F98F297C08D55903C" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_882DC187F2FE507EF9AF44F399908E5F" + { + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:Tango.MachineStudio.HardwareDesigner, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_882DC187F2FE507EF9AF44F399908E5F" + { + "Name" = "8:Tango.MachineStudio.HardwareDesigner.dll" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:Tango.MachineStudio.HardwareDesigner.dll" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_C15E39669002469F98F297C08D55903C" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_89624A3865EAD179277FE5905CBE627D" { "AssemblyRegister" = "3:1" @@ -4596,7 +5153,7 @@ "_A0C8023CFDF8E1966A878020945346CF" { "Name" = "8:System.ObjectModel.dll" - "Attributes" = "3:0" + "Attributes" = "3:512" } } "SourcePath" = "8:System.ObjectModel.dll" @@ -4605,7 +5162,7 @@ "Folder" = "8:_C15E39669002469F98F297C08D55903C" "Condition" = "8:" "Transitive" = "11:FALSE" - "Vital" = "11:FALSE" + "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" @@ -4613,7 +5170,7 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:TRUE" + "Exclude" = "11:FALSE" "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } @@ -4844,7 +5401,7 @@ "_AF79FC974C2F42D24D74E5313E475E87" { "Name" = "8:System.Diagnostics.Debug.dll" - "Attributes" = "3:0" + "Attributes" = "3:512" } } "SourcePath" = "8:System.Diagnostics.Debug.dll" @@ -4853,7 +5410,7 @@ "Folder" = "8:_C15E39669002469F98F297C08D55903C" "Condition" = "8:" "Transitive" = "11:FALSE" - "Vital" = "11:FALSE" + "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" @@ -4861,7 +5418,38 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:TRUE" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_AFB29AE66E7A8C8B6FD1B50745BEBCFA" + { + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:Tango.BrushPicker, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_AFB29AE66E7A8C8B6FD1B50745BEBCFA" + { + "Name" = "8:Tango.BrushPicker.dll" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:Tango.BrushPicker.dll" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_C15E39669002469F98F297C08D55903C" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } @@ -4989,20 +5577,20 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_BF01A029E83A968C697506DFA469C90B" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_BEF81681FFB4A3D9146381DB58646485" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:ColorMine, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:Tango.EmbroideryUI, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" "ScatterAssemblies" { - "_BF01A029E83A968C697506DFA469C90B" + "_BEF81681FFB4A3D9146381DB58646485" { - "Name" = "8:ColorMine.dll" + "Name" = "8:Tango.EmbroideryUI.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:ColorMine.dll" + "SourcePath" = "8:Tango.EmbroideryUI.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_C15E39669002469F98F297C08D55903C" @@ -5020,26 +5608,26 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_C179B63E2F5A58786B70FADA6C8496A5" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_BF01A029E83A968C697506DFA469C90B" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:System.Dynamic.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" + "AssemblyAsmDisplayName" = "8:ColorMine, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL" "ScatterAssemblies" { - "_C179B63E2F5A58786B70FADA6C8496A5" + "_BF01A029E83A968C697506DFA469C90B" { - "Name" = "8:System.Dynamic.Runtime.dll" - "Attributes" = "3:0" + "Name" = "8:ColorMine.dll" + "Attributes" = "3:512" } } - "SourcePath" = "8:System.Dynamic.Runtime.dll" + "SourcePath" = "8:ColorMine.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_C15E39669002469F98F297C08D55903C" "Condition" = "8:" "Transitive" = "11:FALSE" - "Vital" = "11:FALSE" + "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" @@ -5047,24 +5635,24 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:TRUE" + "Exclude" = "11:FALSE" "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_C6BFB4DAD78C1798616508141EF1234E" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_C179B63E2F5A58786B70FADA6C8496A5" { "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:TRUE" - "AssemblyAsmDisplayName" = "8:System.Threading.Tasks, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:System.Dynamic.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" "ScatterAssemblies" { - "_C6BFB4DAD78C1798616508141EF1234E" + "_C179B63E2F5A58786B70FADA6C8496A5" { - "Name" = "8:System.Threading.Tasks.dll" + "Name" = "8:System.Dynamic.Runtime.dll" "Attributes" = "3:0" } } - "SourcePath" = "8:System.Threading.Tasks.dll" + "SourcePath" = "8:System.Dynamic.Runtime.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_C15E39669002469F98F297C08D55903C" @@ -5082,20 +5670,20 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_CBF3A46BFE914D8E4658EABB5A204074" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_C6BFB4DAD78C1798616508141EF1234E" { "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:System.Data.SQLite, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL" + "AssemblyIsInGAC" = "11:TRUE" + "AssemblyAsmDisplayName" = "8:System.Threading.Tasks, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" "ScatterAssemblies" { - "_CBF3A46BFE914D8E4658EABB5A204074" + "_C6BFB4DAD78C1798616508141EF1234E" { - "Name" = "8:System.Data.SQLite.dll" + "Name" = "8:System.Threading.Tasks.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:System.Data.SQLite.dll" + "SourcePath" = "8:System.Threading.Tasks.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_C15E39669002469F98F297C08D55903C" @@ -5206,6 +5794,68 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_CD3DBAF01E467DD4CC12AA88CE8A65C6" + { + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:Tango.MachineStudio.ColorLab, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_CD3DBAF01E467DD4CC12AA88CE8A65C6" + { + "Name" = "8:Tango.MachineStudio.ColorLab.dll" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:Tango.MachineStudio.ColorLab.dll" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_C15E39669002469F98F297C08D55903C" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_D03482576128D28FB1FC54FC473F59E3" + { + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:Tango.ColorPicker, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_D03482576128D28FB1FC54FC473F59E3" + { + "Name" = "8:Tango.ColorPicker.dll" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:Tango.ColorPicker.dll" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_C15E39669002469F98F297C08D55903C" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_D1CB239DDD65E78A28094BC854772AFF" { "AssemblyRegister" = "3:1" @@ -5216,7 +5866,7 @@ "_D1CB239DDD65E78A28094BC854772AFF" { "Name" = "8:System.Runtime.dll" - "Attributes" = "3:0" + "Attributes" = "3:512" } } "SourcePath" = "8:System.Runtime.dll" @@ -5225,7 +5875,7 @@ "Folder" = "8:_C15E39669002469F98F297C08D55903C" "Condition" = "8:" "Transitive" = "11:FALSE" - "Vital" = "11:FALSE" + "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" @@ -5233,7 +5883,7 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:TRUE" + "Exclude" = "11:FALSE" "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } @@ -5361,6 +6011,37 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_D947550594E2BF53BED76C7D7F9747D7" + { + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:System.IO.Compression.FileSystem, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" + "ScatterAssemblies" + { + "_D947550594E2BF53BED76C7D7F9747D7" + { + "Name" = "8:System.IO.Compression.FileSystem.dll" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:System.IO.Compression.FileSystem.dll" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_C15E39669002469F98F297C08D55903C" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_D9C852C126C7F540922D946114717E3C" { "AssemblyRegister" = "3:1" @@ -5464,7 +6145,7 @@ "_DCD0D71251FAABFB20D57E60AC3DEFA3" { "Name" = "8:System.Globalization.dll" - "Attributes" = "3:0" + "Attributes" = "3:512" } } "SourcePath" = "8:System.Globalization.dll" @@ -5473,7 +6154,7 @@ "Folder" = "8:_C15E39669002469F98F297C08D55903C" "Condition" = "8:" "Transitive" = "11:FALSE" - "Vital" = "11:FALSE" + "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" @@ -5481,7 +6162,7 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:TRUE" + "Exclude" = "11:FALSE" "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } @@ -5495,7 +6176,7 @@ "_DD10CB022785FD0CE997E8C7BC1D0FE6" { "Name" = "8:System.Threading.dll" - "Attributes" = "3:0" + "Attributes" = "3:512" } } "SourcePath" = "8:System.Threading.dll" @@ -5504,7 +6185,7 @@ "Folder" = "8:_C15E39669002469F98F297C08D55903C" "Condition" = "8:" "Transitive" = "11:FALSE" - "Vital" = "11:FALSE" + "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" @@ -5512,7 +6193,7 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:TRUE" + "Exclude" = "11:FALSE" "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } @@ -5681,7 +6362,7 @@ "_E0FCEE9366306B5A88DC7CF29E913A4B" { "Name" = "8:System.Collections.dll" - "Attributes" = "3:0" + "Attributes" = "3:512" } } "SourcePath" = "8:System.Collections.dll" @@ -5690,7 +6371,7 @@ "Folder" = "8:_C15E39669002469F98F297C08D55903C" "Condition" = "8:" "Transitive" = "11:FALSE" - "Vital" = "11:FALSE" + "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" @@ -5698,7 +6379,7 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:TRUE" + "Exclude" = "11:FALSE" "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } @@ -5774,7 +6455,7 @@ "_EB90C5C498BD80F4675C07A364C45E3D" { "Name" = "8:System.Diagnostics.Debug.dll" - "Attributes" = "3:0" + "Attributes" = "3:512" } } "SourcePath" = "8:System.Diagnostics.Debug.dll" @@ -5783,7 +6464,7 @@ "Folder" = "8:_C15E39669002469F98F297C08D55903C" "Condition" = "8:" "Transitive" = "11:FALSE" - "Vital" = "11:FALSE" + "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" @@ -5791,7 +6472,7 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:TRUE" + "Exclude" = "11:FALSE" "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } @@ -5805,7 +6486,7 @@ "_EBFEF6DABA658232EC82197A8E01F66E" { "Name" = "8:System.Threading.Tasks.dll" - "Attributes" = "3:0" + "Attributes" = "3:512" } } "SourcePath" = "8:System.Threading.Tasks.dll" @@ -5814,7 +6495,7 @@ "Folder" = "8:_C15E39669002469F98F297C08D55903C" "Condition" = "8:" "Transitive" = "11:FALSE" - "Vital" = "11:FALSE" + "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" @@ -5822,7 +6503,7 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:TRUE" + "Exclude" = "11:FALSE" "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } @@ -5888,11 +6569,42 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_EF2898B0C9AAB2E33674325B9F86943B" + { + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:FluentFTP, Version=19.1.2.0, Culture=neutral, PublicKeyToken=f4af092b1d8df44f, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_EF2898B0C9AAB2E33674325B9F86943B" + { + "Name" = "8:FluentFTP.dll" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:FluentFTP.dll" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_C15E39669002469F98F297C08D55903C" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_F07A99EB8EC845750208F557C91D5A84" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Tango.Video, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86" + "AssemblyAsmDisplayName" = "8:Tango.Video, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" "ScatterAssemblies" { "_F07A99EB8EC845750208F557C91D5A84" @@ -6042,7 +6754,7 @@ "_F46F8B020857673C983D66FE2F41B983" { "Name" = "8:System.Linq.Expressions.dll" - "Attributes" = "3:0" + "Attributes" = "3:512" } } "SourcePath" = "8:System.Linq.Expressions.dll" @@ -6051,7 +6763,7 @@ "Folder" = "8:_C15E39669002469F98F297C08D55903C" "Condition" = "8:" "Transitive" = "11:FALSE" - "Vital" = "11:FALSE" + "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" @@ -6059,7 +6771,7 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:TRUE" + "Exclude" = "11:FALSE" "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } @@ -6156,6 +6868,37 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_FC7C3735446215F02CF0C477948EAAFC" + { + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:Tango.BL, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_FC7C3735446215F02CF0C477948EAAFC" + { + "Name" = "8:Tango.BL.dll" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:Tango.BL.dll" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_C15E39669002469F98F297C08D55903C" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } } "FileType" { @@ -6235,7 +6978,7 @@ "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:Machine Studio" "ProductCode" = "8:{85D89915-CDF5-4C10-AE24-99842E2FDAD0}" - "PackageCode" = "8:{D9AA26EE-C3B6-4D51-8553-F458F996AD82}" + "PackageCode" = "8:{3619637E-3B7B-430E-9541-D4AAA77C0B46}" "UpgradeCode" = "8:{EDD5BF5D-A0F0-4016-AE0A-5C008DD66BB6}" "AspNetVersion" = "8:4.0.30319.0" "RestartWWWService" = "11:FALSE" diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindow.xaml index ab7e503ff..abbfa0aa6 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindow.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindow.xaml @@ -5,7 +5,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:Tango.MachineStudio.Publisher" mc:Ignorable="d" - Title="Machine Studio Publisher" Height="400" Width="700" WindowStartupLocation="CenterScreen" WindowStyle="ToolWindow" ResizeMode="NoResize" Foreground="#202020" d:DataContext="{d:DesignInstance Type=local:MainWindowVM, IsDesignTimeCreatable=False}"> + Title="Machine Studio Publisher" Height="432" Width="700" WindowStartupLocation="CenterScreen" WindowStyle="ToolWindow" ResizeMode="NoResize" Foreground="#202020" d:DataContext="{d:DesignInstance Type=local:MainWindowVM, IsDesignTimeCreatable=False}"> <Border BorderThickness="1" BorderBrush="#0288D1"> <Grid> <Grid.RowDefinitions> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs index 34d2f1b1f..3b92ac686 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs @@ -21,7 +21,7 @@ namespace Tango.MachineStudio.Publisher { public class MainWindowVM : ViewModel { - private String _appPath = AppDomain.CurrentDomain.BaseDirectory; + private String _appPath = AppDomain.CurrentDomain.BaseDirectory + "..\\Release"; private ChannelFactory<IMachineStudioUpdateService> _service; private IMachineStudioUpdateService _client; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/Tango.MachineStudio.Publisher.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/Tango.MachineStudio.Publisher.csproj index 7b59fa319..6f3276996 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/Tango.MachineStudio.Publisher.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/Tango.MachineStudio.Publisher.csproj @@ -43,7 +43,7 @@ <PlatformTarget>AnyCPU</PlatformTarget> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> + <OutputPath>..\..\Build\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml index 63b2b3f6a..6b2bbaaec 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml @@ -14,7 +14,7 @@ <Grid.Background> <ImageBrush ImageSource="/Images/White-Abstract.png" Stretch="Fill"></ImageBrush> </Grid.Background> - <Viewbox Stretch="Fill" UseLayoutRounding="True" SnapsToDevicePixels="True"> + <Viewbox Stretch="Fill"> <Grid Width="1920" Height="1145"> <Grid> <sharedControls:MultiTransitionControl AlwaysFade="True" TransitionType="Zoom" x:Name="TransitionControl" x:FieldModifier="public"> @@ -22,16 +22,16 @@ <ContentControl Tag="LoadingView"> <views:LoadingView></views:LoadingView> </ContentControl> - <ContentControl Tag="LoginView"> + <ContentControl Tag="LoginView" Visibility="Hidden"> <views:LoginView></views:LoginView> </ContentControl> - <ContentControl Tag="MainView"> + <ContentControl Tag="MainView" Visibility="Hidden"> <views:MainView></views:MainView> </ContentControl> - <ContentControl Tag="ShutdownView"> + <ContentControl Tag="ShutdownView" Visibility="Hidden"> <views:ShutdownView></views:ShutdownView> </ContentControl> - <ContentControl Tag="UpdateView"> + <ContentControl Tag="UpdateView" Visibility="Hidden"> <views:UpdateView></views:UpdateView> </ContentControl> </sharedControls:MultiTransitionControl.Controls> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs index 36ee95f10..c4d9b4a28 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs @@ -10,7 +10,9 @@ using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; +using System.Windows.Interop; using System.Windows.Media; +using System.Windows.Media.Animation; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; @@ -30,6 +32,8 @@ namespace Tango.MachineStudio.UI public MainWindow() { + //Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 40 }); + try { InitializeComponent(); @@ -42,6 +46,15 @@ namespace Tango.MachineStudio.UI { LogManager.Log(ex); } + + this.Loaded += MainWindow_Loaded; + } + + private void MainWindow_Loaded(object sender, RoutedEventArgs e) + { + //HwndSource hwndSource = PresentationSource.FromVisual(this) as HwndSource; + //HwndTarget hwndTarget = hwndSource.CompositionTarget; + //hwndTarget.RenderMode = RenderMode.SoftwareOnly; } private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj index 52bd44239..6fc530627 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj @@ -30,7 +30,7 @@ <PlatformTarget>AnyCPU</PlatformTarget> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> + <OutputPath>..\..\Build\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> @@ -371,6 +371,10 @@ <Project>{5d39c1e1-3ecd-4634-bd1b-2bcf71c54a15}</Project> <Name>Tango.MachineStudio.Technician</Name> </ProjectReference> + <ProjectReference Include="..\Modules\Tango.MachineStudio.UsersAndRoles\Tango.MachineStudio.UsersAndRoles.csproj"> + <Project>{88028f14-0028-4ded-b119-19b8ee23cf32}</Project> + <Name>Tango.MachineStudio.UsersAndRoles</Name> + </ProjectReference> <ProjectReference Include="..\Tango.MachineStudio.Common\Tango.MachineStudio.Common.csproj"> <Project>{cb0b0aa2-bb24-4bca-a720-45e397684e12}</Project> <Name>Tango.MachineStudio.Common</Name> @@ -407,7 +411,7 @@ </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> - <PostBuildEvent>$(TargetDir)linkgen.exe -s "$(TargetPath)" -d "$(TargetDir)Utilities\Machine Studio.lnk" + <PostBuildEvent>if $(ConfigurationName) == Debug $(TargetDir)linkgen.exe -s "$(TargetPath)" -d "$(TargetDir)Utilities\Machine Studio.lnk" RD /S /Q "$(TargetDir)cs\" RD /S /Q "$(TargetDir)da\" diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs index 7d83fa032..9ee8471ec 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs @@ -28,6 +28,14 @@ namespace Tango.MachineStudio.UI.ViewModels private LogManager logManager = LogManager.Default; public IStudioApplicationManager ApplicationManager { get; set; } + private bool _isLoading; + + public bool IsLoading + { + get { return _isLoading; } + set { _isLoading = value; RaisePropertyChangedAuto(); } + } + /// <summary> /// Initializes a new instance of the <see cref="LoadingViewVM"/> class. /// </summary> @@ -48,6 +56,8 @@ namespace Tango.MachineStudio.UI.ViewModels /// </summary> private void Load() { + IsLoading = true; + ThreadsHelper.StartStaThread(() => { try @@ -57,6 +67,7 @@ namespace Tango.MachineStudio.UI.ViewModels { _studioModuleLoader.LoadModules(); _navigationManager.NavigateTo(NavigationView.LoginView); + IsLoading = false; }); } catch (Exception ex) diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs index 23be8d274..4fcebe3dd 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs @@ -49,7 +49,6 @@ namespace Tango.MachineStudio.UI.ViewModels { Scanner = scanner; ConnectCommand = new RelayCommand(Connect,(x) => SelectedMachine != null); - Scanner.Start(); } /// <summary> @@ -59,10 +58,17 @@ namespace Tango.MachineStudio.UI.ViewModels { if (SelectedMachine != null) { + Scanner.Stop(); Accept(); } } + protected override void Cancel() + { + Scanner.Stop(); + base.Cancel(); + } + /// <summary> /// Called when the dialog has been shown. /// </summary> @@ -70,6 +76,7 @@ namespace Tango.MachineStudio.UI.ViewModels { base.OnShow(); Scanner.AvailableMachines.Clear(); + Scanner.Start(); } } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ShutdownViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ShutdownViewVM.cs index ed771f00a..92e0eb9b5 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ShutdownViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ShutdownViewVM.cs @@ -3,13 +3,15 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using Tango.SharedUI; namespace Tango.MachineStudio.UI.ViewModels { /// <summary> /// Represents the Machine Studio shutdown view, view model. /// </summary> - public class ShutdownViewVM + public class ShutdownViewVM : ViewModel { + } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml index 5f65100df..91fc11a22 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml @@ -15,7 +15,7 @@ <TextBlock FontSize="70" Foreground="{StaticResource AccentColorBrush}">Machine Studio</TextBlock> </StackPanel> <TextBlock HorizontalAlignment="Right" FontSize="18" Margin="0 0 -50 0" Foreground="{StaticResource AccentColorBrush}">Twine Solutions</TextBlock> - <mahapps:ProgressRing Margin="20 60 20 40" Width="80" Height="80"></mahapps:ProgressRing> + <mahapps:ProgressRing Margin="20 60 20 40" Width="80" Height="80" IsActive="{Binding IsLoading}"></mahapps:ProgressRing> <TextBlock HorizontalAlignment="Center" FontSize="18" FontStyle="Italic">Loading, please wait...</TextBlock> </StackPanel> </Grid> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml index a4256436c..8e6fa36f5 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml @@ -48,16 +48,19 @@ <StackPanel Margin="5 0 0 0" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center"> <Image Source="/Images/account.png" RenderOptions.BitmapScalingMode="Fant" VerticalAlignment="Center" Width="50" Height="50"></Image> <StackPanel Margin="0 5 0 0"> - <TextBlock FontSize="16" TextTrimming="CharacterEllipsis" MaxWidth="170" FontStyle="Italic" FontWeight="Bold" Margin="10 0 0 0" VerticalAlignment="Center" Text="{Binding AuthenticationProvider.CurrentUser.Contact.FullName}"></TextBlock> + <TextBlock FontSize="16" TextTrimming="CharacterEllipsis" MaxWidth="170" FontStyle="Italic" FontWeight="Bold" Margin="10 0 0 0" VerticalAlignment="Center" Text="{Binding AuthenticationProvider.CurrentUser.Contact.FullName}"></TextBlock> <TextBlock FontSize="12" TextTrimming="CharacterEllipsis" MaxWidth="170" FontStyle="Italic" Margin="10 5 0 0" VerticalAlignment="Center"> <Run Text="{Binding AuthenticationProvider.CurrentUser.Organization.Name}"></Run> , - <Run Text="{Binding AuthenticationProvider.CurrentUser.Roles[0]}"> + <Run Text="{Binding AuthenticationProvider.CurrentUser.Roles[0].Name}"> <Run.ToolTip> <ItemsControl ItemsSource="{Binding AuthenticationProvider.CurrentUser.Roles}"> <ItemsControl.ItemTemplate> <DataTemplate> - <TextBlock Text="{Binding Name}"></TextBlock> + <StackPanel Orientation="Horizontal" Margin="2"> + <materialDesign:PackIcon Kind="AccountKey" Width="16" Height="16" /> + <TextBlock Margin="5 0 0 0" Text="{Binding Name}"></TextBlock> + </StackPanel> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs index c40904173..e0ae60b87 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs @@ -76,6 +76,7 @@ namespace Tango.MachineStudio.UI.Views { Tag = module.Name, Content = grid, + Visibility = Visibility.Hidden, }); _loader.UserModules.Add(module); diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml index dd86238ce..cc1060b2a 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml @@ -15,7 +15,7 @@ <TextBlock FontSize="70" Foreground="Gray">Machine Studio</TextBlock> </StackPanel> <TextBlock HorizontalAlignment="Right" FontSize="18" Margin="0 0 -50 0" Foreground="Gray">Twine Solutions</TextBlock> - <mahapps:ProgressRing Margin="20 60 20 40" Width="80" Height="80" Foreground="Gray"></mahapps:ProgressRing> + <mahapps:ProgressRing x:Name="progressRing" IsActive="False" Margin="20 60 20 40" Width="80" Height="80" Foreground="Gray"></mahapps:ProgressRing> <TextBlock HorizontalAlignment="Center" FontSize="18" FontStyle="Italic" Foreground="Gray">Shutting Down, please wait...</TextBlock> </StackPanel> </Grid> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml.cs index e1d49aec0..afe6d3800 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml.cs @@ -12,17 +12,23 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; +using static Tango.SharedUI.Controls.MultiTransitionControl; namespace Tango.MachineStudio.UI.Views { /// <summary> /// Interaction logic for ShutdownView.xaml /// </summary> - public partial class ShutdownView : UserControl + public partial class ShutdownView : UserControl, ITransitionView { public ShutdownView() { InitializeComponent(); } + + public void OnTransitionCompleted() + { + progressRing.IsActive = true; + } } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml index dabbaab94..e34cdb83b 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml @@ -16,9 +16,9 @@ <Grid MaxWidth="1200" MaxHeight="700"> <DockPanel> <Grid DockPanel.Dock="Top" HorizontalAlignment="Center"> - <Grid.Effect> + <!--<Grid.Effect> <DropShadowEffect BlurRadius="200" ShadowDepth="0" Opacity="0.5" /> - </Grid.Effect> + </Grid.Effect>--> <StackPanel Orientation="Horizontal"> <Image Source="/Images/update.png" Width="100" /> <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" FontSize="70">Update Center</TextBlock> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Tango.MachineStudio.UpdateService.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Tango.MachineStudio.UpdateService.csproj index f572056ba..08d40b49a 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Tango.MachineStudio.UpdateService.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Tango.MachineStudio.UpdateService.csproj @@ -81,10 +81,7 @@ </ItemGroup> <ItemGroup> <Content Include="packages.config" /> - <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> - <None Include="Properties\PublishProfiles\CustomProfile1.pubxml" /> - <None Include="Properties\PublishProfiles\CustomProfile2.pubxml" /> - <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> + <None Include="Properties\PublishProfiles\Twine Local Via FTP.pubxml" /> <None Include="Web.Debug.config"> <DependentUpon>Web.config</DependentUpon> </None> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Updater/Tango.MachineStudio.Updater.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Updater/Tango.MachineStudio.Updater.csproj index c77222c03..37a6dbf63 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Updater/Tango.MachineStudio.Updater.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Updater/Tango.MachineStudio.Updater.csproj @@ -28,7 +28,7 @@ <PlatformTarget>AnyCPU</PlatformTarget> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> + <OutputPath>..\..\Build\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> |
