public bool RemoveSmartWall(DtoSmartWall inSmartWall)
 {
     if (SmartWallsList != null && SmartWallsList.Contains(inSmartWall))
     {
         SmartWallsList.Remove(inSmartWall);
         inSmartWall.EizoActionCalled -= InSmartWall_EizoActionCalled;
         return(true);
     }
     return(false);
 }
 //Work with list functions
 #region Add & Remove SmartWall functions
 public bool AddSmartWall(DtoSmartWall inSmartWall)
 {
     if (SmartWallsList == null)
     {
         SmartWallsList = new ObservableCollection <DtoSmartWall>();
     }
     if (SmartWallsList != null && !SmartWallsList.Contains(inSmartWall))
     {
         SmartWallsList.Add(inSmartWall);
         inSmartWall.EizoActionCalled += InSmartWall_EizoActionCalled;
         return(true);
     }
     return(false);
 }
Exemple #3
0
 //Functions
 #region Set Parent Smart Wall
 public void SetParentSmartWall(DtoSmartWall inSmartWall)
 {
     ParentSmartWall = inSmartWall;
     //toRetChildrenList = ParentSmartWall.PrisetsList.Cast<ALogicalChildrenClass>().ToList();
 }
Exemple #4
0
 public void NotifyEizoActionCalled(object inObjectCaller, DtoSmartWall inSelectedObjectInstance, EMVWActions inActionType)
 {
     EizoActionCalled?.Invoke(this, new MVW_UserActionEventArgument <DtoSmartWall, EMVWActions>(inObjectCaller, inSelectedObjectInstance, inActionType));
 }
        //Other
        #region Mockup
        private void InitializeMockupInfo()
        {
            if (SmartWallsList == null)
            {
                SmartWallsList = new ObservableCollection <DtoSmartWall>();
            }

            #region Prisets
            List <DtoPreset> tmpSW1Prisets = new List <DtoPreset>()
            {
                new DtoPreset()
                {
                    Name = "Priset 1"
                },
                new DtoPreset()
                {
                    Name = "Priset 2"
                },
            };

            List <DtoPreset> tmpSW2Prisets = new List <DtoPreset>()
            {
                new DtoPreset()
                {
                    Name = "Priset 3"
                },
                new DtoPreset()
                {
                    Name = "Priset 4"
                },
            };
            #endregion

            #region Monitors
            List <DtoMonitor> tmpSW1Monitors = new List <DtoMonitor>()
            {
                new DtoMonitor()
                {
                    Name = "Monitor 1"
                },
                new DtoMonitor()
                {
                    Name = "Monitor 2"
                },
                new DtoMonitor()
                {
                    Name = "Monitor 3"
                },
            };
            List <DtoMonitor> tmpSW2Monitors = new List <DtoMonitor>()
            {
                new DtoMonitor()
                {
                    Name = "Monitor 4"
                },
                new DtoMonitor()
                {
                    Name = "Monitor 5"
                },
                new DtoMonitor()
                {
                    Name = "Monitor 6"
                },
            };
            #endregion

            #region Smart Walls
            DtoSmartWall tmpSmartWall1 = new DtoSmartWall()
            {
                Name = "SmartWall 1", MonitorsList = new ObservableCollection <DtoMonitor>(tmpSW1Monitors), PresetsList = new ObservableCollection <DtoPreset>(tmpSW1Prisets)
            };
            DtoSmartWall tmpSmartWall2 = new DtoSmartWall()
            {
                Name = "SmartWall 2", MonitorsList = new ObservableCollection <DtoMonitor>(tmpSW2Monitors), PresetsList = new ObservableCollection <DtoPreset>(tmpSW2Prisets)
            };
            SmartWallsList.Add(tmpSmartWall1);
            SmartWallsList.Add(tmpSmartWall2);
            #endregion
        }