コード例 #1
0
        private static void MinimumValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            CurrencyTextBox ctb = d as CurrencyTextBox;

            if (ctb.Number < (decimal)e.NewValue)
            {
                ctb.Number = (decimal)e.NewValue;
            }
        }
コード例 #2
0
        private static object MaximumCoerceValue(DependencyObject d, object baseValue)
        {
            CurrencyTextBox ctb = d as CurrencyTextBox;

            if (ctb.MaximumValue > decimal.MaxValue / 2)
            {
                return(decimal.MaxValue / 2);
            }

            return(baseValue);
        }
コード例 #3
0
        private static void NumberPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            CurrencyTextBox ctb = d as CurrencyTextBox;

            //Color update
            if (ctb.Number < 0)
            {
                ctb.Foreground = Brushes.Red;
            }
            else
            {
                ctb.Foreground = Brushes.Black;
            }
        }
コード例 #4
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.cbPlaca = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 2:
                this.txtKM = ((System.Windows.Controls.TextBox)(target));
                return;

            case 3:
                this.txtCombustivel = ((System.Windows.Controls.TextBox)(target));
                return;

            case 4:
                this.txtQtd = ((System.Windows.Controls.TextBox)(target));

            #line 66 "..\..\..\Views\CadAbastecimento.xaml"
                this.txtQtd.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TxtQtd_TextChanged);

            #line default
            #line hidden
                return;

            case 5:
                this.btnSalvar = ((System.Windows.Controls.Button)(target));

            #line 73 "..\..\..\Views\CadAbastecimento.xaml"
                this.btnSalvar.Click += new System.Windows.RoutedEventHandler(this.BtnSalvar_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.txtValor = ((CurrencyTextBoxControl.CurrencyTextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #5
0
        private static object NumberPropertyCoerceValue(DependencyObject d, object baseValue)
        {
            CurrencyTextBox ctb   = d as CurrencyTextBox;
            decimal         value = (decimal)baseValue;

            //Check maximum value
            if (value > ctb.MaximumValue && ctb.MaximumValue > 0)
            {
                return(ctb.MaximumValue);
            }
            else
            //Check minimum value
            if (value < ctb.MinimumValue && ctb.MinimumValue < 0)
            {
                return(ctb.MinimumValue);
            }
            else
            {
                return(value);
            }
        }
コード例 #6
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.cbPlaca = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 2:
                this.txtPlano = ((System.Windows.Controls.TextBox)(target));
                return;

            case 3:
                this.txtSeguradora = ((System.Windows.Controls.TextBox)(target));
                return;

            case 4:
                this.dpData = ((System.Windows.Controls.DatePicker)(target));
                return;

            case 5:
                this.txtApolice = ((System.Windows.Controls.TextBox)(target));
                return;

            case 6:
                this.btnSalvar = ((System.Windows.Controls.Button)(target));

            #line 75 "..\..\..\Views\CadSeguro.xaml"
                this.btnSalvar.Click += new System.Windows.RoutedEventHandler(this.BtnSalvar_Click);

            #line default
            #line hidden
                return;

            case 7:
                this.txtValor = ((CurrencyTextBoxControl.CurrencyTextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #7
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.FormGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 2:
                this.textBoxCodigo = ((System.Windows.Controls.TextBox)(target));

            #line 71 "..\..\..\SubWindows\AdicionarProdutoWindow - Copy.xaml"
                this.textBoxCodigo.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.PreviewTextInput);

            #line default
            #line hidden
                return;

            case 3:
                this.textBoxNome = ((System.Windows.Controls.TextBox)(target));
                return;

            case 4:
                this.textBoxPrecoCusto = ((CurrencyTextBoxControl.CurrencyTextBox)(target));
                return;

            case 5:
                this.textBoxPrecoVista = ((CurrencyTextBoxControl.CurrencyTextBox)(target));
                return;

            case 6:
                this.textBoxPrecoPrazo = ((CurrencyTextBoxControl.CurrencyTextBox)(target));
                return;

            case 7:
                this.textBoxCategoria = ((System.Windows.Controls.TextBox)(target));
                return;

            case 8:
                this.textBoxEstoque = ((System.Windows.Controls.TextBox)(target));

            #line 77 "..\..\..\SubWindows\AdicionarProdutoWindow - Copy.xaml"
                this.textBoxEstoque.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.PreviewTextInput);

            #line default
            #line hidden
                return;

            case 9:
                this.textBoxDescricao = ((System.Windows.Controls.TextBox)(target));
                return;

            case 10:
                this.checkBoxEstoque = ((System.Windows.Controls.CheckBox)(target));

            #line 80 "..\..\..\SubWindows\AdicionarProdutoWindow - Copy.xaml"
                this.checkBoxEstoque.Checked += new System.Windows.RoutedEventHandler(this.checkBox_Checked);

            #line default
            #line hidden

            #line 80 "..\..\..\SubWindows\AdicionarProdutoWindow - Copy.xaml"
                this.checkBoxEstoque.Unchecked += new System.Windows.RoutedEventHandler(this.checkBox_Unchecked);

            #line default
            #line hidden
                return;

            case 11:
                this.comboBoxFornecedores = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 12:
                this.checkBoxPreco = ((System.Windows.Controls.CheckBox)(target));

            #line 82 "..\..\..\SubWindows\AdicionarProdutoWindow - Copy.xaml"
                this.checkBoxPreco.Checked += new System.Windows.RoutedEventHandler(this.checkBox_Checked_1);

            #line default
            #line hidden

            #line 82 "..\..\..\SubWindows\AdicionarProdutoWindow - Copy.xaml"
                this.checkBoxPreco.Unchecked += new System.Windows.RoutedEventHandler(this.checkBoxPreco_Unchecked);

            #line default
            #line hidden
                return;

            case 13:
                this.buttonAdd = ((System.Windows.Controls.Button)(target));

            #line 84 "..\..\..\SubWindows\AdicionarProdutoWindow - Copy.xaml"
                this.buttonAdd.Click += new System.Windows.RoutedEventHandler(this.buttonAdd_Click);

            #line default
            #line hidden
                return;

            case 14:
                this.buttonLimpar = ((System.Windows.Controls.Button)(target));

            #line 85 "..\..\..\SubWindows\AdicionarProdutoWindow - Copy.xaml"
                this.buttonLimpar.Click += new System.Windows.RoutedEventHandler(this.buttonLimpar_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #8
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.TrainsitionigContentSlide = ((MaterialDesignThemes.Wpf.Transitions.TransitioningContent)(target));
                return;

            case 2:
                this.txtTitulo = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 3:
                this.cadPeca = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 4:
                this.panel1 = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 5:
                this.txtNome = ((System.Windows.Controls.TextBox)(target));

            #line 30 "..\..\..\Views\CadPeca.xaml"
                this.txtNome.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnKeyDownHandler);

            #line default
            #line hidden
                return;

            case 6:
                this.txtPrateleira = ((System.Windows.Controls.TextBox)(target));

            #line 32 "..\..\..\Views\CadPeca.xaml"
                this.txtPrateleira.KeyDown += new System.Windows.Input.KeyEventHandler(this.TxtPrateleira_KeyDown);

            #line default
            #line hidden
                return;

            case 7:
                this.panel2 = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 8:
                this.txtValor = ((CurrencyTextBoxControl.CurrencyTextBox)(target));

            #line 38 "..\..\..\Views\CadPeca.xaml"
                this.txtValor.KeyDown += new System.Windows.Input.KeyEventHandler(this.TxtValor_KeyDown);

            #line default
            #line hidden
                return;

            case 9:
                this.txtQtdMin = ((System.Windows.Controls.TextBox)(target));

            #line 48 "..\..\..\Views\CadPeca.xaml"
                this.txtQtdMin.KeyDown += new System.Windows.Input.KeyEventHandler(this.TxtValor_KeyDown);

            #line default
            #line hidden

            #line 48 "..\..\..\Views\CadPeca.xaml"
                this.txtQtdMin.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TxtQtdMin_TextChanged);

            #line default
            #line hidden
                return;

            case 10:
                this.btnCadastrar = ((System.Windows.Controls.Button)(target));

            #line 50 "..\..\..\Views\CadPeca.xaml"
                this.btnCadastrar.Click += new System.Windows.RoutedEventHandler(this.BtnCadastrar_Click);

            #line default
            #line hidden
                return;

            case 11:
                this.btnListarPeca = ((System.Windows.Controls.Button)(target));

            #line 62 "..\..\..\Views\CadPeca.xaml"
                this.btnListarPeca.Click += new System.Windows.RoutedEventHandler(this.BtnListarPeca_Click);

            #line default
            #line hidden
                return;

            case 12:
                this.btnAltera = ((System.Windows.Controls.Button)(target));

            #line 70 "..\..\..\Views\CadPeca.xaml"
                this.btnAltera.Click += new System.Windows.RoutedEventHandler(this.BtnAltera_Click);

            #line default
            #line hidden
                return;

            case 13:
                this.txtDescricao = ((System.Windows.Controls.TextBox)(target));
                return;

            case 14:
                this.listarPeca = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 15:
                this.stpAlterarVeiculo = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 16:
                this.teste = ((System.Windows.Controls.TextBox)(target));
                return;

            case 17:
                this.alterarPeca = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 18:
                this.txtAltNome = ((System.Windows.Controls.TextBox)(target));

            #line 103 "..\..\..\Views\CadPeca.xaml"
                this.txtAltNome.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnKeyDownHandler);

            #line default
            #line hidden
                return;

            case 19:
                this.txtAltPrateleira = ((System.Windows.Controls.TextBox)(target));

            #line 105 "..\..\..\Views\CadPeca.xaml"
                this.txtAltPrateleira.KeyDown += new System.Windows.Input.KeyEventHandler(this.TxtPrateleira_KeyDown);

            #line default
            #line hidden
                return;

            case 20:
                this.txtAltValor = ((CurrencyTextBoxControl.CurrencyTextBox)(target));

            #line 110 "..\..\..\Views\CadPeca.xaml"
                this.txtAltValor.KeyDown += new System.Windows.Input.KeyEventHandler(this.TxtValor_KeyDown);

            #line default
            #line hidden
                return;

            case 21:
                this.txtAltQtdMin = ((System.Windows.Controls.TextBox)(target));

            #line 120 "..\..\..\Views\CadPeca.xaml"
                this.txtAltQtdMin.KeyDown += new System.Windows.Input.KeyEventHandler(this.TxtValor_KeyDown);

            #line default
            #line hidden
                return;

            case 22:
                this.btnAlterar = ((System.Windows.Controls.Button)(target));

            #line 122 "..\..\..\Views\CadPeca.xaml"
                this.btnAlterar.Click += new System.Windows.RoutedEventHandler(this.BtnCadastrar_Click);

            #line default
            #line hidden
                return;

            case 23:
                this.spListar = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 24:
                this.lblFiltro = ((System.Windows.Controls.Label)(target));
                return;

            case 25:
                this.txtBuscar = ((System.Windows.Controls.TextBox)(target));

            #line 141 "..\..\..\Views\CadPeca.xaml"
                this.txtBuscar.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TxtBuscar_TextChanged);

            #line default
            #line hidden
                return;

            case 26:
                this.btnBuscar = ((System.Windows.Controls.Button)(target));

            #line 145 "..\..\..\Views\CadPeca.xaml"
                this.btnBuscar.Click += new System.Windows.RoutedEventHandler(this.BtnBuscar_Click);

            #line default
            #line hidden
                return;

            case 27:
                this.dgListar = ((System.Windows.Controls.DataGrid)(target));

            #line 149 "..\..\..\Views\CadPeca.xaml"
                this.dgListar.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.DgListar_MouseDoubleClick);

            #line default
            #line hidden

            #line 149 "..\..\..\Views\CadPeca.xaml"
                this.dgListar.AutoGeneratedColumns += new System.EventHandler(this.DgListar_AutoGeneratedColumns);

            #line default
            #line hidden
                return;

            case 28:
                this.btnVoltar = ((System.Windows.Controls.Button)(target));

            #line 152 "..\..\..\Views\CadPeca.xaml"
                this.btnVoltar.Click += new System.Windows.RoutedEventHandler(this.BtnVoltar_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #9
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.TrainsitionigContentSlide = ((MaterialDesignThemes.Wpf.Transitions.TransitioningContent)(target));
                return;

            case 2:
                this.tbTitulo = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 3:
                this.spInManutencao = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 4:
                this.btnCadManutencao = ((System.Windows.Controls.Button)(target));

            #line 20 "..\..\..\Views\CadManutencao.xaml"
                this.btnCadManutencao.Click += new System.Windows.RoutedEventHandler(this.BtnCadManutencao_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.btnFinalizar = ((System.Windows.Controls.Button)(target));

            #line 34 "..\..\..\Views\CadManutencao.xaml"
                this.btnFinalizar.Click += new System.Windows.RoutedEventHandler(this.BtnFinalizar_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.btnConsultar = ((System.Windows.Controls.Button)(target));

            #line 57 "..\..\..\Views\CadManutencao.xaml"
                this.btnConsultar.Click += new System.Windows.RoutedEventHandler(this.BtnConsultar_Click);

            #line default
            #line hidden
                return;

            case 7:
                this.spCadManutencao = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 8:
                this.cbPlacaManutencao = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 9:
                this.lblData = ((System.Windows.Controls.Label)(target));
                return;

            case 10:
                this.dpData = ((System.Windows.Controls.DatePicker)(target));
                return;

            case 11:
                this.gridVeiculo = ((System.Windows.Controls.Grid)(target));
                return;

            case 12:
                this.gridCadViagem = ((System.Windows.Controls.Grid)(target));
                return;

            case 13:
                this.txtDescricao = ((System.Windows.Controls.TextBox)(target));
                return;

            case 14:
                this.btnCadastrar = ((System.Windows.Controls.Button)(target));

            #line 126 "..\..\..\Views\CadManutencao.xaml"
                this.btnCadastrar.Click += new System.Windows.RoutedEventHandler(this.BtnCadastrar_Click_1);

            #line default
            #line hidden
                return;

            case 15:
                this.btnVoltarSaindo = ((System.Windows.Controls.Button)(target));

            #line 137 "..\..\..\Views\CadManutencao.xaml"
                this.btnVoltarSaindo.Click += new System.Windows.RoutedEventHandler(this.BtnVoltarSaindo_Click);

            #line default
            #line hidden
                return;

            case 16:
                this.spFinalizarManutencao = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 17:
                this.cbPlaca = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 18:
                this.lblDataSaida = ((System.Windows.Controls.Label)(target));
                return;

            case 19:
                this.cbPeca = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 20:
                this.txtQtd = ((System.Windows.Controls.TextBox)(target));

            #line 166 "..\..\..\Views\CadManutencao.xaml"
                this.txtQtd.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TxtQtd_TextChanged);

            #line default
            #line hidden
                return;

            case 21:
                this.btnAdicionar = ((System.Windows.Controls.Button)(target));

            #line 168 "..\..\..\Views\CadManutencao.xaml"
                this.btnAdicionar.Click += new System.Windows.RoutedEventHandler(this.BtnAdicionar_Click);

            #line default
            #line hidden
                return;

            case 22:
                this.dgPeca = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 23:
                this.btnDeletar = ((System.Windows.Controls.Button)(target));

            #line 178 "..\..\..\Views\CadManutencao.xaml"
                this.btnDeletar.Click += new System.Windows.RoutedEventHandler(this.BtnDeletar_Click);

            #line default
            #line hidden
                return;

            case 24:
                this.txtValor = ((CurrencyTextBoxControl.CurrencyTextBox)(target));
                return;

            case 25:
                this.gridVeiculo1 = ((System.Windows.Controls.Grid)(target));
                return;

            case 26:
                this.gridFinalizarManutencao = ((System.Windows.Controls.Grid)(target));
                return;

            case 27:
                this.txtDescricao1 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 28:
                this.btnSalvarFim = ((System.Windows.Controls.Button)(target));

            #line 248 "..\..\..\Views\CadManutencao.xaml"
                this.btnSalvarFim.Click += new System.Windows.RoutedEventHandler(this.BtnSalvarFim_Click);

            #line default
            #line hidden
                return;

            case 29:
                this.btnVoltarSaindo1 = ((System.Windows.Controls.Button)(target));

            #line 262 "..\..\..\Views\CadManutencao.xaml"
                this.btnVoltarSaindo1.Click += new System.Windows.RoutedEventHandler(this.BtnVoltarSaindo1_Click);

            #line default
            #line hidden
                return;

            case 30:
                this.spListarVeiculos = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 31:
                this.lblFiltro = ((System.Windows.Controls.Label)(target));
                return;

            case 32:
                this.txtBuscar = ((System.Windows.Controls.TextBox)(target));

            #line 277 "..\..\..\Views\CadManutencao.xaml"
                this.txtBuscar.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TxtBuscar_TextChanged);

            #line default
            #line hidden
                return;

            case 33:
                this.btnBuscar = ((System.Windows.Controls.Button)(target));
                return;

            case 34:
                this.dgVeiculo = ((System.Windows.Controls.DataGrid)(target));

            #line 285 "..\..\..\Views\CadManutencao.xaml"
                this.dgVeiculo.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.DgVeiculo_MouseDoubleClick);

            #line default
            #line hidden

            #line 285 "..\..\..\Views\CadManutencao.xaml"
                this.dgVeiculo.AutoGeneratedColumns += new System.EventHandler(this.DgVeiculo_AutoGeneratedColumns);

            #line default
            #line hidden
                return;

            case 35:
                this.btnVoltar = ((System.Windows.Controls.Button)(target));

            #line 286 "..\..\..\Views\CadManutencao.xaml"
                this.btnVoltar.Click += new System.Windows.RoutedEventHandler(this.BtnVoltar_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }