aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MachinesViewVM.cs
blob: 432982dc2e74cadb4fa117b9675765372fa2fa88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
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.SharedUI;

namespace Tango.MachineStudio.DB.ViewModels
{
    public class MachinesViewVM : DbTableViewModel<Machine>
    {
        public MachinesViewVM(INotificationProvider notification) : base(notification)
        {
        }

        protected override void InitializeEntity(Machine entity)
        {
            base.InitializeEntity(entity);
            entity.ProductionDate = DateTime.UtcNow;
        }
    }
}
/// <summary> /// Gets or sets the uniform resource identifier (URI) to load resources from. /// </summary> public new Uri Source { get { return _sourceUri; } set { _sourceUri = value; if (!_sharedDictionaries.ContainsKey(value)) { // If the dictionary is not yet loaded, load it by setting // the source of the base class base.Source = value; // add it to the cache _sharedDictionaries.Add(value, this); } else { // If the dictionary is already loaded, get it from the cache MergedDictionaries.Add(_sharedDictionaries[value]); } } } } }