示例#1
0
 private void CboMasterClass_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         BtnSave.Focus();
     }
 }
 private void TxtPassword_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key.Equals(Key.Enter))
     {
         BtnSave.Focus();
     }
 }
示例#3
0
 private void sheet_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.Control)
     {
         if (e.KeyCode == Keys.O)
         {
             BtnOpen.PerformClick();
         }
         else if (e.KeyCode == Keys.E)
         {
             BtnSave.PerformClick();
         }
         else if (e.KeyCode == Keys.T)
         {
             BtnConvert.PerformClick();
         }
         else if (e.KeyCode == Keys.S)
         {
             BtnSynth.PerformClick();
         }
         else if (e.KeyCode == Keys.Add || e.KeyCode == Keys.Oemplus)
         {
             sheet.NoteWidth *= 1.1F;
             sheet.Redraw();
         }
         else if (e.KeyCode == Keys.Subtract || e.KeyCode == Keys.OemMinus)
         {
             sheet.NoteWidth *= 1 / 1.1F;
             sheet.Redraw();
         }
     }
     else if (e.KeyCode == Keys.Space)
     {
         if (_file == null)
         {
             return;
         }
         BtnPlay.PerformClick();
     }
     else if (e.KeyCode == Keys.Left)
     {
         if (_file == null)
         {
             return;
         }
         _file.CurrentTime = _file.CurrentTime.Subtract(TimeSpan.FromSeconds(0.25));
         sheet.Time        = _file.CurrentTime;
         sheet.Redraw();
     }
     else if (e.KeyCode == Keys.Right)
     {
         if (_file == null)
         {
             return;
         }
         _file.CurrentTime = _file.CurrentTime.Add(TimeSpan.FromSeconds(0.25));
         sheet.Time        = _file.CurrentTime;
         sheet.Redraw();
     }
 }
 private void txtPoints_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Return)
     {
         BtnSave.Focus();
     }
 }
        private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
        {
            var fileDialog = new OpenFileDialog();
            var result     = fileDialog.ShowDialog();

            if (result != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }

            var file = fileDialog.FileName;

            App.SudokuManager.GetFiles(file);
            var bindingExpression = BtnResolveAll.GetBindingExpression(IsEnabledProperty);

            if (bindingExpression != null)
            {
                bindingExpression.UpdateTarget();
            }
            var bindingExpression1 = BtnSave.GetBindingExpression(IsEnabledProperty);

            if (bindingExpression1 != null)
            {
                bindingExpression1.UpdateTarget();
            }
        }
        internal void EditRequestMethod()
        {
            try
            {
                ExcelLib.PopulateInCollection(Base.ExcelPath, "TenantMyRequest");
                //validate if User is on My requests page
                Driver.driver.PageSource.Contains("My Requests");

                //Get Job Description from Excel sheet and search
                TxtSearchBar.SendKeys(ExcelLib.ReadData(2, "Job Description"));
                BtnSearch.Click();
                Driver.wait(2);
                LnqSortBy.Click();

                //validate if Job Description is as selected
                string JobDescription = Driver.driver.FindElement(By.XPath("html/body/div/section/div[1]/div[5]/div[1]/div/div/div/div[2]/div[3]/div/div[2]/span")).Text;
                JobDescription.Contains(ExcelLib.ReadData(2, "Job Description"));

                //Edit the Job Description and Submit the form
                LnqEdit.Click();
                TxtDescription.SendKeys(ExcelLib.ReadData(2, "New Description"));
                BtnSave.Submit();

                //Validate the success message
                //string message = Driver.driver.FindElement(By.XPath("html/body/div/section/div[3]/div[2]/form")).Text;
                string message = Driver.driver.SwitchTo().Alert().Text;
                Assert.AreEqual(message, "Item edited successfully");
            }
            catch (Exception Ex)
            {
                throw Ex;
            }
        }
 private void DtpRequestDate_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         BtnSave.Focus();
     }
 }
示例#8
0
 private void TxtDriver_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         BtnSave.Focus();
     }
 }
示例#9
0
 private void TbContainerDescription_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         BtnSave.Focus();
     }
 }
示例#10
0
        public void Feed_Configuration_duplicate(string UName, string Paswd, string optionalName, string Action, string URL)
        {
            Entered_Username     = UName;
            Entered_Password     = Paswd;
            Entered_OPtionalName = optionalName;
            Entered_Url          = URL;

            UserName.EnterText(UName);
            Password.EnterText(Paswd);
            OptionalName.EnterText(optionalName);
            if (provider == "others")
            {
                URL_Otherfeed.EnterText(URL);
            }
            if (Action == "Save" && UName != "" && Paswd != "")
            {
                BtnSave.WebClick();
                DuplicateFeed_Msg.Wait_ElmToBeDisplayed(30);
                DuplicateMsg_ServiceProviderDataId = DuplicateFeed_Msg.GetText();
                //bool a = DuplicateFeed_Msg.Displayed;
                // DuplicateFeed_Msg

                // PropertiesCollection.fluentWait("//div[contains(text(),'Error']", 20);
            }

            if (Action == "Cancel")
            {
                BtnCancel.WebClick();
            }
            // System.Threading.Thread.Sleep(5000);
        }
示例#11
0
 private void TxtDiscount_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         txtDiscount.Text = string.Format("{0:#,##0.00}", double.Parse(txtDiscount.Text));
         BtnSave.Focus();
     }
 }
示例#12
0
 private void txtPasswd_PreviewKeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         e.Handled = true;
         BtnSave.Focus();
     }
 }
示例#13
0
        private void repositoryItemLookUpEditAddSanfID_EditValueChanged(object sender, EventArgs e)
        {
            BtnSave.Focus();
            gridViewAdd.Focus();
            LookUpEdit LUE = (LookUpEdit)sender;

            ItemDetials.Rows[gridViewAdd.GetFocusedDataSourceRowIndex()]["UnitID"]   = AsnafTbl.Rows[LUE.ItemIndex]["TagzeaUnit"].ToString();
            ItemDetials.Rows[gridViewAdd.GetFocusedDataSourceRowIndex()]["UnitName"] = AsnafTbl.Rows[LUE.ItemIndex]["UnitName"].ToString();
        }
示例#14
0
 public void Save(string email, string name, string lastname, string phone, string address)
 {
     BtnCreate.Click();
     TxtEmail.EnterText(email);
     TxtFirstName.EnterText(name);
     TxtLastName.EnterText(lastname);
     TxtPhone.EnterText(phone);
     TxtAddress.EnterText(address);
     BtnSave.Click();
 }
示例#15
0
 private void btnSaveForm_Click(object sender, EventArgs e)
 {
     if (BtnSave != null && BtnSave.Enabled)
     {
         BtnSave.PerformClick();
     }
     else if (BtnSaveDelNNew != null && BtnSaveDelNNew.Enabled)
     {
         BtnSaveDelNNew.SaveClickEvent();
     }
 }
示例#16
0
        private void repositoryItemLookUpEditDiscountTypeId_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            BtnSave.Focus();
            gridViewAdd.Focus();
            LookUpEdit LUE = (LookUpEdit)sender;

            if (LUE.EditValue.ToString() != ((int)Program.DiscountType.بدون_خصم).ToString() && ItemDetials.Rows[gridViewAdd.GetFocusedDataSourceRowIndex()]["harakatype"].ToString() == ((int)Program.HarakaType.مرتجع).ToString())
            {
                LUE.EditValue = ((int)Program.DiscountType.بدون_خصم).ToString();
                ItemDetials.Rows[gridViewAdd.GetFocusedDataSourceRowIndex()]["Discount"] = "0";
            }
        }
示例#17
0
        public Remachados()
        {
            InitializeComponent();
            SiaWin = System.Windows.Application.Current.MainWindow;
            idemp = SiaWin._BusinessId;
            LoadConfig();
            loadCombo();
            loadOrden();
            controls(1);
            BtnSave.Focus();


        }
示例#18
0
        private void Window_PreviewKeyDown(object sender, KeyEventArgs e)
        {
            if (BtnSave.Content.ToString().Trim() == "Nuevo") return;
            if (e.Key == Key.F5 && BtnSave.Content.ToString().Trim() == "Guardar")
            {
                if (e.Key == System.Windows.Input.Key.F5)
                {
                    BtnSave.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
                    return;
                }
            }

        }
示例#19
0
        public void InitializeEditMode()
        {
            BringToFront();
            editMode = true;
            Show();
            TBPostNr.Show();
            TBAdresse.Text      = viewModel.ValgtBolig.Adresse;
            TBAdresse.BackColor = Color.LightGray;
            TBAdresse.ReadOnly  = true; //Adresse ændres ikke medmindre vi henter en kæmpe lastbil.

            TBAreal.Text      = viewModel.ValgtBolig.Kvm.ToString();
            TBAreal.BackColor = Color.LightGray;
            TBAreal.ReadOnly  = true; //Areal ændres ikke

            TBPris.Text      = viewModel.ValgtBolig.Pris.ToString();
            TBPris.BackColor = Color.White;

            CBPostNr.Hide(); //PostNr skal ikke ændres ever
            TBPostNr.Text     = viewModel.ValgtBolig.PostNr.ToString();
            TBPostNr.ReadOnly = true;

            LabelID.Text = viewModel.ValgtBolig.ID.ToString();

            BtnVælgE.Enabled      = false; //Kan ikke vælge EMægler i edit
            BtnVælgSælger.Enabled = false; //Kan ikke ændre sælger i edit

            BtnDelete.Enabled = true;      //Kan slette i editMode

            DTPOpretDato.Value   = viewModel.ValgtBolig.OprettelsesDato;
            DTPOpretDato.Enabled = false;                           //Kan ikke ændre dato

            TBEMæglerNavn.Text = viewModel.ValgtEmægler.ToString(); //Tostring metoden er overridet
            TBValgtSælger.Text = viewModel.ValgtSælger.ToString();  //Til at vise navn
            lblPost.Hide();
            LabelID.Show();
            LabelMode.Text = "EDIT MODE";
            BTNSolgt.Show();

            //tjekker om boligen er solgt, for så skal denne knap ikke vises!
            var erSolgt = viewModel.TjekBoligSolgt(selectedBolig);

            if (erSolgt)
            {
                BTNSolgt.Hide();
                BtnDelete.Hide();
                LabelMode.Text = "Solgt bolig";
                BtnSave.Hide();
                BtnVælgE.Hide();
                BtnVælgSælger.Hide();
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (BtnCancel != null)
            {
                BtnCancel.Dispose();
                BtnCancel = null;
            }

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

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

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

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

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

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

            if (txtVat != null)
            {
                txtVat.Dispose();
                txtVat = null;
            }
        }
示例#21
0
    protected void txtInvoive_TextChanged(object sender, EventArgs e)
    {
        decimal InvoiceNo = Convert.ToDecimal(txtInvoive.Text.Trim());
        int     Fy        = Convert.ToInt32(strFY);
        DataSet ds        = new DataSet();

        ds = InvoiceDeliveryStatus.Idv_Chetana_GetInvoiceDeliveryStatusDetails(InvoiceNo, Fy);
        bool Flag;

        if ((ds.Tables[1].Rows[0]["auth"].ToString()) == "1")
        {
            Flag = true;
        }
        else
        {
            Flag = false;
        }
        if (ds.Tables[1].Rows.Count != 0)
        {
            if (Flag)
            {
                if (ds.Tables[0].Rows.Count != 0)
                {
                    DataTable dt = new DataTable();
                    dt = ds.Tables[0];
                    txtInvoiceDate.Text = dt.Rows[0]["InvoiceDate"].ToString();
                    txtTotalAmount.Text = dt.Rows[0]["TotalAmount"].ToString();
                    txtCustName.Text    = dt.Rows[0]["CustName"].ToString();
                    txtCustcode.Text    = dt.Rows[0]["CustCode"].ToString();
                    txtArea.Text        = dt.Rows[0]["AreaName"].ToString();
                    BtnSave.Focus();
                }
                else
                {
                    MessageBox("Invoice No. does not Exists");
                    txtInvoive.Focus();
                }
            }
            else
            {
                MessageBox("Invoice No. already Exists");
                txtInvoive.Focus();
                txtInvoiceDate.Text = "";
                txtTotalAmount.Text = "";
                txtCustName.Text    = "";
                txtCustcode.Text    = "";
                txtArea.Text        = "";
            }
        }
    }
 private void TxtPackingSize_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         if (String.IsNullOrEmpty(productCode))
         {
             BtnSaveAndNew.Focus();
         }
         else
         {
             BtnSave.Focus();
         }
     }
 }
        void ReleaseDesignerOutlets()
        {
            if (BtnSave != null)
            {
                BtnSave.Dispose();
                BtnSave = null;
            }

            if (FactoryOptionTableView != null)
            {
                FactoryOptionTableView.Dispose();
                FactoryOptionTableView = null;
            }
        }
        public FeedIssueSchedule(string farmer, string batch, string wk1In, string wk3In, string wk4In, string user)
        {
            this._farmer = farmer;
            this._batch  = batch;
            this._wk1In  = wk1In;
            this._wk3In  = wk3In;
            this._wk4In  = wk4In;
            this._user   = user;

            InitializeComponent();
            EditViewOfFeedSchedule();
            BtnSave.Text = "Update";
            BtnSave.Update();
        }
示例#25
0
        //click save button
        public PropertyOwnerPage ClickSave()
        {
            while (!BtnSave.Displayed && BtnSave.Enabled)
            {
                Thread.Sleep(100);
            }

            BtnSave.Click();
            while (!Driver.driver.Url.Contains("Home/Index"))
            {
                Thread.Sleep(100);
            }

            return(new PropertyOwnerPage());
        }
 private void Window_PreviewKeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.Key == Key.F5)
         {
             BtnSave.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
         }
     }
     catch (Exception w)
     {
         SiaWin.Func.SiaExeptionGobal(w);
         MessageBox.Show("error en el key down" + w);
     }
 }
示例#27
0
        /// <summary>
        /// Save and accept
        /// </summary>
        /// <returns></returns>
        public RentalPropertiesPage ClickSaveAndAcceptListRental()
        {
            while (!BtnSave.Displayed && BtnSave.Enabled)
            {
                Thread.Sleep(100);
            }

            BtnSave.Click();
            Driver.driver.SwitchTo().Alert().Accept();
            while (!Driver.driver.Url.Contains("RentalProperties"))
            {
                Thread.Sleep(100);
            }

            return(new RentalPropertiesPage());
        }
示例#28
0
        protected override bool ProcessDialogKey(Keys keyData)
        {
            switch (Form.ModifierKeys)
            {
            case Keys.None when keyData == Keys.Escape:
                if (ArsMessage.Question("Onay", Text + " Ekranı Kapatılacak.\nEmin Misiniz?") == DialogResult.Yes)
                {
                    this.Close();
                }
                return(true);

            case Keys.None when keyData == Keys.F10 && (BtnSave != null || btnSaveDelNew != null):
                if (BtnSave != null && BtnSave.Enabled)
                {
                    BtnSave.PerformClick();
                }
                else if (BtnSaveDelNNew != null && BtnSaveDelNNew.Enabled)
                {
                    BtnSaveDelNNew.SaveClickEvent();
                }
                break;

            case Keys.None when keyData == Keys.F11 && (BtnDel != null || btnSaveDelNew != null):
                if (BtnDel != null && BtnDel.Enabled)
                {
                    BtnDel.PerformClick();
                }
                else if (BtnSaveDelNNew != null && BtnSaveDelNNew.Enabled)
                {
                    BtnSaveDelNNew.DelClickEvent();
                }
                break;

            case Keys.None when keyData == Keys.F12 && (BtnClear != null || btnSaveDelNew != null):
                if (BtnClear != null && BtnClear.Enabled)
                {
                    BtnClear.PerformClick();
                }
                else if (BtnSaveDelNNew != null && BtnSaveDelNNew.Enabled)
                {
                    BtnSaveDelNNew.NewClickEvent();
                }
                break;
            }
            return(base.ProcessDialogKey(keyData));
        }
示例#29
0
        private void repositoryItemLookUpEditAddSanfID_EditValueChanged(object sender, EventArgs e)
        {
            BtnSave.Focus();
            gridViewAdd.Focus();
            LookUpEdit LUE = (LookUpEdit)sender;

            if (ItemDetials.Rows[gridViewAdd.GetFocusedDataSourceRowIndex()]["harakatype"].ToString() == ((int)Program.HarakaType.مبيعات).ToString())
            {
                ItemDetials.Rows[gridViewAdd.GetFocusedDataSourceRowIndex()]["Price"] = FXFW.SqlDB.LoadDataTable(@"Select priceout From TblPricelistdetailes Where SanfID = " + LUE.EditValue).Rows[0][0].ToString();
            }
            else if (ItemDetials.Rows[gridViewAdd.GetFocusedDataSourceRowIndex()]["harakatype"].ToString() == ((int)Program.HarakaType.مرتجع).ToString())
            {
                ItemDetials.Rows[gridViewAdd.GetFocusedDataSourceRowIndex()]["Price"]          = FXFW.SqlDB.LoadDataTable(@"Select priceout From TblPricelistdetailes Where SanfID = " + LUE.EditValue).Rows[0][0].ToString();
                ItemDetials.Rows[gridViewAdd.GetFocusedDataSourceRowIndex()]["DiscountTypeId"] = ((int)Program.DiscountType.بدون_خصم).ToString();// if its back discount should b none
                ItemDetials.Rows[gridViewAdd.GetFocusedDataSourceRowIndex()]["Discount"]       = "0";
            }
        }
示例#30
0
        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            switch (keyData)
            {
            case (Keys.Control | Keys.N):
            {
                BtnAddNew.PerformClick(); break;
            }

            case (Keys.Control | Keys.E):
            {
                BtnEdit.PerformClick(); break;
            }

            case (Keys.Control | Keys.D):
            {
                BtnDelete.PerformClick(); break;
            }

            case (Keys.Control | Keys.S):
            {
                BtnSave.PerformClick(); break;
            }

            case (Keys.Control | Keys.U):
            {
                BtnUndo.PerformClick(); break;
            }

            case (Keys.Control | Keys.F):
            {
                BtnFind.PerformClick(); break;
            }

            case (Keys.Control | Keys.R):
            {
                BtnReload.PerformClick(); break;
            }

            case (Keys.Control | Keys.P):
            {
                BtnPrint.PerformClick(); break;
            }
            }
            return(base.ProcessCmdKey(ref msg, keyData));
        }