using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.DAL.Observables;
using Tango.SharedUI;
namespace Tango.MachineStudio.MachineDesigner.ViewModels
{
public class MainViewVM : ViewModel
{
private ObservablesEntitiesAdapter _adapter;
///
/// Gets or sets the db adapter.
///
public ObservablesEntitiesAdapter Adapter
{
get { return _adapter; }
set { _adapter = value; RaisePropertyChangedAuto(); }
}
private Machine _machine;
///
/// Gets or sets the machine.
///
public Machine Machine
{
get { return _machine; }
set { _machine = value; RaisePropertyChangedAuto(); }
}
private Configuration _configuration;
///
/// Gets or sets the configuration.
///
public Configuration Configuration
{
get { return _configuration; }
set { _configuration = value; RaisePropertyChangedAuto(); }
}
///
/// Initializes a new instance of the class.
///
public MainViewVM()
{
Adapter = ObservablesEntitiesAdapter.Instance;
Machine = Adapter.Machines.First();
Configuration = Machine.Configuration;
}
}
}