示例#1
0
 private void TimerActualizar_Tick(object sender, EventArgs e)
 {
     TimerActualizar.Stop();
     ActualizarDetalle();
 }
示例#2
0
        private void ProgramarActualizacionDetalle(bool textChanged)
        {
            TimerActualizar.Stop();

            if (string.IsNullOrEmpty(m_FreeTextCode) == false && this.EntradaCodigo.Text == m_FreeTextCode)
            {
                m_ItemId        = 0;
                this.CurrentRow = null;
                m_LastText1     = "";
                if (EntradaFreeText.Visible == false)
                {
                    EntradaFreeText.Visible = true;
                    EntradaFreeText.Focus();
                }

                if (textChanged)
                {
                    //this.DispararTextChanged = true;
                    //this.TimerActualizar.Start();
                    this.DispararTextChangedAhora();
                }
            }
            else if (this.Relation.IsEmpty() == false && string.IsNullOrWhiteSpace(EntradaCodigo.Text) == false && EntradaCodigo.Text != "0")
            {
                Label1.ForeColor = this.DisplayStyle.TextColor;
                if (this.AutoUpdate)
                {
                    if (Lfx.Workspace.Master == null || Lfx.Workspace.Master.SlowLink)
                    {
                        this.TimerActualizar.Interval = 500;
                    }
                    else
                    {
                        this.TimerActualizar.Interval = 200;
                    }

                    if (textChanged)
                    {
                        this.DispararTextChanged = true;
                        this.TimerActualizar.Start();
                    }
                }
                else
                {
                    if (textChanged)
                    {
                        this.DispararTextChangedAhora();
                    }
                }
            }
            else
            {
                m_ItemId         = 0;
                this.CurrentRow  = null;
                m_LastText1      = "";
                Label1.Text      = this.PlaceholderText;
                Label1.ForeColor = this.DisplayStyle.DataAreaGrayTextColor;

                if (textChanged)
                {
                    this.DispararTextChangedAhora();
                }
            }
        }