Exemple #1
0
 private void ConversionQty_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         BtnOk.PerformClick();
     }
 }
 /// <summary>
 ///     Shows the window.
 /// </summary>
 public void ShowWindow(string headerCaption = UIConstant.MoveDialogHeaderText)
 {
     Header     = headerCaption;
     Visibility = Visibility.Visible;
     Show();
     BtnOk.Focus();
 }
        private void timer1_Tick(object sender, EventArgs e)
        {
            var highestItem = DeviceList.RecentTouchedDevice();

            if (highestItem != null)
            {
                if (last != highestItem.LastChangeDectection)
                {
                    last        = highestItem.LastChangeDectection;
                    label1.Text = String.Concat(highestItem.Item.Name, " ", highestItem.DetectedType, " ", highestItem.DetectedValue);
                    if (highestItem.DetectedType == DetectionType.Button)
                    {
                        int button = Int32.Parse(highestItem.DetectedValue);
                        ButtonFrom = Math.Min(ButtonFrom, button);
                        ButtonTo   = Math.Max(ButtonTo, button);

                        DrawGrid(highestItem.ButtonCount, ButtonFrom, ButtonTo);
                        pictureBox1.Visible = true;
                    }
                    else
                    {
                        pictureBox1.Visible = false;
                    }
                }
                BtnOk.Focus();
            }
            else
            {
                label1.Text         = "-";
                pictureBox1.Visible = false;
            }
            BtnReset.Visible = pictureBox1.Visible;
            BtnOk.Enabled    = highestItem != null;
        }
 //////////////////////////////////////////////////////////////////////////
 private void OnRecentDblClick(object sender, EventArgs e)
 {
     if (BtnOk.Enabled)
     {
         BtnOk.PerformClick();
     }
 }
        public FrmTroopsTemplate(TroopsTemplate readonlyTroopsTemplateToShow)
        {
            InitializeComponent();

            _readonlyMode = true;

            FillData(readonlyTroopsTemplateToShow);

            TbxName.ReadOnly = true;

            TbxSpearmen.ReadOnly      = true;
            TbxSwordmen.ReadOnly      = true;
            TbxAxemen.ReadOnly        = true;
            TbxBowmen.ReadOnly        = true;
            TbxScouts.ReadOnly        = true;
            TbxLightCavalary.ReadOnly = true;
            TbxHorseArchers.ReadOnly  = true;
            TbxHeavyCavalary.ReadOnly = true;
            TbxRams.ReadOnly          = true;
            TbxCatapults.ReadOnly     = true;
            TbxKnights.ReadOnly       = true;
            TbxNoblemen.ReadOnly      = true;

            BtnDeletion.Visible = false;
            BtnCancel.Visible   = false;

            BtnOk.Select();
        }
 public void ShowMessageDialog(string message, string caption, DialogState state = DialogState.Alert)
 {
     Header = caption;
     TxtMessageText.Text = message;
     Show();
     Visibility = Visibility.Visible;
     BtnOk.Focus();
 }
 public void RemoveVerifiedForwardingAddresses()
 {
     foreach (var addr in WebDriver.GetDriver().FindElements(By.XPath("//span[contains(text(),'Forward a copy of incoming mail to')]/select/option[contains(text(),'Remove')]")))
     {
         addr.Click();
         BtnOk.Click(5);
     }
 }
 public void RemoveUnverifiedForwardingAddresses()
 {
     foreach (var addr in WebDriver.GetDriver().FindElements(By.XPath("//span[text()='Remove address']")))
     {
         addr.Click();
         BtnOk.Click(5);
     }
 }
        public void SetDisplayValue(string propertyName)
        {
            Trace.WriteLine(String.Format("Setting display attribute ID to '{0}'", propertyName));
            var popup = new SelectPropertyModalPopup();

            popup.SelectProperty(propertyName, BtnDisplayId);
            BtnOk.Click();
        }
 public void SelectPrimaryContact(string user)
 {
     BtnSelectUser.Click();
     PrimaryContactPopup.SwitchTo();
     PrimaryContactPopup.SelectValue(user);
     PrimaryContactPopup.BtnOk.Click();
     PrimaryContactPopup.SwitchBackToParent();
     BtnOk.Click();
 }
 private void TxtValor_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.Key != Key.Enter)
     {
         return;
     }
     e.Handled = true;
     BtnOk.Focus();
 }
Exemple #12
0
        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.Key)
            {
            case Key.Enter:
                BtnOk.SimulateClick();
                break;

            case Key.Escape:
                BtnCancel.SimulateClick();
                break;
            }
        }
Exemple #13
0
        private void PwdChangeForm_Load(object sender, EventArgs e)
        {
            MaximizeBox = false;                           //最大化不可用
            MinimizeBox = false;                           //最小化不可用
                                                           //ControlBox = false;//上面三个按钮隐藏,以后用...

            FormBorderStyle = FormBorderStyle.FixedSingle; //不可调整大小。可包括控件菜单栏、标题栏、“最大化”按钮和“最小化”按钮。只能使用“最大化”和“最小化”按钮改变大小。创建单线边框。
            BtnOk.Focus();
            TxtNewPwd.ForeColor = Color.FromArgb(255, 128, 128, 128);
            TxtRe.ForeColor     = Color.FromArgb(255, 128, 128, 128);
            TxtNewPwd.Text      = "请输入密码!";
            TxtRe.Text          = "请再次输入密码!";
        }
        public void SelectUser(string lastName)
        {
            CCElement targetElement, targetParent, rdoTarget;

            Wait.Until(h => DivContainer.Displayed);
            List <CCElement> lastNames = DivContainer.GetDescendants(".//table/tbody/tr/td[2]");

            targetElement = lastNames.FirstOrDefault(h => h.Text == lastName);
            if (targetElement == null)
            {
                throw new Exception("Could not find user with last name: " + lastName);
            }
            targetParent = targetElement.GetParent();
            rdoTarget    = targetParent.GetDescendant(".//td[1]/input");
            rdoTarget.Click();
            BtnOk.Click();
        }
Exemple #15
0
        private void frmSetEngin_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.KeyData)
            {
            case Keys.F5:
                BtnOk.PerformClick();
                break;

            case Keys.Escape:
                BTNCancel.PerformClick();
                break;

            case Keys.F6:
                BtnTest.PerformClick();
                break;
            }
        }
Exemple #16
0
        public AddWorker()
        {
            proxy        = new AgensyServiceClient();
            PersonStatus = "manager";
            birtDay      = new DateTime();
            birtDay      = DateTime.Now;
            Login        = "";
            LastName     = "";
            FirstName    = "";
            SurName      = "";
            Email        = "";
            Phone        = "";
            Password     = "";


            ButtonOk     = new BtnOk(this);
            ButtonCencel = new BtnCencel(this);
        }
Exemple #17
0
 private void BtnUDF_Click(object sender, EventArgs e)
 {
     //string _odrno = ClsGlobal.GetOrderNoFrmGrid(Grid);
     //if (_Tag == "NEW" && !string.IsNullOrEmpty(TxtChallanNo.Text))
     //{
     //    GetUDFMasterDataforChallan();
     //}
     //else if (_Tag == "NEW" && !string.IsNullOrEmpty(_odrno))
     //{
     //    string[] a = _odrno.Split(',');
     //    GetUDFMasterDataforOrder(a[1]);
     //}
     //else
     //{
     //    FrmUDFMasterEntry frm = new FrmUDFMasterEntry("Purchase Master Global", _VoucherNo, "PI");
     //    frm.ShowDialog();
     //}
     BtnOk.Focus();
 }
        void ReleaseDesignerOutlets()
        {
            if (TXTTenantName != null)
            {
                TXTTenantName.Dispose();
                TXTTenantName = null;
            }

            if (BtnOk != null)
            {
                BtnOk.Dispose();
                BtnOk = null;
            }

            if (BtnCancel != null)
            {
                BtnCancel.Dispose();
                BtnCancel = null;
            }
        }
Exemple #19
0
        private void AdicionarPagamento_OnClick(object sender, RoutedEventArgs e)
        {
            try
            {
                var tipoDePagamento = (TipoPagamento)CmbTipoDePagameto.SelectedItem;
                if (tipoDePagamento.CodigoTipoPagamento == "0")
                {
                    MessageBox.Show("Selecione um tipo de pagamento.", InstanceManager.Parametros.TituloDasMensagens, MessageBoxButton.OK,
                                    MessageBoxImage.Exclamation);
                    return;
                }

                if (!TxtValor.Text.IsNumeric())
                {
                    MessageBox.Show("Valor inválido.", InstanceManager.Parametros.TituloDasMensagens, MessageBoxButton.OK,
                                    MessageBoxImage.Exclamation);
                    return;
                }


                var valor = TxtValor.Text.ToDecimal();
                _mvvm.AdicionarVendaPagamento(tipoDePagamento, valor);

                if (_mvvm.ValorTotalDaVenda <= _mvvm.ValorTotalDePagamento)
                {
                    BtnOk.Focus();
                }
                else
                {
                    TxtValor.Text = (_mvvm.ValorTotalDaVenda - _mvvm.ValorTotalDePagamento).ToString("#.00");
                    TxtValor.Focus();
                }
            }catch (Exception ex)
            {
                MessageBox.Show(string.Concat("Falha ao Adicionar Pagamento. Entre em contato com o Administrador.\nErro: ", ex.Message), InstanceManager.Parametros.TituloDasMensagens, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Exemple #20
0
        void ReleaseDesignerOutlets()
        {
            if (AmountDoneBar != null)
            {
                AmountDoneBar.Dispose();
                AmountDoneBar = null;
            }

            if (AmountDoneBtn != null)
            {
                AmountDoneBtn.Dispose();
                AmountDoneBtn = null;
            }

            if (BtnCancel != null)
            {
                BtnCancel.Dispose();
                BtnCancel = null;
            }

            if (BtnClose != null)
            {
                BtnClose.Dispose();
                BtnClose = null;
            }

            if (BtnDelete != null)
            {
                BtnDelete.Dispose();
                BtnDelete = null;
            }

            if (BtnOk != null)
            {
                BtnOk.Dispose();
                BtnOk = null;
            }

            if (BtnRevenueDone != null)
            {
                BtnRevenueDone.Dispose();
                BtnRevenueDone = null;
            }

            if (BtnTaxDone != null)
            {
                BtnTaxDone.Dispose();
                BtnTaxDone = null;
            }

            if (LblAmount != null)
            {
                LblAmount.Dispose();
                LblAmount = null;
            }

            if (LblDescription != null)
            {
                LblDescription.Dispose();
                LblDescription = null;
            }

            if (LblRevenue != null)
            {
                LblRevenue.Dispose();
                LblRevenue = null;
            }

            if (LblTaxType != null)
            {
                LblTaxType.Dispose();
                LblTaxType = null;
            }

            if (LblTitle != null)
            {
                LblTitle.Dispose();
                LblTitle = null;
            }

            if (LblVat != null)
            {
                LblVat.Dispose();
                LblVat = null;
            }

            if (RevenueDoneBar != null)
            {
                RevenueDoneBar.Dispose();
                RevenueDoneBar = null;
            }

            if (RevenuePicker != null)
            {
                RevenuePicker.Dispose();
                RevenuePicker = null;
            }

            if (ScrollVw != null)
            {
                ScrollVw.Dispose();
                ScrollVw = null;
            }

            if (TaxtTypePicker != null)
            {
                TaxtTypePicker.Dispose();
                TaxtTypePicker = null;
            }

            if (TaxTypeDoneBar != null)
            {
                TaxTypeDoneBar.Dispose();
                TaxTypeDoneBar = null;
            }

            if (TxtAmount != null)
            {
                TxtAmount.Dispose();
                TxtAmount = null;
            }

            if (TxtDescription != null)
            {
                TxtDescription.Dispose();
                TxtDescription = null;
            }

            if (TxtRevenue != null)
            {
                TxtRevenue.Dispose();
                TxtRevenue = null;
            }

            if (TxtTaxType != null)
            {
                TxtTaxType.Dispose();
                TxtTaxType = null;
            }

            if (TxtVat != null)
            {
                TxtVat.Dispose();
                TxtVat = null;
            }
        }
Exemple #21
0
 private void MostrarAgenda()
 {
     lstAgenda.Show();
     txtAgenda.Show();
     BtnOk.Show();
 }
Exemple #22
0
 private void OcultarAgenda()
 {
     lstAgenda.Hide();
     txtAgenda.Hide();
     BtnOk.Hide();
 }
 public void SelectFirstUser()
 {
     FirstUser.Click();
     BtnOk.Click();
 }
 /// <summary>
 ///     Shows the window.
 /// </summary>
 public void ShowWindow()
 {
     Visibility = Visibility.Visible;
     Show();
     BtnOk.Focus();
 }
Exemple #25
0
 private void frmLogin_Shown(object sender, EventArgs e)
 {
     BtnOk.Focus();
 }
 private void SscDialog_OnLoaded(object sender, RoutedEventArgs e)
 {
     BtnOk.Focus();
 }
 /// <summary>
 /// Click on OK button
 /// </summary>
 public void ClickOk()
 {
     Console.WriteLine("Click 'OK' button in window Record Macro");
     BtnOk.Click();
 }