Example #1
0
        public Vaccination(Country country, int[] changes)
        {
            InitializeComponent();
            Country      = country;
            Fund.Content = Country.Fund;
            Changes      = changes;

            for (int i = 0; i < Country.CitiesCount; i++)
            {
                var SP = new StackPanel
                {
                    Orientation = Orientation.Horizontal,
                    Height      = 70
                };

                var CityName = new Label
                {
                    Width             = 260,
                    VerticalAlignment = VerticalAlignment.Center
                };
                if (Country.Cities[i].Name.Length > 17)
                {
                    CityName.Content = Country.Cities[i].Name.Substring(0, 17) + "...";
                }
                else
                {
                    CityName.Content = Country.Cities[i].Name;
                }
                CityName.Style = this.Resources["LabelStyle"] as Style;
                SP.Children.Add(CityName);

                var EmptySpace = new Label
                {
                    Width = 70
                };
                SP.Children.Add(EmptySpace);

                var Vaccinating = new Xceed.Wpf.Toolkit.IntegerUpDown
                {
                    Style = this.Resources["UpDownStyle"] as Style,
                    Name  = "City" + (i).ToString() + "Vaccinated",
                    Value = Changes[i]
                };
                Vaccinating.ValueChanged += Vaccinating_ValueChanged;
                SP.Children.Add(Vaccinating);

                Cities.Children.Add(SP);

                if (i != Country.CitiesCount - 1)
                {
                    var BlackSpace = new Label
                    {
                        Style = this.Resources["Label2Style"] as Style
                    };
                    Cities.Children.Add(BlackSpace);
                }
            }
        }
Example #2
0
        void SetValueRangeNUD(Xceed.Wpf.Toolkit.IntegerUpDown x)
        {
            string[] t   = listWeek[0].Split(' ');
            int      min = int.Parse(t[1]);

            t = listWeek[listWeek.Count - 1].Split(' ');
            int max = int.Parse(t[1]);

            x.Minimum = min;
            x.Maximum = max;
        }
Example #3
0
        private void Vaccinating_ValueChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
        {
            Xceed.Wpf.Toolkit.IntegerUpDown a = sender as Xceed.Wpf.Toolkit.IntegerUpDown;
            int index = int.Parse(a.Name[4].ToString());

            if (!string.IsNullOrEmpty(a.Text))
            {
                Country.Fund  -= (int)a.Value * Country.Cost;
                Country.Fund  += Changes[index] * Country.Cost;
                Changes[index] = (int)a.Value;
                Fund.Content   = Country.Fund;
            }
        }
Example #4
0
        string DisplayWeek2RealWeek(Xceed.Wpf.Toolkit.IntegerUpDown x)
        {
            string w = x.Value.ToString();

            foreach (var item in listWeek)
            {
                string[] t = item.Split(' ');
                if (t[1] == w)
                {
                    return(t[0]);
                }
            }
            return("0");
        }
Example #5
0
        void AutoSelectWeek(Xceed.Wpf.Toolkit.IntegerUpDown x)
        {
            int w = GetCurrentNumWeek();

            foreach (var item in listWeek)
            {
                string[] t = item.Split(' ');
                if (w == int.Parse(t[0]))
                {
                    x.Value = int.Parse(t[1]);
                    return;
                }
            }
        }
        private void add_tickbars(Canvas canvas, Slider slider_H, Slider slider_W, Xceed.Wpf.Toolkit.IntegerUpDown TickFrecuency)
        {
            CustomTickBar_H Tickbar_H = new CustomTickBar_H();

            Tickbar_H.Height  = 20;
            Tickbar_H.Minimum = 0;

            Binding binding_slider_w_value = new Binding();

            binding_slider_w_value.Source = slider_W;
            binding_slider_w_value.Path   = new PropertyPath("Value");
            binding_slider_w_value.Mode   = BindingMode.OneWay;
            binding_slider_w_value.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
            BindingOperations.SetBinding(Tickbar_H, CustomTickBar_H.MaximumProperty, binding_slider_w_value);

            Binding binding_tickfrecuency = new Binding();

            binding_tickfrecuency.Source = TickFrecuency;
            binding_tickfrecuency.Path   = new PropertyPath("Value");
            binding_tickfrecuency.Mode   = BindingMode.OneWay;
            binding_tickfrecuency.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
            BindingOperations.SetBinding(Tickbar_H, CustomTickBar_H.TickFrequencyProperty, binding_tickfrecuency);

            Tickbar_H.RenderTransformOrigin = new Point(0.5, 0.5);
            Tickbar_H.UseLayoutRounding     = false;

            Binding binding_canvas_width = new Binding();

            binding_canvas_width.Source = canvas;
            binding_canvas_width.Path   = new PropertyPath("ActualWidth");
            binding_canvas_width.Mode   = BindingMode.OneWay;
            binding_canvas_width.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
            BindingOperations.SetBinding(Tickbar_H, CustomTickBar_H.WidthProperty, binding_canvas_width);

            Canvas.SetTop(Tickbar_H, 0);
            Tickbar_H.RenderTransformOrigin = new Point(0.5, 0.5);
            Tickbar_H.RenderTransform       = new ScaleTransform(1, -1);

            canvas.Children.Add(Tickbar_H);

            //////////////////////////////////////////////////////////////////////////////////////
            CustomTickBar_V Tickbar_V = new CustomTickBar_V();

            Tickbar_V.Width   = 20;
            Tickbar_V.Minimum = 0;

            Binding binding_slider_h_value = new Binding();

            binding_slider_h_value.Source = slider_H;
            binding_slider_h_value.Path   = new PropertyPath("Value");
            binding_slider_h_value.Mode   = BindingMode.OneWay;
            binding_slider_h_value.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
            BindingOperations.SetBinding(Tickbar_V, CustomTickBar_V.MaximumProperty, binding_slider_h_value);


            BindingOperations.SetBinding(Tickbar_V, CustomTickBar_V.TickFrequencyProperty, binding_tickfrecuency);


            Tickbar_V.UseLayoutRounding = false;

            Binding binding_canvas_height = new Binding();

            binding_canvas_height.Source = canvas;
            binding_canvas_height.Path   = new PropertyPath("ActualHeight");
            binding_canvas_height.Mode   = BindingMode.OneWay;
            binding_canvas_height.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
            BindingOperations.SetBinding(Tickbar_V, CustomTickBar_V.HeightProperty, binding_canvas_height);

            Canvas.SetBottom(Tickbar_V, 0);
            Canvas.SetLeft(Tickbar_V, 0);
            Tickbar_V.RenderTransformOrigin = new Point(0.5, 0.5);
            Tickbar_V.RenderTransform       = new ScaleTransform(1, -1);
            canvas.Children.Add(Tickbar_V);
        }
Example #7
0
        private void button_FaShong_Click(object sender, RoutedEventArgs e)
        {
            LEDSend vLEDSend = new LEDSend();

            vLEDSend.SelectedIPArray = m_SelectedIPArray;
            vLEDSend.TextArray       = RTFBox1.ImagePathList.ToArray();

            List <ConfigInfo> vPicList   = new List <ConfigInfo>();
            List <ConfigInfo> vVideoList = new List <ConfigInfo>();

            for (int i = 1; i <= 4; i++)
            {
                TextBox vVideoTextBox = (TextBox)FindName(string.Format("textBox_ShiPing_SPLJ{0}", i));
                if (vVideoTextBox.Text != null && vVideoTextBox.Text != "")
                {
                    if (File.Exists(vVideoTextBox.Text))
                    {
                        ConfigInfo vConfigInfo = new ConfigInfo()
                        {
                            Path = vVideoTextBox.Text,
                            ID   = i
                        };
                        vVideoList.Add(vConfigInfo);
                    }
                }

                TextBox vPicTextBox = (TextBox)FindName(string.Format("textBox_TuPian_TPLJ{0}", i));
                if (vPicTextBox.Text != null && vPicTextBox.Text != "")
                {
                    if (File.Exists(vPicTextBox.Text))
                    {
                        ConfigInfo vConfigInfo = new ConfigInfo()
                        {
                            Path = vPicTextBox.Text,
                            ID   = i
                        };
                        vPicList.Add(vConfigInfo);
                    }
                }
            }

            vLEDSend.PicArray = new string[vPicList.Count];
            for (int i = 0; i < vPicList.Count; i++)
            {
                vLEDSend.PicArray[i] = vPicList[i].Path;
            }

            vLEDSend.VideoArray = new string[vVideoList.Count];
            for (int i = 0; i < vVideoList.Count; i++)
            {
                vLEDSend.VideoArray[i] = vVideoList[i].Path;
            }
            vLEDSend.Owner = Application.Current.MainWindow;
            if (vLEDSend.ShowDialog() ?? false)
            {
                List <LEDChannelInfo> vLEDChannelInfoList = new List <LEDChannelInfo>();
                LEDControl            vLEDControl         = new LEDControl(App.WatchHouseID);

                List <LEDChannelInfo> vTextLedList = new List <LEDChannelInfo>();
                foreach (string vTempText in vLEDSend.SelectedTextArray)
                {
                    LEDChannelInfo vTextChannelInfo = new LEDChannelInfo()
                    {
                        ChannelType = LEDChanneTypeEnum.Text,
                        Content     = vTempText,
                        InEff       = (int)comboBox_Text_XianShi1.SelectedValue,
                        OutEff      = (int)comboBox_Text_QinPing1.SelectedValue,
                        HoldTime    = (integerUpDown_Text.Value ?? 0) * 10
                    };
                    vLEDChannelInfoList.Add(vTextChannelInfo);
                    vTextLedList.Add(vTextChannelInfo);
                }


                List <LEDChannelInfo> vPicLedList = new List <LEDChannelInfo>();
                foreach (string vTempPic in vLEDSend.SelectedPicArray)
                {
                    int      vID = vPicList.Where(m => m.Path == vTempPic).FirstOrDefault().ID;
                    ComboBox vComboBox_TuPian_XianShi = (ComboBox)FindName(string.Format("comboBox_TuPian_XianShi{0}", vID));
                    ComboBox vComboBox_TuPain_QinPing = (ComboBox)FindName(string.Format("comboBox_TuPian_QinPing{0}", vID));
                    Xceed.Wpf.Toolkit.IntegerUpDown vIntegerUpDown_TuPian = (Xceed.Wpf.Toolkit.IntegerUpDown)FindName(string.Format("integerUpDown_TuPian{0}", vID));

                    LEDChannelInfo vPicChannelInfo = new LEDChannelInfo()
                    {
                        ChannelType = LEDChanneTypeEnum.Image,
                        Content     = vTempPic,
                        InEff       = (int)vComboBox_TuPian_XianShi.SelectedValue,
                        OutEff      = (int)vComboBox_TuPain_QinPing.SelectedValue,
                        HoldTime    = (vIntegerUpDown_TuPian.Value ?? 0) * 10
                    };
                    vLEDChannelInfoList.Add(vPicChannelInfo);
                    vPicLedList.Add(vPicChannelInfo);
                }

                List <LEDChannelInfo> vVideoLedList = new List <LEDChannelInfo>();
                foreach (string vTempVideo in vLEDSend.SelectedVideoArray)
                {
                    int      vID = vVideoList.Where(m => m.Path == vTempVideo).FirstOrDefault().ID;
                    ComboBox vComboBox_ShiPing_XianShi = (ComboBox)FindName(string.Format("comboBox_ShiPing_XianShi{0}", vID));
                    ComboBox vComboBox_ShiPing_QinPing = (ComboBox)FindName(string.Format("comboBox_ShiPing_QinPing{0}", vID));
                    Xceed.Wpf.Toolkit.IntegerUpDown vIntegerUpDown_ShiPing = (Xceed.Wpf.Toolkit.IntegerUpDown)FindName(string.Format("integerUpDown_ShiPing{0}", vID));

                    LEDChannelInfo vVideoChannelInfo = new LEDChannelInfo()
                    {
                        ChannelType = LEDChanneTypeEnum.Video,
                        Content     = vTempVideo,
                        InEff       = (int)vComboBox_ShiPing_XianShi.SelectedValue,
                        OutEff      = (int)vComboBox_ShiPing_QinPing.SelectedValue,
                        HoldTime    = (vIntegerUpDown_ShiPing.Value ?? 0) * 10
                    };
                    vLEDChannelInfoList.Add(vVideoChannelInfo);
                    vVideoLedList.Add(vVideoChannelInfo);
                }

                m_SelectedIPArray = vLEDSend.SelectedIPArray;
                vLEDControl.SendMultiChannel(vLEDChannelInfoList, m_SelectedIPArray);
                Xceed.Wpf.Toolkit.MessageBox.Show("已发送", "信息", MessageBoxButton.OK, MessageBoxImage.Information);
                Config vConfig = new Config();
                vConfig.LedTextArray  = vTextLedList.ToArray();
                vConfig.LedPicArray   = vPicLedList.ToArray();
                vConfig.LedVideoArray = vVideoLedList.ToArray();
                vConfig.Save();
            }
        }
Example #8
0
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            m_LEDControl = new LEDControl(App.WatchHouseID);
            Config vConfig = new Config();

            if (m_LEDControl.Width != 0 && m_LEDControl.Heigth != 0)
            {
                RTFBox1.RichWidth  = m_LEDControl.Width;
                RTFBox1.RichHeight = m_LEDControl.Heigth;
            }
            else
            {
                Xceed.Wpf.Toolkit.MessageBox.Show("未设置LED广告屏的分辨率", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
                tabControl.IsEnabled = false;
                RTFBox1.Visibility   = Visibility.Hidden;
            }
            //文字显示
            comboBox_Text_XianShi1.ItemsSource       = m_Eff;
            comboBox_Text_XianShi1.SelectedValuePath = "Key";
            comboBox_Text_XianShi1.DisplayMemberPath = "Value";
            comboBox_Text_XianShi1.SelectedValue     = 25;

            //文字清屏
            comboBox_Text_QinPing1.ItemsSource       = m_Eff;
            comboBox_Text_QinPing1.SelectedValuePath = "Key";
            comboBox_Text_QinPing1.DisplayMemberPath = "Value";
            comboBox_Text_QinPing1.SelectedValue     = 25;
            integerUpDown_Text.Value = 0;
            for (int i = 1; i <= 4; i++)
            {
                //视频路径
                TextBox vTextBox_ShiPing_SPLJ = (TextBox)FindName(string.Format("textBox_ShiPing_SPLJ{0}", i));
                //视频清屏
                ComboBox vComboBox_ShiPing_QinPing = (ComboBox)FindName(string.Format("comboBox_ShiPing_QinPing{0}", i));
                vComboBox_ShiPing_QinPing.ItemsSource       = m_Eff;
                vComboBox_ShiPing_QinPing.SelectedValuePath = "Key";
                vComboBox_ShiPing_QinPing.DisplayMemberPath = "Value";
                vComboBox_ShiPing_QinPing.SelectedValue     = 25;
                //视频显示
                ComboBox vComboBox_ShiPing_XianShi = (ComboBox)FindName(string.Format("comboBox_ShiPing_XianShi{0}", i));
                vComboBox_ShiPing_XianShi.ItemsSource       = m_Eff;
                vComboBox_ShiPing_XianShi.SelectedValuePath = "Key";
                vComboBox_ShiPing_XianShi.DisplayMemberPath = "Value";
                vComboBox_ShiPing_XianShi.SelectedValue     = 25;
                //视频停留时间
                Xceed.Wpf.Toolkit.IntegerUpDown vIntegerUpDown_ShiPing = (Xceed.Wpf.Toolkit.IntegerUpDown)FindName(string.Format("integerUpDown_ShiPing{0}", i));
                vIntegerUpDown_ShiPing.Value = 0;

                if (i <= vConfig.LedVideoArray.Length)
                {
                    vComboBox_ShiPing_QinPing.SelectedValue = vConfig.LedVideoArray[i - 1].OutEff;
                    vComboBox_ShiPing_XianShi.SelectedValue = vConfig.LedVideoArray[i - 1].InEff;
                    vIntegerUpDown_ShiPing.Value            = vConfig.LedVideoArray[i - 1].HoldTime;
                    vTextBox_ShiPing_SPLJ.Text = vConfig.LedVideoArray[i - 1].Content;
                }

                //图片路径
                TextBox vTextBox_TuPian_TPLJ = (TextBox)FindName(string.Format("textBox_TuPian_TPLJ{0}", i));
                //图片清屏
                ComboBox vComboBox_TuPian_QinPing = (ComboBox)FindName(string.Format("comboBox_TuPian_QinPing{0}", i));
                vComboBox_TuPian_QinPing.ItemsSource       = m_Eff;
                vComboBox_TuPian_QinPing.SelectedValuePath = "Key";
                vComboBox_TuPian_QinPing.DisplayMemberPath = "Value";
                vComboBox_TuPian_QinPing.SelectedValue     = 25;
                //图片显示
                ComboBox vComboBox_TuPian_XianShi = (ComboBox)FindName(string.Format("comboBox_TuPian_XianShi{0}", i));
                vComboBox_TuPian_XianShi.ItemsSource       = m_Eff;
                vComboBox_TuPian_XianShi.SelectedValuePath = "Key";
                vComboBox_TuPian_XianShi.DisplayMemberPath = "Value";
                vComboBox_TuPian_XianShi.SelectedValue     = 25;
                //图片停留时间
                Xceed.Wpf.Toolkit.IntegerUpDown vIntegerUpDown_TuPian = (Xceed.Wpf.Toolkit.IntegerUpDown)FindName(string.Format("integerUpDown_TuPian{0}", i));
                vIntegerUpDown_TuPian.Value = 0;
                if (i <= vConfig.LedPicArray.Length)
                {
                    vTextBox_TuPian_TPLJ.Text = vConfig.LedPicArray[i - 1].Content;
                    vComboBox_TuPian_QinPing.SelectedValue = vConfig.LedPicArray[i - 1].OutEff;
                    vComboBox_TuPian_XianShi.SelectedValue = vConfig.LedPicArray[i - 1].InEff;
                    vIntegerUpDown_TuPian.Value            = vConfig.LedPicArray[i - 1].HoldTime;
                }
            }

            //上一次发送成功的图片
            for (int i = 1; i <= 10; i++)
            {
                if (i <= vConfig.LedTextArray.Length)
                {
                    RTFBox1.ImagePathList.Add(vConfig.LedTextArray[i - 1].Content);
                }
            }
        }
Example #9
0
        private void GenerateHostControl(object DefaultValue, Type CurrentType)
        {
            if (DefaultValue != null)
            {
                HostType = DefaultValue.GetType();
            }
            else
            {
                HostType = CurrentType;
            }

            LastValue = DefaultValue;

            if (HostType == typeof(byte))
            {
                ByteNumericControl = new Xceed.Wpf.Toolkit.ByteUpDown();
                ByteNumericControl.UpdateValueOnEnterKey = true;
                ByteNumericControl.Value = (byte)DefaultValue;
                ValueControl.Value1Host.Children.Add(ByteNumericControl);
            }
            else if (HostType == typeof(ushort))
            {
                UShortNumericControl = new Xceed.Wpf.Toolkit.UShortUpDown();
                UShortNumericControl.UpdateValueOnEnterKey = true;
                UShortNumericControl.Value = (ushort)DefaultValue;
                ValueControl.Value1Host.Children.Add(UShortNumericControl);
            }
            else if (HostType == typeof(uint))
            {
                UIntNumericControl = new Xceed.Wpf.Toolkit.UIntegerUpDown();
                UIntNumericControl.UpdateValueOnEnterKey = true;
                UIntNumericControl.Value = (uint)DefaultValue;
                ValueControl.Value1Host.Children.Add(UIntNumericControl);
            }
            else if (HostType == typeof(sbyte))
            {
                SByteNumericControl = new Xceed.Wpf.Toolkit.SByteUpDown();
                SByteNumericControl.UpdateValueOnEnterKey = true;
                SByteNumericControl.Value = (sbyte)DefaultValue;
                ValueControl.Value1Host.Children.Add(SByteNumericControl);
            }
            else if (HostType == typeof(short))
            {
                ShortNumericControl = new Xceed.Wpf.Toolkit.ShortUpDown();
                ShortNumericControl.UpdateValueOnEnterKey = true;
                ShortNumericControl.Value = (short)DefaultValue;
                ValueControl.Value1Host.Children.Add(ShortNumericControl);
            }
            else if (HostType == typeof(int))
            {
                IntNumericControl = new Xceed.Wpf.Toolkit.IntegerUpDown();
                IntNumericControl.UpdateValueOnEnterKey = true;
                IntNumericControl.Value = (int)DefaultValue;
                ValueControl.Value1Host.Children.Add(IntNumericControl);
            }
            else if (HostType == typeof(bool))
            {
                BoolCheckboxControl                            = new System.Windows.Controls.CheckBox();
                BoolCheckboxControl.IsChecked                  = (bool)DefaultValue;
                BoolCheckboxControl.VerticalAlignment          = System.Windows.VerticalAlignment.Center;
                BoolCheckboxControl.HorizontalAlignment        = System.Windows.HorizontalAlignment.Left;
                BoolCheckboxControl.VerticalContentAlignment   = System.Windows.VerticalAlignment.Center;
                BoolCheckboxControl.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Left;
                ValueControl.Value1Host.Children.Add(BoolCheckboxControl);
            }
            else if (HostType == typeof(string))
            {
                StringTextboxControl = new System.Windows.Controls.TextBox()
                {
                    IsInactiveSelectionHighlightEnabled = true
                };
                StringTextboxControl.Text = (string)DefaultValue;
                TextBoxLastString         = (string)DefaultValue;

                ValueControl.Value1Host.Children.Add(StringTextboxControl);
            }
            else if (HostType == typeof(float))
            {
                FloatNumericControl = new Xceed.Wpf.Toolkit.SingleUpDown();
                FloatNumericControl.UpdateValueOnEnterKey = true;
                FloatNumericControl.Value = (float)DefaultValue;
                ValueControl.Value1Host.Children.Add(FloatNumericControl);
            }
            else if (HostType == typeof(System.Drawing.Color))
            {
                ColorPickerControl = new Xceed.Wpf.Toolkit.ColorPicker();
                System.Drawing.Color initalColor = (System.Drawing.Color)DefaultValue;
                ColorPickerLastColor = new System.Windows.Media.Color()
                {
                    A = initalColor.A, R = initalColor.R, G = initalColor.G, B = initalColor.B
                };
                ColorPickerControl.SelectedColor = ColorPickerLastColor;
                ValueControl.Value1Host.Children.Add(ColorPickerControl);
            }

            EnableEvents();
        }
Example #10
0
        /// <summary>
        /// Cuando un control en la pantalla esta vacio este lo apunta y retorna un valor
        /// true si vacio y false si todo esta lleno
        /// </summary>
        /// <param name="apuntar">true=control color original false=color gris</param>
        /// <returns></returns>
        public bool Seleccionar_control(bool apuntar)
        {
            TextBox     textBox     = null;
            PasswordBox passwordBox = null;
            ComboBox    comboBox    = null;

            Xceed.Wpf.Toolkit.IntegerUpDown  integerUpDown  = null;
            Xceed.Wpf.Toolkit.DecimalUpDown  decimalUpDown  = null;
            Xceed.Wpf.Toolkit.DateTimePicker dateTimePicker = null;
            DotNetKit.Windows.Controls.AutoCompleteComboBox autoCompleteComboBox = null;

            foreach (Control a in campos)
            {
                switch (a.GetType().Name)
                {
                case "TextBox":
                    textBox = a as TextBox;
                    if (string.IsNullOrEmpty(textBox.Text))
                    {
                        Marcar_control(textBox, apuntar);
                        a.Focus();
                        return(false);
                    }
                    break;

                case "PasswordBox":
                    passwordBox = (a as PasswordBox);
                    if (string.IsNullOrEmpty(passwordBox.Password))
                    {
                        Marcar_control(passwordBox, apuntar);
                        a.Focus();
                        return(false);
                    }
                    break;

                case "ComboBox":
                    comboBox = (a as ComboBox);
                    if (comboBox.SelectedItem == null)
                    {
                        Marcar_control(comboBox, apuntar);
                        a.Focus();
                        return(false);
                    }
                    break;

                case "IntegerUpDown":
                    integerUpDown = (a as Xceed.Wpf.Toolkit.IntegerUpDown);
                    if (string.IsNullOrEmpty(integerUpDown.Text))
                    {
                        Marcar_control(integerUpDown, apuntar);
                        a.Focus();
                        return(false);
                    }
                    break;

                case "DecimalUpDown":
                    decimalUpDown = (a as Xceed.Wpf.Toolkit.DecimalUpDown);
                    if (string.IsNullOrEmpty(decimalUpDown.Text))
                    {
                        Marcar_control(decimalUpDown, apuntar);
                        a.Focus();
                        return(false);
                    }
                    break;

                case "DateTimePicker":
                    dateTimePicker = (a as Xceed.Wpf.Toolkit.DateTimePicker);
                    if (string.IsNullOrEmpty(dateTimePicker.Text))
                    {
                        Marcar_control(dateTimePicker, apuntar);
                        a.Focus();
                        return(false);
                    }
                    break;

                case "AutoCompleteComboBox":
                    autoCompleteComboBox = (a as DotNetKit.Windows.Controls.AutoCompleteComboBox);
                    if (string.IsNullOrEmpty(autoCompleteComboBox.Text))
                    {
                        Marcar_control(autoCompleteComboBox, apuntar);
                        a.Focus();
                        return(false);
                    }
                    break;
                }
            }
            return(true);
        }