Ejemplo n.º 1
0
        public СalculatorPage()
        {
            CityFromConbobox = new ComboboxControl(BY.NthOfClass("combobox-container", 0));
            CityFrom         = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 0));

            CityToConbobox = new ComboboxControl(BY.NthOfClass("combobox-container", 1));
            CityTo         = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 1));

            ShopConbobox = new ComboboxControl(BY.NthOfClass("combobox-container", 2));
            Shop         = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 2));

            DeclaredPrice = new TextInput(By.Name("declared_price"));
            Weight        = new TextInput(By.Name("weight"));

            Width  = new TextInput(By.Name("dimension_side1"));
            Height = new TextInput(By.Name("dimension_side2"));
            Length = new TextInput(By.Name("dimension_side3"));

            СountedButton = new ButtonInput(By.CssSelector("input.btn.btn-primary"));

            TableFirst  = new СalculatorListControl(By.XPath("//table[1]"));
            TableSecond = new СalculatorListControl(By.XPath("//table[2]"));

            ActionErrorText = new ErrorActionTextControl(By.ClassName("form-horizontal"));
            ErrorText       = new ErrorTextControl(By.ClassName("form-horizontal"));
        }
Ejemplo n.º 2
0
 public TimeCreatePage()
 {
     CompanyName = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 1));
     Route       = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 0));
     MinTime     = new TextInput(By.Name("min_time"));
     MaxTime     = new TextInput(By.Name("max_time"));
 }
Ejemplo n.º 3
0
        public CalculatorPage()
        {
            LabelDirectory   = new StaticText(By.CssSelector("legend"));
            CityFromConbobox = new ComboboxControl(BY.NthOfClass("combobox-container", 0));
            CityFrom         = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 0));

            CityToConbobox = new ComboboxControl(BY.NthOfClass("combobox-container", 1));
            CityTo         = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 1));

            ShopConbobox = new ComboboxControl(BY.NthOfClass("combobox-container", 2));
            Shop         = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 2));

            Weight = new TextInput(By.Name("weight"));
            Width  = new TextInput(By.Name("dimension_side1"));
            Height = new TextInput(By.Name("dimension_side2"));
            Length = new TextInput(By.Name("dimension_side3"));

            PriceDeclared = new TextInput(By.Name("declared_price"));
            PricePayment  = new TextInput(By.Name("payment_price"));

            RadioButtonList = new RadioButtonListControl(By.Name("controls"));

            СountedButton = new ButtonInput(By.CssSelector("input.btn.btn-primary"));

            Table = new СalculatorListAdminControl(By.XPath("//table"));
        }
Ejemplo n.º 4
0
        private void SaveV_Click(object sender, EventArgs e)
        {
            try
            {
                AX.Enabled = false;
                AY.Enabled = false;
                AZ.Enabled = false;

                BX.Enabled = false;
                BY.Enabled = false;
                BZ.Enabled = false;

                Point p1 = new Point(Int32.Parse(AX.Text), Int32.Parse(AY.Text), Int32.Parse(AZ.Text));
                Point p2 = new Point(Int32.Parse(BX.Text), Int32.Parse(BY.Text), Int32.Parse(BZ.Text));

                Vectors vectros = new Vectors(p1, p2);

                Calculate.AppendText(vectros.Calculate());
                Scalar.AppendText(p1.ScalarV(p2) + ";");
                Collinearity.AppendText(vectros.IsCollinearity());
            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.Message);

                AX.Clear();
                AY.Clear();
                AZ.Clear();

                BX.Clear();
                BY.Clear();
                BZ.Clear();
            }
        }
Ejemplo n.º 5
0
 public OrdersInputRowControl(int index)
     : base(By.XPath(string.Format("//tbody")))
 {
     ID          = new StaticText(By.XPath(string.Format("//tbody/tr[{0}]/td[1]", 1 + 3 * index)));
     OrderOutput = new Link(By.XPath(string.Format("//tbody/tr[{0}]/*/a[1]", 3 + 3 * index)));
     MoreInfo    = new Link(BY.NthOfBy(By.LinkText("Подробнее..."), index));
 }
Ejemplo n.º 6
0
        public UserCreatePage()
        {
            Name         = new TextInput(By.Name("name"));
            Phone        = new TextInput(By.Name("phone"));
            UserEmail    = new TextInput(By.Name("username"));
            UserPassword = new TextInput(By.Name("password"));

            UserGroups          = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 0));
            UserGroupsAddButton = new ButtonInput(By.XPath("//button[@type='button']"));

            Key             = new TextInput(By.Name("public_key"));
            BarcodeLimit    = new TextInput(By.Name("barcode_limit"));
            ResponsibleName = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 1));
            IsMaster        = new CheckBox(By.Name("is_master"));

            OfficialName    = new TextInput(By.Name("official_name"));
            Director        = new TextInput(By.Name("director"));
            OnBasis         = new TextInput(By.Name("on_basis"));
            Contract        = new TextInput(By.Name("contract"));
            ContractDate    = new TextInput(By.Name("contract_date"));
            OfficialAddress = new TextInput(By.Name("official_address"));
            Address         = new TextInput(By.Name("address"));
            Inn             = new TextInput(By.Name("inn"));
            Ogrn            = new TextInput(By.Name("ogrn"));
            BankName        = new TextInput(By.Name("bank_name"));
            BankBik         = new TextInput(By.Name("bank_bik"));
            BankKs          = new TextInput(By.Name("bank_ks"));
            BankRs          = new TextInput(By.Name("bank_rs"));
        }
Ejemplo n.º 7
0
        public Form2(int a, int b)
        {
            f = a;
            q = b;
            string s = "Введите данные фигуры номер 1";

            InitializeComponent();
            outInfo.Text = s;
            if (a == 1)
            {
                textBox4.Dispose();
                DX.Dispose();
                DY.Dispose();
            }
            else if (a == 2)
            {
                textBox2.Dispose();
                BX.Dispose();
                BY.Dispose();
                textBox4.Dispose();
                DX.Dispose();
                DY.Dispose();
                textBox1.Text = "цент";
                textBox3.Text = "R";
                CY.Dispose();
            }
        }
Ejemplo n.º 8
0
        public ManagersCreatePage()
        {
            Name  = new TextInput(By.Name("name"));
            Phone = new TextInput(By.Name("phone"));
            Email = new TextInput(By.Name("email"));
            Sign  = new TextInput(By.Name("sign"));

            User = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 0));
        }
Ejemplo n.º 9
0
 public PricePickupCreatePage()
 {
     CompanyName   = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 0));
     City          = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 1));
     Price         = new TextInput(By.Name("price"));
     PriceOverFlow = new TextInput(By.Name("weight_overflow_price"));
     Weight        = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 2));
     Dimension     = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 3));
 }
Ejemplo n.º 10
0
        public UserAdminShopCreatePage()
        {
            Name                = new TextInput(By.Name("name"));
            Address             = new TextInput(By.Name("address"));
            CompanyPickup       = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 0));
            ManagersLegalEntity = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 1));
            Warehouse           = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 2));

            CreateButton = new ButtonInput(By.CssSelector("input.btn.btn-primary"));
        }
Ejemplo n.º 11
0
        public OrderedIttemplatesCreatePage()
        {
            CompanyName = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 0));

            Through      = new Select(By.Name("through"));
            Action       = new Select(By.Name("action"));
            ThroughEmail = new TextInput(By.Name("through_email"));
            Subject      = new TextInput(By.Name("subject"));
            Message      = new TextInput(By.Name("message"));
        }
Ejemplo n.º 12
0
        public DeliveryPointCreatePage()
        {
            City              = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 0));
            CompanyName       = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 1));
            DeliveryPointName = new TextInput(By.Name("name"));
            CompanyCode       = new TextInput(By.Name("company_code"));
            Address           = new TextInput(By.Name("address"));
            Longitude         = new TextInput(By.Name("longitude"));
            Latitude          = new TextInput(By.Name("latitude"));

            HasFittingRoom = new CheckBox(By.Name("has_fitting_room"));
            IsCash         = new CheckBox(By.Name("is_cash"));
            IsCard         = new CheckBox(By.Name("is_card"));
        }
Ejemplo n.º 13
0
        public void ClickAndWaitTextHorizontalError(int index = 0, int timeout = 6000, int waitTimeout = 100)
        {
            Click();
            var alertClass = new StaticControl(BY.NthOfClass("alert-error", index));
            var w          = Stopwatch.StartNew();

            while (alertClass.IsPresent == false)
            {
                Thread.Sleep(waitTimeout);
                if (w.ElapsedMilliseconds > timeout)
                {
                    Assert.AreEqual(alertClass.IsPresent, true, "Время ожидание завершено. Не найден элемент содержаший ошибку");
                }
            }
        }
Ejemplo n.º 14
0
        public CompanyCreatePage()
        {
            Name                   = new TextInput(By.Name("name"));
            CompanyDriver          = new Select(By.Name("driver"));
            CompanyAddress         = new TextInput(By.Name("address"));
            CompanyPickup          = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 0));
            CompanyPickupAddButton = new ButtonInput(By.XPath("//button[@type='button']"));

            Manager             = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 1));
            ManagersPickup      = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 2));
            ManagersLegalEntity = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 3));

            Term            = new TextInput(By.Name("term"));
            ItemsMax        = new TextInput(By.Name("items_max"));
            SinglePickup    = new CheckBox(By.Name("single_pickup"));
            Prolongation    = new CheckBox(By.Name("prolongation"));
            BarcodePull     = new CheckBox(By.Name("enabled_barcode_pull"));
            PackingPaid     = new CheckBox(By.Name("packing_paid"));
            PackingRequired = new CheckBox(By.Name("packing_required"));
        }
Ejemplo n.º 15
0
        public UserWarehouseCreatePage()
        {
            LabelDirectory = new StaticText(By.CssSelector("legend"));
            Name           = new TextInput(By.Name("name"));
            Name           = new TextInput(By.Name("name"));
            Street         = new TextInput(By.Name("street"));
            House          = new TextInput(By.Name("house"));
            Flat           = new TextInput(By.Name("flat"));
            ContactPerson  = new TextInput(By.Name("contact_person"));
            ContactPhone   = new TextInput(By.Name("contact_phone"));
            ContactEmail   = new TextInput(By.Name("contact_email"));
            PostalCode     = new TextInput(By.Name("postal_code"));
            City           = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 0));
            Freshlogic     = new TextInput(By.Name("freshlogic_id"));

            CreateButton   = new ButtonInput(By.CssSelector("input.btn.btn-primary"));
            WarehousesBack = new Link(By.Name("freshlogic_id"));

            ErrorText = new ErrorTextControl(By.ClassName("form-horizontal"));
        }
Ejemplo n.º 16
0
        public void ClickAndWaitTextErrorAbsence(int index = 0, int timeout = 6000, int waitTimeout = 100)
        {
            var alertClass = new StaticControl(BY.NthOfClass("alert-error", index));
            var errorClass = new StaticControl(BY.NthOfClass("help-inline", index));

            Click();
            var w = Stopwatch.StartNew();

            while (errorClass.IsPresent || alertClass.IsPresent)
            {
                Thread.Sleep(waitTimeout);
                if (w.ElapsedMilliseconds > timeout)
                {
                    Assert.AreEqual(errorClass.IsPresent, false, "Время ожидание завершено. Найден элемент содержаший ошибку");
                }
                if (w.ElapsedMilliseconds > timeout)
                {
                    Assert.AreEqual(alertClass.IsPresent, false, "Время ожидание завершено. Найден элемент содержаший ошибку");
                }
            }
        }
Ejemplo n.º 17
0
        public OrderCourirsEditingPage()
        {
            City          = new StaticText(By.Name("to_city__value__"));
            CityTo        = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 0));
            DeclaredPrice = new TextInput(By.Name("declared_price"));
            Weight        = new TextInput(By.Name("weight"));
            Width         = new TextInput(By.Name("dimension_side1"));
            Height        = new TextInput(By.Name("dimension_side2"));
            Length        = new TextInput(By.Name("dimension_side3"));

            СountedButton = new ButtonInput(By.Name("recalc"));

            CanceledButton   = new ButtonInput(By.CssSelector("div.form-actions > input.btn.btn-primary.btn-success"));
            SaveChangeButton = new ButtonInput(By.CssSelector("div.form-actions > input.btn.btn-primary.pull-right"));

            BuyerPostalCode = new TextInput(By.Name("to_postal_code"));
            BuyerStreet     = new TextInput(By.Name("to_street"));
            BuyerHouse      = new TextInput(By.Name("to_house"));
            BuyerFlat       = new TextInput(By.Name("to_flat"));
            BuyerName       = new TextInput(By.Name("to_name"));
            BuyerPhone      = new TextInput(By.Name("to_phone"));
            BuyerPhoneAdd   = new TextInput(By.Name("to_add_phone"));
            BuyerEmail      = new TextInput(By.Name("to_email"));
            IsCargoVolume   = new CheckBox(By.Name("is_cargo_volume"));

            PaymentPrice     = new TextInput(By.Name("payment_price"));
            OrderNumber      = new TextInput(By.Name("shop_refnum"));
            GoodsDescription = new TextInput(By.Name("goods_description"));
            DeliveryDate     = new TextInput(By.Name("delivery_date_new"));
            DeliveryTimeFrom = new Select(By.Name("delivery_time_from"));
            DeliveryTimeTo   = new Select(By.Name("delivery_time_to"));
            OrderComment     = new TextInput(By.Name("order_comment"));
            ItemsCount       = new TextInput(By.Name("items_count"));

            ActionErrorText = new ErrorActionTextControl(By.ClassName("form-horizontal"));
            ErrorText       = new ErrorTextControl(By.ClassName("form-horizontal"));
            Countedloader   = new StaticControl(By.CssSelector("#radio_div > div > imj"));

            DeliveryList = new RadioButtonListControl("radio_div");
        }
Ejemplo n.º 18
0
        private void Reset_Click(object sender, EventArgs e)
        {
            AX.Clear();
            AY.Clear();
            AZ.Clear();

            BX.Clear();
            BY.Clear();
            BZ.Clear();

            Calculate.Clear();
            Scalar.Clear();
            Collinearity.Clear();

            AX.Enabled = true;
            AY.Enabled = true;
            AZ.Enabled = true;

            BX.Enabled = true;
            BY.Enabled = true;
            BZ.Enabled = true;
        }
Ejemplo n.º 19
0
        public override void Predict()
        {
            //Normalise Input
            Normalise(X, Xmean, Xstd, Y);

            //Process Gating Network
            for (int i = 0; i < ControlNeurons.Length; i++)
            {
                BX.SetValue(i, 0, Y.GetValue(ControlNeurons[i], 0));
            }
            ELU(Layer(BX, BW0, Bb0, BY));
            ELU(Layer(BY, BW1, Bb1, BY));
            SoftMax(Layer(BY, BW2, Bb2, BY));

            //Generate Network Weights
            W0.SetZero(); b0.SetZero();
            W1.SetZero(); b1.SetZero();
            W2.SetZero(); b2.SetZero();
            for (int i = 0; i < YDimBlend; i++)
            {
                float weight = BY.GetValue(i, 0);
                Blend(W0, CW[6 * i + 0], weight);
                Blend(b0, CW[6 * i + 1], weight);
                Blend(W1, CW[6 * i + 2], weight);
                Blend(b1, CW[6 * i + 3], weight);
                Blend(W2, CW[6 * i + 4], weight);
                Blend(b2, CW[6 * i + 5], weight);
            }

            //Process Motion-Prediction Network
            ELU(Layer(Y, W0, b0, Y));
            ELU(Layer(Y, W1, b1, Y));
            Layer(Y, W2, b2, Y);

            //Renormalise Output
            Renormalise(Y, Ymean, Ystd, Y);
        }
Ejemplo n.º 20
0
 public CalendarCreatePage()
 {
     Date    = new TextInput(By.Name("date"));
     Company = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 0));
     Type    = new Select(By.Name("type"));
 }
Ejemplo n.º 21
0
 public SortMethod(BY type, int id = 0, DIRECTION dir = DIRECTION.Asc)
 {
     By        = type;
     Id        = id;
     Direction = dir;
 }
Ejemplo n.º 22
0
 public PickupTimetableCreatePage()
 {
     Company      = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 0));
     PickupTime   = new Select(By.Name("pickup_time"));
     PickupPeriod = new Select(By.Name("delta"));
 }
Ejemplo n.º 23
0
 public StaticText this[int index]
 {
     get { return(new StaticText(BY.NthOfClass("help-inline", index), this)); }
 }
Ejemplo n.º 24
0
 public PaymentPriceCreatePage()
 {
     Company = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 0));
     City    = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 1));
 }
Ejemplo n.º 25
0
 public RadioButtonControl this[int index]
 {
     get { return(new RadioButtonControl(BY.NthOfClass("radio", index))); }
 }
Ejemplo n.º 26
0
 public StaticText this[int index]
 {
     get { return(new StaticText(BY.NthOfClass("alert-error", index), this)); }
 }