aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Messages/OpenEntityEditViewMessage.cs
blob: 789cecdee18ba209cc82355435c0dee8977645b7 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL.Entities;
using Tango.MachineStudio.Common.Messages;
using Tango.MachineStudio.DB.ViewModels;
using Tango.SharedUI;

namespace Tango.MachineStudio.DB.Messages
{
    /// <summary>
    /// Invoked when the user has opened an entity for editing.
    /// </summary>
    /// <seealso cref="Tango.MachineStudio.Common.Messages.IStudioMessage" />
    public class OpenEntityEditViewMessage : IStudioMessage
    {
        /// <summary>
        /// Gets or sets the dialog open mode.
        /// </summary>
        public DialogOpenMode DialogOpenMode { get; set; }

        /// <summary>
        /// Gets or sets the context.
        /// </summary>
        public ViewModel Context { get; set; }

        /// <summary>
        /// Gets or sets the type of the entity.
        /// </summary>
        public Type EntityType { get; set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="OpenEntityEditViewMessage"/> class.
        /// </summary>
        /// <param name="mode">The mode.</param>
        /// <param name="context">The context.</param>
        /// <param name="entityType">Type of the entity.</param>
        public OpenEntityEditViewMessage(DialogOpenMode mode, ViewModel context, Type entityType)
        {
            DialogOpenMode = mode;
            Context = context;
            EntityType = entityType;
        }
    }
}