diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2021-07-04 15:25:08 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2021-07-04 15:25:08 +0300 |
| commit | 8a0b8f6abe3d143b43131a330e0ee39c2547ce8f (patch) | |
| tree | 7178cbe758b1adefb37c53be6839446e18d9d791 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML | |
| parent | b29f337cff7513e0fe0e4b98e6bc7970da89e837 (diff) | |
| download | Tango-8a0b8f6abe3d143b43131a330e0ee39c2547ce8f.tar.gz Tango-8a0b8f6abe3d143b43131a330e0ee39c2547ce8f.zip | |
After Virus
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML')
2 files changed, 47 insertions, 31 deletions
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 b3e020c85..f44034a2f 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 @@ -101,26 +101,26 @@ namespace Tango.MachineStudio.RML.ViewModels set { _fiberSynths = value; RaisePropertyChangedAuto(); } } - private ObservableCollection<SpoolType> _spoolTypes; - public ObservableCollection<SpoolType> SpoolTypes - { - get { return _spoolTypes; } - set { _spoolTypes = value; RaisePropertyChangedAuto(); } - } + //private ObservableCollection<SpoolType> _spoolTypes; + //public ObservableCollection<SpoolType> SpoolTypes + //{ + // get { return _spoolTypes; } + // set { _spoolTypes = value; RaisePropertyChangedAuto(); } + //} - private ObservableCollection<BtsrApplicationType> _btsrApplicationTypes; - public ObservableCollection<BtsrApplicationType> BtsrApplicationTypes - { - get { return _btsrApplicationTypes; } - set { _btsrApplicationTypes = value; RaisePropertyChangedAuto(); } - } + //private ObservableCollection<BtsrApplicationType> _btsrApplicationTypes; + //public ObservableCollection<BtsrApplicationType> BtsrApplicationTypes + //{ + // get { return _btsrApplicationTypes; } + // set { _btsrApplicationTypes = value; RaisePropertyChangedAuto(); } + //} - private ObservableCollection<BtsrYarnType> _btsrYarnTypes; - public ObservableCollection<BtsrYarnType> BtsrYarnTypes - { - get { return _btsrYarnTypes; } - set { _btsrYarnTypes = value; RaisePropertyChangedAuto(); } - } + //private ObservableCollection<BtsrYarnType> _btsrYarnTypes; + //public ObservableCollection<BtsrYarnType> BtsrYarnTypes + //{ + // get { return _btsrYarnTypes; } + // set { _btsrYarnTypes = value; RaisePropertyChangedAuto(); } + //} private Rml _selectedRML; public Rml SelectedRML @@ -136,6 +136,17 @@ namespace Tango.MachineStudio.RML.ViewModels set { _activeRML = value; RaisePropertyChangedAuto(); } } + private List<String> _manufacturers; + + public List<String> Manufacturers + { + get { return _manufacturers; } + set { _manufacturers = value; + RaisePropertyChangedAuto(); + } + } + + private CalibrationDataViewVM _calibrationDataViewVM; public CalibrationDataViewVM CalibrationDataViewVM { @@ -312,7 +323,7 @@ namespace Tango.MachineStudio.RML.ViewModels x.Guid, x.FileName }).ToListAsync(); - + foreach (var rml in Rmls) { var cct = ccts.SingleOrDefault(x => x.Guid == rml.CctGuid); @@ -337,6 +348,8 @@ namespace Tango.MachineStudio.RML.ViewModels || r.Name.ToLower().Contains(RMLFilter.ToLower()); }; + + } } catch (Exception ex) @@ -373,7 +386,7 @@ namespace Tango.MachineStudio.RML.ViewModels }).ToObservableCollection(); CCTS.Where(x => String.IsNullOrWhiteSpace(x.FileName)).ToList().ForEach(x => x.FileName = x.Guid); - + LoadRmlProperties(); ActiveRML = await new RmlBuilder(_active_context) @@ -499,9 +512,10 @@ namespace Tango.MachineStudio.RML.ViewModels LinearMassDensityUnits = _active_context.LinearMassDensityUnits.ToObservableCollection(); FiberShapes = _active_context.FiberShapes.ToObservableCollection(); FiberSynths = _active_context.FiberSynths.ToObservableCollection(); - SpoolTypes = _active_context.SpoolTypes.ToObservableCollection(); - BtsrApplicationTypes = _active_context.BtsrApplicationTypes.ToObservableCollection(); - BtsrYarnTypes = _active_context.BtsrYarnTypes.ToObservableCollection(); + //SpoolTypes = _active_context.SpoolTypes.ToObservableCollection(); + //BtsrApplicationTypes = _active_context.BtsrApplicationTypes.ToObservableCollection(); + //BtsrYarnTypes = _active_context.BtsrYarnTypes.ToObservableCollection(); + Manufacturers = _active_context.YarnManufacturers.Select(x => x.Name).ToList(); } private async void AddNewRml() 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 099637601..f89da482c 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 @@ -72,14 +72,16 @@ <TextBlock Text="Head Type:" ></TextBlock> <ComboBox ItemsSource="{Binding Source={x:Type enumerations:HeadTypes},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding ActiveRML.RmlHeadType}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox> - <TextBlock Text="Qualification Level:" ></TextBlock> - <ComboBox ItemsSource="{Binding Source={x:Type enumerations:RmlQualifications},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding ActiveRML.RmlQualificationLevel}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox> + <!--<TextBlock Text="Qualification Level:" ></TextBlock> + <ComboBox ItemsSource="{Binding Source={x:Type enumerations:RmlQualifications},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding ActiveRML.RmlQualificationLevel}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox>--> - <TextBlock Text="Manufacturer:" ></TextBlock> - <TextBox Text="{Binding ActiveRML.Manufacturer}"></TextBox> + <TextBlock Text="Manufacturer:" HorizontalAlignment="Left" ></TextBlock> + <!--<TextBox Text="{Binding ActiveRML.Manufacturer}"></TextBox>--> + <ComboBox VerticalAlignment="Center" ItemsSource="{Binding Manufacturers}" SelectedItem="{Binding ActiveRML.Manufacturer,Mode=TwoWay}" IsEditable="False" Margin="20 0 0 0"/> - <TextBlock Text="Material:" ></TextBlock> - <ComboBox ItemsSource="{Binding Materials}" SelectedItem="{Binding ActiveRML.MediaMaterial,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox> + + <!--<TextBlock Text="Material:" ></TextBlock> + <ComboBox ItemsSource="{Binding Materials}" SelectedItem="{Binding ActiveRML.MediaMaterial,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>--> <TextBlock Text="White Point:" ></TextBlock> <UniformGrid Columns="3"> @@ -88,7 +90,7 @@ <mahapps:NumericUpDown HasDecimals="True" Minimum="-128" Maximum="128" InterceptArrowKeys="True" HideUpDownButtons="True" Value="{Binding ActiveRML.WhitePointB}" HorizontalContentAlignment="Left" BorderBrush="{StaticResource MainWindow.Foreground}" Foreground="{StaticResource MainWindow.Foreground}"/> </UniformGrid> - <TextBlock Text="Purpose:" ></TextBlock> + <!--<TextBlock Text="Purpose:" ></TextBlock> <ComboBox ItemsSource="{Binding Purposes}" SelectedItem="{Binding ActiveRML.MediaPurpose,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox> <TextBlock Text="Condition:" ></TextBlock> @@ -131,7 +133,7 @@ <ToggleButton HorizontalAlignment="Right" IsChecked="{Binding ActiveRML.AirEntanglement}" Style="{StaticResource MaterialDesignSwitchToggleButton}" /> <TextBlock Text="Lubricant:" ></TextBlock> - <ToggleButton HorizontalAlignment="Right" IsChecked="{Binding ActiveRML.Lubricant}" Style="{StaticResource MaterialDesignSwitchToggleButton}" /> + <ToggleButton HorizontalAlignment="Right" IsChecked="{Binding ActiveRML.Lubricant}" Style="{StaticResource MaterialDesignSwitchToggleButton}" />--> </controls:TableGrid> </DockPanel> </Grid> |
