コード例 #1
0
 public bool RemoveMonitor(DtoMonitor inMonitor)
 {
     if (inMonitor != null)
     {
         return(inMonitor.RemoveMeFromParentSmartWall());
     }
     return(false);
 }
コード例 #2
0
 public bool AddMonitor(DtoMonitor inMonitor, DtoSmartWall inParentSmartWall)
 {
     if (inParentSmartWall != null && inMonitor != null)
     {
         return(inParentSmartWall.AddMonitor(inMonitor));
     }
     return(false);
 }
コード例 #3
0
 //Work with monitor function
 #region Set Monitor function
 public void SetMonitor(DtoMonitor inMonitor)
 {
     if (Monitor != null)
     {
         //SaveSettingsChanges(); //za sad se iz Eizo maina poziva.
     }
     Monitor = inMonitor;
     monitorSettings_UserControl.SetMonitorAndControlUIType(inMonitor, Common.Enumerations.EFormInitializeType.Edit);
 }
コード例 #4
0
        public void SetMonitorAndControlUIType(DtoMonitor inMonitor, EFormInitializeType inControlUIType = EFormInitializeType.New)
        {
            initialize  = true;
            Monitor     = inMonitor;
            tmpName     = inMonitor.Name;
            tmpUserName = inMonitor.UserName;
            tmpPassword = inMonitor.Password;
            tmpIPAdress = inMonitor.IPAdress;
            tmpHTTPPort = inMonitor.HTTPport;

            tmpAspectRatio        = inMonitor.AspectRatio;
            tmpDiagonalSizeInches = inMonitor.InchesDiagonalSize;
            initialize            = false;
        }
コード例 #5
0
        public List <DtoMonitor> reservasMonitor(DtoConsultaMonitor dtoMonitor)
        {
            List <DtoMonitor> lst = new List <DtoMonitor>();

            foreach (var servicio in buscar(null, dtoMonitor.proveedor))
            {
                DtoMonitor dto = new DtoMonitor();
                dto.servicio = servicio;
                dto.horario  = horarioDisponible(dtoMonitor.proveedor, dto.servicio.idServicio, dtoMonitor.fecha, dtoMonitor.proveedor);
                lst.Add(dto);
            }

            return(lst);
        }
コード例 #6
0
        public AddMonitor_Form(DtoMonitor inMonitor, EFormInitializeType type = EFormInitializeType.New)
        {
            this.DataContext = this;
            InitializeComponent();
            InitializeForm();

            if (inMonitor != null)
            {
                newMonitor_uc.SetMonitorAndControlUIType(inMonitor, type);
            }
            else
            {
                MessageBox.Show($"Problem with Monitor");
                this.DialogResult = false;
                this.Close();
            }
        }
コード例 #7
0
        public AddEditMonitor_UserControl(DtoMonitor inMonitor, EFormInitializeType ininitializeType = EFormInitializeType.New)
        {
            this.DataContext = this;


            Monitor     = inMonitor;
            tmpName     = inMonitor.Name;
            tmpUserName = inMonitor.UserName;
            tmpPassword = inMonitor.Password;
            tmpIPAdress = inMonitor.IPAdress;
            tmpHTTPPort = inMonitor.HTTPport;

            tmpAspectRatio        = inMonitor.AspectRatio;
            tmpDiagonalSizeInches = inMonitor.InchesDiagonalSize;

            InitializeComponent();
            InitializeForm();
        }
コード例 #8
0
        public MonitorRectangle(Panel inParentPanel, DtoSmartWall inConnectedSmartWall, DtoMonitor inConnectedMonitor)
        {
            ParentPanel      = inParentPanel;
            ConnectedMonitor = inConnectedMonitor;
            if (ConnectedMonitor != null)
            {
                MonitorNameText = new FormattedText(ConnectedMonitor?.Name, CultureInfo.CurrentCulture, FlowDirection.LeftToRight, new Typeface("Tahoma"), textFontSize, textColor);
            }
            ConnectedSmartWall = inConnectedSmartWall;

            InitializeClass();
            InitializeParentPanelEvents();

            GenerateMonitorRectangle();
            AddMeToParentChildren();

            InitializeAdorner();
        }
コード例 #9
0
        //Events
        #region Eizo Config Events
        private void PluginConfig_EizoActionCalled(object sender, MVW_UserActionEventArgument <DtoMainConfiguration, EMVWActions> e)
        {
            #region SmartWall calls
            if (e.ActionType == EMVWActions.EditSmartWall && (e.ObjectCaller.GetType() == typeof(DtoSmartWall))) //Edit SmartWall
            {
                var tmpSmartWall = e.ObjectCaller as DtoSmartWall;
                if (tmpSmartWall != null)
                {
                    var resault = EditSmartWall(tmpSmartWall);
                    if (resault == true)
                    {
                        NotifyThatSavingsNeed();
                    }
                }
            }

            else if (e.ActionType == EMVWActions.RemoveSmartWall && (e.ObjectCaller.GetType() == typeof(DtoSmartWall))) //Remove SmartWall
            {
                var tmpSmartWall = e.ObjectCaller as DtoSmartWall;
                if (tmpSmartWall != null)
                {
                    var resault = MessageBox.Show($"Are you sure want delete {tmpSmartWall.Name}", "Delete SmartWall", MessageBoxButton.YesNo, MessageBoxImage.Question);
                    if (resault == MessageBoxResult.Yes)
                    {
                        var removedSmartWall = RemoveSmartWall(tmpSmartWall);
                        if (removedSmartWall == true)
                        {
                            NotifyThatSavingsNeed();
                        }
                    }
                }
            }
            else if (e.ActionType == EMVWActions.EditSmartWallLayout && (e.ObjectCaller.GetType() == typeof(DtoSmartWall))) //Remove SmartWall
            {
                var tmpSmartWall = e.ObjectCaller as DtoSmartWall;
                if (tmpSmartWall != null)
                {
                    //SetActiveEditLayoutSmartWall(tmpSmartWall);
                }
            }
            #endregion

            #region  Monitor calls
            else if (e.ActionType == EMVWActions.AddMonitor && (e.ObjectCaller.GetType() == typeof(DtoSmartWall))) //ADD Monitor
            {
                var tmpSmartWall = e.ObjectCaller as DtoSmartWall;
                if (tmpSmartWall != null)
                {
                    DtoMonitor      monitorToAdd      = new DtoMonitor("New Monitor");
                    AddMonitor_Form createMonitorForm = new AddMonitor_Form(monitorToAdd);
                    var             resault           = createMonitorForm.ShowDialog();
                    if (resault.HasValue && resault == true)
                    {
                        var monitorAdded = AddMonitor(monitorToAdd, tmpSmartWall);
                        if (monitorAdded == true)
                        {
                            NotifyThatSavingsNeed();
                        }
                    }
                }
            }

            else if (e.ActionType == EMVWActions.EditMonitor && (e.ObjectCaller.GetType() == typeof(DtoMonitor))) //EDIT Monitor
            {
                var tmpMonitor = e.ObjectCaller as DtoMonitor;
                if (tmpMonitor != null)
                {
                    var resault = EditMonitor(tmpMonitor);
                    if (resault == true)
                    {
                        NotifyThatSavingsNeed();
                    }
                }
            }

            else if (e.ActionType == EMVWActions.RemoveMonitor && (e.ObjectCaller.GetType() == typeof(DtoMonitor))) //REMOVE Monitor
            {
                var tmpMonitor = e.ObjectCaller as DtoMonitor;
                if (tmpMonitor != null)
                {
                    var resault = MessageBox.Show($"Are you sure want delete {tmpMonitor.Name}", "Delete Monitor", MessageBoxButton.YesNo, MessageBoxImage.Question);
                    if (resault == MessageBoxResult.Yes)
                    {
                        var removedMonitor = RemoveMonitor(tmpMonitor);
                        if (removedMonitor == true)
                        {
                            NotifyThatSavingsNeed();
                        }
                    }
                }
            }
            #endregion

            #region Preset calls
            else if (e.ActionType == EMVWActions.AddPreset && (e.ObjectCaller.GetType() == typeof(DtoSmartWall))) //Add Preset
            {
                var tmpSmartWall = e.ObjectCaller as DtoSmartWall;
                if (tmpSmartWall != null)
                {
                    DtoPreset      presetToAdd      = new DtoPreset("New Preset");
                    AddPreset_Form createPresetForm = new AddPreset_Form(presetToAdd);
                    var            resault          = createPresetForm.ShowDialog();
                    if (resault.HasValue && resault == true)
                    {
                        var monitorAdded = AddPreset(presetToAdd, tmpSmartWall);
                        if (monitorAdded == true)
                        {
                            NotifyThatSavingsNeed();
                        }
                    }
                }
            }
            else if (e.ActionType == EMVWActions.EditPreset && (e.ObjectCaller.GetType() == typeof(DtoPreset))) //Edit Preset
            {
                var tmpPreset = e.ObjectCaller as DtoPreset;
                if (tmpPreset != null)
                {
                    var resault = EditPreset(tmpPreset);
                    if (resault == true)
                    {
                        NotifyThatSavingsNeed();
                    }
                }
            }
            else if (e.ActionType == EMVWActions.RemovePreset && (e.ObjectCaller.GetType() == typeof(DtoPreset))) //Remove Preset
            {
                var tmpPreset = e.ObjectCaller as DtoPreset;
                if (tmpPreset != null)
                {
                    var resault = MessageBox.Show($"Are you sure want delete {tmpPreset.Name}", "Delete Preset", MessageBoxButton.YesNo, MessageBoxImage.Question);
                    if (resault == MessageBoxResult.Yes)
                    {
                        var removedMonitor = RemovePreset(tmpPreset);
                        if (removedMonitor == true)
                        {
                            NotifyThatSavingsNeed();
                        }
                    }
                }
            }
            #endregion

            else if (e.ActionType == EMVWActions.EditPresetSettings && (e.ObjectCaller.GetType() == typeof(DtoPresetSettings))) //Add Preset
            {
            }
        }
コード例 #10
0
 private void SetSelectedMonitorSettings(DtoMonitor inMonitor)
 {
     monitorTabbedSettings_UC.SetMonitor(inMonitor);
 }
コード例 #11
0
 public bool EditMonitor(DtoMonitor inMonitor)
 {
     return(false);
 }
コード例 #12
0
 public MonitorRectangleName_Adorner(UIElement adornedElement, DtoMonitor inConnectedMonitor = null)
     : base(adornedElement)
 {
     ConnectedMonitor      = inConnectedMonitor;
     this.IsHitTestVisible = false;
 }