aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml.cs
diff options
context:
space:
mode:
<
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.Core.Commands;
using Tango.Integration.Observables;
using Tango.MachineStudio.Common.Notifications;
using Tango.MachineStudio.MachineDesigner.AutoComplete;

namespace Tango.MachineStudio.MachineDesigner.ViewModels
{
    public class MachineVersionDialogVM : DialogViewVM
    {
        public ObservablesEntitiesAdapter Adapter { get; set; }

        public double Version { get; set; }

        private String _versionName;

        public String VersionName
        {
            get { return _versionName; }
            set { _versionName = value; RaisePropertyChangedAuto(); }
        }

        private MachineVersion _selectedVersion;

        public MachineVersion SelectedVersion
        {
            get { return _selectedVersion; }
            set
            {
                _selectedVersion = value;
                RaisePropertyChangedAuto();
                VersionName = value != null ? value.Name : null;
                Version = value != null ? value.Version : 0;
            }
        }

        public RelayCommand AcceptCommand { get; set; }

        public RelayCommand CancelCommand { get; set; }

        public MachineVersionDialogVM()
        {
            Adapter = ObservablesEntitiesAdapter.Instance;
            AcceptCommand = new RelayCommand(() => 
            {
                Accept();
            });
            CancelCommand = new RelayCommand(Cancel);
        }
    }
}
authorShlomo Hecht <shlomo@twine-s.com>2020-12-29 18:14:55 +0200
committerShlomo Hecht <shlomo@twine-s.com>2020-12-29 18:14:55 +0200
commitfab31b6b86f8ea0374fb71ab0a43806d623d9474 (patch)
tree