Last-Modified: Sat, 20 Jun 2026 12:24:14 GMT Expires: Tue, 17 Jun 2036 12:24:14 GMT Tango - Twine softwares
aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/TextEditorComponent.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Scripting/Tango.Scripting.Editors/TextEditorComponent.cs')
0 files changed, 0 insertions, 0 deletions
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.Core.Commands;
using Tango.BL.Entities;
using Tango.MachineStudio.Common.Notifications;
using Tango.MachineStudio.MachineDesigner.AutoComplete;
using Tango.BL;
using Tango.SharedUI;

namespace Tango.MachineStudio.MachineDesigner.ViewModels
{
    public class MachineVersionDialogVM : DialogViewVM
    {
        public ObservablesStaticCollections 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 = ObservablesStaticCollections.Instance;
            AcceptCommand = new RelayCommand(() => 
            {
                Accept();
            });
            CancelCommand = new RelayCommand(Cancel);
        }
    }
}