Esempio n. 1
0
        public void Execute(object parameter)
        {
            SceneCategoryModel parent = parameter as SceneCategoryModel;

            //  sceneCategoryModel.Items.Add(new SceneCategoryModel() { Parent = sceneCategoryModel, UnityContainer = sceneCategoryModel.UnityContainer, Name = "Scene 1", ContentID = "SceneID:##:" }); //CreateScene();

            ushort id = 0;

            if (parent != null)
            {
                var tableModel = parent as DBTableModel;
                if (tableModel != null)
                {
                    id = tableModel.AutoIncrement();
                }
            }
            else
            {
                return;
            }

            parent.IsDirty = true;

            if (id > 0)
            {
                SceneDataModel pom = new SceneDataModel()
                {
                    Parent = parent, Name = "Scene Obj NEW", ContentID = "SceneID:##:" + id, SceneID = id
                };

                pom.Create();
                parent.Items.Add(pom);
            }
            else
            {
                var log = VEFModule.UnityContainer.Resolve(typeof(ILoggerService), "") as ILoggerService;
                log.Log("Error: CmdCreateScene id =  (" + id.ToString() + ")", LogCategory.Error, LogPriority.High);
            }
        }
Esempio n. 2
0
 public CmdCreateScene(SceneCategoryModel model)
 {
     m_model = model;
 }