diff options
| author | Mirta <mirta@twine-s.com> | 2019-08-08 15:25:02 +0300 |
|---|---|---|
| committer | Mirta <mirta@twine-s.com> | 2019-08-08 15:25:02 +0300 |
| commit | c7afd7e05b3230a4c652d74effd813b858da8ee3 (patch) | |
| tree | 5e932dbdf668929ddc416b1706d5b481c2863ba2 /Software/Visual_Studio/MachineStudio/Modules | |
| parent | b112abfecb622ac7fcb7c161b03f450fbb58b00a (diff) | |
| parent | d627576c770ddab1079940c34057a55206f6a835 (diff) | |
| download | Tango-c7afd7e05b3230a4c652d74effd813b858da8ee3.tar.gz Tango-c7afd7e05b3230a4c652d74effd813b858da8ee3.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules')
70 files changed, 1492 insertions, 386 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispensersView.xaml b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispensersView.xaml index a8262667e..0943d76bf 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispensersView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispensersView.xaml @@ -32,13 +32,13 @@ </Grid> <Grid DockPanel.Dock="Bottom" IsEnabled="{Binding IsFree}"> <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 RemoveDispenserCommand}"> + <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}" Command="{Binding RemoveDispenserCommand}"> <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 AddDispenserCommand}"> + <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource GreenBrush300}" BorderBrush="{StaticResource GreenBrush300}" Command="{Binding AddDispenserCommand}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Plus" Width="20" Height="20" /> <TextBlock Margin="5 0 0 0" FontSize="16">NEW DISPENSER</TextBlock> @@ -55,7 +55,7 @@ </StackPanel> </Grid> <Grid IsEnabled="{Binding IsFree}"> - <controls:DoubleClickDataGrid Style="{StaticResource {x:Type DataGrid}}" DoubleClickCommand="{Binding ManageDispenserCommand}" Margin="0 0 0 10" BorderBrush="Silver" IsReadOnly="True" BorderThickness="1" Background="#93FFFFFF" AlternatingRowBackground="#C9F6F6F6" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding Dispensers}" SelectedItem="{Binding SelectedDispenser}"> + <controls:DoubleClickDataGrid Style="{StaticResource {x:Type DataGrid}}" DoubleClickCommand="{Binding ManageDispenserCommand}" Margin="0 0 0 10" BorderBrush="Silver" IsReadOnly="True" BorderThickness="1" Background="{StaticResource TransparentBackgroundBrush}" AlternatingRowBackground="{StaticResource Transparent200}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding Dispensers}" SelectedItem="{Binding SelectedDispenser}"> <DataGrid.CellStyle> <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> <Setter Property="BorderThickness" Value="0"/> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Converters/ObservableCollectionToViewSourceConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Converters/ObservableCollectionToViewSourceConverter.cs new file mode 100644 index 000000000..050539741 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Converters/ObservableCollectionToViewSourceConverter.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Data; + +namespace Tango.MachineStudio.Catalogs.Converters +{ + public class ObservableCollectionToViewSourceConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + String sortMember = parameter != null ? parameter.ToString() : null; + IList list = value as IList; + if (list != null) + { + var view = CollectionViewSource.GetDefaultView(list); + view.SortDescriptions.Clear(); + + //Delay because the DataGrid clears the sort description after source change. + Task.Factory.StartNew(() => + { + Thread.Sleep(10); + + Application.Current.Dispatcher.BeginInvoke(new Action(() => + { + view.SortDescriptions.Add(new SortDescription(sortMember, ListSortDirection.Ascending)); + view.Refresh(); + })); + }); + return view; + } + + return value; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Excel/ColorGroup.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Excel/ColorGroup.cs new file mode 100644 index 000000000..852311883 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Excel/ColorGroup.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media; + +namespace Tango.MachineStudio.Catalogs.Excel +{ + public class ColorGroup + { + public Color GroupColor { get; set; } + public String GroupName { get; set; } + public int GroupIndex { get; set; } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Excel/ColorItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Excel/ColorItem.cs new file mode 100644 index 000000000..9d5011325 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Excel/ColorItem.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media; + +namespace Tango.MachineStudio.Catalogs.Excel +{ + public class ColorItem + { + public Color ItemColor { get; set; } + public String Group { get; set; } + public int Code { get; set; } + public String Name { get; set; } + public int ItemIndex { get; set; } + public int Red { get; set; } + public int Green { get; set; } + public int Blue { get; set; } + public double L { get; set; } + public double A { get; set; } + public double B { get; set; } + public double Cyan { get; set; } + public double Magenta { get; set; } + public double Yellow { get; set; } + public double Black { get; set; } + public int Region { get; set; } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Excel/ColorRecipe.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Excel/ColorRecipe.cs new file mode 100644 index 000000000..724652cd4 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Excel/ColorRecipe.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media; + +namespace Tango.MachineStudio.Catalogs.Excel +{ + public class ColorRecipe + { + public Color R_Color { get; set; } + public String R_Name { get; set; } + public String R_Media { get; set; } + public double R_Cyan { get; set; } + public double R_Magenta { get; set; } + public double R_Yellow { get; set; } + public double R_Black { get; set; } + public int R_Region { get; set; } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Excel/Media.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Excel/Media.cs new file mode 100644 index 000000000..d65b1a986 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Excel/Media.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.MachineStudio.Catalogs.Excel +{ + public class Media + { + public String MediaName { get; set; } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Tango.MachineStudio.Catalogs.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Tango.MachineStudio.Catalogs.csproj index 1d29166be..5473c28bc 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Tango.MachineStudio.Catalogs.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Tango.MachineStudio.Catalogs.csproj @@ -68,8 +68,12 @@ </ItemGroup> <ItemGroup> <Compile Include="Contracts\IMainView.cs" /> + <Compile Include="Converters\ObservableCollectionToViewSourceConverter.cs" /> + <Compile Include="Excel\ColorGroup.cs" /> + <Compile Include="Excel\ColorItem.cs" /> + <Compile Include="Excel\ColorRecipe.cs" /> + <Compile Include="Excel\Media.cs" /> <Compile Include="ViewModelLocator.cs" /> - <Compile Include="ViewModels\CatalogVM.cs" /> <Compile Include="ViewModels\MainViewVM.cs" /> <Compile Include="Views\CatalogView.xaml.cs"> <DependentUpon>CatalogView.xaml</DependentUpon> @@ -121,6 +125,7 @@ <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> + <EmbeddedResource Include="Templates\ExportTemplate.xlsx" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\..\Tango.BL\Tango.BL.csproj"> @@ -135,6 +140,10 @@ <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project> <Name>Tango.Core</Name> </ProjectReference> + <ProjectReference Include="..\..\..\Tango.Documents\Tango.Documents.csproj"> + <Project>{ca87a608-7b17-4c98-88f2-42abee10f4c1}</Project> + <Name>Tango.Documents</Name> + </ProjectReference> <ProjectReference Include="..\..\..\Tango.Logging\Tango.Logging.csproj"> <Project>{bc932dbd-7cdb-488c-99e4-f02cf441f55e}</Project> <Name>Tango.Logging</Name> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Templates/ExportTemplate - BACKUP.xlsx b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Templates/ExportTemplate - BACKUP.xlsx Binary files differnew file mode 100644 index 000000000..44abd31db --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Templates/ExportTemplate - BACKUP.xlsx diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Templates/ExportTemplate - bad.xlsx b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Templates/ExportTemplate - bad.xlsx Binary files differnew file mode 100644 index 000000000..d95727038 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Templates/ExportTemplate - bad.xlsx diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Templates/ExportTemplate.xlsx b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Templates/ExportTemplate.xlsx Binary files differnew file mode 100644 index 000000000..e57422725 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Templates/ExportTemplate.xlsx diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModels/CatalogVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModels/CatalogVM.cs deleted file mode 100644 index 7d9c79ada..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModels/CatalogVM.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL.Entities; -using Tango.Core; - -namespace Tango.MachineStudio.Catalogs.ViewModels -{ - public class CatalogVM : ExtendedObject - { - public ColorSpace ColorSpace { get; set; } - - public List<Rml> SupportedMedia { get; set; } - - public int Colors { get; set; } - - public CatalogVM() - { - SupportedMedia = new List<Rml>(); - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModels/MainViewVM.cs index 6b1c82e0f..652ad3093 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModels/MainViewVM.cs @@ -1,17 +1,602 @@ using System; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; +using Tango.BL; +using Tango.BL.Entities; using Tango.MachineStudio.Common; +using System.Data.Entity; +using Tango.MachineStudio.Catalogs.Contracts; +using Tango.MachineStudio.Common.Notifications; +using Tango.Core.Commands; +using Tango.BL.Builders; +using Tango.Documents; +using Microsoft.Win32; +using Tango.Core.Helpers; +using System.IO; +using Tango.MachineStudio.Catalogs.Excel; namespace Tango.MachineStudio.Catalogs.ViewModels { - public class MainViewVM : StudioViewModel + public class MainViewVM : StudioViewModel<IMainView> { - public override void OnApplicationReady() + private ObservablesContext _catalogsContext; + private ObservablesContext _activeCatalogContext; + private INotificationProvider _notification; + + #region Properties + + private ObservableCollection<ColorCatalog> _catalogs; + /// <summary> + /// Gets or sets the catalogs. + /// </summary> + public ObservableCollection<ColorCatalog> Catalogs + { + get { return _catalogs; } + set { _catalogs = value; RaisePropertyChangedAuto(); } + } + + private ColorCatalog _selectedCatalog; + /// <summary> + /// Gets or sets the selected catalog. + /// </summary> + public ColorCatalog SelectedCatalog + { + get { return _selectedCatalog; } + set { _selectedCatalog = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } + } + + private ColorCatalog _activeCatalog; + /// <summary> + /// Gets or sets the active catalog. + /// </summary> + public ColorCatalog ActiveCatalog + { + get { return _activeCatalog; } + set { _activeCatalog = value; RaisePropertyChangedAuto(); } + } + + private ColorCatalogsGroup _selectedGroup; + /// <summary> + /// Gets or sets the selected group. + /// </summary> + public ColorCatalogsGroup SelectedGroup + { + get { return _selectedGroup; } + set { _selectedGroup = value; RaisePropertyChangedAuto(); } + } + + private ColorCatalogsItem _selectedItem; + /// <summary> + /// Gets or sets the selected item. + /// </summary> + public ColorCatalogsItem SelectedItem + { + get { return _selectedItem; } + set { _selectedItem = value; RaisePropertyChangedAuto(); } + } + + private List<Rml> _rmls; + /// <summary> + /// Gets or sets the RMLS. + /// </summary> + public List<Rml> RMLS + { + get { return _rmls; } + set { _rmls = value; RaisePropertyChangedAuto(); } + } + + #endregion + + #region Commands + + /// <summary> + /// Gets or sets the new catalog command. + /// </summary> + public RelayCommand NewCatalogCommand { get; set; } + + /// <summary> + /// Gets or sets the delete catalog command. + /// </summary> + public RelayCommand DeleteCatalogCommand { get; set; } + + /// <summary> + /// Gets or sets the edit catalog command. + /// </summary> + public RelayCommand EditCatalogCommand { get; set; } + + /// <summary> + /// Gets or sets the back to catalogs command. + /// </summary> + public RelayCommand BackToCatalogsCommand { get; set; } + + /// <summary> + /// Gets or sets the save active catalog command. + /// </summary> + public RelayCommand SaveActiveCatalogCommand { get; set; } + + /// <summary> + /// Gets or sets the export excel command. + /// </summary> + public RelayCommand ExportExcelCommand { get; set; } + + /// <summary> + /// Gets or sets the import excel command. + /// </summary> + public RelayCommand ImportExcelCommand { get; set; } + + #endregion + + #region Constructors + + /// <summary> + /// Initializes a new instance of the <see cref="MainViewVM"/> class. + /// </summary> + public MainViewVM() + { + Catalogs = new ObservableCollection<ColorCatalog>(); + + EditCatalogCommand = new RelayCommand(EditSelectedCatalog, () => SelectedCatalog != null); + NewCatalogCommand = new RelayCommand(CreateNewCatalog); + DeleteCatalogCommand = new RelayCommand(DeleteSelectedCatalog, () => SelectedCatalog != null); + BackToCatalogsCommand = new RelayCommand(BackToCatalogs); + SaveActiveCatalogCommand = new RelayCommand(SaveActiveCatalog); + ExportExcelCommand = new RelayCommand(ExportCatalogToExcel); + ImportExcelCommand = new RelayCommand(ImportCatalogFromExcel); + } + + /// <summary> + /// Initializes a new instance of the <see cref="MainViewVM"/> class. + /// </summary> + /// <param name="notificationProvider">The notification provider.</param> + public MainViewVM(INotificationProvider notificationProvider) : this() + { + _notification = notificationProvider; + } + + #endregion + + #region Edit / Delete / Create Catalog + + public async Task LoadCatalogs() + { + using (_notification.PushTaskItem("Loading color catalogs...")) + { + IsFree = false; + + if (_catalogsContext != null) + { + _catalogsContext.Dispose(); + } + + _catalogsContext = ObservablesContext.CreateDefault(); + + Catalogs = (await _catalogsContext.ColorCatalogs.Include(x => x.ColorCatalogsGroups.Select(g => g.ColorCatalogsItems)).ToListAsync()).ToSynchronizedObservableCollection(); + SelectedCatalog = null; + + IsFree = true; + } + } + + public async void EditSelectedCatalog() + { + if (SelectedCatalog != null) + { + using (_notification.PushTaskItem("Loading selected catalog...")) + { + try + { + IsFree = false; + + if (_activeCatalogContext != null) + { + _activeCatalogContext.Dispose(); + } + + _activeCatalogContext = ObservablesContext.CreateDefault(); + + ActiveCatalog = await new ColorCatalogBuilder(_activeCatalogContext).Set(SelectedCatalog.Guid).WithGroups().WithItems().WithRecipes().BuildAsync(); + SelectedGroup = ActiveCatalog.ColorCatalogsGroups.FirstOrDefault(); + RMLS = await _activeCatalogContext.Rmls.ToListAsync(); + + if (SelectedGroup != null) + { + SelectedItem = SelectedGroup.ColorCatalogsItems.FirstOrDefault(); + } + + View.NavigateTo(CatalogsNavigationView.CatalogView); + } + catch (Exception ex) + { + _notification.ShowError($"An error occurred while trying to load the selected catalog.\n{ex.Message}"); + LogManager.Log(ex, $"Error loading selected catalog '{SelectedCatalog.Name}'."); + } + finally + { + IsFree = true; + } + } + } + } + + private async void DeleteSelectedCatalog() + { + if (SelectedCatalog != null) + { + if (_notification.ShowQuestion("Are you sure you want to delete the selected catalog ?")) + { + using (_notification.PushTaskItem("Deleting selected catalog...")) + { + try + { + IsFree = false; + await SelectedCatalog.DeleteCascadeAsync(_catalogsContext); + SelectedCatalog = null; + } + catch (Exception ex) + { + _notification.ShowError($"An error occurred while trying to delete the selected catalog.\n{ex.Message}"); + LogManager.Log(ex, $"Error deleting catalog {SelectedCatalog.Name}."); + } + finally + { + IsFree = true; + } + } + } + } + } + + private async void CreateNewCatalog() + { + String name = _notification.ShowTextInput("Please enter a catalog name", "Catalog name"); + if (!String.IsNullOrWhiteSpace(name)) + { + using (_notification.PushTaskItem("Generating catalog...")) + { + try + { + IsFree = false; + ColorCatalog newCatalog = new ColorCatalog(); + newCatalog.Name = name; + newCatalog.Description = name; + newCatalog.Company = "Twine"; + _catalogsContext.ColorCatalogs.Add(newCatalog); + await _catalogsContext.SaveChangesAsync(); + SelectedCatalog = newCatalog; + EditSelectedCatalog(); + } + catch (Exception ex) + { + _notification.ShowError($"An error occurred while trying to create the catalog.\n{ex.Message}"); + LogManager.Log(ex, $"Error creating new catalog."); + } + finally + { + IsFree = true; + } + } + } + } + + public void OnGroupDeleted(ColorCatalogsGroup group) + { + group.Delete(_activeCatalogContext); + } + + public void OnItemDeleted(ColorCatalogsItem item) + { + item.Delete(_activeCatalogContext); + } + + public void OnRecipeDeleted(ColorCatalogsItemsRecipe recipe) + { + recipe.Delete(_activeCatalogContext); + } + + private async void SaveActiveCatalog() + { + if (ActiveCatalog != null) + { + using (_notification.PushTaskItem("Updating catalog...")) + { + try + { + IsFree = false; + await _activeCatalogContext.SaveChangesAsync(); + await LoadCatalogs(); + _notification.ShowInfo("Catalog updated successfully."); + } + catch (Exception ex) + { + _notification.ShowError($"An error occurred while trying to update the catalog.\n{ex.Message}"); + LogManager.Log(ex, $"Error updating catalog {ActiveCatalog.Name}."); + } + finally + { + IsFree = true; + } + } + } + } + + private void BackToCatalogs() { - + View.NavigateTo(CatalogsNavigationView.CatalogsView); } + + #endregion + + #region Export / Import Excel + + public void ExportCatalogToExcel() + { + SaveFileDialog dlg = new SaveFileDialog(); + dlg.Filter = "Excel Documents|*.xlsx"; + if (dlg.ShowDialog().Value) + { + using (_notification.PushTaskItem("Exporting catalog to file...")) + { + Task.Factory.StartNew(() => + { + try + { + IsFree = false; + + Stream stream = null; + bool dispose = false; + String file = AssemblyHelper.GetCurrentAssemblyFolder() + "\\Templates\\ExportTemplate.xlsx"; + + if (File.Exists(file)) + { + stream = File.OpenRead(file); + dispose = true; + } + else + { + stream = EmbeddedResourceHelper.GetEmbeddedResourceStream("Tango.MachineStudio.Catalogs.Templates.ExportTemplate.xlsx"); + } + + byte[] data = new byte[stream.Length]; + stream.Read(data, 0, data.Length); + File.WriteAllBytes(dlg.FileName, data); + + if (dispose) + { + stream.Dispose(); + } + + ExcelWriter writer = new ExcelWriter(dlg.FileName); + + List<Media> medias = RMLS.Select(x => new Media() + { + MediaName = x.Name, + }).ToList(); + + writer.WriteData(medias, "RML"); + + List<ColorGroup> groups = ActiveCatalog.ColorCatalogsGroups.Select(x => new ColorGroup() + { + GroupColor = x.Color, + GroupName = x.Name, + GroupIndex = x.GroupIndex, + }).ToList(); + + writer.WriteData(groups, "Groups"); + + List<ColorItem> items = ActiveCatalog.ColorCatalogsGroups.SelectMany(x => x.ColorCatalogsItems).Select(x => new ColorItem() + { + + ItemColor = x.Color, + Group = x.ColorCatalogsGroup.Name, + Code = x.Code, + Name = x.Name, + ItemIndex = x.ItemIndex, + Red = x.Red, + Green = x.Green, + Blue = x.Blue, + L = x.L, + A = x.A, + B = x.B, + Cyan = x.Cyan, + Magenta = x.Magenta, + Yellow = x.Yellow, + Black = x.Black, + Region = x.ProcessParametersTableIndex, + + }).ToList(); + + writer.WriteData(items, "Colors"); + + List<ColorRecipe> recipes = ActiveCatalog.ColorCatalogsGroups.SelectMany(x => x.ColorCatalogsItems).SelectMany(x => x.ColorCatalogsItemsRecipes).Select(x => new ColorRecipe() + { + + R_Color = x.ColorCatalogsItem.Color, + R_Name = x.ColorCatalogsItem.Name, + R_Media = x.Rml.Name, + R_Cyan = x.Cyan, + R_Magenta = x.Magenta, + R_Yellow = x.Yellow, + R_Black = x.Black, + R_Region = x.ProcessParametersTableIndex, + + + }).ToList(); + + writer.WriteData(recipes, "Recipes"); + + writer.Dispose(); + + InvokeUI(() => + { + _notification.ShowInfo("Catalog exported successfully."); + }); + } + catch (Exception ex) + { + LogManager.Log(ex, $"Error exporting color catalog to {dlg.FileName}"); + + InvokeUI(() => + { + _notification.ShowError($"An error occurred while trying to export the catalog. Make sure the selected excel file is closed and data is valid.\n{ex.FlattenMessage()}"); + }); + } + finally + { + IsFree = true; + } + }); + } + } + } + + public void ImportCatalogFromExcel() + { + OpenFileDialog dlg = new OpenFileDialog(); + dlg.Filter = "Excel Documents|*.xlsx"; + if (dlg.ShowDialog().Value) + { + using (_notification.PushTaskItem("Merging catalog from file...")) + { + Task.Factory.StartNew(() => + { + try + { + ExcelReader reader = new ExcelReader(dlg.FileName); + var groups = reader.GetData<ColorGroup>("Groups"); + reader.Dispose(); + + reader = new ExcelReader(dlg.FileName); + var colors = reader.GetData<ColorItem>("Colors"); + reader.Dispose(); + + reader = new ExcelReader(dlg.FileName); + var recipes = reader.GetData<ColorRecipe>("Recipes"); + reader.Dispose(); + + foreach (var group in groups) + { + ColorCatalogsGroup existinGroup = ActiveCatalog.ColorCatalogsGroups.SingleOrDefault(x => x.Name == group.GroupName); + + bool inserting = false; + if (existinGroup == null) + { + existinGroup = new ColorCatalogsGroup(); + inserting = true; + } + + existinGroup.Name = group.GroupName; + existinGroup.GroupIndex = group.GroupIndex; + + if (inserting) + { + ActiveCatalog.ColorCatalogsGroups.Add(existinGroup); + } + } + + foreach (var item in colors) + { + var existinItem = ActiveCatalog.ColorCatalogsGroups.SelectMany(x => x.ColorCatalogsItems).SingleOrDefault(x => x.Code == item.Code); + var group = ActiveCatalog.ColorCatalogsGroups.SingleOrDefault(x => x.Name == item.Group); + + bool inserting = false; + + if (existinItem == null) + { + existinItem = new ColorCatalogsItem(); + inserting = true; + } + else + { + if (existinItem.ColorCatalogsGroup != group) + { + existinItem.ColorCatalogsGroup.ColorCatalogsItems.Remove(existinItem); + group.ColorCatalogsItems.Add(existinItem); + } + } + + existinItem.ColorCatalogsGroup = group; + existinItem.Code = item.Code; + existinItem.Name = item.Name; + existinItem.ItemIndex = item.ItemIndex; + existinItem.Red = item.Red; + existinItem.Green = item.Green; + existinItem.Blue = item.Blue; + existinItem.L = item.L; + existinItem.A = item.A; + existinItem.B = item.B; + existinItem.Cyan = item.Cyan; + existinItem.Magenta = item.Magenta; + existinItem.Yellow = item.Yellow; + existinItem.Black = item.Black; + existinItem.ProcessParametersTableIndex = item.Region; + + if (inserting) + { + _activeCatalogContext.ColorCatalogsItems.Add(existinItem); + } + } + + foreach (var recipe in recipes) + { + var existingRecipe = ActiveCatalog.ColorCatalogsGroups.SelectMany(x => x.ColorCatalogsItems).SelectMany(x => x.ColorCatalogsItemsRecipes).SingleOrDefault(x => x.ColorCatalogsItem.Name == recipe.R_Name && x.Rml.Name == recipe.R_Media); + + bool inserting = false; + + if (existingRecipe == null) + { + existingRecipe = new ColorCatalogsItemsRecipe(); + existingRecipe.Rml = RMLS.SingleOrDefault(x => x.Name == recipe.R_Media); + existingRecipe.ColorCatalogsItem = ActiveCatalog.ColorCatalogsGroups.SelectMany(x => x.ColorCatalogsItems).SingleOrDefault(x => x.Name == recipe.R_Name); + inserting = true; + } + + existingRecipe.Cyan = recipe.R_Cyan; + existingRecipe.Magenta = recipe.R_Magenta; + existingRecipe.Yellow = recipe.R_Yellow; + existingRecipe.Black = recipe.R_Black; + existingRecipe.ProcessParametersTableIndex = recipe.R_Region; + + if (inserting) + { + _activeCatalogContext.ColorCatalogsItemsRecipes.Add(existingRecipe); + } + } + + InvokeUI(() => + { + _notification.ShowInfo("Catalog imported successfully."); + }); + } + catch (Exception ex) + { + LogManager.Log(ex, $"Error importing color catalog to {dlg.FileName}"); + + InvokeUI(() => + { + _notification.ShowError($"An error occurred while trying to merge the catalog. Please check your data.\n{ex.FlattenMessage()}"); + }); + } + finally + { + IsFree = true; + } + }); + } + } + } + + #endregion + + #region Application Ready + + public async override void OnApplicationReady() + { + await LoadCatalogs(); + } + + #endregion } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml index 17198b866..6856cf4a2 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml @@ -1,14 +1,232 @@ -<UserControl x:Class="Tango.MachineStudio.Catalogs.Views.CatalogsView" +<UserControl x:Class="Tango.MachineStudio.Catalogs.Views.CatalogView" 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:vm="clr-namespace:Tango.MachineStudio.Catalogs.ViewModels" + xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" + xmlns:localConverters="clr-namespace:Tango.MachineStudio.Catalogs.Converters" + xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL" + xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" + xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:global="clr-namespace:Tango.MachineStudio.Catalogs" xmlns:local="clr-namespace:Tango.MachineStudio.Catalogs.Views" mc:Ignorable="d" - d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" Foreground="#BBBBBB" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> - <Grid> - + d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" Foreground="#232323" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> + + <UserControl.Resources> + <converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter" /> + <localConverters:ObservableCollectionToViewSourceConverter x:Key="ObservableCollectionToViewSourceConverter" /> + + <Style x:Key="EditableGrid" TargetType="DataGrid" BasedOn="{StaticResource {x:Type DataGrid}}"> + <Setter Property="AutoGenerateColumns" Value="False"></Setter> + </Style> + + <Style x:Key="EditableCell" TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type DataGridCell}"> + <Grid Background="{TemplateBinding Background}"> + <ContentPresenter VerticalAlignment="Center" Margin="8" /> + </Grid> + </ControlTemplate> + </Setter.Value> + </Setter> + <Setter Property="BorderThickness" Value="0"/> + <Setter Property="FocusVisualStyle" Value="{x:Null}"/> + <Setter Property="VerticalContentAlignment" Value="Center"></Setter> + <Style.Triggers> + <Trigger Property="IsSelected" Value="True"> + <Setter Property="BorderThickness" Value="0"/> + <Setter Property="BorderBrush" Value="Cyan"/> + </Trigger> + </Style.Triggers> + </Style> + + </UserControl.Resources> + + <Grid Margin="20"> + <DockPanel> + <Grid DockPanel.Dock="Top"> + <StackPanel Orientation="Horizontal"> + <Button Style="{StaticResource MaterialDesignFlatButton}" Height="Auto" Command="{Binding BackToCatalogsCommand}"> + <materialDesign:PackIcon Kind="ArrowLeft" Width="50" Height="50" Foreground="#202020" ToolTip="Back to RML list" /> + </Button> + <TextBlock Text="{Binding ActiveCatalog.Name}" VerticalAlignment="Center" Margin="10 0 0 0" FontSize="34"></TextBlock> + </StackPanel> + + <StackPanel HorizontalAlignment="Right" Orientation="Horizontal"> + <Button Background="#65C682" BorderBrush="#65C682" Width="170" Height="45" VerticalAlignment="Center" Command="{Binding ImportExcelCommand}"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="Import" Width="24" Height="24" /> + <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">IMPORT EXCEL</TextBlock> + </StackPanel> + </Button> + <Button Margin="10 0 0 0" Background="#65C682" BorderBrush="#65C682" Width="170" Height="45" VerticalAlignment="Center" Command="{Binding ExportExcelCommand}"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="Export" Width="24" Height="24" /> + <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">EXPORT EXCEL</TextBlock> + </StackPanel> + </Button> + <Button Margin="10 0 0 0" Width="170" Height="45" VerticalAlignment="Center" Command="{Binding SaveActiveCatalogCommand}"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="ContentSaveAll" Width="24" Height="24" /> + <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">SAVE</TextBlock> + </StackPanel> + </Button> + </StackPanel> + </Grid> + + <Grid Margin="0 20"> + <Grid.RowDefinitions> + <RowDefinition Height="113*"/> + <RowDefinition Height="358*"/> + </Grid.RowDefinitions> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="302*"/> + <ColumnDefinition Width="399*"/> + <ColumnDefinition Width="1179*"/> + </Grid.ColumnDefinitions> + + <Grid Margin="10"> + <materialDesign:Card Background="{DynamicResource MaterialDesignBackground}" VerticalAlignment="Stretch"> + <Border Padding="20"> + <DockPanel> + <TextBlock DockPanel.Dock="Top" FontSize="16">PROPERTIES</TextBlock> + <controls:TableGrid RowHeight="35"> + <TextBlock Text="Company:" ></TextBlock> + <TextBox Text="{Binding ActiveCatalog.Company}"></TextBox> + + <TextBlock Text="Name:" ></TextBlock> + <TextBox Text="{Binding ActiveCatalog.Name,UpdateSourceTrigger=PropertyChanged}"></TextBox> + + <TextBlock Text="Description:" ></TextBlock> + <TextBox Text="{Binding ActiveCatalog.Description}"></TextBox> + + <TextBlock Text="Design:" ></TextBlock> + <ComboBox ItemsSource="{Binding Source={x:Type enumerations:CatalogDesignType},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding ActiveCatalog.Design}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox> + + </controls:TableGrid> + </DockPanel> + </Border> + </materialDesign:Card> + </Grid> + + <Grid Grid.Column="1" Margin="10"> + <materialDesign:Card Background="{DynamicResource MaterialDesignBackground}" VerticalAlignment="Stretch"> + <Border Padding="20"> + <DockPanel> + <TextBlock DockPanel.Dock="Top" FontSize="16">DESIGN CONTENT</TextBlock> + + </DockPanel> + </Border> + </materialDesign:Card> + </Grid> + + <Grid Grid.ColumnSpan="3"> + + </Grid> + </Grid> + + <Grid Grid.Row="1" Margin="0 20 0 0"> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="300"/> + <ColumnDefinition Width="930"/> + <ColumnDefinition Width="1*"/> + </Grid.ColumnDefinitions> + + + <DockPanel Margin="10"> + <TextBlock DockPanel.Dock="Top" FontSize="16">CATALOG GROUPS</TextBlock> + + <materialDesign:Card Margin="0 5 0 0" Background="{DynamicResource MaterialDesignBackground}" VerticalAlignment="Stretch"> + <DataGrid x:Name="gridGroups" Style="{StaticResource EditableGrid}" CellStyle="{StaticResource EditableCell}" ItemsSource="{Binding ActiveCatalog.ColorCatalogsGroups}" SelectedItem="{Binding SelectedGroup}" CanUserDeleteRows="False" PreviewKeyDown="OnGroupsGrid_PreviewKeyDown"> + <DataGrid.Columns> + <DataGridTemplateColumn Header="" Width="Auto"> + <DataGridTemplateColumn.CellTemplate> + <DataTemplate> + <Ellipse Width="30" Height="30"> + <Ellipse.Fill> + <SolidColorBrush Color="{Binding Color}" /> + </Ellipse.Fill> + </Ellipse> + </DataTemplate> + </DataGridTemplateColumn.CellTemplate> + </DataGridTemplateColumn> + <DataGridTextColumn Header="NAME" Binding="{Binding Name}" Width="150" /> + <DataGridTextColumn Header="IDX" Binding="{Binding GroupIndex}" Width="1*" SortMemberPath="GroupIndex" SortDirection="Ascending" /> + </DataGrid.Columns> + </DataGrid> + </materialDesign:Card> + </DockPanel> + + + <DockPanel Margin="10" Grid.Column="1"> + <TextBlock DockPanel.Dock="Top" FontSize="16"> + <Run>GROUP COLORS</Run> + <Run>(</Run><Run Text="{Binding SelectedGroup.ColorCatalogsItems.Count,Mode=OneWay}"></Run><Run>)</Run> + </TextBlock> + <materialDesign:Card Margin="0 5 0 0" Background="{DynamicResource MaterialDesignBackground}" VerticalAlignment="Stretch"> + <DataGrid x:Name="gridItems" Style="{StaticResource EditableGrid}" CellStyle="{StaticResource EditableCell}" ItemsSource="{Binding SelectedGroup.ColorCatalogsItems,Converter={StaticResource ObservableCollectionToViewSourceConverter},ConverterParameter='ItemIndex'}" SelectedItem="{Binding SelectedItem}" PreviewKeyDown="OnItemsGrid_PreviewKeyDown"> + <DataGrid.Columns> + <DataGridTemplateColumn Header="" Width="Auto"> + <DataGridTemplateColumn.CellTemplate> + <DataTemplate> + <Ellipse Width="25" Height="25"> + <Ellipse.Fill> + <SolidColorBrush Color="{Binding Color}" /> + </Ellipse.Fill> + </Ellipse> + </DataTemplate> + </DataGridTemplateColumn.CellTemplate> + </DataGridTemplateColumn> + <DataGridTextColumn Header="CODE" Binding="{Binding Code}" Width="Auto" /> + <DataGridTextColumn Header="NAME" Binding="{Binding Name}" Width="Auto" /> + <DataGridTextColumn Header="IDX" Binding="{Binding ItemIndex}" Width="Auto" /> + + <DataGridTextColumn Header="R" Binding="{Binding Red,UpdateSourceTrigger=PropertyChanged}" Width="Auto" /> + <DataGridTextColumn Header="G" Binding="{Binding Green,UpdateSourceTrigger=PropertyChanged}" Width="Auto" /> + <DataGridTextColumn Header="B" Binding="{Binding Blue,UpdateSourceTrigger=PropertyChanged}" Width="Auto" /> + + <DataGridTextColumn Header="L" Binding="{Binding L}" Width="60" /> + <DataGridTextColumn Header="A" Binding="{Binding A}" Width="60" /> + <DataGridTextColumn Header="B" Binding="{Binding B}" Width="60" /> + + <DataGridTextColumn Header="CYAN" Binding="{Binding Cyan}" Width="65" /> + <DataGridTextColumn Header="MAGENTA" Binding="{Binding Magenta}" Width="80" /> + <DataGridTextColumn Header="YELLOW" Binding="{Binding Yellow}" Width="70" /> + <DataGridTextColumn Header="BLACK" Binding="{Binding Black}" Width="65" /> + + <DataGridTextColumn Header="REGION" Binding="{Binding ProcessParametersTableIndex}" Width="69" /> + </DataGrid.Columns> + </DataGrid> + </materialDesign:Card> + </DockPanel> + + <DockPanel Margin="10" Grid.Column="2"> + <TextBlock DockPanel.Dock="Top" FontSize="16"> + <Run>COLOR MEDIA RECIPES</Run> + <Run>(</Run><Run Text="{Binding SelectedItem.ColorCatalogsItemsRecipes.Count,Mode=OneWay}"></Run><Run>)</Run> + </TextBlock> + <materialDesign:Card Margin="0 5 0 0" Background="{DynamicResource MaterialDesignBackground}" VerticalAlignment="Stretch"> + <DataGrid x:Name="gridRecipes" Style="{StaticResource EditableGrid}" CellStyle="{StaticResource EditableCell}" ItemsSource="{Binding SelectedItem.ColorCatalogsItemsRecipes}" PreviewKeyDown="OnRecipesGrid_PreviewKeyDown" CanUserSortColumns="False"> + <DataGrid.Columns> + <materialDesign:MaterialDataGridComboBoxColumn Header="MEDIA" Width="180" SortMemberPath="Name" ItemsSourceBinding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.RMLS}" SelectedItemBinding="{Binding Rml}" DisplayMemberPath="Name" /> + <DataGridTextColumn Header="CYAN" Binding="{Binding Cyan}" Width="80" /> + <DataGridTextColumn Header="MAGENTA" Binding="{Binding Magenta}" Width="80" /> + <DataGridTextColumn Header="YELLOW" Binding="{Binding Yellow}" Width="80" /> + <DataGridTextColumn Header="BLACK" Binding="{Binding Black}" Width="80" /> + <DataGridTextColumn Header="REGION" Binding="{Binding ProcessParametersTableIndex}" Width="Auto" /> + </DataGrid.Columns> + </DataGrid> + </materialDesign:Card> + </DockPanel> + </Grid> + </Grid> + </Grid> + </DockPanel> </Grid> </UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml.cs index 02418b677..4ba37416d 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml.cs @@ -12,17 +12,48 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; +using Tango.MachineStudio.Catalogs.ViewModels; namespace Tango.MachineStudio.Catalogs.Views { /// <summary> /// Interaction logic for CatalogsView.xaml /// </summary> - public partial class CatalogsView : UserControl + public partial class CatalogView : UserControl { - public CatalogsView() + private MainViewVM _vm; + + public CatalogView() { InitializeComponent(); + Loaded += (_, __) => _vm = DataContext as MainViewVM; + } + + private void OnGroupsGrid_PreviewKeyDown(object sender, KeyEventArgs e) + { + if (e.Key == Key.Delete && gridGroups.SelectedItem != null) + { + _vm.OnGroupDeleted(gridGroups.SelectedItem as BL.Entities.ColorCatalogsGroup); + e.Handled = true; + } + } + + private void OnItemsGrid_PreviewKeyDown(object sender, KeyEventArgs e) + { + if (e.Key == Key.Delete && gridItems.SelectedItem != null) + { + _vm.OnItemDeleted(gridItems.SelectedItem as BL.Entities.ColorCatalogsItem); + e.Handled = true; + } + } + + private void OnRecipesGrid_PreviewKeyDown(object sender, KeyEventArgs e) + { + if (e.Key == Key.Delete && gridRecipes.SelectedItem != null) + { + _vm.OnRecipeDeleted(gridRecipes.SelectedItem as BL.Entities.ColorCatalogsItemsRecipe); + e.Handled = true; + } } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogsView.xaml index e324fb8d7..343131e83 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogsView.xaml @@ -1,4 +1,4 @@ -<UserControl x:Class="Tango.MachineStudio.Catalogs.Views.CatalogView" +<UserControl x:Class="Tango.MachineStudio.Catalogs.Views.CatalogsView" 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" @@ -20,17 +20,17 @@ <Grid> <DockPanel Margin="100" MaxWidth="1200"> <Grid DockPanel.Dock="Top"> - <Image Source="../Images/catalogs.png" Width="300" Margin="10" /> + <Image Source="../Images/catalogs.png" Width="200" Margin="10" /> </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 RemoveRmlCommand}"> + <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}" Command="{Binding DeleteCatalogCommand}"> <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 AddRmlCommand}"> + <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource GreenBrush300}" BorderBrush="{StaticResource GreenBrush300}" Command="{Binding NewCatalogCommand}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Plus" Width="20" Height="20" /> <TextBlock Margin="5 0 0 0" FontSize="16">NEW CATALOG</TextBlock> @@ -38,7 +38,7 @@ </Button> </StackPanel> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right"> - <Button Margin="50 0 0 0" MinWidth="200" Height="60" Command="{Binding ManageRmlCommand}"> + <Button Margin="50 0 0 0" MinWidth="200" Height="60" Command="{Binding EditCatalogCommand}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Pencil" Width="24" Height="24" /> <TextBlock Margin="10 0 0 0" FontSize="18">EDIT</TextBlock> @@ -47,7 +47,7 @@ </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 Rmls}" SelectedItem="{Binding SelectedRML}"> + <DataGrid Margin="0 0 0 10" BorderBrush="Silver" IsReadOnly="True" BorderThickness="1" Background="#93FFFFFF" AlternatingRowBackground="#C9F6F6F6" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding Catalogs}" SelectedItem="{Binding SelectedCatalog}"> <DataGrid.CellStyle> <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> <Setter Property="BorderThickness" Value="0"/> @@ -63,10 +63,12 @@ </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn>--> + <DataGridTextColumn Header="COMPANY" Binding="{Binding Company}" Width="Auto" /> <DataGridTextColumn Header="NAME" Binding="{Binding Name}" Width="Auto" /> <DataGridTextColumn Header="DESCRIPTION" Binding="{Binding Description}" Width="Auto" /> - <DataGridTextColumn Header="COLORS" Binding="{Binding Description}" Width="Auto" /> - <DataGridTextColumn Header="SUPPORTED MEDIA" Binding="{Binding Description}" Width="Auto" /> + <DataGridTextColumn Header="DESIGN" Binding="{Binding Design}" Width="Auto" /> + <DataGridTextColumn Header="GROUPS" Binding="{Binding ColorCatalogsGroups.Count}" Width="Auto" /> + <DataGridTextColumn Header="COLORS" Binding="{Binding TotalColors}" Width="Auto" /> <DataGridTextColumn Header="LAST UPDATED" Binding="{Binding LastUpdated,Converter={StaticResource DateTimeUTCToShortDateTimeConverter}}" Width="1*" /> </DataGrid.Columns> </DataGrid> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogsView.xaml.cs index 302ff59f7..02418b677 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogsView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogsView.xaml.cs @@ -18,9 +18,9 @@ namespace Tango.MachineStudio.Catalogs.Views /// <summary> /// Interaction logic for CatalogsView.xaml /// </summary> - public partial class CatalogView : UserControl + public partial class CatalogsView : UserControl { - public CatalogView() + public CatalogsView() { InitializeComponent(); } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/MainView.xaml index 3a1d04e3d..140a616e1 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/MainView.xaml @@ -9,7 +9,7 @@ xmlns:global="clr-namespace:Tango.MachineStudio.Catalogs" mc:Ignorable="d" d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" Foreground="#BBBBBB" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> - <Grid> + <Grid IsEnabled="{Binding IsFree}"> <controls:NavigationControl x:Name="navigationControl" TransitionType="Slide"> <local:CatalogsView /> <local:CatalogView/> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/MainView.xaml.cs index c94282ca1..fdfd23c2b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/MainView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/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.Core.DI; using Tango.MachineStudio.Catalogs.Contracts; namespace Tango.MachineStudio.Catalogs.Views @@ -24,6 +25,7 @@ namespace Tango.MachineStudio.Catalogs.Views public MainView() { InitializeComponent(); + TangoIOC.Default.Register<IMainView>(this); } public void NavigateTo(CatalogsNavigationView view) diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Views/MainView.xaml index 04150072c..0ff36e86a 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Views/MainView.xaml @@ -33,14 +33,14 @@ </ResourceDictionary> </ResourceDictionary.MergedDictionaries> - <SolidColorBrush x:Key="Foreground" Color="#BBBBBB" /> - <SolidColorBrush x:Key="Background" Color="#202020" /> - <SolidColorBrush x:Key="Accent" Color="#03A9F4" /> - <SolidColorBrush x:Key="Red" Color="#FF5F5F" /> - <SolidColorBrush x:Key="Green" Color="#68E46E" /> - <SolidColorBrush x:Key="Blue" Color="#64B8EC" /> - <SolidColorBrush x:Key="BorderBrush" Color="#3E3E3E" /> - <SolidColorBrush x:Key="LightBackground" Color="#303030" /> + <SolidColorBrush x:Key="Foreground" Color="{Binding Color, Source={StaticResource LightGrayBrush100}}" /> + <SolidColorBrush x:Key="Background" Color="{Binding Color, Source={StaticResource DarkGrayBrush200}}" /> + <SolidColorBrush x:Key="Accent" Color="{Binding Color, Source={StaticResource BlueBrush100}}" /> + <SolidColorBrush x:Key="Red" Color="{Binding Color, Source={StaticResource RedBrush100}}" /> + <SolidColorBrush x:Key="Green" Color="{Binding Color, Source={StaticResource GreenBrush100}}"/> + <SolidColorBrush x:Key="Blue" Color="{Binding Color, Source={StaticResource BlueBrush}}" /> + <SolidColorBrush x:Key="BorderBrush" Color="{Binding Color, Source={StaticResource GrayBrush280}}" /> + <SolidColorBrush x:Key="LightBackground" Color="{Binding Color, Source={StaticResource GrayBrush300}}" /> <converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter" /> <localConverters:CaptureModeToVisibilityConverter x:Key="CaptureModeToVisibilityConverter" /> 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 c33ef1f86..2fe47bfab 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 @@ -248,12 +248,8 @@ namespace Tango.MachineStudio.ColorLab.ViewModels public RelayCommand ImportForwardDataCommand { get; set; } - public RelayCommand ImportInverseDataCommand { get; set; } - public RelayCommand ExportForwardDataCommand { get; set; } - public RelayCommand ExportInverseDataCommand { get; set; } - public RelayCommand SaveCommand { get; set; } #endregion @@ -274,10 +270,8 @@ namespace Tango.MachineStudio.ColorLab.ViewModels SourceColor.ColorChanged += SourceColor_ColorChanged; ImportForwardDataCommand = new RelayCommand(ImportForwardData, () => SelectedRML != null && IsFree); - ImportInverseDataCommand = new RelayCommand(ImportInverseData, () => SelectedRML != null && IsFree); - ExportForwardDataCommand = new RelayCommand(ExportForwardData, () => SelectedRML != null && CCT != null && CCT.ForwardFileName != null && IsFree); - ExportInverseDataCommand = new RelayCommand(ExportInverseData, () => SelectedRML != null && CCT != null && CCT.InverseFileName != null && IsFree); + ExportForwardDataCommand = new RelayCommand(ExportForwardData, () => SelectedRML != null && CCT != null && CCT.FileName != null && IsFree); SaveCommand = new RelayCommand(Save, () => SelectedRML != null && IsFree); } @@ -336,24 +330,26 @@ namespace Tango.MachineStudio.ColorLab.ViewModels { try { - if (LiquidsCalibrationData == null || CCT.ForwardData == null) return; + if (LiquidsCalibrationData == null || CCT.Data == null) return; ConversionInput input = new ConversionInput(); input.ColorSpace = SourceColor.IsLab ? PMR.ColorLab.ColorSpace.Lab : PMR.ColorLab.ColorSpace.Rgb; input.DeltaChroma = DeltaChroma; input.DeltaL = DeltaL; - input.ForwardData = ByteString.CopyFrom(CCT.ForwardData); + input.ForwardData = ByteString.CopyFrom(CCT.Data); input.InputCoordinates = new InputCoordinates(); input.InputCoordinates.Red = (int)SourceColor.Red; input.InputCoordinates.Green = (int)SourceColor.Green; input.InputCoordinates.Blue = (int)SourceColor.Blue; + input.InputCoordinates.L = SourceColor.L; input.InputCoordinates.A = SourceColor.A; input.InputCoordinates.B = SourceColor.B; - input.ThreadL = 92.1815; //SelectedRML.MediaColor.L; - input.ThreadA = 2.2555; //SelectedRML.MediaColor.A; - input.ThreadB = -10.9325; //SelectedRML.MediaColor.B; + + input.ThreadL = SelectedRML.WhitePointL; + input.ThreadA = SelectedRML.WhitePointA; + input.ThreadB = SelectedRML.WhitePointB; //Validate calibration data foreach (var vm in LiquidsCalibrationData.Where(x => x.IdsPack.IdsPackFormula.Code == IdsPackFormulas.StandardColor.ToInt32())) @@ -455,36 +451,17 @@ namespace Tango.MachineStudio.ColorLab.ViewModels String file = GetCCTFileOpen(); if (file != null) { - CCT.ForwardFileName = Path.GetFileName(file); - CCT.ForwardData = File.ReadAllBytes(file); - } - } - - private void ImportInverseData() - { - String file = GetCCTFileOpen(); - if (file != null) - { - CCT.InverseFileName = Path.GetFileName(file); - CCT.InverseData = File.ReadAllBytes(file); + CCT.FileName = Path.GetFileName(file); + CCT.Data = File.ReadAllBytes(file); } } private void ExportForwardData() { - String file = GetCCTFileSave(CCT.ForwardFileName); + String file = GetCCTFileSave(CCT.FileName); if (file != null) { - File.WriteAllBytes(file, CCT.ForwardData); - } - } - - private void ExportInverseData() - { - String file = GetCCTFileSave(CCT.InverseFileName); - if (file != null) - { - File.WriteAllBytes(file, CCT.InverseData); + File.WriteAllBytes(file, CCT.Data); } } @@ -573,12 +550,12 @@ namespace Tango.MachineStudio.ColorLab.ViewModels input.ColorSpace = PMR.ColorLab.ColorSpace.Volume; input.DeltaChroma = DeltaChroma; input.DeltaL = DeltaL; - input.ForwardData = ByteString.CopyFrom(CCT.ForwardData); + input.ForwardData = ByteString.CopyFrom(CCT.Data); input.InputCoordinates = new InputCoordinates(); - input.ThreadL = 92.1815; //SelectedRML.MediaColor.L; - input.ThreadA = 2.2555; //SelectedRML.MediaColor.A; - input.ThreadB = -10.9325; //SelectedRML.MediaColor.B; + input.ThreadL = SelectedRML.WhitePointL; + input.ThreadA = SelectedRML.WhitePointA; + input.ThreadB = SelectedRML.WhitePointB; foreach (var vm in LiquidsCalibrationData) { @@ -610,12 +587,25 @@ namespace Tango.MachineStudio.ColorLab.ViewModels var output = converter.Convert(input); - TargetColor = new RgbVM() + if (SourceColor.IsLab) { - Red = output.SingleCoordinates.Red, - Green = output.SingleCoordinates.Green, - Blue = output.SingleCoordinates.Blue, - }; + TargetColor = new RgbVM() + { + IsLab = true, + L = output.SingleCoordinates.L, + A = output.SingleCoordinates.A, + B = output.SingleCoordinates.B, + }; + } + else + { + TargetColor = new RgbVM() + { + Red = output.SingleCoordinates.Red, + Green = output.SingleCoordinates.Green, + Blue = output.SingleCoordinates.Blue, + }; + } } catch (Exception ex) { @@ -628,7 +618,7 @@ namespace Tango.MachineStudio.ColorLab.ViewModels #region RML - private async void InvalidateLiquidFactorsCalibrationData() + public async void InvalidateLiquidFactorsCalibrationData() { if (SelectedRML != null && SelectedMachine != null) { @@ -695,12 +685,12 @@ namespace Tango.MachineStudio.ColorLab.ViewModels } _isNewCCT = false; - CCT = SelectedRML.Ccts.FirstOrDefault(); + CCT = SelectedRML.Cct; if (CCT == null) { CCT = new Cct(); - CCT.Rml = SelectedRML; + SelectedRML.Cct = CCT; _isNewCCT = true; } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/CalibrationDataView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/CalibrationDataView.xaml index 3c9723b30..172e08ff5 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/CalibrationDataView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/CalibrationDataView.xaml @@ -49,7 +49,7 @@ </StackPanel> <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="False"> + <DataGrid Background="#BBFFFFFF" AlternatingRowBackground="#CCE1E1E1" BorderThickness="1" BorderBrush="{StaticResource DarkGrayBrush}" Margin="5 0" ItemsSource="{Binding CalibrationPoints}" CanUserResizeColumns="False" CanUserReorderColumns="False" AutoGenerateColumns="False" CanUserAddRows="True" CanUserDeleteRows="True" CanUserSortColumns="False"> <DataGrid.CellStyle> <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> <Setter Property="BorderThickness" Value="0"/> 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 fe4edcb8b..a16b6b4d2 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 @@ -141,14 +141,14 @@ <Grid> <Grid Margin="10 10 10 0" Height="135" Visibility="{Binding IsHosted,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> <StackPanel HorizontalAlignment="Left" Margin="20 0 0 0"> - <TextBlock Margin="0 0 0 0" FontSize="20" TextAlignment="Left">COLOR ADJUSTMENT DATA</TextBlock> + <TextBlock Margin="0 0 0 0" FontSize="20" TextAlignment="Left">COLOR CONVERSION TABLE (CCT)</TextBlock> <Grid> <StackPanel Orientation="Horizontal" Margin="0 5 0 0"> <materialDesign:PackIcon Kind="ArrowLeftBoldHexagonOutline" VerticalAlignment="Center" Width="40" Height="40" /> <Image Source="../Images/data-table.png" Height="80" Opacity="0.8"></Image> <StackPanel VerticalAlignment="Center" Width="300" Margin="10 0 0 0"> - <TextBox IsReadOnly="False" Margin="0 5 0 0" Text="{Binding CCT.ForwardFileName}" HorizontalContentAlignment="Center"></TextBox> + <TextBox IsReadOnly="False" Margin="0 5 0 0" Text="{Binding CCT.FileName}" HorizontalContentAlignment="Center"></TextBox> <UniformGrid Columns="2" Margin="0 5 0 0" HorizontalAlignment="Right"> <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Command="{Binding ImportForwardDataCommand}"> <StackPanel Orientation="Horizontal" Margin="0 0 20 0"> @@ -198,8 +198,8 @@ <StackPanel VerticalAlignment="Center"> <StackPanel Height="20"> <StackPanel Orientation="Horizontal" Margin="0 0 0 5" Visibility="{Binding IsOutOfGamut,Converter={StaticResource BooleanToVisibilityConverter}}"> - <materialDesign:PackIcon Kind="Alert" Foreground="#FF6D6D" /> - <TextBlock Margin="5 0 0 0" Foreground="#FF6D6D">Color is out of gamut</TextBlock> + <materialDesign:PackIcon Kind="Alert" Foreground="{StaticResource RedBrush100}" /> + <TextBlock Margin="5 0 0 0" Foreground="{StaticResource RedBrush100}">Color is out of gamut</TextBlock> </StackPanel> </StackPanel> <Border BorderThickness="1" BorderBrush="#545454" Margin="0" Padding="2 2 2 0"> @@ -265,8 +265,8 @@ </Grid> <TextBlock FontStyle="Italic" HorizontalAlignment="Center">SOURCE / INVERSE</TextBlock> - <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="2" Margin="00 0 0 0">SUGGESTIONS</TextBlock> - <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="4">LIQUID VOLUMES</TextBlock> + <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="2" Margin="0 0 0 0">SUGGESTIONS</TextBlock> + <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="4" Margin="-80 0 0 0">LIQUID VOLUMES</TextBlock> <Image Source="../Images/arrow-long-right.png" Grid.Column="1" Grid.Row="1" Width="120" Stretch="Fill" Height="30" Opacity="0.8" Margin="20 0 20 0"></Image> @@ -302,7 +302,7 @@ </hive:HexList.ItemTemplate> </hive:HexList> - <TextBlock FontSize="40" Foreground="#FF5F5F" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="2" Grid.Row="1" Text="NO INPUT"> + <TextBlock FontSize="40" Foreground="{StaticResource RedBrush100}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="2" Grid.Row="1" Text="NO INPUT"> <TextBlock.Style> <Style TargetType="TextBlock"> <Setter Property="Visibility" Value="Collapsed"></Setter> @@ -318,6 +318,71 @@ <Image Source="../Images/arrow-long-right.png" Grid.Column="3" Grid.Row="1" Width="120" Stretch="Fill" Height="30" Opacity="0.8" Margin="20 0 20 0"></Image> <Grid Grid.Column="4" Grid.Row="1" IsHitTestVisible="False"> + <StackPanel HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 -20 0 0"> + <StackPanel Orientation="Horizontal" Height="60"> + <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0"> + <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">R</TextBlock> + + <Grid> + <Rectangle Margin="0 5 0 0" Stroke="#202020"> + <Rectangle.Fill> + <SolidColorBrush Color="Red" Opacity="{Binding SelectedSuggestion.Coordinates.Red,Converter={StaticResource ColorComponentToOpacityConverter}}" /> + </Rectangle.Fill> + </Rectangle> + <TextBlock Text="{Binding SelectedSuggestion.Coordinates.Red}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock> + </Grid> + </DockPanel> + <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0"> + <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">G</TextBlock> + <Grid> + <Rectangle Margin="0 5 0 0" Stroke="#202020"> + <Rectangle.Fill> + <SolidColorBrush Color="Green" Opacity="{Binding SelectedSuggestion.Coordinates.Green,Converter={StaticResource ColorComponentToOpacityConverter}}" /> + </Rectangle.Fill> + </Rectangle> + <TextBlock Text="{Binding SelectedSuggestion.Coordinates.Green}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock> + </Grid> + </DockPanel> + <DockPanel Width="50" HorizontalAlignment="Left"> + <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock> + <Grid> + <Rectangle Margin="0 5 0 0" Stroke="#202020"> + <Rectangle.Fill> + <SolidColorBrush Color="Blue" Opacity="{Binding SelectedSuggestion.Coordinates.Blue,Converter={StaticResource ColorComponentToOpacityConverter}}" /> + </Rectangle.Fill> + </Rectangle> + <TextBlock Text="{Binding SelectedSuggestion.Coordinates.Blue}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock> + </Grid> + </DockPanel> + </StackPanel> + <StackPanel Orientation="Horizontal" Height="40" Margin="0 5 0 0"> + <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0"> + <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">L</TextBlock> + + <Grid> + <Rectangle Margin="0 5 0 0" Stroke="#202020"/> + <TextBlock Text="{Binding SelectedSuggestion.Coordinates.L,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock> + </Grid> + </DockPanel> + <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0"> + <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">A</TextBlock> + + <Grid> + <Rectangle Margin="0 5 0 0" Stroke="#202020"/> + <TextBlock Text="{Binding SelectedSuggestion.Coordinates.A,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock> + </Grid> + </DockPanel> + <DockPanel Width="50" HorizontalAlignment="Left"> + <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock> + + <Grid> + <Rectangle Margin="0 5 0 0" Stroke="#202020"/> + <TextBlock Text="{Binding SelectedSuggestion.Coordinates.B,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock> + </Grid> + </DockPanel> + </StackPanel> + </StackPanel> + <ItemsControl ItemsSource="{Binding LiquidVolumes}" VerticalAlignment="Center" MinWidth="420" > <ItemsControl.ItemsPanel> <ItemsPanelTemplate> @@ -354,8 +419,8 @@ <StackPanel Grid.Column="4" Grid.Row="3"> <StackPanel Height="25" Margin="25 0 0 0"> <StackPanel Orientation="Horizontal" Margin="0 0 0 0" Visibility="{Binding IsVolumesOutOfRange,Converter={StaticResource BooleanToVisibilityConverter}}"> - <materialDesign:PackIcon Kind="Alert" Foreground="#FF6D6D" /> - <TextBlock Margin="5 0 0 0" Foreground="#FF6D6D">Liquid volumes exceeds the maximum range</TextBlock> + <materialDesign:PackIcon Kind="Alert" Foreground="{StaticResource RedBrush100}" /> + <TextBlock Margin="5 0 0 0" Foreground="{StaticResource RedBrush100}">Liquid volumes exceeds the maximum range</TextBlock> </StackPanel> </StackPanel> @@ -393,7 +458,7 @@ <DockPanel Width="80" HorizontalAlignment="Left"> <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">COMPOSITE</TextBlock> <Grid> - <Ellipse Height="70" Margin="0 5 0 0" Stroke="#202020"> + <Ellipse Height="70" Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"> <Ellipse.Fill> <SolidColorBrush Color="{Binding TargetColor.Color}"></SolidColorBrush> </Ellipse.Fill> @@ -408,7 +473,7 @@ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">R</TextBlock> <Grid> - <Rectangle Margin="0 5 0 0" Stroke="#202020"> + <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"> <Rectangle.Fill> <SolidColorBrush Color="Red" Opacity="{Binding TargetColor.Red,Converter={StaticResource ColorComponentToOpacityConverter}}" /> </Rectangle.Fill> @@ -419,7 +484,7 @@ <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0"> <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">G</TextBlock> <Grid> - <Rectangle Margin="0 5 0 0" Stroke="#202020"> + <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"> <Rectangle.Fill> <SolidColorBrush Color="Green" Opacity="{Binding TargetColor.Green,Converter={StaticResource ColorComponentToOpacityConverter}}" /> </Rectangle.Fill> @@ -430,7 +495,7 @@ <DockPanel Width="50" HorizontalAlignment="Left"> <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock> <Grid> - <Rectangle Margin="0 5 0 0" Stroke="#202020"> + <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"> <Rectangle.Fill> <SolidColorBrush Color="Blue" Opacity="{Binding TargetColor.Blue,Converter={StaticResource ColorComponentToOpacityConverter}}" /> </Rectangle.Fill> @@ -444,7 +509,7 @@ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">L</TextBlock> <Grid> - <Rectangle Margin="0 5 0 0" Stroke="#202020"/> + <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"/> <TextBlock Text="{Binding TargetColor.L,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock> </Grid> </DockPanel> @@ -452,7 +517,7 @@ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">A</TextBlock> <Grid> - <Rectangle Margin="0 5 0 0" Stroke="#202020"/> + <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"/> <TextBlock Text="{Binding TargetColor.A,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock> </Grid> </DockPanel> @@ -460,7 +525,7 @@ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock> <Grid> - <Rectangle Margin="0 5 0 0" Stroke="#202020"/> + <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"/> <TextBlock Text="{Binding TargetColor.B,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock> </Grid> </DockPanel> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CctsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CctsViewVM.cs index 58ffddbb0..090d54036 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CctsViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CctsViewVM.cs @@ -30,8 +30,8 @@ namespace Tango.MachineStudio.DB.ViewModels { try { - EditEntity.InverseData = File.ReadAllBytes(file); - EditEntity.InverseFileName = Path.GetFileName(file); + //EditEntity.InverseData = File.ReadAllBytes(file); + //EditEntity.InverseFileName = Path.GetFileName(file); } catch (Exception ex) { @@ -47,8 +47,8 @@ namespace Tango.MachineStudio.DB.ViewModels { try { - EditEntity.ForwardData = File.ReadAllBytes(file); - EditEntity.ForwardFileName = Path.GetFileName(file); + //EditEntity.ForwardData = File.ReadAllBytes(file); + //EditEntity.ForwardFileName = Path.GetFileName(file); } catch (Exception ex) { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Views/MainView.xaml index 1ef3c1769..7fc9034cd 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Views/MainView.xaml @@ -48,7 +48,7 @@ <DataTemplate> <Grid HorizontalAlignment="Stretch"> <DockPanel> - <Button DockPanel.Dock="Right" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Width="24" Height="24" Foreground="#FF6F6F" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.RemoveRecordingCommand}" CommandParameter="{Binding}"> + <Button DockPanel.Dock="Right" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Width="24" Height="24" Foreground="{StaticResource RedBrush100}" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.RemoveRecordingCommand}" CommandParameter="{Binding}"> <materialDesign:PackIcon Kind="Delete" Width="20" Height="20" /> </Button> @@ -212,12 +212,12 @@ <Button Command="{Binding MediaSeekForwardCommand}" Margin="20 0 0 0" Style="{StaticResource MaterialDesignFloatingActionButton}" Padding="0" Width="60" Height="60" Background="Transparent"> <materialDesign:PackIcon Width="40" Height="40" Kind="FastForward" Foreground="{StaticResource AccentColorBrush}" /> </Button> - <Button Command="{Binding MediaRecordingCommand}" Margin="20 0 0 0" Style="{StaticResource MaterialDesignFloatingActionButton}" Foreground="#FF7A7A" BorderBrush="#FF8585" Padding="0" Width="50" Height="50" Background="Transparent" ToolTip="Start Recording"> + <Button Command="{Binding MediaRecordingCommand}" Margin="20 0 0 0" Style="{StaticResource MaterialDesignFloatingActionButton}" Foreground="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush400}" Padding="0" Width="50" Height="50" Background="Transparent" ToolTip="Start Recording"> <materialDesign:PackIcon Width="30" Height="30" Kind="Record" /> </Button> </StackPanel> <Grid> - <Label Margin="0 0 15 0" VerticalAlignment="Center" HorizontalAlignment="Right" Foreground="#FF8585" FontSize="40" FontFamily="{StaticResource digital-7}"> + <Label Margin="0 0 15 0" VerticalAlignment="Center" HorizontalAlignment="Right" Foreground="{StaticResource RedBrush400}" FontSize="40" FontFamily="{StaticResource digital-7}"> <Label.Style> <Style TargetType="Label"> <Setter Property="Opacity" Value="1"></Setter> 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 a865cdc8f..ac5354a74 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 @@ -1537,9 +1537,9 @@ namespace Tango.MachineStudio.Developer.ViewModels { LogManager.Log("Invalidating liquid factors, process parameters and process group history..."); - _selectedRML = new RmlBuilder(_activeJobDbContext).Set(SelectedRML).WithAllParametersGroup().WithCAT(SelectedMachine.Guid).WithCCT().WithLiquidFactors().Build(); + _selectedRML = new RmlBuilder(_activeJobDbContext).Set(SelectedRML.Guid).WithAllParametersGroup().WithCAT(SelectedMachine.Guid).WithCCT().WithLiquidFactors().Build(); - if (_selectedRML.Ccts.Count == 0) + if (_selectedRML.Cct == null) { InvokeUI(() => { 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 ad1648642..b90aa62b8 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 @@ -126,18 +126,12 @@ </Style> <Style TargetType="Border" x:Key="JobFieldBorder"> - <Setter Property="BorderBrush" Value="#A5A4A4"></Setter> + <Setter Property="BorderBrush" Value="{StaticResource LightGrayBrush}"></Setter> <Setter Property="BorderThickness" Value="0 0 1 1"></Setter> <Setter Property="CornerRadius" Value="100 10 100 0"></Setter> <Setter Property="Padding" Value="10 5 10 5"></Setter> <Setter Property="Margin" Value="0 0 10 0"></Setter> - <Setter Property="Background"> - <Setter.Value> - <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5"> - <GradientStop Color="#00E6E6E6"/> - <GradientStop Color="#DEDEDE" Offset="1"/> - </LinearGradientBrush> - </Setter.Value> + <Setter Property="Background" Value="{StaticResource borderBackground}"> </Setter> </Style> @@ -167,7 +161,7 @@ </StackPanel> </ToggleButton> <Popup x:Name="Popup" MouseDown="Popup_MouseDown" PopupAnimation="Fade" StaysOpen="False" PlacementTarget="{Binding ElementName=PopupButton}" Placement="Bottom" AllowsTransparency="True"> - <Border Background="#E6FFFFFF" CornerRadius="5" Margin="10"> + <Border Background="{StaticResource WhiteBrush}" CornerRadius="5" Margin="10"> <Border.Effect> <DropShadowEffect ShadowDepth="0" BlurRadius="10" /> </Border.Effect> @@ -203,7 +197,7 @@ </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> - <TextBlock TextAlignment="Center" Foreground="#202020" Margin="10 0"> + <TextBlock TextAlignment="Center" Foreground="{StaticResource DarkGrayBrush200}" Margin="10 0"> <Run Text="{Binding LiquidType}"></Run> <LineBreak/> <Run Text="{Binding Volume,StringFormat=0}"></Run> @@ -294,8 +288,8 @@ </ItemsControl> <StackPanel Orientation="Horizontal" Margin="30 10 0 0" Height="16" Visibility="{Binding IsLiquidVolumesOutOfRange,Converter={StaticResource BooleanToVisibilityConverter}}"> - <materialDesign:PackIcon Kind="Alert" Foreground="#FFAC3C" /> - <TextBlock Margin="5 0 0 0" Foreground="#FFAC3C">Liquid volumes exceeds the maximum range for color conversion!</TextBlock> + <materialDesign:PackIcon Kind="Alert" Foreground="{StaticResource OrangeBrush}" /> + <TextBlock Margin="5 0 0 0" Foreground="{StaticResource OrangeBrush}">Liquid volumes exceeds the maximum range for color conversion!</TextBlock> </StackPanel> </StackPanel> @@ -310,7 +304,7 @@ <Run>)</Run> </TextBlock> - <Border Margin="60 0 0 0" DataContext="{Binding LiquidVolumes,Converter={StaticResource LiquidVolumesToLubricantLiquidVolume}}" BorderBrush="#E6E6E6" BorderThickness="1 0 0 0"> + <Border Margin="60 0 0 0" DataContext="{Binding LiquidVolumes,Converter={StaticResource LiquidVolumesToLubricantLiquidVolume}}" BorderBrush="{StaticResource WhiteBrush100}" BorderThickness="1 0 0 0"> <Border.Style> <Style TargetType="Border"> <Setter Property="Visibility" Value="Collapsed"></Setter> @@ -325,7 +319,7 @@ <ContentControl.Foreground> <SolidColorBrush Color="{Binding IdsPack.LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush> </ContentControl.Foreground> - <mahapps:NumericUpDown Foreground="#515151" ScrollViewer.HorizontalScrollBarVisibility="Disabled" FontSize="20" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center"> + <mahapps:NumericUpDown Foreground="{StaticResource GrayBrush250}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" FontSize="20" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center"> <mahapps:NumericUpDown.Resources> <StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource> </mahapps:NumericUpDown.Resources> @@ -338,7 +332,7 @@ <DataTemplate x:Key="RGB_Template"> <StackPanel> <StackPanel Orientation="Horizontal"> - <ContentControl Style="{StaticResource numberBorder}" Foreground="#FF6F6F" Width="60" Height="60" Margin="10 0 0 0"> + <ContentControl Style="{StaticResource numberBorder}" Foreground="{StaticResource RedBrush200}" Width="60" Height="60" Margin="10 0 0 0"> <mahapps:NumericUpDown ValueChanged="OnBrushStopFieldValueChanged" FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Red, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="255" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Center"> <mahapps:NumericUpDown.Resources> <Style TargetType="TextBox"/> @@ -346,7 +340,7 @@ </mahapps:NumericUpDown> </ContentControl> - <ContentControl Style="{StaticResource numberBorder}" Foreground="#92FF92" Width="60" Height="60" Margin="10 0 0 0"> + <ContentControl Style="{StaticResource numberBorder}" Foreground="{StaticResource GreenBrush400}" Width="60" Height="60" Margin="10 0 0 0"> <mahapps:NumericUpDown ValueChanged="OnBrushStopFieldValueChanged" FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Green, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="255" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Center"> <mahapps:NumericUpDown.Resources> <Style TargetType="TextBox"/> @@ -354,7 +348,7 @@ </mahapps:NumericUpDown> </ContentControl> - <ContentControl Style="{StaticResource numberBorder}" Foreground="#3C7EF4" BorderThickness="1" Width="60" Height="60" Margin="10 0 0 0"> + <ContentControl Style="{StaticResource numberBorder}" Foreground="{StaticResource DarkBlueBrush}" BorderThickness="1" Width="60" Height="60" Margin="10 0 0 0"> <mahapps:NumericUpDown ValueChanged="OnBrushStopFieldValueChanged" FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Blue, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="255" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Center"> <mahapps:NumericUpDown.Resources> <Style TargetType="TextBox"/> @@ -366,8 +360,8 @@ </StackPanel> <StackPanel Orientation="Horizontal" Margin="30 10 0 0" Height="16" Visibility="{Binding IsOutOfGamut,Converter={StaticResource BooleanToVisibilityConverter}}"> - <materialDesign:PackIcon Kind="Alert" Foreground="#FF6D6D" /> - <TextBlock Margin="5 0 0 0" Foreground="#FF6D6D">Color is out of gamut!</TextBlock> + <materialDesign:PackIcon Kind="Alert" Foreground="{StaticResource RedBrush200}" /> + <TextBlock Margin="5 0 0 0" Foreground="{StaticResource RedBrush200}">Color is out of gamut!</TextBlock> </StackPanel> </StackPanel> </DataTemplate> @@ -382,7 +376,7 @@ </mahapps:NumericUpDown> </ContentControl> - <ContentControl Style="{StaticResource numberBorder}" Foreground="#FF8A8A" Width="60" Height="60" Margin="10 0 0 0"> + <ContentControl Style="{StaticResource numberBorder}" Foreground="{StaticResource RedBrush400}" Width="60" Height="60" Margin="10 0 0 0"> <mahapps:NumericUpDown ValueChanged="OnBrushStopFieldValueChanged" FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding A, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.0" HideUpDownButtons="True" Minimum="-128" Maximum="128" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center"> <mahapps:NumericUpDown.Resources> <Style TargetType="TextBox"/> @@ -390,7 +384,7 @@ </mahapps:NumericUpDown> </ContentControl> - <ContentControl Style="{StaticResource numberBorder}" Foreground="#92FF92" Width="60" Height="60" Margin="10 0 0 0"> + <ContentControl Style="{StaticResource numberBorder}" Foreground="{StaticResource GreenBrush400}" Width="60" Height="60" Margin="10 0 0 0"> <mahapps:NumericUpDown ValueChanged="OnBrushStopFieldValueChanged" FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding B, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.0" HideUpDownButtons="True" Minimum="-128" Maximum="128" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center"> <mahapps:NumericUpDown.Resources> <Style TargetType="TextBox"/> @@ -428,7 +422,7 @@ </mahapps:NumericUpDown> </ContentControl> - <ContentControl Style="{StaticResource numberBorder}" Foreground="Black" Width="60" Height="60" Margin="10 0 0 0"> + <ContentControl Style="{StaticResource numberBorder}" Foreground="{StaticResource BlackForegroundBrush}" Width="60" Height="60" Margin="10 0 0 0"> <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Black,Converter={StaticResource OneToPercentConverter}, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center"> <mahapps:NumericUpDown.Resources> <Style TargetType="TextBox"/> @@ -456,7 +450,7 @@ <ColumnDefinition Width="1*" /> </Grid.ColumnDefinitions> - <Grid Background="#96FFFFFF"> + <Grid Background="{StaticResource TransparentBackgroundBrush}"> <Grid.Style> <Style TargetType="Grid"> <Setter Property="Width" Value="304"></Setter> @@ -488,19 +482,19 @@ <DockPanel> <Border DockPanel.Dock="Bottom" Margin="10"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right"> - <Button Command="{Binding DuplicateSegmentCommand}" Margin="0 0 4 0" Background="#FF9A6A" BorderBrush="#FF9A6A" Height="42" Padding="10" ToolTip="Duplicate Segment"> + <Button Command="{Binding DuplicateSegmentCommand}" Margin="0 0 4 0" Background="{StaticResource OrangeBrush300}" BorderBrush="{StaticResource OrangeBrush300}" Height="42" Padding="10" ToolTip="Duplicate Segment"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="ContentCopy" Width="24" Height="24"></materialDesign:PackIcon> <TextBlock VerticalAlignment="Center">Duplicate</TextBlock> </StackPanel> </Button> - <Button Command="{Binding RemoveSegmentCommand}" Margin="0 0 4 0" Background="#FF6A6A" BorderBrush="#FF6A6A" Height="42" Padding="10" ToolTip="Remove Segment"> + <Button Command="{Binding RemoveSegmentCommand}" Margin="0 0 4 0" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}" Height="42" Padding="10" ToolTip="Remove Segment"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Delete" Width="24" Height="24"></materialDesign:PackIcon> <TextBlock VerticalAlignment="Center">Remove</TextBlock> </StackPanel> </Button> - <Button AutomationProperties.AutomationId="{x:Static automation:Developer.AddSegmentButton}" Command="{Binding AddSegmentCommand}" Background="#68B367" BorderBrush="#68B367" Height="42" Padding="10" ToolTip="Add Segment"> + <Button AutomationProperties.AutomationId="{x:Static automation:Developer.AddSegmentButton}" Command="{Binding AddSegmentCommand}" Background="{StaticResource GreenBrush300}" BorderBrush="{StaticResource GreenBrush300}" Height="42" Padding="10" ToolTip="Add Segment"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Plus" Width="24" Height="24"></materialDesign:PackIcon> <TextBlock VerticalAlignment="Center">New</TextBlock> @@ -524,7 +518,7 @@ </Polygon.Effect> <Polygon.Style> <Style TargetType="Polygon"> - <Setter Property="Stroke" Value="Black"></Setter> + <Setter Property="Stroke" Value="{StaticResource BlackForegroundBrush}"></Setter> <Setter Property="Fill"> <Setter.Value> <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1"> @@ -535,7 +529,7 @@ </Setter> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected,FallbackValue=False}" Value="True"> - <Setter Property="Stroke" Value="Black"></Setter> + <Setter Property="Stroke" Value="{StaticResource BlackForegroundBrush}"></Setter> <Setter Property="Fill"> <Setter.Value> <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1"> @@ -647,8 +641,8 @@ <ComboBox.ToolTip> <TextBlock> <Run Text="{Binding ActiveJob.SpoolType.Name}"></Run> - <Run FontSize="9" Foreground="#D9D9D9" Text="{Binding ActiveJob.SpoolType.Length,Mode=OneWay}"></Run> - <Run FontSize="9" Foreground="#DEDEDE" Text="m"></Run> + <Run FontSize="9" Foreground="{StaticResource LightGrayBrush200}" Text="{Binding ActiveJob.SpoolType.Length,Mode=OneWay}"></Run> + <Run FontSize="9" Foreground="{StaticResource LightGrayBrush200}" Text="m"></Run> </TextBlock> </ComboBox.ToolTip> <ComboBox.ItemTemplate> @@ -672,7 +666,7 @@ </StackPanel> <DockPanel LastChildFill="True"> <ToggleButton Margin="10 0 25 0" DockPanel.Dock="Right" VerticalAlignment="Bottom" HorizontalAlignment="Right" IsChecked="{Binding ActiveJob.EnableInterSegment}"></ToggleButton> - <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" Width="70" HorizontalAlignment="Left" StringFormat="{}{0:N1} m" FontFamily="{StaticResource digital-7}" IsEnabled="{Binding ActiveJob.EnableInterSegment}" Margin="0 2 0 0" HideUpDownButtons="True" Minimum="1" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="DimGray" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ActiveJob.InterSegmentLength,Mode=TwoWay}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" Width="70" HorizontalAlignment="Left" StringFormat="{}{0:N1} m" FontFamily="{StaticResource digital-7}" IsEnabled="{Binding ActiveJob.EnableInterSegment}" Margin="0 2 0 0" HideUpDownButtons="True" Minimum="1" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="{StaticResource DimGrayBrush}" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ActiveJob.InterSegmentLength,Mode=TwoWay}"></mahapps:NumericUpDown> </DockPanel> </StackPanel> </Border> @@ -695,7 +689,7 @@ <Image Source="../Images/repeat.png" Width="32"></Image> <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Units</TextBlock> </StackPanel> - <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" Width="70" HorizontalAlignment="Left" FontFamily="{StaticResource digital-7}" Margin="0 5 0 0" HideUpDownButtons="True" Minimum="1" Maximum="1000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="DimGray" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding ActiveJob.NumberOfUnits,Mode=TwoWay}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" Width="70" HorizontalAlignment="Left" FontFamily="{StaticResource digital-7}" Margin="0 5 0 0" HideUpDownButtons="True" Minimum="1" Maximum="1000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="{StaticResource DimGrayBrush}" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding ActiveJob.NumberOfUnits,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> </Border> @@ -718,13 +712,13 @@ <Grid HorizontalAlignment="Right" Margin="0 0 10 0"> <StackPanel Orientation="Horizontal"> - <Button AutomationProperties.AutomationId="{x:Static automation:Developer.ToJobsButton}" Height="70" Width="100" Margin="0 0 10 0" Style="{StaticResource MaterialDesignFlatButton}" Foreground="#202020" VerticalAlignment="Bottom" BorderBrush="Transparent" Command="{Binding DiscardJobCommand}"> + <Button AutomationProperties.AutomationId="{x:Static automation:Developer.ToJobsButton}" Height="70" Width="100" Margin="0 0 10 0" Style="{StaticResource MaterialDesignFlatButton}" Foreground="{StaticResource DarkGrayBrush}" VerticalAlignment="Bottom" BorderBrush="Transparent" Command="{Binding DiscardJobCommand}"> <StackPanel> <materialDesign:PackIcon HorizontalAlignment="Center" Width="24" Height="24" Kind="KeyboardBackspace" /> <TextBlock VerticalAlignment="Center" Margin="0 10 0 0">TO JOBS</TextBlock> </StackPanel> </Button> - <Button AutomationProperties.AutomationId="{x:Static automation:Developer.SaveJobButton}" Height="70" Width="100" Margin="0 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Foreground="#202020" VerticalAlignment="Bottom" BorderBrush="Transparent" Command="{Binding SaveJobCommand}"> + <Button AutomationProperties.AutomationId="{x:Static automation:Developer.SaveJobButton}" Height="70" Width="100" Margin="0 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Foreground="{StaticResource DarkGrayBrush}" VerticalAlignment="Bottom" BorderBrush="Transparent" Command="{Binding SaveJobCommand}"> <StackPanel> <materialDesign:PackIcon HorizontalAlignment="Center" Width="24" Height="24" Kind="ContentSave" /> <TextBlock VerticalAlignment="Center" Margin="0 10 0 0">SAVE JOB</TextBlock> @@ -753,7 +747,7 @@ <Image Source="../Images/ruler.png" Width="32"></Image> <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Segment Length</TextBlock> </StackPanel> - <mahapps:NumericUpDown x:Name="numSegmentLength" FontSize="{StaticResource NumbersFontSize}" HideUpDownButtons="True" Width="90" HorizontalAlignment="Left" FontFamily="{StaticResource digital-7}" StringFormat="{}{0:N1} m" Margin="0 2 0 0" Minimum="1" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="DimGray" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding SelectedSegment.Length,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"> + <mahapps:NumericUpDown x:Name="numSegmentLength" FontSize="{StaticResource NumbersFontSize}" HideUpDownButtons="True" Width="90" HorizontalAlignment="Left" FontFamily="{StaticResource digital-7}" StringFormat="{}{0:N1} m" Margin="0 2 0 0" Minimum="1" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="{StaticResource DimGrayBrush}" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding SelectedSegment.Length,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"> <mahapps:NumericUpDown.Resources> <StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource> </mahapps:NumericUpDown.Resources> @@ -797,7 +791,7 @@ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0 40 180 0"> <materialDesign:PackIcon Kind="ChevronLeft" Width="24" Height="24" /> - <TextBlock Margin="0 -2 0 0" VerticalAlignment="Center"><Run>SUPPORTED MEDIA LIQUID</Run> <Run FontSize="10" Foreground="DimGray">( Max Nanolitter/CM )</Run></TextBlock> + <TextBlock Margin="0 -2 0 0" VerticalAlignment="Center"><Run>SUPPORTED MEDIA LIQUID</Run> <Run FontSize="10" Foreground="{StaticResource DimGrayBrush}">( Max Nanolitter/CM )</Run></TextBlock> <materialDesign:PackIcon Kind="ChevronRight" Width="24" Height="24" /> </StackPanel> @@ -813,7 +807,7 @@ <ItemsControl.ItemTemplate> <DataTemplate DataType="{x:Type observables:LiquidTypesRml}"> <StackPanel Margin="0 0 10 0"> - <TextBlock HorizontalAlignment="Center" FontSize="10" Foreground="DimGray" Text="{Binding LiquidType.Name}"></TextBlock> + <TextBlock HorizontalAlignment="Center" FontSize="10" Foreground="{StaticResource DimGrayBrush}" Text="{Binding LiquidType.Name}"></TextBlock> <Grid Width="58" Height="48" Margin="0 5 0 0"> <shapes:Hexagon StrokeThickness="1" Stroke="Gray"> <shapes:Hexagon.Fill> @@ -824,7 +818,7 @@ </shapes:Hexagon.Fill> </shapes:Hexagon> - <TextBox Style="{x:Null}" Background="Transparent" Foreground="Black" BorderThickness="0" Text="{Binding MaxNlPerCm}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontWeight="Bold" FontStyle="Italic"></TextBox> + <TextBox Style="{x:Null}" Background="Transparent" Foreground="{StaticResource BlackForegroundBrush}" BorderThickness="0" Text="{Binding MaxNlPerCm}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontWeight="Bold" FontStyle="Italic"></TextBox> </Grid> </StackPanel> </DataTemplate> @@ -853,19 +847,19 @@ <Border DockPanel.Dock="Bottom" Margin="10"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right"> - <Button Command="{Binding DuplicateBrushStopCommand}" Margin="0 0 4 0" Background="#FF9A6A" BorderBrush="#FF9A6A" Height="42" Padding="10"> + <Button Command="{Binding DuplicateBrushStopCommand}" Margin="0 0 4 0" Background="{StaticResource OrangeBrush300}" BorderBrush="{StaticResource OrangeBrush300}" Height="42" Padding="10"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="ContentCopy" Width="24" Height="24"></materialDesign:PackIcon> <TextBlock VerticalAlignment="Center">Duplicate</TextBlock> </StackPanel> </Button> - <Button Command="{Binding RemoveBrushStopCommand}" Margin="0 0 4 0" Background="#FF6A6A" BorderBrush="#FF6A6A" Height="42" Padding="10"> + <Button Command="{Binding RemoveBrushStopCommand}" Margin="0 0 4 0" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}" Height="42" Padding="10"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Delete" Width="24" Height="24"></materialDesign:PackIcon> <TextBlock VerticalAlignment="Center">Remove</TextBlock> </StackPanel> </Button> - <Button AutomationProperties.AutomationId="{x:Static automation:Developer.AddBrushStopButton}" Command="{Binding AddBrushStopCommand}" Background="#68B367" BorderBrush="#68B367" Height="42" Padding="10"> + <Button AutomationProperties.AutomationId="{x:Static automation:Developer.AddBrushStopButton}" Command="{Binding AddBrushStopCommand}" Background="{StaticResource GreenBrush300}" BorderBrush="{StaticResource GreenBrush300}" Height="42" Padding="10"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Plus" Width="24" Height="24"></materialDesign:PackIcon> <TextBlock VerticalAlignment="Center">New</TextBlock> @@ -879,15 +873,15 @@ <Grid DockPanel.Dock="Top"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> <Image Source="../Images/color-palette.png" Width="42"></Image> - <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" Foreground="DimGray" FontSize="16" FontWeight="SemiBold">SEGMENT BRUSH</TextBlock> + <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" Foreground="{StaticResource DimGrayBrush}" FontSize="16" FontWeight="SemiBold">SEGMENT BRUSH</TextBlock> </StackPanel> <DockPanel> <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" VerticalAlignment="Center" Margin="0 0 0 0"> - <TextBlock VerticalAlignment="Center" Foreground="DimGray">Generate Gradient</TextBlock> + <TextBlock VerticalAlignment="Center" Foreground="{StaticResource DimGrayBrush}">Generate Gradient</TextBlock> <ToggleButton Margin="10 0 0 0" IsChecked="{Binding Settings.EnableGradientGeneration,Mode=TwoWay}" /> - <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" Foreground="DimGray">Resolution:</TextBlock> - <mahapps:NumericUpDown HideUpDownButtons="True" Width="90" HorizontalAlignment="Left" FontSize="14" FontFamily="{StaticResource digital-7}" StringFormat="{}{0:N0} cm" Margin="5 1 0 0" Minimum="10" Maximum="1000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" BorderBrush="DimGray" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding Settings.GradientResolutionCM,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"> + <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" Foreground="{StaticResource DimGrayBrush}">Resolution:</TextBlock> + <mahapps:NumericUpDown HideUpDownButtons="True" Width="90" HorizontalAlignment="Left" FontSize="14" FontFamily="{StaticResource digital-7}" StringFormat="{}{0:N0} cm" Margin="5 1 0 0" Minimum="10" Maximum="1000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" BorderBrush="{StaticResource DimGrayBrush}" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding Settings.GradientResolutionCM,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"> <mahapps:NumericUpDown.Resources> <StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource> </mahapps:NumericUpDown.Resources> @@ -962,7 +956,7 @@ <ComboBox ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ColorSpaces}" SelectedItem="{Binding ColorSpace}" DisplayMemberPath="Name" Width="100" HorizontalAlignment="Left"> <ComboBox.ItemContainerStyle> <Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}"> - <Setter Property="Background" Value="#ECECEC"></Setter> + <Setter Property="Background" Value="{StaticResource WhiteBrush100}"></Setter> </Style> </ComboBox.ItemContainerStyle> </ComboBox> @@ -982,9 +976,9 @@ </Style> </StackPanel.Style> <TextBlock Width="180" TextAlignment="Center" HorizontalAlignment="Center" FontSize="16"> - <Run FontWeight="Bold" FontStyle="Italic" Text="OFFSET:" Foreground="#5E5E5E"></Run> - <Run FontFamily="{StaticResource digital-7}" Text="{Binding OffsetPercent,StringFormat={}{0:F1}%}"></Run> - <Run FontSize="12" Foreground="Gray" Text="{Binding OffsetMeters,Mode=OneWay,StringFormat={} ( {0:F1}m )}"></Run> + <Run FontWeight="Bold" FontStyle="Italic" Text="OFFSET:" Foreground="{StaticResource GrayBrush250}"></Run> + <Run FontFamily="{StaticResource digital-7}" Text="{Binding OffsetPercent,StringFormat={}{0:F1}%}" Foreground="{StaticResource BlackForegroundBrush}"></Run> + <Run FontSize="12" Foreground="{StaticResource GrayBrush250}" Text="{Binding OffsetMeters,Mode=OneWay,StringFormat={} ( {0:F1}m )}"></Run> </TextBlock> <Slider ValueChanged="Offset_Slider_ValueChanged" Style="{StaticResource GradientOffsetSlider}" SmallChange="0.1" IsSnapToTickEnabled="True" TickFrequency="0.1" Margin="0 20 0 0" HorizontalAlignment="Center" Width="300" Value="{Binding OffsetPercent}" IsEnabled="{Binding IsMiddle}" Minimum="0" Maximum="100"> <Slider.Foreground> @@ -1092,7 +1086,7 @@ <DataTemplate> <TextBlock VerticalAlignment="Center"> <Run Text="{Binding NanoliterPerStep,Mode=OneWay,StringFormat='0.00'}"></Run> - <Run Text="(nl)" FontSize="9" Foreground="Gray"></Run> + <Run Text="(nl)" FontSize="9" Foreground="{StaticResource GrayBrush250}"></Run> </TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> @@ -1103,7 +1097,7 @@ <ComboBox ItemsSource="{Binding Source={StaticResource dispenserDivisions}}" SelectedItem="{Binding DispenserStepDivision,UpdateSourceTrigger=PropertyChanged}" BorderThickness="0"> <ComboBox.ItemContainerStyle> <Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}"> - <Setter Property="Background" Value="#ECECEC"></Setter> + <Setter Property="Background" Value="{StaticResource WhiteBrush100}"></Setter> </Style> </ComboBox.ItemContainerStyle> <ComboBox.ItemTemplate> @@ -1120,7 +1114,7 @@ <DataTemplate> <TextBlock VerticalAlignment="Center"> <Run Text="{Binding LiquidMaxNanoliterPerCentimeter,Mode=OneWay,StringFormat='0.0'}"></Run> - <Run Text="(nl)" FontSize="9" Foreground="Gray"></Run> + <Run Text="(nl)" FontSize="9" Foreground="{StaticResource GrayBrush250}"></Run> </TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> @@ -1130,7 +1124,7 @@ <DataTemplate> <TextBlock VerticalAlignment="Center"> <Run Text="{Binding Volume}"></Run> - <Run Text="%" Foreground="Gray"></Run> + <Run Text="%" Foreground="{StaticResource GrayBrush250}"></Run> </TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> @@ -1149,7 +1143,7 @@ <DataTemplate> <TextBlock VerticalAlignment="Center"> <Run Text="{Binding NanoliterPerCentimeter,Mode=OneWay,StringFormat='0.0'}"></Run> - <Run Text="(nl)" FontSize="9" Foreground="Gray"></Run> + <Run Text="(nl)" FontSize="9" Foreground="{StaticResource GrayBrush250}"></Run> </TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> @@ -1159,7 +1153,7 @@ <DataTemplate> <TextBlock VerticalAlignment="Center"> <Run Text="{Binding NanoliterPerSecond,Mode=OneWay,StringFormat='0.0'}"></Run> - <Run Text="(nl)" FontSize="9" Foreground="Gray"></Run> + <Run Text="(nl)" FontSize="9" Foreground="{StaticResource GrayBrush250}"></Run> </TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> @@ -1174,7 +1168,7 @@ <Setter.Value> <TextBlock> <Run Text="{Binding PulsePerSecond,Mode=OneWay,StringFormat='0.0'}"></Run> - <Run Text="(pulse)" FontSize="9" Foreground="Gray"></Run> + <Run Text="(pulse)" FontSize="9" Foreground="{StaticResource GrayBrush250}"></Run> </TextBlock> </Setter.Value> </Setter> @@ -1187,7 +1181,7 @@ <Setter.Value> <TextBlock> <Run Text="{Binding PulsePerSecond,Mode=OneWay,StringFormat='0.0'}"></Run> - <Run Text="(pulse)" FontSize="9" Foreground="Gray"></Run> + <Run Text="(pulse)" FontSize="9" Foreground="{StaticResource GrayBrush250}"></Run> </TextBlock> </Setter.Value> </Setter> @@ -1243,7 +1237,7 @@ <Grid DockPanel.Dock="Left" VerticalAlignment="Center" Margin="20 15 0 0"> <TextBlock FontSize="16" Margin="0 0 0 0"> <Run FontWeight="Bold">ESTIMATED DURATION:</Run> - <Run Foreground="Black" FontSize="22" FontStyle="Italic" FontFamily="{StaticResource digital-7}" Text="{Binding EstimatedDuration,StringFormat=hh\\:mm\\:ss,TargetNullValue='00:00:00'}"></Run> + <Run Foreground="{StaticResource BlackForegroundBrush}" FontSize="22" FontStyle="Italic" FontFamily="{StaticResource digital-7}" Text="{Binding EstimatedDuration,StringFormat=hh\\:mm\\:ss,TargetNullValue='00:00:00'}"></Run> </TextBlock> </Grid> @@ -1256,7 +1250,7 @@ </StackPanel> </Button> <Button Height="60" Width="60" Margin="-60 0 0 0" Padding="0" Command="{Binding StartJobAndRecordCommand}" Click="OnJobStartClick" ToolTip="Start Job and Record"> - <materialDesign:PackIcon VerticalAlignment="Center" Width="38" Height="38" Kind="Record" Foreground="#FF6D6D" /> + <materialDesign:PackIcon VerticalAlignment="Center" Width="38" Height="38" Kind="Record" Foreground="{StaticResource RedBrush200}" /> </Button> </StackPanel> <Button Command="{Binding ToRunningJobCommand}" Width="280" Height="60" Visibility="{Binding IsJobRunning,Converter={StaticResource BooleanToVisibilityConverter}}"> @@ -1298,11 +1292,11 @@ </Rectangle> <StackPanel Margin="0 0 0 0" HorizontalAlignment="Center"> - <TextBlock FontSize="12" HorizontalAlignment="Right" Foreground="Black"> + <TextBlock FontSize="12" HorizontalAlignment="Right" Foreground="{StaticResource BlackForegroundBrush}"> <Run Text="{Binding Length,Mode=OneWay,StringFormat=N2}"></Run> - <Run Foreground="Gray" FontSize="10" Text="m"></Run> + <Run Foreground="{StaticResource GrayBrush250}" FontSize="10" Text="m"></Run> </TextBlock> - <materialDesign:PackIcon HorizontalAlignment="Center" RenderTransformOrigin="0.5,0.5" Kind="Triangle" Width="8" Height="8" Foreground="DimGray"> + <materialDesign:PackIcon HorizontalAlignment="Center" RenderTransformOrigin="0.5,0.5" Kind="Triangle" Width="8" Height="8" Foreground="{StaticResource DimGrayBrush}"> <materialDesign:PackIcon.RenderTransform> <RotateTransform Angle="180" /> </materialDesign:PackIcon.RenderTransform> @@ -1314,23 +1308,23 @@ </ItemsControl> <StackPanel Margin="-30 -5 0 0" HorizontalAlignment="Left"> - <TextBlock FontSize="12" Foreground="Black"> + <TextBlock FontSize="12" Foreground="{StaticResource BlackForegroundBrush}"> <Run Text="0"></Run> - <Run Foreground="Gray" FontSize="10" Text="m"></Run> + <Run Foreground="{StaticResource GrayBrush250}" FontSize="10" Text="m"></Run> </TextBlock> - <materialDesign:PackIcon HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" Kind="SubdirectoryArrowRight" Width="16" Height="16" Foreground="DimGray"> + <materialDesign:PackIcon HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" Kind="SubdirectoryArrowRight" Width="16" Height="16" Foreground="{StaticResource DimGrayBrush}"> </materialDesign:PackIcon> </StackPanel> <StackPanel Margin="0 -5 -20 0" HorizontalAlignment="Right"> - <TextBlock FontSize="12" Foreground="Black"> + <TextBlock FontSize="12" Foreground="{StaticResource BlackForegroundBrush}"> <Run Text="{Binding ActiveJob.Length,Mode=OneWay,StringFormat=N2}"></Run> <Run Foreground="Gray" FontSize="10" Text="m"></Run> <Run>x</Run> <Run Text="{Binding ActiveJob.NumberOfUnits}"></Run> </TextBlock> - <materialDesign:PackIcon HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" Kind="FlagCheckered" Width="16" Height="16" Foreground="DimGray"> + <materialDesign:PackIcon HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" Kind="FlagCheckered" Width="16" Height="16" Foreground="{StaticResource DimGrayBrush}"> </materialDesign:PackIcon> </StackPanel> @@ -1349,7 +1343,7 @@ </Grid> <Grid> - <Grid Background="#B9FFFFFF"> + <Grid Background="{StaticResource TransparentBackgroundBrush100}"> <Grid.Style> <Style TargetType="Grid"> <Setter Property="Width" Value="520"></Setter> @@ -1390,7 +1384,7 @@ <ComboBox Margin="0 10 0 0" ItemsSource="{Binding GroupsHistory}" SelectedItem="{Binding SelectedGroupHistory}"> <ComboBox.ItemContainerStyle> <Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}"> - <Setter Property="Background" Value="#E6FFFFFF"></Setter> + <Setter Property="Background" Value="{StaticResource TransparentBackgroundBrush200}"></Setter> <Setter Property="Padding" Value="5"></Setter> </Style> </ComboBox.ItemContainerStyle> @@ -1402,14 +1396,14 @@ <Style TargetType="TextBlock"> <Style.Triggers> <DataTrigger Binding="{Binding Active}" Value="True"> - <Setter Property="Foreground" Value="#FF5F5F"></Setter> + <Setter Property="Foreground" Value="{StaticResource RedBrush100}"></Setter> <Setter Property="FontStyle" Value="Italic"></Setter> </DataTrigger> </Style.Triggers> </Style> </TextBlock.Style> </TextBlock> - <TextBlock Text="{Binding SaveDate}" Margin="10 0 0 0" FontStyle="Italic" Foreground="Gray" VerticalAlignment="Center"></TextBlock> + <TextBlock Text="{Binding SaveDate}" Margin="10 0 0 0" FontStyle="Italic" Foreground="{StaticResource GrayBrush250}" VerticalAlignment="Center"></TextBlock> </StackPanel> </DataTemplate> </ComboBox.ItemTemplate> @@ -1439,7 +1433,7 @@ <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected,FallbackValue=False}" Value="True"> <Setter Property="BorderBrush" Value="{StaticResource AccentColorBrush}"></Setter> - <Setter Property="Background" Value="#D4FFFFFF"></Setter> + <Setter Property="Background" Value="{StaticResource TransparentBackgroundBrush300}"></Setter> <Setter Property="Opacity" Value="1"></Setter> </DataTrigger> </Style.Triggers> @@ -1453,7 +1447,7 @@ <WrapPanel.Resources> <Style TargetType="TextBlock"> <Setter Property="FontSize" Value="10"></Setter> - <Setter Property="Foreground" Value="#7A7A7A"></Setter> + <Setter Property="Foreground" Value="{StaticResource GrayBrush50}"></Setter> <Setter Property="Margin" Value="0 5 0 5"></Setter> <Setter Property="MinWidth" Value="80"></Setter> </Style> @@ -1514,7 +1508,7 @@ <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="5" Visibility="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected,Converter={StaticResource BooleanToVisibilityConverter}}"> <TextBlock Text="Active" FontWeight="Bold" FontStyle="Italic" FontSize="13" VerticalAlignment="Center"></TextBlock> - <materialDesign:PackIcon Foreground="#90E990" Kind="CheckboxBlankCircle" VerticalAlignment="Center" Margin="5 0 0 0"> + <materialDesign:PackIcon Foreground="{StaticResource GreenBrush400}" Kind="CheckboxBlankCircle" VerticalAlignment="Center" Margin="5 0 0 0"> <materialDesign:PackIcon.Style> <Style TargetType="materialDesign:PackIcon"> <Setter Property="Opacity" Value="0"></Setter> @@ -1553,7 +1547,7 @@ </ListBox> <StackPanel Margin="10 20" VerticalAlignment="Bottom" Orientation="Horizontal" HorizontalAlignment="Right"> - <Button Height="40" Width="105" Command="{Binding ResetProcessParametersCommand}" Background="Transparent" BorderBrush="#202020" Foreground="#202020" Margin="0 2 10 0" ToolTip="Resets the current process parameters in the embedded device"> + <Button Height="40" Width="105" Command="{Binding ResetProcessParametersCommand}" Background="Transparent" BorderBrush="{StaticResource DarkGrayBrush200}" Foreground="{StaticResource DarkGrayBrush200}" Margin="0 2 10 0" ToolTip="Resets the current process parameters in the embedded device"> <TextBlock TextWrapping="Wrap" TextAlignment="Center"> TEMP OFF </TextBlock> @@ -1589,7 +1583,7 @@ </Style.Triggers> </Style> </Grid.Style> - <TextBlock Foreground="#FA9292" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24">SELECT MACHINE & MEDIA</TextBlock> + <TextBlock Foreground="{StaticResource RedBrush400}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24">SELECT MACHINE & MEDIA</TextBlock> </Grid> </Grid> </Expander> @@ -1599,14 +1593,14 @@ </StackPanel> </ScrollViewer> - <Rectangle HorizontalAlignment="Right" Stroke="#383838" VerticalAlignment="Top" Height="427"></Rectangle> - <Rectangle HorizontalAlignment="Right" Stroke="#383838" VerticalAlignment="Bottom" Height="428"></Rectangle> + <Rectangle HorizontalAlignment="Right" Stroke="{StaticResource GrayBrush280}" VerticalAlignment="Top" Height="427"></Rectangle> + <Rectangle HorizontalAlignment="Right" Stroke="{StaticResource GrayBrush280}" VerticalAlignment="Bottom" Height="428"></Rectangle> </Grid> <Button Background="Transparent" Command="{Binding ToggleSideBarCommand}" Padding="0" Style="{StaticResource MaterialDesignFlatButton}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" HorizontalAlignment="Right" VerticalAlignment="Center" Height="200" Width="50" Margin="0 0 -50 0"> - <Border Background="#F1F1F1" CornerRadius="0 10 10 0" BorderThickness="0 1 1 1" BorderBrush="#383838"> + <Border Background="{StaticResource WhiteBrush100}" CornerRadius="0 10 10 0" BorderThickness="0 1 1 1" BorderBrush="{StaticResource GrayBrush280}"> <Grid> - <TextBlock Foreground="#FF7272" Text="PROCESS PARAMETERS" FontSize="16" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Center" HorizontalAlignment="Center"> + <TextBlock Foreground="{StaticResource RedBrush300}" Text="PROCESS PARAMETERS" FontSize="16" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Center" HorizontalAlignment="Center"> <TextBlock.LayoutTransform> <RotateTransform Angle="270"></RotateTransform> </TextBlock.LayoutTransform> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml index ab97d7858..70d5b6180 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml @@ -35,12 +35,12 @@ <ColumnDefinition Width="1*"/> </Grid.ColumnDefinitions> - <Grid Background="#B1FFFFFF"> + <Grid Background="{StaticResource TransparentBackgroundBrush400}"> <StackPanel> <TextBlock Margin="40 20" FontSize="30" FontWeight="SemiBold" FontStyle="Italic">TARGET MACHINE</TextBlock> <DockPanel Margin="40 0 40 0" IsEnabled="{Binding CanWork}"> - <Button Command="{Binding ReloadMachinesCommand}" DockPanel.Dock="Right" ToolTip="Reload" Foreground="#404040" Margin="20 0 0 0" Padding="0" Width="40" Height="Auto" Style="{StaticResource MaterialDesignFlatButton}"> + <Button Command="{Binding ReloadMachinesCommand}" DockPanel.Dock="Right" ToolTip="Reload" Foreground="{StaticResource GrayBrush280}" Margin="20 0 0 0" Padding="0" Width="40" Height="Auto" Style="{StaticResource MaterialDesignFlatButton}"> <materialDesign:PackIcon Kind="Refresh" Width="24" Height="24" /> </Button> <autoComplete:AutoCompleteTextBox Provider="{Binding MachinesProvider}" LoadingContent="Loading..." FontSize="20" SelectedItem="{Binding SelectedMachine,Mode=TwoWay}" materialDesign:HintAssist.Hint="Serial Number" DisplayMember="SerialNumber"> @@ -55,12 +55,6 @@ </autoComplete:AutoCompleteTextBox> </DockPanel> <designer:MachineView Width="600" IsHitTestVisible="False" Margin="0 40 0 0" DataContext="{Binding SelectedMachine}" /> - <Button Command="{Binding EditMachineCommand}" HorizontalAlignment="Right" Margin="0 10 20 20" Style="{StaticResource MaterialDesignFlatButton}"> - <StackPanel Orientation="Horizontal"> - <materialDesign:PackIcon VerticalAlignment="Center" Kind="Pencil"></materialDesign:PackIcon> - <TextBlock Margin="10 0 0 0">EDIT</TextBlock> - </StackPanel> - </Button> </StackPanel> </Grid> @@ -100,19 +94,19 @@ <Grid DockPanel.Dock="Bottom" Margin="0 20 0 0"> <StackPanel VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Left" Margin="20 0 0 0"> - <Button AutomationProperties.AutomationId="{x:Static automation:Developer.DeleteJobButton}" Margin="0 0 10 0" MinWidth="160" Height="50" Background="#FF7575" BorderBrush="#FF7575" Command="{Binding RemoveJobCommand}"> + <Button AutomationProperties.AutomationId="{x:Static automation:Developer.DeleteJobButton}" Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}" Command="{Binding RemoveJobCommand}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Delete" Width="20" Height="20" /> <TextBlock Margin="5 0 0 0" FontSize="16">DELETE</TextBlock> </StackPanel> </Button> - <Button AutomationProperties.AutomationId="{x:Static automation:Developer.DuplicateJobButton}" Margin="0 0 10 0" MinWidth="160" Height="50" Background="#FF995A" BorderBrush="#FF995A" Command="{Binding DuplicateJobCommand}"> + <Button AutomationProperties.AutomationId="{x:Static automation:Developer.DuplicateJobButton}" Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource OrangeBrush300}" BorderBrush="{StaticResource OrangeBrush300}" Command="{Binding DuplicateJobCommand}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="ContentCopy" Width="20" Height="20" /> <TextBlock Margin="5 0 0 0" FontSize="16">DUPLICATE</TextBlock> </StackPanel> </Button> - <Button AutomationProperties.AutomationId="{x:Static automation:Developer.NewJobButton}" Margin="0 0 10 0" MinWidth="160" Height="50" Background="#65C682" BorderBrush="#65C682" Command="{Binding AddJobCommand}"> + <Button AutomationProperties.AutomationId="{x:Static automation:Developer.NewJobButton}" Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource GreenBrush300}" BorderBrush="{StaticResource GreenBrush300}" Command="{Binding AddJobCommand}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Plus" Width="20" Height="20" /> <TextBlock Margin="5 0 0 0" FontSize="16">NEW JOB</TextBlock> @@ -266,7 +260,7 @@ </Grid> </DockPanel> - <Button Command="{Binding ImportEmbroideryFileCommand}" Margin="20 0 0 -100" Foreground="Black" FontSize="16" VerticalAlignment="Bottom" HorizontalAlignment="Left" Style="{StaticResource emptyButton}" Cursor="Hand"> + <Button Command="{Binding ImportEmbroideryFileCommand}" Margin="20 0 0 -100" Foreground="{StaticResource BlackForegroundBrush}" FontSize="16" VerticalAlignment="Bottom" HorizontalAlignment="Left" Style="{StaticResource emptyButton}" Cursor="Hand"> <StackPanel Orientation="Horizontal"> <Image Source="../Images/sewing-machine.png" Width="32"></Image> <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" TextDecorations="Underline">Import Embroidery File</TextBlock> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml index 6289f009b..2787d73ef 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml @@ -65,7 +65,7 @@ </Grid.RowDefinitions> <StackPanel> - <Grid Background="#202020" TextElement.Foreground="Silver"> + <Grid Background="{StaticResource DarkGrayBrush}" TextElement.Foreground="Silver"> <Grid.Style> <Style TargetType="Grid"> <Setter Property="LayoutTransform"> @@ -93,13 +93,13 @@ </Style.Triggers> </Style> </Grid.Style> - <Border BorderBrush="#404040" BorderThickness="0 0 0 1" Padding="20"> + <Border BorderBrush="{StaticResource GrayBrush280}" BorderThickness="0 0 0 1" Padding="20"> <Grid> <DockPanel> <Grid DockPanel.Dock="Left" MinWidth="190" VerticalAlignment="Center" Margin="0 0 0 0"> <StackPanel Orientation="Vertical" Visibility="{Binding IsJobRunning,Converter={StaticResource BooleanToVisibilityConverter}}"> - <ProgressBar Foreground="#FF6464" Width="50" Height="50" HorizontalAlignment="Center" VerticalAlignment="Center" IsIndeterminate="True" Style="{StaticResource MaterialDesignCircularProgressBar}" Value="0" /> - <TextBlock Margin="0 10 0 0" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="14" FontStyle="Italic" FontWeight="DemiBold" Foreground="#FF6464" TextWrapping="Wrap"> + <ProgressBar Foreground="{StaticResource RedBrush300}" Width="50" Height="50" HorizontalAlignment="Center" VerticalAlignment="Center" IsIndeterminate="True" Style="{StaticResource MaterialDesignCircularProgressBar}" Value="0" /> + <TextBlock Margin="0 10 0 0" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="14" FontStyle="Italic" FontWeight="DemiBold" Foreground="{StaticResource RedBrush300}" TextWrapping="Wrap"> <Run Text="Running '"></Run> <Run Text="{Binding RunningJob.Name}"></Run> <Run Text="'..."></Run> @@ -108,9 +108,9 @@ </Grid> <StackPanel DockPanel.Dock="Right" VerticalAlignment="Center" Margin="0 20 0 0"> <StackPanel Orientation="Horizontal"> - <TextBlock VerticalAlignment="Center" FontSize="30" FontFamily="{StaticResource digital-7}" Margin="0 0 40 0" Foreground="#FF6464" Width="100" Text="{Binding RunningJobStatus.RemainingTime,StringFormat=hh\\:mm\\:ss}"></TextBlock> + <TextBlock VerticalAlignment="Center" FontSize="30" FontFamily="{StaticResource digital-7}" Margin="0 0 40 0" Foreground="{StaticResource RedBrush300}" Width="100" Text="{Binding RunningJobStatus.RemainingTime,StringFormat=hh\\:mm\\:ss}"></TextBlock> - <Button Height="40" Width="170" Command="{Binding StopJobCommand}" Background="#FF6464" BorderBrush="#FF6464"> + <Button Height="40" Width="170" Command="{Binding StopJobCommand}" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon VerticalAlignment="Center" Width="24" Height="24" Kind="Stop" /> <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">STOP</TextBlock> @@ -120,7 +120,7 @@ </StackPanel> <Grid> <Grid> - <Border Margin="0 10 0 0" VerticalAlignment="Bottom" Width="1200" BorderBrush="#404040" BorderThickness="0" ClipToBounds="False"> + <Border Margin="0 10 0 0" VerticalAlignment="Bottom" Width="1200" BorderBrush="{StaticResource GrayBrush280}" BorderThickness="0" ClipToBounds="False"> <Grid ClipToBounds="False" > <ItemsControl ClipToBounds="False" x:Name="runningJobBrushList" ItemsSource="{Binding RunningJobStatus.CurrentUnitSegments}" Margin="0 0 60 0"> @@ -135,7 +135,7 @@ <Grid.ToolTip> <ToolTip Background="White" Padding="0" Visibility="{Binding IsInterSegment,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> - <Border BorderThickness="1" BorderBrush="#202020" CornerRadius="3" Padding="5"> + <Border BorderThickness="1" BorderBrush="{StaticResource DarkGrayBrush}" CornerRadius="3" Padding="5"> <StackPanel Background="White"> <ItemsControl ItemsSource="{Binding BrushStops[0].LiquidVolumes}" VerticalAlignment="Center"> <ItemsControl.ItemsPanel> @@ -149,7 +149,7 @@ <ContentControl.Foreground> <SolidColorBrush Color="{Binding IdsPack.LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush> </ContentControl.Foreground> - <TextBlock Foreground="#202020" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Volume,StringFormat=0.00}"></TextBlock> + <TextBlock Foreground="{StaticResource DarkGrayBrush}" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Volume,StringFormat=0.00}"></TextBlock> </ContentControl> </DataTemplate> </ItemsControl.ItemTemplate> @@ -200,7 +200,7 @@ <ComboBox ItemsSource="{Binding Source={StaticResource dispenserDivisions}}" SelectedItem="{Binding DispenserStepDivision,UpdateSourceTrigger=PropertyChanged}" BorderThickness="0"> <ComboBox.ItemContainerStyle> <Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}"> - <Setter Property="Background" Value="#ECECEC"></Setter> + <Setter Property="Background" Value="{StaticResource WhiteBrush100}"></Setter> </Style> </ComboBox.ItemContainerStyle> <ComboBox.ItemTemplate> @@ -339,7 +339,7 @@ <DataTrigger Binding="{Binding Started}" Value="True"> <Setter Property="Content"> <Setter.Value> - <TextBlock Text="{Binding RemainingTime,StringFormat=hh\\:mm\\:ss}" Foreground="#FF6464" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Margin="10" FontSize="20"></TextBlock> + <TextBlock Text="{Binding RemainingTime,StringFormat=hh\\:mm\\:ss}" Foreground="{StaticResource RedBrush300}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Margin="10" FontSize="20"></TextBlock> </Setter.Value> </Setter> </DataTrigger> @@ -378,14 +378,14 @@ <Run Text="{Binding RunningJobStatus.CurrentUnitTotalProgress,Mode=OneWay,StringFormat=N2}"></Run> <Run FontSize="13" Text="m"></Run> <Run></Run> - <Run Foreground="#FF6464">x</Run><Run Foreground="#FF6464" FontSize="16" FontWeight="SemiBold" Text="{Binding RunningJobStatus.RemainingUnits}"></Run> + <Run Foreground="{StaticResource RedBrush300}">x</Run><Run Foreground="{StaticResource RedBrush300}" FontSize="16" FontWeight="SemiBold" Text="{Binding RunningJobStatus.RemainingUnits}"></Run> </TextBlock> <materialDesign:PackIcon HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" Kind="FlagCheckered" Width="20" Height="20"> </materialDesign:PackIcon> </StackPanel> - <Border BorderBrush="#404040" BorderThickness="1" VerticalAlignment="Center" Height="30" Margin="0 11 60 0"> + <Border BorderBrush="{StaticResource GrayBrush280}" BorderThickness="1" VerticalAlignment="Center" Height="30" Margin="0 11 60 0"> </Border> @@ -398,8 +398,8 @@ <Binding ElementName="jobProgressCanvas" Path="ActualWidth" /> </MultiBinding> </Canvas.Left> - <materialDesign:PackIcon Kind="MapMarker" Foreground="#FF6464" Width="35" Height="35" Margin="-17 0 0 0" /> - <TextBlock Margin="-11 -23 0 0" FontSize="16" Foreground="#FF6464" VerticalAlignment="Top" Height="18" Text="{Binding RunningJobStatus.Progress,StringFormat=0.0}"></TextBlock> + <materialDesign:PackIcon Kind="MapMarker" Foreground="{StaticResource RedBrush300}" Width="35" Height="35" Margin="-17 0 0 0" /> + <TextBlock Margin="-11 -23 0 0" FontSize="16" Foreground="{StaticResource RedBrush300}" VerticalAlignment="Top" Height="18" Text="{Binding RunningJobStatus.Progress,StringFormat=0.0}"></TextBlock> </Grid> </Canvas> </Grid> @@ -408,7 +408,7 @@ </Grid> </DockPanel> - <TextBlock Visibility="{Binding RunningJobStatus.IsFinalizing,Converter={StaticResource BooleanToVisibilityConverter}}" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="-170 0 0 0" Background="#202020" FontSize="14" Height="30" Foreground="#FF6D6D">Finalizing...</TextBlock> + <TextBlock Visibility="{Binding RunningJobStatus.IsFinalizing,Converter={StaticResource BooleanToVisibilityConverter}}" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="-170 0 0 0" Background="{StaticResource DarkGrayBrush}" FontSize="14" Height="30" Foreground="{StaticResource RedBrush100}">Finalizing...</TextBlock> </Grid> </Border> @@ -444,7 +444,7 @@ </Style> </Grid.Style> - <Border BorderBrush="#404040" BorderThickness="0 1 0 1" Padding="5"> + <Border BorderBrush="{StaticResource GrayBrush280}" BorderThickness="0 1 0 1" Padding="5"> <DockPanel> <StackPanel Orientation="Horizontal" DockPanel.Dock="Left"> <materialDesign:PackIcon Kind="Check" Width="32" Height="32" VerticalAlignment="Center" /> @@ -454,7 +454,7 @@ <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" Margin="0 0 10 0"> <Button Height="20" Padding="0" Command="{Binding CloseJobCompletionStatusCommand}" Style="{StaticResource MaterialDesignFlatButton}"> <StackPanel Orientation="Horizontal"> - <materialDesign:PackIcon Foreground="#202020" VerticalAlignment="Center" Width="20" Height="20" Kind="Close" /> + <materialDesign:PackIcon Foreground="{StaticResource DarkGrayBrush}" VerticalAlignment="Center" Width="20" Height="20" Kind="Close" /> </StackPanel> </Button> </StackPanel> @@ -495,7 +495,7 @@ </Style> </Grid.Style> - <Border BorderBrush="#404040" BorderThickness="0 1 0 1" Padding="5"> + <Border BorderBrush="{StaticResource GrayBrush280}" BorderThickness="0 1 0 1" Padding="5"> <DockPanel> <StackPanel Orientation="Horizontal" DockPanel.Dock="Left"> <materialDesign:PackIcon Kind="Alert" Width="32" Height="32" VerticalAlignment="Center" /> @@ -512,7 +512,7 @@ <Button Padding="0" Height="20" Command="{Binding CloseJobCompletionStatusCommand}" Style="{StaticResource MaterialDesignFlatButton}"> <StackPanel Orientation="Horizontal"> - <materialDesign:PackIcon Foreground="#202020" VerticalAlignment="Center" Width="20" Height="20" Kind="Close" /> + <materialDesign:PackIcon Foreground="{StaticResource DarkGrayBrush}" VerticalAlignment="Center" Width="20" Height="20" Kind="Close" /> </StackPanel> </Button> </StackPanel> @@ -553,7 +553,7 @@ </Style> </Grid.Style> - <Border BorderBrush="#404040" BorderThickness="0 1 0 1" Padding="5"> + <Border BorderBrush="{StaticResource GrayBrush280}" BorderThickness="0 1 0 1" Padding="5"> <DockPanel> <StackPanel Orientation="Horizontal" DockPanel.Dock="Left"> <materialDesign:PackIcon Kind="Alert" Width="32" Height="32" VerticalAlignment="Center" /> @@ -563,7 +563,7 @@ <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" Margin="0 0 10 0"> <Button Padding="0" Height="20" Command="{Binding CloseJobCompletionStatusCommand}" Style="{StaticResource MaterialDesignFlatButton}"> <StackPanel Orientation="Horizontal"> - <materialDesign:PackIcon Foreground="#202020" VerticalAlignment="Center" Width="20" Height="20" Kind="Close" /> + <materialDesign:PackIcon Foreground="{StaticResource DarkGrayBrush}" VerticalAlignment="Center" Width="20" Height="20" Kind="Close" /> </StackPanel> </Button> </StackPanel> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml index d0f0c2af6..3073d0b62 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml @@ -84,7 +84,7 @@ </DataTrigger> <DataTrigger Binding="{Binding Completed}" Value="True"> <Setter Property="Kind" Value="CheckCircle"></Setter> - <Setter Property="Foreground" Value="#29B31D"></Setter> + <Setter Property="Foreground" Value="{StaticResource GreenBrush100}"></Setter> </DataTrigger> </Style.Triggers> </Style> @@ -110,7 +110,7 @@ </DockPanel> </Grid> - <GridSplitter Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Stretch" Height="5" Background="Black" /> + <GridSplitter Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Stretch" Height="5" Background="{StaticResource BlackForegroundBrush}" /> <Grid Grid.Row="2" Margin="0 40 0 0"> <DockPanel> <StackPanel Margin="0 0 0 0" Orientation="Horizontal" DockPanel.Dock="Top"> @@ -174,11 +174,11 @@ </DataTrigger> <DataTrigger Binding="{Binding Category}" Value="Warning"> <Setter Property="Kind" Value="Alert"></Setter> - <Setter Property="Foreground" Value="#FFA300"></Setter> + <Setter Property="Foreground" Value="{StaticResource OrangeBrush}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding Category}" Value="Error"> <Setter Property="Kind" Value="AlertOctagon"></Setter> - <Setter Property="Foreground" Value="#FF5C5C"></Setter> + <Setter Property="Foreground" Value="{StaticResource RedBrush100}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding Category}" Value="Critical"> <Setter Property="Kind" Value="BellPlus"></Setter> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml index 121e6e45c..71ce6f173 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml @@ -420,7 +420,7 @@ <Grid Grid.Row="1" Margin="10 0 10 10"> <UniformGrid Rows="1"> - <Button Height="Auto" Grid.Column="1" Command="{Binding DeleteCommand}" Margin="2" Background="#FF8A8A" BorderBrush="#FF8A8A"> + <Button Height="Auto" Grid.Column="1" Command="{Binding DeleteCommand}" Margin="2" Background="{StaticResource RedBrush400}" BorderBrush="{StaticResource RedBrush400}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Width="20" Height="20" VerticalAlignment="Center" Kind="Delete"></materialDesign:PackIcon> <TextBlock FontSize="14" Margin="10 0 0 0" VerticalAlignment="Center">DEL</TextBlock> @@ -432,7 +432,7 @@ <TextBlock FontSize="14" Margin="10 0 0 0" VerticalAlignment="Center">NEW</TextBlock> </StackPanel> </Button> - <Button Height="Auto" Grid.Column="1" Command="{Binding CloneCommand}" Margin="2" Background="#FF9A6A" BorderBrush="#FF9A6A"> + <Button Height="Auto" Grid.Column="1" Command="{Binding CloneCommand}" Margin="2" Background="{StaticResource OrangeBrush300}" BorderBrush="{StaticResource OrangeBrush300}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Width="20" Height="20" VerticalAlignment="Center" Kind="ContentCopy"></materialDesign:PackIcon> <TextBlock FontSize="14" Margin="10 0 0 0" VerticalAlignment="Center">CLONE</TextBlock> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogDetailsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogDetailsView.xaml index c7ebcaf02..d124ac3a1 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogDetailsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogDetailsView.xaml @@ -38,11 +38,11 @@ </DataTrigger> <DataTrigger Binding="{Binding Log.Category}" Value="Warning"> <Setter Property="Kind" Value="Alert"></Setter> - <Setter Property="Foreground" Value="#FFA300"></Setter> + <Setter Property="Foreground" Value="{StaticResource OrangeBrush}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding Log.Category}" Value="Error"> <Setter Property="Kind" Value="AlertOctagon"></Setter> - <Setter Property="Foreground" Value="#FF5C5C"></Setter> + <Setter Property="Foreground" Value="{StaticResource RedBrush100}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding Log.Category}" Value="Critical"> <Setter Property="Kind" Value="BellPlus"></Setter> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogsView.xaml index e61dc99ba..28864e93a 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogsView.xaml @@ -50,13 +50,13 @@ <RowDefinition Height="1*"/> </Grid.RowDefinitions> - <Border Background="#F1F1F1"> + <Border Background="{StaticResource WhiteBrush100}"> <Border.Effect> <DropShadowEffect /> </Border.Effect> <Grid> <StackPanel Orientation="Horizontal"> - <Button Margin="10 0 0 0" Height="50" Style="{StaticResource MaterialDesignFlatButton}" Foreground="#202020" Command="{Binding NavigateToHomeCommand}" HorizontalContentAlignment="Left"> + <Button Margin="10 0 0 0" Height="50" Style="{StaticResource MaterialDesignFlatButton}" Foreground="{StaticResource DarkGrayBrush}" Command="{Binding NavigateToHomeCommand}" HorizontalContentAlignment="Left"> <StackPanel Orientation="Horizontal" > <materialDesign:PackIcon Kind="ArrowLeftBold" Width="20" Height="20" /> <TextBlock Margin="5 0 0 0" FontSize="16">BACK</TextBlock> @@ -78,7 +78,7 @@ </StackPanel> </Border> - <Button Style="{StaticResource MaterialDesignFlatButton}" IsEnabled="{Binding IsRealTime}" Command="{Binding ToggleRealTimePaused}" Padding="0" Height="50" Width="50" Foreground="#202020" ToolTip="Pause/Resume Real-Time"> + <Button Style="{StaticResource MaterialDesignFlatButton}" IsEnabled="{Binding IsRealTime}" Command="{Binding ToggleRealTimePaused}" Padding="0" Height="50" Width="50" Foreground="{StaticResource DarkGrayBrush}" ToolTip="Pause/Resume Real-Time"> <materialDesign:PackIcon Width="50" Height="50"> <materialDesign:PackIcon.Style> <Style TargetType="materialDesign:PackIcon"> @@ -200,11 +200,11 @@ </DataTrigger> <DataTrigger Binding="{Binding Category}" Value="Warning"> <Setter Property="Kind" Value="Alert"></Setter> - <Setter Property="Foreground" Value="#FFA300"></Setter> + <Setter Property="Foreground" Value="{StaticResource OrangeBrush}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding Category}" Value="Error"> <Setter Property="Kind" Value="AlertOctagon"></Setter> - <Setter Property="Foreground" Value="#FF5C5C"></Setter> + <Setter Property="Foreground" Value="{StaticResource RedBrush100}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding Category}" Value="Critical"> <Setter Property="Kind" Value="BellPlus"></Setter> @@ -212,7 +212,7 @@ </DataTrigger> <DataTrigger Binding="{Binding Category}" Value="Debug"> <Setter Property="Kind" Value="Bug"></Setter> - <Setter Property="Foreground" Value="#303030"></Setter> + <Setter Property="Foreground" Value="{StaticResource GrayBrush300}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding CallerMethodName}" Value="OnStartup"> <Setter Property="Kind" Value="ClockFast"></Setter> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EmbeddedLogDetailsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EmbeddedLogDetailsView.xaml index 6511f035f..4864a55a7 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EmbeddedLogDetailsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EmbeddedLogDetailsView.xaml @@ -36,11 +36,11 @@ </DataTrigger> <DataTrigger Binding="{Binding Log.Category}" Value="Warning"> <Setter Property="Kind" Value="Alert"></Setter> - <Setter Property="Foreground" Value="#FFA300"></Setter> + <Setter Property="Foreground" Value="{StaticResource OrangeBrush}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding Log.Category}" Value="Error"> <Setter Property="Kind" Value="AlertOctagon"></Setter> - <Setter Property="Foreground" Value="#FF5C5C"></Setter> + <Setter Property="Foreground" Value="{StaticResource RedBrush100}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding Log.Category}" Value="Critical"> <Setter Property="Kind" Value="BellPlus"></Setter> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EmbeddedLogsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EmbeddedLogsView.xaml index 4573c8451..4e5ba43d3 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EmbeddedLogsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EmbeddedLogsView.xaml @@ -50,13 +50,13 @@ <RowDefinition Height="1*"/> </Grid.RowDefinitions> - <Border Background="#F1F1F1"> + <Border Background="{StaticResource WhiteBrush100}"> <Border.Effect> <DropShadowEffect /> </Border.Effect> <Grid> <StackPanel Orientation="Horizontal"> - <Button Margin="10 0 0 0" Height="50" Style="{StaticResource MaterialDesignFlatButton}" Foreground="#202020" Command="{Binding NavigateToHomeCommand}" HorizontalContentAlignment="Left"> + <Button Margin="10 0 0 0" Height="50" Style="{StaticResource MaterialDesignFlatButton}" Foreground="{StaticResource DarkGrayBrush}" Command="{Binding NavigateToHomeCommand}" HorizontalContentAlignment="Left"> <StackPanel Orientation="Horizontal" > <materialDesign:PackIcon Kind="ArrowLeftBold" Width="20" Height="20" /> <TextBlock Margin="5 0 0 0" FontSize="16">BACK</TextBlock> @@ -78,7 +78,7 @@ </StackPanel> </Border> - <Button Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding ToggleRealTimePaused}" Padding="0" Height="50" Width="50" Foreground="#202020" ToolTip="Pause/Resume Real-Time"> + <Button Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding ToggleRealTimePaused}" Padding="0" Height="50" Width="50" Foreground="{StaticResource DarkGrayBrush}" ToolTip="Pause/Resume Real-Time"> <materialDesign:PackIcon Width="50" Height="50"> <materialDesign:PackIcon.Style> <Style TargetType="materialDesign:PackIcon"> @@ -170,11 +170,11 @@ </DataTrigger> <DataTrigger Binding="{Binding Category}" Value="Warning"> <Setter Property="Kind" Value="Alert"></Setter> - <Setter Property="Foreground" Value="#FFA300"></Setter> + <Setter Property="Foreground" Value="{StaticResource OrangeBrush}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding Category}" Value="Error"> <Setter Property="Kind" Value="AlertOctagon"></Setter> - <Setter Property="Foreground" Value="#FF5C5C"></Setter> + <Setter Property="Foreground" Value="{StaticResource RedBrush100}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding Category}" Value="Critical"> <Setter Property="Kind" Value="BellPlus"></Setter> @@ -182,7 +182,7 @@ </DataTrigger> <DataTrigger Binding="{Binding Category}" Value="Debug"> <Setter Property="Kind" Value="Bug"></Setter> - <Setter Property="Foreground" Value="#303030"></Setter> + <Setter Property="Foreground" Value="{StaticResource GrayBrush300}"></Setter> </DataTrigger> <!--<DataTrigger Binding="{Binding CallerMethodName}" Value="OnStartup"> <Setter Property="Kind" Value="ClockFast"></Setter> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventDetailsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventDetailsView.xaml index 389b18776..8e0dc5fd1 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventDetailsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventDetailsView.xaml @@ -36,11 +36,11 @@ </DataTrigger> <DataTrigger Binding="{Binding Event.Category}" Value="Warning"> <Setter Property="Kind" Value="Alert"></Setter> - <Setter Property="Foreground" Value="#FFA300"></Setter> + <Setter Property="Foreground" Value="{StaticResource OrangeBrush}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding Event.Category}" Value="Error"> <Setter Property="Kind" Value="AlertOctagon"></Setter> - <Setter Property="Foreground" Value="#FF5C5C"></Setter> + <Setter Property="Foreground" Value="{StaticResource RedBrush100}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding Event.Category}" Value="Critical"> <Setter Property="Kind" Value="BellPlus"></Setter> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventsView.xaml index 632495103..5e16461a6 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventsView.xaml @@ -50,13 +50,13 @@ <RowDefinition Height="1*"/> </Grid.RowDefinitions> - <Border Background="#F1F1F1"> + <Border Background="{StaticResource WhiteBrush100}"> <Border.Effect> <DropShadowEffect /> </Border.Effect> <Grid> <StackPanel Orientation="Horizontal"> - <Button Margin="10 0 0 0" Height="50" Style="{StaticResource MaterialDesignFlatButton}" Foreground="#202020" Command="{Binding NavigateToHomeCommand}" HorizontalContentAlignment="Left"> + <Button Margin="10 0 0 0" Height="50" Style="{StaticResource MaterialDesignFlatButton}" Foreground="{StaticResource DarkGrayBrush}" Command="{Binding NavigateToHomeCommand}" HorizontalContentAlignment="Left"> <StackPanel Orientation="Horizontal" > <materialDesign:PackIcon Kind="ArrowLeftBold" Width="20" Height="20" /> <TextBlock Margin="5 0 0 0" FontSize="16">BACK</TextBlock> @@ -178,11 +178,11 @@ </DataTrigger> <DataTrigger Binding="{Binding Category}" Value="Warning"> <Setter Property="Kind" Value="Alert"></Setter> - <Setter Property="Foreground" Value="#FFA300"></Setter> + <Setter Property="Foreground" Value="{StaticResource OrangeBrush}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding Category}" Value="Error"> <Setter Property="Kind" Value="AlertOctagon"></Setter> - <Setter Property="Foreground" Value="#FF5C5C"></Setter> + <Setter Property="Foreground" Value="{StaticResource RedBrush100}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding Category}" Value="Critical"> <Setter Property="Kind" Value="BellPlus"></Setter> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/HomeView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/HomeView.xaml index b41351064..041650d7f 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/HomeView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/HomeView.xaml @@ -25,7 +25,7 @@ <Setter Property="CornerRadius" Value="20"></Setter> <Setter Property="Width" Value="450"></Setter> <Setter Property="Height" Value="400"></Setter> - <Setter Property="TextElement.Foreground" Value="#202020"></Setter> + <Setter Property="TextElement.Foreground" Value="{StaticResource DarkGrayBrush}"></Setter> <Setter Property="TextElement.FontSize" Value="25"></Setter> <Setter Property="BorderThickness" Value="1"></Setter> <Setter Property="BorderBrush" Value="#D6D6D6"></Setter> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/TimelineView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/TimelineView.xaml index 664f2489c..fceed1ce8 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/TimelineView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/TimelineView.xaml @@ -33,7 +33,7 @@ </LinearGradientBrush> <LinearGradientBrush x:Key="errorBrush" StartPoint="0.5,0" EndPoint="0.5,1"> - <GradientStop Color="#FFFF6A6A"/> + <GradientStop Color="{StaticResource RedBrush100}"/> <GradientStop Color="#FFD9D9" Offset="1"/> </LinearGradientBrush> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs index 15033e295..935cfe5ee 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs @@ -239,6 +239,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels public void DropIdsPack(IdsPack idsPack1, IdsPack idsPack2) { ActiveMachine.Configuration.IdsPacks.Swap(idsPack1, idsPack2); + ColorLabVM.InvalidateLiquidFactorsCalibrationData(); } /// <summary> @@ -333,6 +334,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels { idsPack.LiquidType = liquidType; idsPack.LiquidTypeGuid = liquidType.Guid; + ColorLabVM.InvalidateLiquidFactorsCalibrationData(); } /// <summary> @@ -358,6 +360,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels { ActiveMachineAdapter.Context.IdsPacks.Remove(SelectedIds); SelectedIds = null; + ColorLabVM.InvalidateLiquidFactorsCalibrationData(); } /// <summary> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineDetailsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineDetailsView.xaml index ce60ebf02..7acb4c806 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineDetailsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineDetailsView.xaml @@ -15,7 +15,7 @@ <Grid DockPanel.Dock="Top"> <StackPanel Orientation="Horizontal"> <Button Style="{StaticResource MaterialDesignFlatButton}" Height="Auto" Command="{Binding BackToMachinesCommand}"> - <materialDesign:PackIcon Kind="ArrowLeft" Width="50" Height="50" Foreground="#202020" ToolTip="Back to RML list" /> + <materialDesign:PackIcon Kind="ArrowLeft" Width="50" Height="50" Foreground="{StaticResource DarkGrayBrush}" ToolTip="Back to RML list" /> </Button> <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" FontSize="34" Text="{Binding ActiveMachine.Name}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml index ba2a022a1..8c9fe7179 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml @@ -28,7 +28,7 @@ <local:MachineView DataContext="{Binding ActiveMachine}" IsHitTestVisible="False" /> <Border Grid.Column="1" Margin="100 70" CornerRadius="5" Background="#68F6F6F6" Padding="10" BorderBrush="Silver" BorderThickness="1"> - <Grid TextElement.Foreground="#3E3E3E"> + <Grid TextElement.Foreground="{StaticResource GrayBrush280}"> <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition Width="Auto" /> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachinesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachinesView.xaml index faa6b1086..41dc0554c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachinesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachinesView.xaml @@ -31,19 +31,19 @@ </Grid> <Grid DockPanel.Dock="Bottom" IsEnabled="{Binding IsFree}"> <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 RemoveMachineCommand}"> + <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}" Command="{Binding RemoveMachineCommand}"> <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="#FFA65F" BorderBrush="#FFA65F" Command="{Binding CloneMachineCommand}"> + <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource OrangeBrush300}" BorderBrush="{StaticResource OrangeBrush200}" Command="{Binding CloneMachineCommand}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="ContentCopy" Width="20" Height="20" /> <TextBlock Margin="5 0 0 0" FontSize="16">CLONE</TextBlock> </StackPanel> </Button> - <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="#65C682" BorderBrush="#65C682" Command="{Binding AddMachineCommand}"> + <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource GreenBrush300}" BorderBrush="{StaticResource GreenBrush300}" Command="{Binding AddMachineCommand}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Plus" Width="20" Height="20" /> <TextBlock Margin="5 0 0 0" FontSize="16">NEW MACHINE</TextBlock> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/SpoolsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/SpoolsView.xaml index d04389ae7..3641492df 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/SpoolsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/SpoolsView.xaml @@ -28,13 +28,13 @@ <DockPanel Grid.Column="1" Margin="50 100"> <Grid DockPanel.Dock="Bottom"> <StackPanel VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0 0 0 0"> - <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="#FF7575" BorderBrush="#FF7575" Command="{Binding RemoveSpoolCommand}"> + <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}" Command="{Binding RemoveSpoolCommand}"> <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 0 0" MinWidth="160" Height="50" Background="#65C682" BorderBrush="#65C682" Command="{Binding AddSpoolCommand}"> + <Button Margin="0 0 0 0" MinWidth="160" Height="50" Background="{StaticResource GreenBrush300}" BorderBrush="{StaticResource GreenBrush300}" Command="{Binding AddSpoolCommand}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Plus" Width="20" Height="20" /> <TextBlock Margin="5 0 0 0" FontSize="16">NEW SPOOL</TextBlock> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/data-table.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/data-table.png Binary files differnew file mode 100644 index 000000000..0d5e5eaa6 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/data-table.png diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj index b1c8f580d..6b113be5f 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj @@ -186,6 +186,9 @@ <ItemGroup> <Resource Include="Images\thread_128px.png" /> </ItemGroup> + <ItemGroup> + <Resource Include="Images\data-table.png" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <ProjectExtensions> <VisualStudio> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs index ebcfe72fd..7218ef5ea 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; +using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -119,7 +120,6 @@ namespace Tango.MachineStudio.RML.ViewModels set { _activeProcessParametersTableView = value; RaisePropertyChangedAuto(); } } - /// <summary> /// Gets or sets the manage RML command. /// </summary> @@ -135,6 +135,10 @@ namespace Tango.MachineStudio.RML.ViewModels /// </summary> public RelayCommand RemoveRmlCommand { get; set; } + public RelayCommand ImportForwardDataCommand { get; set; } + + public RelayCommand ExportForwardDataCommand { get; set; } + public RelayCommand AddProcessParametersTableCommand { get; set; } public RelayCommand<ProcessParametersTable> RemoveProcessParametersTableCommand { get; set; } @@ -165,6 +169,10 @@ namespace Tango.MachineStudio.RML.ViewModels RemoveLiquidFactorCommand = new RelayCommand<LiquidTypesRml>(RemoveLiquidFactor, () => IsFree); CreateCalibrationDataExcelTemplateCommand = new RelayCommand(CreateCalibrationDataExcelTemplate); SaveCommand = new RelayCommand(Save, () => IsFree); + + ImportForwardDataCommand = new RelayCommand(ImportForwardData, () => ActiveRML != null && IsFree); + + ExportForwardDataCommand = new RelayCommand(ExportForwardData, () => ActiveRML != null && ActiveRML.Cct != null && IsFree); } public override void OnApplicationReady() @@ -199,6 +207,7 @@ namespace Tango.MachineStudio.RML.ViewModels .Set(guid) .WithActiveParametersGroup() .WithLiquidFactors() + .WithCCT() .BuildAsync(); if (ActiveRML.ProcessParametersTablesGroups.ToList().Count == 0) @@ -251,6 +260,8 @@ namespace Tango.MachineStudio.RML.ViewModels View.NavigateTo(RmlNavigationView.RmlView); + InvalidateRelayCommands(); + IsFree = true; } } @@ -491,5 +502,62 @@ namespace Tango.MachineStudio.RML.ViewModels View.NavigateTo(RmlNavigationView.RmlsView); LoadRmls(); } + + #region Import / Export Color Conversion Data + + private void ImportForwardData() + { + String file = GetCCTFileOpen(); + if (file != null) + { + if (ActiveRML.Cct == null) + { + Cct cct = new Cct(); + ActiveRML.Cct = cct; + } + + ActiveRML.Cct.FileName = Path.GetFileName(file); + ActiveRML.Cct.Data = File.ReadAllBytes(file); + } + } + + private void ExportForwardData() + { + String file = GetCCTFileSave(ActiveRML.Cct.FileName); + if (file != null) + { + File.WriteAllBytes(file, ActiveRML.Cct.Data); + } + } + + private String GetCCTFileOpen() + { + OpenFileDialog dlg = new OpenFileDialog(); + dlg.Title = "Select color adjustment file"; + dlg.Filter = "Color Conversion Table|*.cct"; + if (dlg.ShowDialogCenter()) + { + return dlg.FileName; + } + + return null; + } + + private String GetCCTFileSave(String fileName) + { + SaveFileDialog dlg = new SaveFileDialog(); + dlg.Title = "Select color adjustment file"; + dlg.Filter = "Color Conversion Table|*.cct"; + dlg.FileName = fileName; + dlg.DefaultExt = ".cct"; + if (dlg.ShowDialogCenter()) + { + return dlg.FileName; + } + + return null; + } + + #endregion } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/AddLiquidFactorView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/AddLiquidFactorView.xaml index 6d9b68edb..426a56f51 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/AddLiquidFactorView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/AddLiquidFactorView.xaml @@ -27,7 +27,7 @@ <Grid> <StackPanel VerticalAlignment="Top" Margin="0 30 0 0"> <StackPanel Orientation="Horizontal"> - <materialDesign:PackIcon Kind="Plus" VerticalAlignment="Top" Width="50" Height="50" Foreground="#08B008" /> + <materialDesign:PackIcon Kind="Plus" VerticalAlignment="Top" Width="50" Height="50" Foreground="{StaticResource GreenBrush100}" /> <TextBlock Padding="0 10 0 0" TextWrapping="Wrap" Margin="10 0 0 0" VerticalAlignment="Top" FontSize="14" Text="ADD LIQUID FACTOR" Width="400"></TextBlock> </StackPanel> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml index 8f2c5d187..1a13358c1 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml @@ -137,6 +137,43 @@ <DropShadowEffect Opacity="0.4" /> </Border.Effect> <Grid> + <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">COLOR CONVERSION TABLE (CCT)</TextBlock> + </Grid> + </Border> + <Grid DockPanel.Dock="Top" Margin="20 10"> + <StackPanel HorizontalAlignment="Left" Margin="20 0 0 0"> + <Grid> + <StackPanel Orientation="Horizontal" Margin="0 5 0 0"> + <materialDesign:PackIcon Kind="ArrowLeftBoldHexagonOutline" VerticalAlignment="Center" Width="40" Height="40" /> + <Image Source="../Images/data-table.png" Height="80" Opacity="0.8"></Image> + <StackPanel VerticalAlignment="Center" Width="300" Margin="10 0 0 0"> + + <TextBox IsReadOnly="False" Margin="0 5 0 0" Text="{Binding ActiveRML.Cct.FileName}" HorizontalContentAlignment="Center"></TextBox> + <UniformGrid Columns="2" Margin="0 5 0 0" HorizontalAlignment="Right"> + <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Command="{Binding ImportForwardDataCommand}"> + <StackPanel Orientation="Horizontal" Margin="0 0 20 0"> + <materialDesign:PackIcon Kind="Upload" VerticalAlignment="Center" /> + <TextBlock Margin="5 0 0 0">IMPORT</TextBlock> + </StackPanel> + </Button> + <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Command="{Binding ExportForwardDataCommand}"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="Download" VerticalAlignment="Center" /> + <TextBlock Margin="5 0 0 0">EXPORT</TextBlock> + </StackPanel> + </Button> + </UniformGrid> + </StackPanel> + </StackPanel> + </Grid> + </StackPanel> + </Grid> + + <Border DockPanel.Dock="Top" Background="#E9FFFFFF" Margin="20 0" Padding="5" CornerRadius="5"> + <Border.Effect> + <DropShadowEffect Opacity="0.4" /> + </Border.Effect> + <Grid> <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">ACTIVE PROCESS GROUP</TextBlock> <Button ToolTip="Add new table" Style="{StaticResource MaterialDesignFlatButton}" Height="Auto" Width="30" HorizontalAlignment="Right" Padding="0" Command="{Binding AddProcessParametersTableCommand}"> <materialDesign:PackIcon Kind="Plus" Foreground="#0AC30A" Width="24" Height="24" /> @@ -159,7 +196,7 @@ </Button> <Grid Style="{StaticResource draggableDroppableGrid}" dragAndDrop:DragAndDropService.Drop="OnProcessTableDropped"> - <Border Padding="5" BorderThickness="1" Margin="20 5 0 5" BorderBrush="#101010" Background="#B9FFFFFF"> + <Border Padding="5" BorderThickness="1" Margin="20 5 0 5" BorderBrush="{StaticResource DarkGrayBrush}" Background="#B9FFFFFF"> <Grid> <DockPanel Width="300"> <TextBox materialDesign:HintAssist.Hint="Table Name" DockPanel.Dock="Top" Text="{Binding Name}"></TextBox> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml index 06a28c1e4..64fbc357d 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml @@ -25,13 +25,13 @@ </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 RemoveRmlCommand}"> + <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}" Command="{Binding RemoveRmlCommand}"> <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 AddRmlCommand}"> + <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource GreenBrush300}" BorderBrush="{StaticResource GreenBrush300}" Command="{Binding AddRmlCommand}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Plus" Width="20" Height="20" /> <TextBlock Margin="5 0 0 0" FontSize="16">NEW RML</TextBlock> @@ -48,7 +48,7 @@ </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 Rmls}" SelectedItem="{Binding SelectedRML}"> + <DataGrid Margin="0 0 0 10" BorderBrush="Silver" IsReadOnly="True" BorderThickness="1" Background="{StaticResource TransparentBackgroundBrush}" AlternatingRowBackground="{StaticResource Transparent200}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding Rmls}" SelectedItem="{Binding SelectedRML}"> <DataGrid.CellStyle> <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> <Setter Property="BorderThickness" Value="0"/> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Views/MainView.xaml index 840e18523..fd34c0c6f 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Views/MainView.xaml @@ -22,72 +22,72 @@ <Grid> <DockPanel> - <Border Background="#ECECEC" Margin="20" Width="350" CornerRadius="5" IsEnabled="{Binding IsFree}"> + <Border Background="{StaticResource WhiteBrush100}" Margin="20" Width="350" CornerRadius="5" IsEnabled="{Binding IsFree}"> <Border.Effect> <DropShadowEffect ShadowDepth="0" BlurRadius="10" Color="Gray" /> </Border.Effect> <DockPanel> <TextBlock HorizontalAlignment="Left" DockPanel.Dock="Top" Margin="30 55 20 20" FontSize="30" FontStyle="Italic" Foreground="{StaticResource AccentColorBrush}" FontWeight="Bold">ACTIONS</TextBlock> <StackPanel Margin="0 40 0 0"> - <Button Command="{Binding CreateFolderCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="#363636" HorizontalContentAlignment="Left"> + <Button Command="{Binding CreateFolderCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="{StaticResource GrayBrush310}" HorizontalContentAlignment="Left"> <DockPanel> - <materialDesign:PackIcon Kind="FolderPlus" Foreground="#E79F20" Width="32" Height="32" /> + <materialDesign:PackIcon Kind="FolderPlus" Foreground="{StaticResource OrangeBrush250}" Width="32" Height="32" /> <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" FontSize="18">CREATE FOLDER</TextBlock> </DockPanel> </Button> - <Button Command="{Binding DeleteFolderCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="#363636" HorizontalContentAlignment="Left"> + <Button Command="{Binding DeleteFolderCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="{StaticResource GrayBrush310}" HorizontalContentAlignment="Left"> <DockPanel> - <materialDesign:PackIcon Kind="FolderRemove" Foreground="#E14141" Width="32" Height="32" /> + <materialDesign:PackIcon Kind="FolderRemove" Foreground="{StaticResource RedBrush500}" Width="32" Height="32" /> <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" FontSize="18">DELETE FOLDER</TextBlock> </DockPanel> </Button> <Separator/> - <Button Command="{Binding UploadFileCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="#363636" HorizontalContentAlignment="Left"> + <Button Command="{Binding UploadFileCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="{StaticResource GrayBrush310}" HorizontalContentAlignment="Left"> <DockPanel> - <materialDesign:PackIcon Kind="Upload" Foreground="#E97E28" Width="32" Height="32" /> + <materialDesign:PackIcon Kind="Upload" Foreground="{StaticResource OrangeBrush250}" Width="32" Height="32" /> <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" FontSize="18">UPLOAD FILE</TextBlock> </DockPanel> </Button> - <Button Command="{Binding DownloadFileCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="#363636" HorizontalContentAlignment="Left"> + <Button Command="{Binding DownloadFileCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="{StaticResource GrayBrush310}" HorizontalContentAlignment="Left"> <DockPanel> - <materialDesign:PackIcon Kind="Download" Foreground="#2DD42D" Width="32" Height="32" /> + <materialDesign:PackIcon Kind="Download" Foreground="{StaticResource GreenDownloadFileBrush}" Width="32" Height="32" /> <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" FontSize="18">DOWNLOAD FILE</TextBlock> </DockPanel> </Button> <Separator/> - <Button Command="{Binding DeleteFileCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="#363636" HorizontalContentAlignment="Left"> + <Button Command="{Binding DeleteFileCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="{StaticResource GrayBrush310}" HorizontalContentAlignment="Left"> <DockPanel> - <materialDesign:PackIcon Kind="Delete" Foreground="#E14141" Width="32" Height="32" /> + <materialDesign:PackIcon Kind="Delete" Foreground="{StaticResource RedBrush500}" Width="32" Height="32" /> <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" FontSize="18">DELETE FILE</TextBlock> </DockPanel> </Button> <Separator/> - <Button Command="{Binding UploadVersionCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="#363636" HorizontalContentAlignment="Left"> + <Button Command="{Binding UploadVersionCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="{StaticResource GrayBrush310}" HorizontalContentAlignment="Left"> <DockPanel> - <materialDesign:PackIcon Kind="BriefcaseUpload" Foreground="#833CEC" Width="32" Height="32" /> + <materialDesign:PackIcon Kind="BriefcaseUpload" Foreground="{StaticResource LilacBrush}" Width="32" Height="32" /> <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" FontSize="18">UPGRADE VERSION</TextBlock> </DockPanel> </Button> - <Button Command="{Binding ValidateVersionCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="#363636" HorizontalContentAlignment="Left"> + <Button Command="{Binding ValidateVersionCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="{StaticResource GrayBrush310}" HorizontalContentAlignment="Left"> <DockPanel> - <materialDesign:PackIcon Kind="CheckAll" Foreground="#682EBE" Width="32" Height="32" /> + <materialDesign:PackIcon Kind="CheckAll" Foreground="{StaticResource LilacBrush100}" Width="32" Height="32" /> <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" FontSize="18">VALIDATE VERSION</TextBlock> </DockPanel> </Button> - <Button Command="{Binding ActivateVersionCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="#363636" HorizontalContentAlignment="Left"> + <Button Command="{Binding ActivateVersionCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="{StaticResource GrayBrush310}" HorizontalContentAlignment="Left"> <DockPanel> - <materialDesign:PackIcon Kind="Flash" Foreground="#532990" Width="32" Height="32" /> + <materialDesign:PackIcon Kind="Flash" Foreground="{StaticResource LilacBrush200}" Width="32" Height="32" /> <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" FontSize="18">ACTIVATE VERSION</TextBlock> </DockPanel> </Button> - <Button Command="{Binding GenerateTfpCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="#363636" HorizontalContentAlignment="Left"> + <Button Command="{Binding GenerateTfpCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="{StaticResource GrayBrush310}" HorizontalContentAlignment="Left"> <DockPanel> - <materialDesign:PackIcon Kind="Chip" Foreground="#532990" Width="32" Height="32" /> + <materialDesign:PackIcon Kind="Chip" Foreground="{StaticResource LilacBrush200}" Width="32" Height="32" /> <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" FontSize="18">GENERATE TFP FILE</TextBlock> </DockPanel> </Button> <Separator/> - <Button Command="{Binding RefreshCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="#363636" HorizontalContentAlignment="Left"> + <Button Command="{Binding RefreshCommand}" Margin="0 5 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="20 10" Height="Auto" Foreground="{StaticResource GrayBrush310}" HorizontalContentAlignment="Left"> <DockPanel> <materialDesign:PackIcon Kind="Refresh" Foreground="{StaticResource AccentColorBrush}" Width="32" Height="32" /> <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" FontSize="18">REFRESH</TextBlock> @@ -99,7 +99,7 @@ <Grid> <DockPanel> - <Border DockPanel.Dock="Top" Background="#ECECEC" Margin="20" Height="150" CornerRadius="5" Padding="20 0"> + <Border DockPanel.Dock="Top" Background="{StaticResource WhiteBrush100}" Margin="20" Height="150" CornerRadius="5" Padding="20 0"> <Border.Effect> <DropShadowEffect ShadowDepth="0" BlurRadius="10" Color="Gray" /> </Border.Effect> @@ -156,7 +156,7 @@ <RowDefinition Height="5" /> <RowDefinition Height="40*" MinHeight="150" /> </Grid.RowDefinitions> - <Border Background="#8BFFFFFF" CornerRadius="5" Padding="20"> + <Border Background="{StaticResource TransparentBackgroundBrush500}" CornerRadius="5" Padding="20"> <DataGrid x:Name="gridStorageItems" IsEnabled="{Binding IsFree}" MouseDoubleClick="DataGrid_MouseDoubleClick" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserResizeRows="False" CanUserSortColumns="True" IsReadOnly="True" Background="Transparent" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{Binding StorageManager.CurrentFolder.Items}" SelectedItem="{Binding SelectedStorageItem}"> <DataGrid.CellStyle> <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> @@ -207,7 +207,7 @@ <GridSplitter Grid.Row="1" Height="5" VerticalAlignment="Center" HorizontalAlignment="Stretch" Background="Gray" Margin="5 0" /> - <Border Background="#8BFFFFFF" CornerRadius="5" Padding="20" Grid.Row="3"> + <Border Background="{StaticResource TransparentBackgroundBrush500}" CornerRadius="5" Padding="20" Grid.Row="3"> <DockPanel> <TextBlock DockPanel.Dock="Top" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" FontStyle="Italic" Foreground="{StaticResource AccentColorBrush}" FontWeight="Bold">FILE TRANSFERS</TextBlock> <DataGrid AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserResizeRows="False" CanUserSortColumns="False" IsReadOnly="True" Background="Transparent" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{Binding FileHandlers}"> @@ -226,11 +226,11 @@ <materialDesign:PackIcon.Style> <Style TargetType="materialDesign:PackIcon"> <Setter Property="Kind" Value="Download"></Setter> - <Setter Property="Foreground" Value="#20BB20"></Setter> + <Setter Property="Foreground" Value="{StaticResource GreenBrush450}"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding Type}" Value="Upload"> <Setter Property="Kind" Value="Upload"></Setter> - <Setter Property="Foreground" Value="#E76311"></Setter> + <Setter Property="Foreground" Value="{StaticResource OrangeUploadBrush}"></Setter> </DataTrigger> </Style.Triggers> </Style> @@ -252,13 +252,13 @@ <ProgressBar Height="15" Margin="0 0 30 0" VerticalAlignment="Center" Maximum="{Binding Handler.Total,Mode=OneWay}" Value="{Binding Handler.Current,Mode=OneWay}"> <ProgressBar.Style> <Style TargetType="ProgressBar"> - <Setter Property="Foreground" Value="#2FD42F"></Setter> + <Setter Property="Foreground" Value="{StaticResource GreenUploadBrush}"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding Handler.Status}" Value="Canceled"> - <Setter Property="Foreground" Value="#EF832B"></Setter> + <Setter Property="Foreground" Value="{StaticResource OrangeCanceledBrush}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding Handler.Status}" Value="Failed"> - <Setter Property="Foreground" Value="#E11A1A"></Setter> + <Setter Property="Foreground" Value="{StaticResource RedBrush500}"></Setter> </DataTrigger> </Style.Triggers> </Style> @@ -290,7 +290,7 @@ <Setter Property="ContentTemplate"> <Setter.Value> <DataTemplate> - <Button Command="{Binding Source={x:Reference control},Path=DataContext.CancelFileHandlerCommand}" CommandParameter="{Binding}" Margin="5" Background="#FF6A6A" BorderBrush="#FF6A6A">CANCEL</Button> + <Button Command="{Binding Source={x:Reference control},Path=DataContext.CancelFileHandlerCommand}" CommandParameter="{Binding}" Margin="5" Background="{StaticResource RedBrush100}" BorderBrush="{StaticResource RedBrush100}">CANCEL</Button> </DataTemplate> </Setter.Value> </Setter> @@ -303,7 +303,7 @@ <Setter Property="ContentTemplate"> <Setter.Value> <DataTemplate> - <Button Command="{Binding Source={x:Reference control},Path=DataContext.OpenFileHandlerCommand}" CommandParameter="{Binding}" Margin="5" Background="#2CC62C" BorderBrush="#2CC62C">OPEN</Button> + <Button Command="{Binding Source={x:Reference control},Path=DataContext.OpenFileHandlerCommand}" CommandParameter="{Binding}" Margin="5" Background="{StaticResource GreenOpenFileBrush}" BorderBrush="{StaticResource GreenOpenFileBrush}">OPEN</Button> </DataTemplate> </Setter.Value> </Setter> @@ -318,7 +318,7 @@ <DataGridTemplateColumn Width="60"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> - <Button Foreground="#FF5A5A" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Width="24" Height="24" Command="{Binding Source={x:Reference control},Path=DataContext.RemoveFileHandlerCommand}" CommandParameter="{Binding}" Margin="5"> + <Button Foreground="{StaticResource RedBrush100}" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Width="24" Height="24" Command="{Binding Source={x:Reference control},Path=DataContext.RemoveFileHandlerCommand}" CommandParameter="{Binding}" Margin="5"> <materialDesign:PackIcon Kind="Close" Width="24" Height="24" /> </Button> </DataTemplate> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml index bac93bff3..e6a18ddde 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml @@ -9,7 +9,7 @@ xmlns:local="clr-namespace:Tango.MachineStudio.Stubs.Views" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="#202020" Foreground="Gainsboro" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource DarkGrayBrush}" Foreground="Gainsboro" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> <UserControl.Resources> <ResourceDictionary> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/BlowerElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/BlowerElementEditor.xaml index 228424e80..524dd79c5 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/BlowerElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/BlowerElementEditor.xaml @@ -56,7 +56,7 @@ </i:Interaction.Triggers> </visuals:AnalogSwitch> - <Border Background="#202020" Margin="8" CornerRadius="3" Padding="5" Grid.Column="1"> + <Border Background="{StaticResource DarkGrayBrush}" Margin="8" CornerRadius="3" Padding="5" Grid.Column="1"> <Grid> <mahapps:NumericUpDown Style="{x:Null}" InterceptMouseWheel="True" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Right" HideUpDownButtons="True" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" HasDecimals="True" Minimum="0" Maximum="10000" Padding="0" Value="{Binding HardwareBlower.Voltage,FallbackValue='0.0',Mode=TwoWay}" VerticalAlignment="Center" FontSize="44" FontFamily="{StaticResource digital-7}" Foreground="#FFD400" Margin="0 0 16 0"> <mahapps:NumericUpDown.Resources> @@ -72,7 +72,7 @@ <Button Style="{x:Null}" Grid.Column="2" Margin="8" Cursor="Hand" Command="{Binding SetCommand}"> <Button.Template> <ControlTemplate TargetType="Button"> - <Grid Background="#404040"> + <Grid Background="{StaticResource GrayBrush280}"> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Gainsboro" FontSize="16" FontWeight="SemiBold">SET</TextBlock> </Grid> <ControlTemplate.Triggers> 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 index 2686d57d9..27530ab10 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ControllerElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ControllerElementEditor.xaml @@ -86,7 +86,7 @@ <RowDefinition Height="70*"/> <RowDefinition Height="90*"/> </Grid.RowDefinitions> - <Border Background="#202020" Margin="0 3 0 0" CornerRadius="3" Padding="5"> + <Border Background="{StaticResource DarkGrayBrush}" Margin="0 3 0 0" CornerRadius="3" Padding="5"> <Grid> <TextBlock Text="{Binding EffectiveValue,StringFormat=0.0,FallbackValue='0.0'}" Foreground="#FF6F78" HorizontalAlignment="Right" VerticalAlignment="Center" FontSize="44" FontFamily="{StaticResource digital-7}" Margin="0 0 12 0"> @@ -95,7 +95,7 @@ </Grid> </Border> - <Border Background="#202020" Grid.Row="1" Margin="0 10 0 0" CornerRadius="3" Padding="5"> + <Border Background="{StaticResource DarkGrayBrush}" Grid.Row="1" Margin="0 10 0 0" CornerRadius="3" Padding="5"> <Grid> <mahapps:NumericUpDown Style="{x:Null}" InterceptMouseWheel="True" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Right" HideUpDownButtons="True" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" StringFormat="0.0" HasDecimals="True" Minimum="{Binding ElementName=fader,Path=Minimum}" Maximum="{Binding ElementName=fader,Path=Maximum}" Padding="0" Value="{Binding Value,Mode=TwoWay,StringFormat=0.0,FallbackValue=0.0}" VerticalAlignment="Center" FontSize="44" FontFamily="{StaticResource digital-7}" Foreground="#FFD400" Margin="0 0 12 0"> <mahapps:NumericUpDown.Resources> @@ -111,7 +111,7 @@ <Button Style="{x:Null}" Grid.Row="2" VerticalAlignment="Bottom" Height="60" Cursor="Hand" Command="{Binding SetCommand}"> <Button.Template> <ControlTemplate TargetType="Button"> - <Grid Background="#404040"> + <Grid Background="{StaticResource GrayBrush280}"> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Gainsboro" FontSize="16" FontWeight="SemiBold">SET</TextBlock> </Grid> <ControlTemplate.Triggers> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DispenserElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DispenserElementEditor.xaml index 96f966d20..90e18d43e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DispenserElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DispenserElementEditor.xaml @@ -23,7 +23,7 @@ <Grid x:Key="gridHoming"> <DockPanel> <Button Click="OnHomingStopped" DockPanel.Dock="Right" Padding="0" Style="{StaticResource MaterialDesignFlatButton}" VerticalAlignment="Center" Margin="0 0 5 0" ToolTip="Stop Homing"> - <materialDesign:PackIcon Kind="Stop" Foreground="#FF5F5F" HorizontalAlignment="Center" VerticalAlignment="Center" Width="32" Height="32" /> + <materialDesign:PackIcon Kind="Stop" Foreground="{StaticResource RedBrush100}" HorizontalAlignment="Center" VerticalAlignment="Center" Width="32" Height="32" /> </Button> <ProgressBar Foreground="DimGray" BorderBrush="DimGray" Maximum="{Binding HomingMaximumProgress}" Value="{Binding HomingProgress}" VerticalAlignment="Center" Height="10" Margin="5 0 5 0" Background="Transparent"></ProgressBar> </DockPanel> @@ -102,7 +102,7 @@ </Grid.ColumnDefinitions> <Image Source="../Images/dispenser-line.png" Grid.ColumnSpan="2" Stretch="Fill"></Image> - <Path RenderTransformOrigin="0.5,0.5" Margin="10 80 40 10" HorizontalAlignment="Left" VerticalAlignment="Bottom" StrokeThickness="1" Stroke="#202020" Stretch="Uniform" Data="M728.4 312.2l-198.1-63.4c-0.5-5.9-1.6-11.6-3.4-17c8.4-2.8 17-5.9 25.7-9.2c78.8-29.7 124.3-63 135-98.8 c7.2-23.8-0.5-47.5-22.6-70.3c-17.5-18-56.2-44.9-57.8-46c-6.2-4.3-14.7-2.8-19.1 3.3L465.5 180.8c-3.2-0.4-6.4-0.6-9.6-0.6 c-2.2 0-4.5 0.1-6.7 0.3c-0.5-62.6-8.3-142.4-41.1-178.6c-12.7-14.1-28.3-21.2-46.1-21.2c0 0 0 0 0 0c-12.3 0-25.6 3.5-39.7 10.4 c-17.4 8.6-43.8 27.5-55.6 36.2c-3.5 2.6-5.7 4.2-6.1 4.5c-3.7 2.8-5.6 7.2-5.4 11.6c0.1 2.6 1 5.3 2.7 7.5l128.9 175.8 c-1.4 3.5-2.6 7.1-3.4 10.8c-42.1-13.7-94.9-27.4-138.4-27.4c-34.2 0-59.1 8.6-73.8 25.7c-13 15-17.7 35.8-14 61.7 c3.6 24.8 19.1 69.3 19.7 71.2c2 5.7 7.3 9.3 13 9.3c1.4 0 2.9-0.2 4.3-0.7L404 308.3c2.3 2.3 4.8 4.4 7.4 6.3 c-7.3 10-14.8 20.7-22.3 32c-46.3 70.4-63.5 124-51.1 159.3c8.2 23.5 28.3 38.2 59.6 43.6c16.2 2.8 41.8 3.4 60.4 3.4 c8.1 0 13.5-0.1 13.5-0.1c7.5-0.2 13.5-6.3 13.5-13.9L484 323.8c4.1-1.7 8.1-3.7 11.8-6.1c6.1 8.3 12.6 16.9 19.5 25.6 c52.2 65.4 97.5 98.6 134.8 98.6c17.6 0 42.4-7.5 61.3-43.3c11.7-22.2 25.4-67.3 25.9-69.2C739.5 322.2 735.5 314.5 728.4 312.2z M455.9 293c-21.1 0-38.3-17.1-38.3-38.3s17.1-38.3 38.3-38.3c21.1 0 38.3 17.1 38.3 38.3C494.2 275.9 477 293 455.9 293z"> + <Path RenderTransformOrigin="0.5,0.5" Margin="10 80 40 10" HorizontalAlignment="Left" VerticalAlignment="Bottom" StrokeThickness="1" Stroke="{StaticResource DarkGrayBrush}" Stretch="Uniform" Data="M728.4 312.2l-198.1-63.4c-0.5-5.9-1.6-11.6-3.4-17c8.4-2.8 17-5.9 25.7-9.2c78.8-29.7 124.3-63 135-98.8 c7.2-23.8-0.5-47.5-22.6-70.3c-17.5-18-56.2-44.9-57.8-46c-6.2-4.3-14.7-2.8-19.1 3.3L465.5 180.8c-3.2-0.4-6.4-0.6-9.6-0.6 c-2.2 0-4.5 0.1-6.7 0.3c-0.5-62.6-8.3-142.4-41.1-178.6c-12.7-14.1-28.3-21.2-46.1-21.2c0 0 0 0 0 0c-12.3 0-25.6 3.5-39.7 10.4 c-17.4 8.6-43.8 27.5-55.6 36.2c-3.5 2.6-5.7 4.2-6.1 4.5c-3.7 2.8-5.6 7.2-5.4 11.6c0.1 2.6 1 5.3 2.7 7.5l128.9 175.8 c-1.4 3.5-2.6 7.1-3.4 10.8c-42.1-13.7-94.9-27.4-138.4-27.4c-34.2 0-59.1 8.6-73.8 25.7c-13 15-17.7 35.8-14 61.7 c3.6 24.8 19.1 69.3 19.7 71.2c2 5.7 7.3 9.3 13 9.3c1.4 0 2.9-0.2 4.3-0.7L404 308.3c2.3 2.3 4.8 4.4 7.4 6.3 c-7.3 10-14.8 20.7-22.3 32c-46.3 70.4-63.5 124-51.1 159.3c8.2 23.5 28.3 38.2 59.6 43.6c16.2 2.8 41.8 3.4 60.4 3.4 c8.1 0 13.5-0.1 13.5-0.1c7.5-0.2 13.5-6.3 13.5-13.9L484 323.8c4.1-1.7 8.1-3.7 11.8-6.1c6.1 8.3 12.6 16.9 19.5 25.6 c52.2 65.4 97.5 98.6 134.8 98.6c17.6 0 42.4-7.5 61.3-43.3c11.7-22.2 25.4-67.3 25.9-69.2C739.5 322.2 735.5 314.5 728.4 312.2z M455.9 293c-21.1 0-38.3-17.1-38.3-38.3s17.1-38.3 38.3-38.3c21.1 0 38.3 17.1 38.3 38.3C494.2 275.9 477 293 455.9 293z"> <Path.Fill> <LinearGradientBrush> <GradientStop Color="Black"/> @@ -170,10 +170,10 @@ </Grid> <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 -65 0"> - <Border Background="#202020" CornerRadius="3" Padding="3"> - <mahapps:NumericUpDown BorderThickness="0" Background="Transparent" HideUpDownButtons="True" HasDecimals="False" Minimum="0" Maximum="10000" StringFormat="0" Value="{Binding Speed,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged,StringFormat=0,FallbackValue=5000}" HorizontalAlignment="Center" HorizontalContentAlignment="Center" FontSize="22" VerticalAlignment="Center" Foreground="#FF8585" FontFamily="{StaticResource digital-7}"></mahapps:NumericUpDown> + <Border Background="{StaticResource DarkGrayBrush}" CornerRadius="3" Padding="3"> + <mahapps:NumericUpDown BorderThickness="0" Background="Transparent" HideUpDownButtons="True" HasDecimals="False" Minimum="0" Maximum="10000" StringFormat="0" Value="{Binding Speed,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged,StringFormat=0,FallbackValue=5000}" HorizontalAlignment="Center" HorizontalContentAlignment="Center" FontSize="22" VerticalAlignment="Center" Foreground="{StaticResource RedBrush400}" FontFamily="{StaticResource digital-7}"></mahapps:NumericUpDown> </Border> - <visuals:Knob Width="50" Height="50" TicksHighlightBrush="#FF8585" KnobType="MetroDark" TicksWidth="2" Margin="0 5 0 0" TicksHeight="5" Minimum="0" Maximum="5000" Value="{Binding Speed,Mode=TwoWay}" /> + <visuals:Knob Width="50" Height="50" TicksHighlightBrush="{StaticResource RedBrush400}" KnobType="MetroDark" TicksWidth="2" Margin="0 5 0 0" TicksHeight="5" Minimum="0" Maximum="5000" Value="{Binding Speed,Mode=TwoWay}" /> </StackPanel> <!--Content--> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml index 4b7e2ea2c..190b4d3c8 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml @@ -48,7 +48,7 @@ </Grid> <Grid Grid.Row="1"> - <Border Background="#202020" Margin="0 3 0 0" CornerRadius="3" Padding="5"> + <Border Background="{StaticResource DarkGrayBrush}" Margin="0 3 0 0" CornerRadius="3" Padding="5"> <Grid> <TextBlock Text="{Binding HeaterState.CurrentValue,StringFormat=0.00,FallbackValue='0.00'}" HorizontalAlignment="Right" VerticalAlignment="Center" FontSize="80" FontFamily="{StaticResource digital-7}" Margin="0 0 12 0"> <TextBlock.Style> @@ -75,7 +75,7 @@ <Image Source="../Images/temperature.png" Margin="0 10 20 10" RenderOptions.BitmapScalingMode="Fant"></Image> - <Border Background="#202020" Margin="0 3 0 0" CornerRadius="3" Padding="5" Grid.Column="1"> + <Border Background="{StaticResource DarkGrayBrush}" Margin="0 3 0 0" CornerRadius="3" Padding="5" Grid.Column="1"> <Grid> <mahapps:NumericUpDown x:Name="txtSetPoint" InterceptMouseWheel="True" IsHitTestVisible="{Binding IsEditing}" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Right" HideUpDownButtons="True" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" HasDecimals="True" Minimum="0" Maximum="400" Padding="0" Value="{Binding SetPoint,FallbackValue='0.0',Mode=TwoWay}" VerticalAlignment="Center" FontSize="44" FontFamily="{StaticResource digital-7}" Foreground="#FFD400" Margin="0 0 12 0"> <mahapps:NumericUpDown.Resources> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/JobRunnerElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/JobRunnerElementEditor.xaml index 76a6a16a7..5165e9819 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/JobRunnerElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/JobRunnerElementEditor.xaml @@ -43,9 +43,9 @@ <!--Content--> <Grid> - <Border Padding="10" BorderThickness="1" BorderBrush="#202020" Background="#88FFFFFF" CornerRadius="5"> + <Border Padding="10" BorderThickness="1" BorderBrush="{StaticResource DarkGrayBrush}" Background="#88FFFFFF" CornerRadius="5"> <DockPanel> - <TextBox Foreground="#202020" FontSize="14" DockPanel.Dock="Top" Text="{Binding Job.Name}"></TextBox> + <TextBox Foreground="{StaticResource DarkGrayBrush}" FontSize="14" DockPanel.Dock="Top" Text="{Binding Job.Name}"></TextBox> <ItemsControl Margin="0 10 0 0" DockPanel.Dock="Top" ItemsSource="{Binding BrushStop.LiquidVolumes}" VerticalAlignment="Center"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> @@ -74,7 +74,7 @@ <ProgressBar Margin="0 0 10 0" VerticalAlignment="Bottom" Height="10" Minimum="0" Maximum="{Binding RunningJobStatus.TotalProgress}" Value="{Binding RunningJobStatus.Progress}"></ProgressBar> - <TextBlock HorizontalAlignment="Right" VerticalAlignment="Top" Foreground="#202020" FontSize="14" Margin="0 0 10 0"> + <TextBlock HorizontalAlignment="Right" VerticalAlignment="Top" Foreground="{StaticResource DarkGrayBrush}" FontSize="14" Margin="0 0 10 0"> <Run Text="{Binding RunningJobStatus.Progress,StringFormat=0.0}"></Run><Run Foreground="DodgerBlue" FontWeight="Bold">/</Run><Run Text="{Binding RunningJobStatus.TotalProgress,StringFormat=0.0}"></Run> <Run Foreground="Gray">m</Run> <Run></Run> @@ -135,7 +135,7 @@ <ComboBox ItemsSource="{Binding Source={StaticResource dispenserDivisions}}" SelectedItem="{Binding DispenserStepDivision,UpdateSourceTrigger=PropertyChanged}"> <ComboBox.ItemContainerStyle> <Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}"> - <Setter Property="Background" Value="#ECECEC"></Setter> + <Setter Property="Background" Value="{StaticResource WhiteBrush100}"></Setter> </Style> </ComboBox.ItemContainerStyle> <ComboBox.ItemTemplate> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorRecorderElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorRecorderElementEditor.xaml index 65f25f131..645f98331 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorRecorderElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorRecorderElementEditor.xaml @@ -38,7 +38,7 @@ <RowDefinition Height="27"/> </Grid.RowDefinitions> - <TextBlock Text="CSV RECORDER" Foreground="#FF8585" FontFamily="{StaticResource digital-7}" FontSize="18" VerticalAlignment="Center" Margin="0,6,0,3" Height="18"></TextBlock> + <TextBlock Text="CSV RECORDER" Foreground="{StaticResource RedBrush400}" FontFamily="{StaticResource digital-7}" FontSize="18" VerticalAlignment="Center" Margin="0,6,0,3" Height="18"></TextBlock> <DockPanel Grid.Row="1"> <Grid> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorElementEditor.xaml index ecfea2f28..7c3728d1e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorElementEditor.xaml @@ -24,7 +24,7 @@ <Grid x:Key="gridHoming"> <DockPanel> <Button Click="OnHomingStopped" DockPanel.Dock="Right" Padding="0" Style="{StaticResource MaterialDesignFlatButton}" VerticalAlignment="Center" Margin="0 0 5 0" ToolTip="Stop Homing"> - <materialDesign:PackIcon Kind="Stop" Foreground="#FF5F5F" HorizontalAlignment="Center" VerticalAlignment="Center" Width="32" Height="32" /> + <materialDesign:PackIcon Kind="Stop" Foreground="{StaticResource RedBrush100}" HorizontalAlignment="Center" VerticalAlignment="Center" Width="32" Height="32" /> </Button> <ProgressBar Foreground="DimGray" BorderBrush="DimGray" Maximum="{Binding HomingMaximumProgress}" BorderThickness="1" Value="{Binding HomingProgress}" VerticalAlignment="Center" Height="10" Margin="5 0 5 0" Background="Transparent"> @@ -86,9 +86,9 @@ </Grid.RowDefinitions> <Grid Grid.Column="1"> - <Border BorderThickness="1" BorderBrush="#303030" CornerRadius="10" Background="#252525"> + <Border BorderThickness="1" BorderBrush="{StaticResource GrayBrush300}" CornerRadius="10" Background="#252525"> <Grid Margin="20"> - <Path RenderTransformOrigin="0.5,0.5" StrokeThickness="1" Stroke="#202020" Stretch="Uniform" Margin="10" Data="M500.633 211.454l-58.729-14.443c-3.53-11.133-8.071-21.929-13.55-32.256c8.818-14.678 27.349-45.571 27.349-45.571 c3.545-5.903 2.607-13.462-2.256-18.325l-42.422-42.422c-4.863-4.878-12.407-5.815-18.325-2.256L347.055 83.53 c-10.269-5.435-21.006-9.932-32.065-13.433l-14.443-58.729C298.876 4.688 292.885 0 286 0h-60 c-6.885 0-12.891 4.688-14.546 11.367c0 0-10.005 40.99-14.429 58.715c-11.792 3.735-23.188 8.584-34.043 14.502l-47.329-28.403 c-5.918-3.516-13.447-2.607-18.325 2.256l-42.422 42.422c-4.863 4.863-5.801 12.422-2.256 18.325l29.268 48.882 c-4.717 9.302-8.672 18.984-11.821 28.901l-58.729 14.487C4.688 213.124 0 219.115 0 226v60c0 6.885 4.688 12.891 11.367 14.546 l58.744 14.443c3.56 11.294 8.188 22.266 13.799 32.798l-26.191 43.652c-3.545 5.903-2.607 13.462 2.256 18.325l42.422 42.422 c4.849 4.849 12.407 5.771 18.325 2.256c0 0 29.37-17.607 43.755-26.221c10.415 5.552 21.313 10.137 32.549 13.696l14.429 58.715 C213.109 507.313 219.115 512 226 512h60c6.885 0 12.876-4.688 14.546-11.367l14.429-58.715 c11.558-3.662 22.69-8.394 33.281-14.136c14.78 8.862 44.443 26.66 44.443 26.66c5.903 3.53 13.462 2.622 18.325-2.256 l42.422-42.422c4.863-4.863 5.801-12.422 2.256-18.325l-26.968-44.927c5.317-10.093 9.727-20.654 13.169-31.523l58.729-14.443 C507.313 298.876 512 292.885 512 286v-60C512 219.115 507.313 213.124 500.633 211.454z M256 361c-57.891 0-105-47.109-105-105 s47.109-105 105-105s105 47.109 105 105S313.891 361 256 361z"> + <Path RenderTransformOrigin="0.5,0.5" StrokeThickness="1" Stroke="{StaticResource DarkGrayBrush}" Stretch="Uniform" Margin="10" Data="M500.633 211.454l-58.729-14.443c-3.53-11.133-8.071-21.929-13.55-32.256c8.818-14.678 27.349-45.571 27.349-45.571 c3.545-5.903 2.607-13.462-2.256-18.325l-42.422-42.422c-4.863-4.878-12.407-5.815-18.325-2.256L347.055 83.53 c-10.269-5.435-21.006-9.932-32.065-13.433l-14.443-58.729C298.876 4.688 292.885 0 286 0h-60 c-6.885 0-12.891 4.688-14.546 11.367c0 0-10.005 40.99-14.429 58.715c-11.792 3.735-23.188 8.584-34.043 14.502l-47.329-28.403 c-5.918-3.516-13.447-2.607-18.325 2.256l-42.422 42.422c-4.863 4.863-5.801 12.422-2.256 18.325l29.268 48.882 c-4.717 9.302-8.672 18.984-11.821 28.901l-58.729 14.487C4.688 213.124 0 219.115 0 226v60c0 6.885 4.688 12.891 11.367 14.546 l58.744 14.443c3.56 11.294 8.188 22.266 13.799 32.798l-26.191 43.652c-3.545 5.903-2.607 13.462 2.256 18.325l42.422 42.422 c4.849 4.849 12.407 5.771 18.325 2.256c0 0 29.37-17.607 43.755-26.221c10.415 5.552 21.313 10.137 32.549 13.696l14.429 58.715 C213.109 507.313 219.115 512 226 512h60c6.885 0 12.876-4.688 14.546-11.367l14.429-58.715 c11.558-3.662 22.69-8.394 33.281-14.136c14.78 8.862 44.443 26.66 44.443 26.66c5.903 3.53 13.462 2.622 18.325-2.256 l42.422-42.422c4.863-4.863 5.801-12.422 2.256-18.325l-26.968-44.927c5.317-10.093 9.727-20.654 13.169-31.523l58.729-14.443 C507.313 298.876 512 292.885 512 286v-60C512 219.115 507.313 213.124 500.633 211.454z M256 361c-57.891 0-105-47.109-105-105 s47.109-105 105-105s105 47.109 105 105S313.891 361 256 361z"> <Path.Fill> <LinearGradientBrush> <GradientStop Color="Black"/> @@ -154,10 +154,10 @@ </Viewbox> <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 -65 5"> - <Border Background="#202020" CornerRadius="3" Padding="3"> - <mahapps:NumericUpDown BorderThickness="0" Background="Transparent" HideUpDownButtons="True" HasDecimals="False" Minimum="0" Maximum="10000" StringFormat="0" Value="{Binding Speed,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged,StringFormat=0,FallbackValue=5000}" HorizontalAlignment="Center" HorizontalContentAlignment="Center" FontSize="22" VerticalAlignment="Center" Foreground="#FF8585" FontFamily="{StaticResource digital-7}"></mahapps:NumericUpDown> + <Border Background="{StaticResource DarkGrayBrush}" CornerRadius="3" Padding="3"> + <mahapps:NumericUpDown BorderThickness="0" Background="Transparent" HideUpDownButtons="True" HasDecimals="False" Minimum="0" Maximum="10000" StringFormat="0" Value="{Binding Speed,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged,StringFormat=0,FallbackValue=5000}" HorizontalAlignment="Center" HorizontalContentAlignment="Center" FontSize="22" VerticalAlignment="Center" Foreground="{StaticResource RedBrush400}" FontFamily="{StaticResource digital-7}"></mahapps:NumericUpDown> </Border> - <visuals:Knob Width="50" Height="50" TicksHighlightBrush="#FF8585" KnobType="MetroDark" TicksWidth="2" Margin="0 5 0 0" TicksHeight="5" Minimum="0" Maximum="5000" Value="{Binding Speed,Mode=TwoWay}" /> + <visuals:Knob Width="50" Height="50" TicksHighlightBrush="{StaticResource RedBrush400}" KnobType="MetroDark" TicksWidth="2" Margin="0 5 0 0" TicksHeight="5" Minimum="0" Maximum="5000" Value="{Binding Speed,Mode=TwoWay}" /> </StackPanel> <!--Content--> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorGroupElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorGroupElementEditor.xaml index ac07f1390..a209270e7 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorGroupElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorGroupElementEditor.xaml @@ -24,7 +24,7 @@ <Grid x:Key="gridHoming"> <DockPanel> <Button Click="OnHomingStopped" DockPanel.Dock="Right" Padding="0" Style="{StaticResource MaterialDesignFlatButton}" VerticalAlignment="Center" Margin="0 0 5 0" ToolTip="Stop Homing"> - <materialDesign:PackIcon Kind="Stop" Foreground="#FF5F5F" HorizontalAlignment="Center" VerticalAlignment="Center" Width="32" Height="32" /> + <materialDesign:PackIcon Kind="Stop" Foreground="{StaticResource RedBrush100}" HorizontalAlignment="Center" VerticalAlignment="Center" Width="32" Height="32" /> </Button> <ProgressBar Foreground="DimGray" BorderBrush="DimGray" Maximum="{Binding HomingMaximumProgress}" BorderThickness="1" Value="{Binding HomingProgress}" VerticalAlignment="Center" Height="10" Margin="5 0 5 0" Background="Transparent"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ProcessParametersElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ProcessParametersElementEditor.xaml index f057521e0..3c4373097 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ProcessParametersElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ProcessParametersElementEditor.xaml @@ -38,7 +38,7 @@ <SolidColorBrush Color="{Binding Color}"></SolidColorBrush> </Border.BorderBrush> <DockPanel> - <TextBox DockPanel.Dock="Top" FontSize="12" Foreground="#202020" Text="{Binding ProcessParameters.Name}"></TextBox> + <TextBox DockPanel.Dock="Top" FontSize="12" Foreground="{StaticResource DarkGrayBrush}" Text="{Binding ProcessParameters.Name}"></TextBox> <Button DockPanel.Dock="Bottom" Margin="0 10 0 0" Height="40" Command="{Binding PushParametersCommand}"> <StackPanel Orientation="Horizontal"> <TextBlock Margin="0 0 10 0">PUSH PARAMETERS</TextBlock> @@ -57,7 +57,7 @@ <Grid Margin="0 2" Focusable="False" Background="Transparent" Style="{StaticResource draggableDroppableGrid}" dragAndDrop:DragAndDropService.Drop="OnProcessParametersDropped" dragAndDrop:DragAndDropService.DraggingSurface="{Binding RelativeSource={RelativeSource AncestorType=editors:ParameterizedEditor},Path=DraggingSurface}"> <ContentControl Focusable="False"> <DockPanel Focusable="False"> - <TextBlock Focusable="False" Width="150" FontSize="12" Foreground="#202020" DockPanel.Dock="Left" IsHitTestVisible="False" Margin="0 5 0 5" Text="{Binding Name}"></TextBlock> + <TextBlock Focusable="False" Width="150" FontSize="12" Foreground="{StaticResource DarkGrayBrush}" DockPanel.Dock="Left" IsHitTestVisible="False" Margin="0 5 0 5" Text="{Binding Name}"></TextBlock> <mahapps:NumericUpDown FontSize="14" Minimum="0" Margin="0 0 5 0" HorizontalContentAlignment="Left" HideUpDownButtons="True" Maximum="10000" StringFormat="0.0" InterceptArrowKeys="True" InterceptMouseWheel="True" HasDecimals="True" Value="{Binding Value,Mode=TwoWay}" Background="#6EFFFFFF"></mahapps:NumericUpDown> </DockPanel> </ContentControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ThreadMotionElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ThreadMotionElementEditor.xaml index 3a7c7d53d..ac440ad64 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ThreadMotionElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ThreadMotionElementEditor.xaml @@ -24,7 +24,7 @@ <Grid x:Key="gridDefault"> <Viewbox Stretch="Fill"> - <materialDesign:PackIcon Kind="Home" Margin="25 0" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="#202020" /> + <materialDesign:PackIcon Kind="Home" Margin="25 0" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="{StaticResource DarkGrayBrush}" /> </Viewbox> <Button Click="OnHomingStarted" Style="{StaticResource emptyButton}" Background="Transparent" BorderThickness="0"></Button> @@ -45,7 +45,7 @@ </Grid.ColumnDefinitions> <Grid Grid.Column="0"> - <Border BorderThickness="1" BorderBrush="#303030" CornerRadius="10" Background="#252525"> + <Border BorderThickness="1" BorderBrush="{StaticResource GrayBrush300}" CornerRadius="10" Background="#252525"> <Grid> <Image x:Name="image" Margin="5" RenderTransformOrigin="0.5,0.5" gif:ImageBehavior.AnimatedSource="../Images/thread-motion.gif" RenderOptions.BitmapScalingMode="Fant" gif:ImageBehavior.AutoStart="False" gif:ImageBehavior.AnimateInDesignMode="True" gif:ImageBehavior.RepeatBehavior="Forever"> @@ -68,10 +68,10 @@ </Viewbox> <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 -65 5"> - <Border Background="#202020" CornerRadius="3" Padding="3"> - <mahapps:NumericUpDown BorderThickness="0" Background="Transparent" HideUpDownButtons="True" HasDecimals="False" Minimum="0" Maximum="10000" StringFormat="0" Value="{Binding Speed,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged,StringFormat=0,FallbackValue=5000}" HorizontalAlignment="Center" HorizontalContentAlignment="Center" FontSize="22" VerticalAlignment="Center" Foreground="#FF8585" FontFamily="{StaticResource digital-7}"></mahapps:NumericUpDown> + <Border Background="{StaticResource DarkGrayBrush}" CornerRadius="3" Padding="3"> + <mahapps:NumericUpDown BorderThickness="0" Background="Transparent" HideUpDownButtons="True" HasDecimals="False" Minimum="0" Maximum="10000" StringFormat="0" Value="{Binding Speed,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged,StringFormat=0,FallbackValue=5000}" HorizontalAlignment="Center" HorizontalContentAlignment="Center" FontSize="22" VerticalAlignment="Center" Foreground="{StaticResource RedBrush400}" FontFamily="{StaticResource digital-7}"></mahapps:NumericUpDown> </Border> - <visuals:Knob Width="50" Height="50" TicksHighlightBrush="#FF8585" KnobType="MetroDark" TicksWidth="2" Margin="0 5 0 0" TicksHeight="5" Minimum="0" Maximum="5000" Value="{Binding Speed,Mode=TwoWay}" /> + <visuals:Knob Width="50" Height="50" TicksHighlightBrush="{StaticResource RedBrush400}" KnobType="MetroDark" TicksWidth="2" Margin="0 5 0 0" TicksHeight="5" Minimum="0" Maximum="5000" Value="{Binding Speed,Mode=TwoWay}" /> </StackPanel> <!--Content--> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ValveElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ValveElementEditor.xaml index 2304469e0..59b9fa2af 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ValveElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ValveElementEditor.xaml @@ -46,7 +46,7 @@ <Button Margin="8" Cursor="Hand" Command="{Binding SetCommand}" CommandParameter="{Binding TechValve.State1}"> <Button.Style> <Style TargetType="Button"> - <Setter Property="Background" Value="#404040"></Setter> + <Setter Property="Background" Value="{StaticResource GrayBrush280}"></Setter> <Setter Property="IsEnabled" Value="True"></Setter> </Style> </Button.Style> @@ -80,7 +80,7 @@ </Button.Template> </Button> - <Border Background="#202020" Margin="8" CornerRadius="3" Padding="5" Grid.Column="1"> + <Border Background="{StaticResource DarkGrayBrush}" Margin="8" CornerRadius="3" Padding="5" Grid.Column="1"> <StackPanel> <TextBlock FontFamily="{StaticResource digital-7}" Text="Valve Controller" FontSize="13" Foreground="#E94A4A" HorizontalAlignment="Center"></TextBlock> <Image Source="../Images/valve.png" RenderOptions.BitmapScalingMode="Fant" Margin="10" Stretch="Uniform" Height="36" /> @@ -90,7 +90,7 @@ <Button Margin="8" Cursor="Hand" Grid.Column="2" Command="{Binding SetCommand}" CommandParameter="{Binding TechValve.State2}"> <Button.Style> <Style TargetType="Button"> - <Setter Property="Background" Value="#404040"></Setter> + <Setter Property="Background" Value="{StaticResource GrayBrush280}"></Setter> <Setter Property="IsEnabled" Value="True"></Setter> </Style> </Button.Style> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MultiGraphTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MultiGraphTemplate.xaml index f12306523..7da979a00 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MultiGraphTemplate.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MultiGraphTemplate.xaml @@ -71,7 +71,7 @@ <DockPanel> <Button HorizontalAlignment="Left" ToolTip="Record this graph data. When stopped, the data will be saved to a csv file." Command="{Binding ToggleRecordingCommand}"> <StackPanel Orientation="Horizontal"> - <materialDesign:PackIcon VerticalAlignment="Center" Kind="Record" Foreground="#FF6D6D"> + <materialDesign:PackIcon VerticalAlignment="Center" Kind="Record" Foreground="{StaticResource RedBrush100}"> <materialDesign:PackIcon.Style> <Style TargetType="materialDesign:PackIcon"> <Setter Property="Opacity" Value="1"></Setter> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml index 8179dccc9..3830ecc3e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml @@ -71,7 +71,7 @@ <DockPanel> <Button HorizontalAlignment="Left" ToolTip="Record this graph data. When stopped, the data will be saved to a csv file." Command="{Binding ToggleRecordingCommand}"> <StackPanel Orientation="Horizontal"> - <materialDesign:PackIcon VerticalAlignment="Center" Kind="Record" Foreground="#FF6D6D"> + <materialDesign:PackIcon VerticalAlignment="Center" Kind="Record" Foreground="{StaticResource RedBrush100}"> <materialDesign:PackIcon.Style> <Style TargetType="materialDesign:PackIcon"> <Setter Property="Opacity" Value="1"></Setter> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Resources/GraphEx.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Resources/GraphEx.xaml index 85cccc2dd..e41fa1095 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Resources/GraphEx.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Resources/GraphEx.xaml @@ -14,22 +14,23 @@ <sys:Double x:Key="MiniFontSize">12</sys:Double> <sys:Double x:Key="TinyFontSize">9</sys:Double> - <!--Colors--> - <Color x:Key="borderColor">Silver</Color> + <!-- moved to COMMON --> + <!-- Colors--> + <!--<Color x:Key="borderColor">Silver</Color> <Color x:Key="graphGridLinesColor">#FFE9E9E9</Color> <Color x:Key="graphsMarkerColor">Gray</Color> <Color x:Key="materialColor">#03A9F4</Color> - <!--Brushes--> + --><!--Brushes--><!-- <SolidColorBrush x:Key="borderBrush" Color="{StaticResource borderColor}"></SolidColorBrush> <SolidColorBrush x:Key="graphGridLinesBrush" Color="{StaticResource graphGridLinesColor}"></SolidColorBrush> <SolidColorBrush x:Key="BlackBrush" Color="#545454"></SolidColorBrush> <SolidColorBrush x:Key="graphGridLinesLightBrush" Color="{StaticResource graphGridLinesColor}"></SolidColorBrush> - <SolidColorBrush x:Key="graphGridLinesDarkBrush" Color="#FF2E2E2E"></SolidColorBrush> + <SolidColorBrush x:Key="graphGridLinesDarkBrush" Color="#FF2E2E2E"></SolidColorBrush>--> - <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" x:Key="graphBackgroundLight"> + <!--<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" x:Key="graphBackgroundLight"> <GradientStop Color="White"/> <GradientStop Color="#FFE9E9E9" Offset="1"/> </LinearGradientBrush> @@ -42,9 +43,9 @@ <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" x:Key="graphBackground"> <GradientStop Color="White"/> <GradientStop Color="#FFE9E9E9" Offset="1"/> - </LinearGradientBrush> + </LinearGradientBrush>--> - <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" x:Key="graphLabelBackground" Opacity="0.7"> + <!--<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" x:Key="graphLabelBackground" Opacity="0.7"> <GradientStop Color="White"/> <GradientStop Color="#FFD9D9D9" Offset="1"/> </LinearGradientBrush> @@ -54,7 +55,7 @@ <GradientStop Color="#FFBDBDBD" Offset="1"/> </LinearGradientBrush> - <SolidColorBrush Color="#FFF1F1F1" x:Key="topBarBackgroundBrush"></SolidColorBrush> + <SolidColorBrush Color="{DynamicResource WhiteBrush100}" x:Key="topBarBackgroundBrush"></SolidColorBrush>--> <!--Navigation Link Button--> <Style x:Key="LinkButton" TargetType="Button"> @@ -67,7 +68,7 @@ </ControlTemplate> </Setter.Value> </Setter> - <Setter Property="Foreground" Value="{StaticResource BlackBrush}" /> + <Setter Property="Foreground" Value="{StaticResource BlackForegroundBrush}" /> <Style.Triggers> <Trigger Property="IsEnabled" Value="False"> <Setter Property="Opacity" Value="0.5"></Setter> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/ImportProjectTabView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/ImportProjectTabView.xaml index b0d6b23fb..1cb7876cf 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/ImportProjectTabView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/ImportProjectTabView.xaml @@ -20,7 +20,7 @@ </StackPanel> <StackPanel DockPanel.Dock="Top" VerticalAlignment="Top" Margin="0 30 0 0"> <StackPanel Orientation="Horizontal"> - <materialDesign:PackIcon Kind="Table" VerticalAlignment="Top" Width="50" Height="50" Foreground="#202020" /> + <materialDesign:PackIcon Kind="Table" VerticalAlignment="Top" Width="50" Height="50" Foreground="{StaticResource DarkGrayBrush}" /> <TextBlock Padding="0 10 0 0" TextWrapping="Wrap" Margin="10 0 0 0" VerticalAlignment="Top" FontSize="14" Text="IMPORT PROJECT TABS" Width="400"></TextBlock> </StackPanel> </StackPanel> 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 8820fcd4d..2d180a8a2 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 @@ -53,13 +53,13 @@ EditorWidth="1920" EditorHeight="1080" FontSize="10" - Background="#7EFFFFFF" - EditorBackground="#70FFFFFF" + Background="{StaticResource TransparentBackgroundBrush450}" + EditorBackground="{StaticResource TransparentBackgroundBrush600}" RulerBackground="Transparent" - Foreground="#1EA9FF" - SelectionFillBrush="#338D8D8D" - SelectionStrokeBrush="#1EA9FF" - BorderBrush="#1EA9FF" + Foreground="{StaticResource BlueSelectionStrokBrush}" + SelectionFillBrush="{StaticResource SelectionFillBrush}" + SelectionStrokeBrush="{StaticResource BlueSelectionStrokBrush}" + BorderBrush="{StaticResource BlueSelectionStrokBrush}" BorderThickness="1"> <editors:ElementsEditor.Style> @@ -136,7 +136,7 @@ <RowDefinition Height="1*"/> </Grid.RowDefinitions> - <Menu Padding="5" Background="#C6ECECEC" Visibility="{Binding HideMenu,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> + <Menu Padding="5" Background="{StaticResource WhiteBrush100}" Visibility="{Binding HideMenu,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> <MenuItem Header="File"> <MenuItem Command="{Binding NewProjectCommand}" MinWidth="180" Header="New" VerticalContentAlignment="Center"> <MenuItem.Icon> @@ -265,8 +265,8 @@ <Setter Property="BorderThickness" Value="1"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected}" Value="True"> - <Setter Property="Background" Value="White"></Setter> - <Setter Property="BorderBrush" Value="#FF7575"></Setter> + <Setter Property="Background" Value="{StaticResource WhiteBackgroundBrush}"></Setter> + <Setter Property="BorderBrush" Value="{StaticResource RedBrush300}"></Setter> <Setter Property="BorderThickness" Value="2"></Setter> </DataTrigger> </Style.Triggers> @@ -327,8 +327,8 @@ <Setter Property="BorderThickness" Value="1"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected}" Value="True"> - <Setter Property="Background" Value="White"></Setter> - <Setter Property="BorderBrush" Value="#FF7575"></Setter> + <Setter Property="Background" Value="{StaticResource WhiteBackgroundBrush}"></Setter> + <Setter Property="BorderBrush" Value="{StaticResource RedBrush300}"></Setter> <Setter Property="BorderThickness" Value="2"></Setter> <DataTrigger.EnterActions> <BeginStoryboard> @@ -398,12 +398,12 @@ </Border.ContextMenu> <Border.Style> <Style TargetType="Border"> - <Setter Property="Background" Value="#CBCBCB"></Setter> - <Setter Property="TextElement.Foreground" Value="#202020"></Setter> + <Setter Property="Background" Value="{StaticResource LightGrayBrush150}"></Setter> + <Setter Property="TextElement.Foreground" Value="{StaticResource DarkGrayBrush}"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding IsSelected}" Value="True"> <Setter Property="Background" Value="{StaticResource AccentColorBrush}"></Setter> - <Setter Property="TextElement.Foreground" Value="White"></Setter> + <Setter Property="TextElement.Foreground" Value="{StaticResource WhiteTextBrush}"></Setter> </DataTrigger> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Opacity" Value="0.8"></Setter> @@ -416,10 +416,10 @@ <materialDesign:PackIcon Kind="Close"> <materialDesign:PackIcon.Style> <Style TargetType="materialDesign:PackIcon"> - <Setter Property="Foreground" Value="#202020"></Setter> + <Setter Property="Foreground" Value="{StaticResource DarkGrayBrush}"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding IsSelected}" Value="True"> - <Setter Property="Foreground" Value="White"></Setter> + <Setter Property="Foreground" Value="{StaticResource WhiteTextBrush}"></Setter> </DataTrigger> </Style.Triggers> </Style> 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 index 64b05769a..f8045d7a6 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationManagementView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationManagementView.xaml @@ -28,7 +28,7 @@ <ColumnDefinition Width="1*"/> </Grid.ColumnDefinitions> - <Border Background="#A6FFFFFF" BorderBrush="Gray" BorderThickness="0 0 1 0"> + <Border Background="#A6FFFFFF" BorderBrush="{StaticResource GrayBrush}" BorderThickness="0 0 1 0"> <Grid Margin="10 20 10 10"> <StackPanel HorizontalAlignment="Center"> @@ -84,13 +84,13 @@ </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}"> + <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}" 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}"> + <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource GreenBrush300}" BorderBrush="{StaticResource GreenBrush300}" 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> 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 index 16dd36360..3e71836d3 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationSelectionView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationSelectionView.xaml @@ -23,13 +23,13 @@ </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}"> + <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}" 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}"> + <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource GreenBrush300}" BorderBrush="{StaticResource GreenBrush300}" 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> 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 index ccb38b198..7e38447d8 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/UserManagementView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/UserManagementView.xaml @@ -149,7 +149,7 @@ </Style.Triggers> </Style> </Button.Style> - <materialDesign:PackIcon Kind="Delete" Foreground="#FF5C5C" Width="16" Height="16" /> + <materialDesign:PackIcon Kind="Delete" Foreground="{StaticResource RedBrush100}" Width="16" Height="16" /> </Button> </Grid> </DataTemplate> |
