From 8a0b8f6abe3d143b43131a330e0ee39c2547ce8f Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Sun, 4 Jul 2021 15:25:08 +0300 Subject: After Virus --- .../Views/MachineTestResultsView.xaml | 82 ++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml new file mode 100644 index 000000000..a8aa173df --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml @@ -0,0 +1,82 @@ + + + + + + + + + + + TARGET MACHINE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.3.1 From 4f0e4d84676b0a8e10805e9614761fba5108f8f7 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Sun, 18 Jul 2021 21:14:11 +0300 Subject: Editable Combobox item in ColorParametersView. --- Software/DB/PPC/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/PPC/Tango_log.ldf | Bin 53673984 -> 53673984 bytes .../ViewModels/ColorParametersVewVM.cs | 15 +- .../ViewModels/MainViewVM.cs | 445 ++++++++++++++++----- .../Views/ColorParametersView.xaml | 2 +- .../Views/ComboboxEditable.xaml | 17 +- .../Views/ComboboxEditable.xaml.cs | 23 +- .../Views/MachineTestResultsView.xaml | 25 +- .../Views/ThreadCharacteristicsView.xaml | 132 ++---- 9 files changed, 404 insertions(+), 255 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml') diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf index ef035ce91..62a798b9c 100644 Binary files a/Software/DB/PPC/Tango.mdf and b/Software/DB/PPC/Tango.mdf differ diff --git a/Software/DB/PPC/Tango_log.ldf b/Software/DB/PPC/Tango_log.ldf index 2f9b20ba1..890f5313e 100644 Binary files a/Software/DB/PPC/Tango_log.ldf and b/Software/DB/PPC/Tango_log.ldf differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorParametersVewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorParametersVewVM.cs index ae90263d2..3a5488256 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorParametersVewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorParametersVewVM.cs @@ -263,7 +263,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels public RelayCommand SaveCommand { get; set; } - public RelayCommand FlytoRMLLiquidFactorsCommand { get; set; } + public RelayCommand SaveFactorsCommand { get; set; } public RelayCommand ImportCyanDataCommand { get; set; } public RelayCommand ImportMagentaDataCommand { get; set; } @@ -309,10 +309,6 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels } } - private void FlytoRMLLiquidFactors(FactorColors obj) - { - throw new NotImplementedException(); - } private void ImportBlackData(object obj) { @@ -327,6 +323,13 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels } } + private void SaveFactors(object obj) + { + /// var LiquidTypesRmls = ActiveRML.LiquidTypesRmls; + // for( int) + } + + private bool LoadColorDataFromExcel(out List items) { OpenFileDialog dlg = new OpenFileDialog(); @@ -388,7 +391,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels ImportYellowDataCommand = new RelayCommand(ImportYellowData); ImportBlackDataCommand = new RelayCommand(ImportBlackData); - FlytoRMLLiquidFactorsCommand = new RelayCommand(FlytoRMLLiquidFactors, () => IsFree); + SaveFactorsCommand = new RelayCommand(SaveFactors, () => IsFree); } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs index 928102f12..6c73ab63b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs @@ -27,6 +27,7 @@ using Tango.MachineStudio.ThreadExtensions.Contracts; using Tango.MachineStudio.ThreadExtensions.Views; using Tango.MachineStudio.ThreadExtensions.Models; using Tango.Settings; +using System.Reflection; namespace Tango.MachineStudio.ThreadExtensions.ViewModels { @@ -350,9 +351,10 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels #region Command Functions - private void AddManufacturerItem(object obj) + private async void AddManufacturerItem(object obj) { AddItemDialogVM vm = ViewModelLocator.AddItemDialogVM; + vm.Name = ""; _notification.ShowModalDialog(vm, (x) => { @@ -361,34 +363,22 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels _notification.ShowError("Manufacturer already exists."); return; } - Manufacturers.Add(vm.Name); - RaisePropertyChanged("Manufacturers"); _active_context.YarnManufacturers.Add(new YarnManufacturer() { Name = vm.Name }); - }, () => { }); - } - - private void DeleteManufacturerItem(object obj) - { - if (_notification.ShowQuestion("Are you sure you want to delete the selected item?")) + if(vm.DialogResult) { - string deletedname = ActiveRML.Manufacturer; - Manufacturers.Remove(deletedname); - RaisePropertyChanged("Manufacturers"); - var deletedItem = _active_context.YarnManufacturers.Where(x => x.Name == deletedname).FirstOrDefault(); - if (deletedItem != null) - { - _active_context.YarnManufacturers.Remove(deletedItem); - ActiveRML.Manufacturer = _active_context.YarnManufacturers.FirstOrDefault().Name; - } + await _active_context.SaveChangesAsync(); + Manufacturers = _active_context.YarnManufacturers.Select(z => z.Name).ToList(); + ActiveRML.Manufacturer = Manufacturers.Where(z=> z == vm.Name).FirstOrDefault(); } } - - private void EditManufacturerItem(object obj) + + private async void EditManufacturerItem(object obj) { AddItemDialogVM vm = ViewModelLocator.AddItemDialogVM; vm.Name = ActiveRML.Manufacturer; + bool bChanged = false; _notification.ShowModalDialog(vm, (x) => { @@ -404,90 +394,346 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels { editItem.Name = x.Name; ActiveRML.Manufacturer = x.Name; + bChanged = true; } Manufacturers = _active_context.YarnManufacturers.Select(z => z.Name).ToList(); }, () => { }); + if(bChanged) + await _active_context.SaveChangesAsync(); } - private void AddBrandItem(object obj) + private bool AddItemToCollection( ObservableCollection collection, DbSet dbColection, ref string name) where T : class { AddItemDialogVM vm = ViewModelLocator.AddItemDialogVM; + vm.Name = ""; - _notification.ShowModalDialog(vm, async (x) => - { - if (Brands.Any(y => y.Name.ToLower() == x.Name.ToLower())) - { - _notification.ShowError("Brand already exists."); - return; - } - YarnBrand newItem = new YarnBrand() { Name = x.Name }; - _active_context.YarnBrands.Add(newItem); - await _active_context.SaveChangesAsync(); - Brands = _active_context.YarnBrands.ToObservableCollection(); - ActiveRMLExtension.YarnBrand = Brands.FirstOrDefault(b => b.Name == vm.Name); - }, () => { }); + PropertyInfo pi = typeof(T).GetProperty("Name"); + bool returnValue = false; + _notification.ShowModalDialog(vm, (x) => + { + if (String.IsNullOrEmpty(x.Name)) + { + returnValue = false; + return; + } + if (collection.Any(y => pi.GetValue(y).ToString().ToLower() == x.Name.ToLower())) + { + returnValue = false; + _notification.ShowError("The name already exists."); + return; + } + returnValue = true; + T newItem = (T)Activator.CreateInstance(typeof(T), new object[] { }); + pi.SetValue(newItem, x.Name); + dbColection.Add(newItem); + }, () => { }); + name = vm.Name; + return returnValue; } - private void EditBrandItem(object obj) + private bool EditItemCollection(ObservableCollection collection, DbSet dbColection, ref string name) where T : class { AddItemDialogVM vm = ViewModelLocator.AddItemDialogVM; - vm.Name = ActiveRMLExtension.YarnBrand.Name; + vm.Name = name; + string currentName = name; - _notification.ShowModalDialog(vm, async (x) => + PropertyInfo pi = typeof(T).GetProperty("Name"); + bool returnValue = false; + _notification.ShowModalDialog(vm, (x) => { - if (ActiveRMLExtension.YarnBrand.Name == vm.Name) + if (String.IsNullOrEmpty(x.Name) || currentName == x.Name) + { + returnValue = false; return; - if (Brands.Any(y => y.Name == vm.Name)) + } + + if (collection.Any(y => pi.GetValue(y).ToString() == x.Name)) { - _notification.ShowError("The Brand already exists."); + returnValue = false; + _notification.ShowError("The name already exists."); return; } - ActiveRMLExtension.YarnBrand.Name = vm.Name; - await _active_context.SaveChangesAsync(); + returnValue = true; }, () => { }); + name = vm.Name; + return returnValue; } - private async void DeleteBrandItem(object obj) + + private async void AddBrandItem(object obj) { - if (_notification.ShowQuestion("Are you sure you want to delete the selected item?")) + string newName = ""; + if( AddItemToCollection( Brands, _active_context.YarnBrands, ref newName)) { - var deletedItem = _active_context.YarnBrands.Where(x => x.Guid == ActiveRMLExtension.YarnBrand.Guid).FirstOrDefault(); - if (deletedItem != null) - { - _active_context.YarnBrands.Remove(deletedItem); - await _active_context.SaveChangesAsync(); - Brands = _active_context.YarnBrands.ToObservableCollection(); - ActiveRMLExtension.YarnBrand = Brands.FirstOrDefault(); - } + await _active_context.SaveChangesAsync(); + Brands = _active_context.YarnBrands.ToObservableCollection(); + ActiveRMLExtension.YarnBrand = Brands.FirstOrDefault(b => b.Name == newName); } } - - private void AddEndUseItem(object ob) + + private async void EditBrandItem(object obj) { - AddItemDialogVM vm = ViewModelLocator.AddItemDialogVM; + string newName = ActiveRMLExtension.YarnBrand.Name; + if (EditItemCollection(Brands, _active_context.YarnBrands, ref newName)) + { + ActiveRMLExtension.LastUpdated = DateTime.UtcNow; + ActiveRMLExtension.YarnBrand.Name = newName; + await _active_context.SaveChangesAsync(); + } + } - _notification.ShowModalDialog(vm, async (x) => + private async void AddEndUseItem(object ob) + { + string newName = ""; + if (AddItemToCollection(EndUse, _active_context.MediaPurposes, ref newName)) { - if (Brands.Any(y => y.Name.ToLower() == x.Name.ToLower())) - { - _notification.ShowError("This item already exists."); - return; - } - MediaPurpos newItem = new MediaPurpos() { Name = x.Name }; - _active_context.MediaPurposes.Add(newItem); await _active_context.SaveChangesAsync(); EndUse = _active_context.MediaPurposes.ToObservableCollection(); - ActiveRML.MediaPurpose = EndUse.FirstOrDefault(b => b.Name == x.Name); - }, () => { }); + ActiveRML.MediaPurpose = EndUse.FirstOrDefault(b => b.Name == newName); + } } - private void EditEndUseItem(object ob) + private async void EditEndUseItem(object ob) { - + string newName = ActiveRML.MediaPurpose.Name; + if (EditItemCollection(EndUse, _active_context.MediaPurposes, ref newName)) + { + ActiveRML.LastUpdated = DateTime.UtcNow; + ActiveRML.MediaPurpose.Name = newName; + await _active_context.SaveChangesAsync(); + } } - private void DeleteEndUseItem(object ob) + + private async void AddApplicationItem(object ob) { - + string newName = ""; + if (AddItemToCollection(Applications, _active_context.YarnApplications, ref newName)) + { + await _active_context.SaveChangesAsync(); + Applications = _active_context.YarnApplications.ToObservableCollection(); + ActiveRMLExtension.YarnApplication = Applications.FirstOrDefault(b => b.Name == newName); + } + } + private async void EditApplicationItem(object ob) + { + string newName = ActiveRMLExtension.YarnApplication.Name; + if (EditItemCollection(Applications, _active_context.YarnApplications, ref newName)) + { + ActiveRMLExtension.LastUpdated = DateTime.UtcNow; + ActiveRMLExtension.YarnApplication.Name = newName; + await _active_context.SaveChangesAsync(); + } + } + + private async void AddIndustrySectorItem(object ob) + { + string newName = ""; + if (AddItemToCollection(IndustrySector, _active_context.YarnIndustrysectors, ref newName)) + { + await _active_context.SaveChangesAsync(); + IndustrySector = _active_context.YarnIndustrysectors.ToObservableCollection(); + ActiveRMLExtension.YarnIndustrysector = IndustrySector.FirstOrDefault(b => b.Name == newName); + } + } + private async void EditIndustrySectorItem(object ob) + { + string newName = ActiveRMLExtension.YarnIndustrysector.Name; + if (EditItemCollection(IndustrySector, _active_context.YarnIndustrysectors, ref newName)) + { + ActiveRMLExtension.LastUpdated = DateTime.UtcNow; + ActiveRMLExtension.YarnIndustrysector.Name = newName; + await _active_context.SaveChangesAsync(); + } + } + + private async void AddMaterialItem(object ob) + { + string newName = ""; + if (AddItemToCollection(Materials, _active_context.MediaMaterials, ref newName)) + { + await _active_context.SaveChangesAsync(); + Materials = _active_context.MediaMaterials.ToObservableCollection(); + ActiveRML.MediaMaterial = Materials.FirstOrDefault(b => b.Name == newName); + } + } + private async void EditMaterialItem(object ob) + { + string newName = ActiveRML.MediaMaterial.Name; + if (EditItemCollection(Materials, _active_context.MediaMaterials, ref newName)) + { + ActiveRML.LastUpdated = DateTime.UtcNow; + ActiveRML.MediaMaterial.Name = newName; + await _active_context.SaveChangesAsync(); + } + } + + private async void AddYarnTypeItem(object ob) + { + string newName = ""; + if (AddItemToCollection(YarnTypes, _active_context.YarnTypes, ref newName)) + { + await _active_context.SaveChangesAsync(); + YarnTypes = _active_context.YarnTypes.ToObservableCollection(); + ActiveRMLExtension.YarnType = YarnTypes.FirstOrDefault(b => b.Name == newName); + } + } + private async void EditYarnTypeItem(object ob) + { + string newName = ActiveRMLExtension.YarnType.Name; + if (EditItemCollection(YarnTypes, _active_context.YarnTypes, ref newName)) + { + ActiveRMLExtension.LastUpdated = DateTime.UtcNow; + ActiveRMLExtension.YarnType.Name = newName; + await _active_context.SaveChangesAsync(); + } + } + + private async void AddSubFamilyItem(object ob) + { + string newName = ""; + if (AddItemToCollection(SubFamilies, _active_context.YarnSubFamilies, ref newName)) + { + await _active_context.SaveChangesAsync(); + SubFamilies = _active_context.YarnSubFamilies.ToObservableCollection(); + ActiveRMLExtension.YarnSubFamily = SubFamilies.FirstOrDefault(b => b.Name == newName); + } + } + private async void EditSubFamilyItem(object ob) + { + string newName = ActiveRMLExtension.YarnSubFamily.Name; + if (EditItemCollection(SubFamilies, _active_context.YarnSubFamilies, ref newName)) + { + ActiveRMLExtension.LastUpdated = DateTime.UtcNow; + ActiveRMLExtension.YarnSubFamily.Name = newName; + await _active_context.SaveChangesAsync(); + } + } + + private async void AddFamilyItem(object ob) + { + string newName = ""; + if (AddItemToCollection(Family, _active_context.YarnFamilies, ref newName)) + { + await _active_context.SaveChangesAsync(); + Family = _active_context.YarnFamilies.ToObservableCollection(); + ActiveRMLExtension.YarnFamily = Family.FirstOrDefault(b => b.Name == newName); + } + } + private async void EditFamilyItem(object ob) + { + string newName = ActiveRMLExtension.YarnFamily.Name; + if (EditItemCollection(Family, _active_context.YarnFamilies, ref newName)) + { + ActiveRMLExtension.LastUpdated = DateTime.UtcNow; + ActiveRMLExtension.YarnFamily.Name = newName; + await _active_context.SaveChangesAsync(); + } + } + + private async void AddGroupItem(object ob) + { + string newName = ""; + if (AddItemToCollection(Group, _active_context.YarnGroups, ref newName)) + { + await _active_context.SaveChangesAsync(); + Group = _active_context.YarnGroups.ToObservableCollection(); + ActiveRMLExtension.YarnGroup = Group.FirstOrDefault(b => b.Name == newName); + } + } + private async void EditGroupItem(object ob) + { + string newName = ActiveRMLExtension.YarnGroup.Name; + if (EditItemCollection(Group, _active_context.YarnGroups, ref newName)) + { + ActiveRMLExtension.LastUpdated = DateTime.UtcNow; + ActiveRMLExtension.YarnGroup.Name = newName; + await _active_context.SaveChangesAsync(); + } + } + + private async void AddTexturingItem(object ob) + { + string newName = ""; + if (AddItemToCollection(Texturing, _active_context.YarnTexturings, ref newName)) + { + await _active_context.SaveChangesAsync(); + Texturing = _active_context.YarnTexturings.ToObservableCollection(); + ActiveRMLExtension.YarnTexturing = Texturing.FirstOrDefault(b => b.Name == newName); + } + } + private async void EditTexturingItem(object ob) + { + string newName = ActiveRMLExtension.YarnTexturing.Name; + if (EditItemCollection(Texturing, _active_context.YarnTexturings, ref newName)) + { + ActiveRMLExtension.LastUpdated = DateTime.UtcNow; + ActiveRMLExtension.YarnTexturing.Name = newName; + await _active_context.SaveChangesAsync(); + } + } + + private async void AddGeometryItem(object ob) + { + string newName = ""; + if (AddItemToCollection(Geometry, _active_context.FiberShapes, ref newName)) + { + await _active_context.SaveChangesAsync(); + Geometry = _active_context.FiberShapes.ToObservableCollection(); + ActiveRML.FiberShape = Geometry.FirstOrDefault(b => b.Name == newName); + } + } + private async void EditGeometryItem(object ob) + { + string newName = ActiveRML.FiberShape.Name; + if (EditItemCollection(Geometry, _active_context.FiberShapes, ref newName)) + { + ActiveRML.LastUpdated = DateTime.UtcNow; + ActiveRML.FiberShape.Name = newName; + await _active_context.SaveChangesAsync(); + } + } + + private async void AddYarnWhiteShadeItem(object ob) + { + string newName = ""; + if (AddItemToCollection(YarnWhiteShade, _active_context.YarnWhiteShades, ref newName)) + { + await _active_context.SaveChangesAsync(); + YarnWhiteShade = _active_context.YarnWhiteShades.ToObservableCollection(); + ActiveRMLExtension.YarnWhiteShade = YarnWhiteShade.FirstOrDefault(b => b.Name == newName); + } + } + private async void EditYarnWhiteShadeItem(object ob) + { + string newName = ActiveRMLExtension.YarnWhiteShade.Name; + if (EditItemCollection(YarnWhiteShade, _active_context.YarnWhiteShades, ref newName)) + { + ActiveRMLExtension.LastUpdated = DateTime.UtcNow; + ActiveRMLExtension.YarnWhiteShade.Name = newName; + await _active_context.SaveChangesAsync(); + } + } + + private async void AddGlossLevelItem(object ob) + { + string newName = ""; + if (AddItemToCollection(GlossLevel, _active_context.YarnGlossLevels, ref newName)) + { + await _active_context.SaveChangesAsync(); + GlossLevel = _active_context.YarnGlossLevels.ToObservableCollection(); + ActiveRMLExtension.YarnGlossLevel = GlossLevel.FirstOrDefault(b => b.Name == newName); + } } + private async void EditGlossLevelItem(object ob) + { + string newName = ActiveRMLExtension.YarnGlossLevel.Name; + if (EditItemCollection(GlossLevel, _active_context.YarnGlossLevels, ref newName)) + { + ActiveRMLExtension.LastUpdated = DateTime.UtcNow; + ActiveRMLExtension.YarnGlossLevel.Name = newName; + await _active_context.SaveChangesAsync(); + } + } + #endregion @@ -501,39 +747,52 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels SaveCommand = new RelayCommand(Save, () => IsFree); ManageRmlExtensionCommand = new RelayCommand(() => LoadActiveRMLExtension(SelectedRMLExtension.Guid), () => SelectedRMLExtension != null); - DeleteManufacturerItemCommand = new RelayCommand(DeleteManufacturerItem, () => ActiveRML.Manufacturer != ""); + AddManufacturerItemCommand = new RelayCommand(AddManufacturerItem); EditManufacturerItemCommand = new RelayCommand(EditManufacturerItem, () => ActiveRML.Manufacturer != ""); AddBrandItemCommand = new RelayCommand(AddBrandItem); EditBrandItemCommand = new RelayCommand(EditBrandItem, () => ActiveRMLExtension.YarnBrand != null); - DeleteBrandItemCommand = new RelayCommand(DeleteBrandItem, () => ActiveRMLExtension.YarnBrand != null); - + AddEndUseItemCommand = new RelayCommand(AddEndUseItem); EditEndUseItemCommand = new RelayCommand(EditEndUseItem); - DeleteEndUseItemCommand = new RelayCommand(DeleteEndUseItem); - - AddApplicationItemCommand = new RelayCommand(AddEndUseItem); - EditApplicationItemCommand = new RelayCommand(EditEndUseItem); - DeleteApplicationItemCommand = new RelayCommand(DeleteEndUseItem); - - AddIndustrySectorItemCommand = new RelayCommand(AddEndUseItem); - EditIndustrySectorItemCommand = new RelayCommand(EditEndUseItem); - DeleteIndustrySectorItemCommand = new RelayCommand(DeleteEndUseItem); - - AddMaterialItemCommand = new RelayCommand(AddEndUseItem); - EditMaterialItemCommand = new RelayCommand(EditEndUseItem); - DeleteMaterialItemCommand = new RelayCommand(DeleteEndUseItem); - - AddYarnTypeItemCommand = new RelayCommand(AddEndUseItem); - EditYarnTypeItemCommand = new RelayCommand(EditEndUseItem); - DeleteYarnTypeItemCommand = new RelayCommand(DeleteEndUseItem); - } - - - + AddApplicationItemCommand = new RelayCommand(AddApplicationItem); + EditApplicationItemCommand = new RelayCommand(EditApplicationItem); + + AddIndustrySectorItemCommand = new RelayCommand(AddIndustrySectorItem); + EditIndustrySectorItemCommand = new RelayCommand(EditIndustrySectorItem); + + AddMaterialItemCommand = new RelayCommand(AddMaterialItem); + EditMaterialItemCommand = new RelayCommand(EditMaterialItem); + + AddYarnTypeItemCommand = new RelayCommand(AddYarnTypeItem); + EditYarnTypeItemCommand = new RelayCommand(EditYarnTypeItem); + + AddSubFamilyItemCommand = new RelayCommand(AddSubFamilyItem); + EditSubFamilyItemCommand = new RelayCommand(EditSubFamilyItem); + + AddFamilyItemCommand = new RelayCommand(AddFamilyItem); + EditFamilyItemCommand = new RelayCommand(EditFamilyItem); + + AddGroupItemCommand = new RelayCommand(AddGroupItem); + EditGroupItemCommand = new RelayCommand(EditGroupItem); + + AddTexturingItemCommand = new RelayCommand(AddTexturingItem); + EditTexturingItemCommand = new RelayCommand(EditTexturingItem); + + AddGeometryItemCommand = new RelayCommand(AddGeometryItem); + EditGeometryItemCommand = new RelayCommand(EditGeometryItem); + + AddYarnWhiteShadeItemCommand = new RelayCommand(AddYarnWhiteShadeItem); + EditYarnWhiteShadeItemCommand = new RelayCommand(EditYarnWhiteShadeItem); + + AddGlossLevelItemCommand = new RelayCommand(AddGlossLevelItem); + EditGlossLevelItemCommand = new RelayCommand(EditGlossLevelItem); + + } + public override void OnApplicationReady() { } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorParametersView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorParametersView.xaml index 739a2ae2c..697289604 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorParametersView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorParametersView.xaml @@ -300,7 +300,7 @@ - - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs index e5b542f45..251241159 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs @@ -53,7 +53,17 @@ namespace Tango.MachineStudio.ThreadExtensions.Views + public string DisplayMemberPath + { + get { return (string)GetValue(DisplayMemberPathProperty); } + set { SetValue(DisplayMemberPathProperty, value); } + } + + public static readonly DependencyProperty DisplayMemberPathProperty = + DependencyProperty.Register("DisplayMemberPath", typeof(string), typeof(ComboboxEditable), new PropertyMetadata("")); + + public RelayCommand AddCommand { get { return (RelayCommand)GetValue(AddCommandProperty); } @@ -73,17 +83,6 @@ namespace Tango.MachineStudio.ThreadExtensions.Views // Using a DependencyProperty as the backing store for DeleteCommand. This enables animation, styling, binding, etc... public static readonly DependencyProperty EditCommandProperty = DependencyProperty.Register("EditCommand", typeof(RelayCommand), typeof(ComboboxEditable)); - - public RelayCommand DeleteCommand - { - get { return (RelayCommand)GetValue(DeleteCommandProperty); } - set { SetValue(DeleteCommandProperty, value); } - } - - // Using a DependencyProperty as the backing store for DeleteCommand. This enables animation, styling, binding, etc... - public static readonly DependencyProperty DeleteCommandProperty = - DependencyProperty.Register("DeleteCommand", typeof(RelayCommand), typeof(ComboboxEditable)); - - + } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml index a8aa173df..27bffbebb 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml @@ -29,30 +29,11 @@ - - - - - + - - - - - - - - - - - + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadCharacteristicsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadCharacteristicsView.xaml index 0f1003a63..caab8edfb 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadCharacteristicsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadCharacteristicsView.xaml @@ -56,100 +56,22 @@ - + - + - - - + - - - + - - - + @@ -170,40 +92,32 @@ - - - + + - - - + + - - - + + - - - + + - - - + + - - - + + - - - + + - - - + + - - + + -- cgit v1.3.1