Пример #1
0
 public Button(Texture2D tex, bool holdButton, int x, int y, Click fn)
 {
     this.tex = tex;
     hold = holdButton;
     rect = new Rectangle(x, y, tex.Width, tex.Height);
     Clicked = fn;
 }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        click = (Click)start.GetComponent<Click>();
        if(click != null) {
            click.setRopeStart(true);
        }
        float detX = end.transform.position.x - start.transform.position.x;
        float detY = end.transform.position.y - start.transform.position.y;
        float angle = Mathf.Atan2(detY, detX);
        if(length != 0)
            transform.localScale = new Vector3(transform.localScale.x, length, transform.localScale.z);
        else
            transform.localScale = new Vector3(transform.localScale.x, transform.localScale.y * Mathf.Sqrt(detX * detX + detY * detY), transform.localScale.z);
        transform.localEulerAngles = new Vector3(0, 0, (angle / Mathf.PI) * 180 + 90);
        transform.position = start.transform.position;
        gameObject.renderer.sortingOrder -= 1;

        GameObject empty = (GameObject)Instantiate(Resources.Load("Prefabs/Other/empty"), new Vector3(0, 0, 0), Quaternion.identity);
        empty.transform.parent = start.transform;
        empty.GetComponent<HingeJoint2D>().connectedAnchor = new Vector3(start.transform.position.x, start.transform.position.y, start.transform.position.z);
        Rigidbody2D emptyRigidbody = empty.GetComponent<Rigidbody2D>();
        emptyRigidbody.mass = 2f;

        if(end.GetComponent<AreaInit>() != null){
            end = end.transform.parent.gameObject;
        }
        HingeJoint2D endJoint = end.AddComponent<HingeJoint2D>();
        /*if(endJoint == null) {
            endJoint = end.AddComponent<HingeJoint2D>();
        }*/
        endJoint.connectedBody = empty.GetComponent<Rigidbody2D>();
        endJoint.connectedAnchor = new Vector3(detX, detY, end.transform.position.z - start.transform.position.z);
    }
Пример #3
0
        public static string DoClickGetRedirectUrl(int couponID, int Source)
        {
            using (var db = drvvv.drvvvSettings.GetDataContextInstance())
            {
                var cCoupons = db.Coupons.SingleOrDefault(x => x.ID == couponID);
                if (cCoupons != null)
                {
                    string ip = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].ToString();
                    if (!IpBlok.Contains(ip))
                    {
                        Click inClick = new Click();
                        inClick.CouponID = couponID;
                        inClick.InDate = DateTime.Now;
                        inClick.Ip = ip;
                        inClick.Source = Source;

                        if (HttpContext.Current.User.Identity.IsAuthenticated)
                            inClick.ClientID = int.Parse(HttpContext.Current.User.Identity.Name);

                        db.Clicks.InsertOnSubmit(inClick);
                        db.SubmitChanges();
                    }
                    return GetLinkSite(cCoupons);
                }
            }
            return null;
        }
Пример #4
0
 public Button(Texture2D tex, Rectangle srcRect, int scale, bool holdButton, int x, int y, Click fn)
 {
     this.tex = tex;
     hold = holdButton;
     this.srcRect = srcRect;
     rect = new Rectangle(x, y, srcRect.Width * scale, srcRect.Height * scale);
     Clicked = fn;
 }
Пример #5
0
 public Heart()
 {
     heartMeter = HEART_METER_INIT;    // Initial value of the Heart meter
     beatPatternLength = BEAT_PATTERN_LENGTH;
     beatPattern = new Click[] { Click.Left, Click.Right };
     beatTimer = BEAT_TIMER;
     // assignBeatPattern();    // assign random click pattern + time width
     clickPattern = new Click[beatPatternLength];    // to store clicks by user
     timeDiff = new float[beatPatternLength];    // to store time diff between clicks
     oldTime = 0F;
     heartState = State.Default;
     performance = Performance.Perfect;
     justPressed = false;
 }
Пример #6
0
 public void PerformClick()
 {
     Click?.Invoke(this, EventArgs.Empty);
 }
 /// <summary>
 /// Invokes all <see cref="Click"/> event handlers for this item, if any.
 /// </summary>
 /// <param name="e">Event arguments, containing menu index.</param>
 internal void HandleClick(MenuEntryClickEventArgs e)
 {
     Click?.Invoke(this, e);
 }
Пример #8
0
 private void OnClick(object sender, RoutedEventArgs e)
 {
     Click?.Invoke(this, e);
 }
Пример #9
0
 public static void BalancesPage(IWebDriver driver)
 {
     Click.Link(driver, DMIDashboardPage.BalancesLink);
 }
Пример #10
0
 partial void UpdateClick(Click instance);
Пример #11
0
 public void ClickContinue()
 {
     Click.Play();
     StartCoroutine(SceneChenge(0));
 }
Пример #12
0
        public void Read()
        {
            var binaryReader = new BufferedBinaryReader(_binaryReader);

            Metadata    metadata    = new Metadata();
            QueryAction queryAction = new QueryAction();
            Click       click       = new Click();

            float length = binaryReader.reader.BaseStream.Length / 100.0f;

            int lineCounter = 0;

            _reader.onBeginRead();

            int type = binaryReader.PeekChar();

            while (type > -1)
            {
                if (++lineCounter % 100000 == 0)
                {
                    Console.Write("                 \rRead: {0} %\r",
                                  (binaryReader.reader.BaseStream.Position / length).ToString("0.000"));
                    if (lineCounter % 2000000 == 0)
                    {
                        GC.Collect();
                    }
                }

                switch (type)
                {
                case 0:
                {
                    metadata.type      = binaryReader.ReadByte();
                    metadata.sessionId = binaryReader.ReadInt32();
                    metadata.day       = binaryReader.ReadInt32();
                    metadata.userId    = binaryReader.ReadInt32();

                    _reader.onMetadata(metadata);
                    break;
                }

                case 1:
                case 2:
                {
                    queryAction.type      = binaryReader.ReadByte();
                    queryAction.sessionId = binaryReader.ReadInt32();
                    queryAction.time      = binaryReader.ReadInt32();
                    queryAction.serpid    = binaryReader.ReadInt32();
                    queryAction.queryId   = binaryReader.ReadInt32();

                    int nTerms = binaryReader.ReadInt32();
                    queryAction.nTerms = nTerms;
                    if (queryAction.terms == null || queryAction.terms.Length < nTerms)
                    {
                        queryAction.terms = new int[nTerms];
                    }

                    for (int i = 0; i < nTerms; i++)
                    {
                        queryAction.terms[i] = binaryReader.ReadInt32();
                    }

                    int nUrls = binaryReader.ReadInt32();
                    queryAction.nUrls = nUrls;
                    if (queryAction.urls == null || queryAction.urls.Length < nUrls)
                    {
                        queryAction.urls    = new int[nUrls];
                        queryAction.domains = new int[nUrls];
                    }

                    for (int i = 0; i < nUrls; i++)
                    {
                        queryAction.urls[i]    = binaryReader.ReadInt32();
                        queryAction.domains[i] = binaryReader.ReadInt32();
                    }

                    _reader.onQueryAction(queryAction);
                    break;
                }

                case 3:
                {
                    click.type      = binaryReader.ReadByte();
                    click.sessionId = binaryReader.ReadInt32();
                    click.time      = binaryReader.ReadInt32();
                    click.serpid    = binaryReader.ReadInt32();
                    click.urlId     = binaryReader.ReadInt32();

                    _reader.onClick(click);
                    break;
                }
                }

                type = binaryReader.PeekChar();
            }

            Console.Write("                  \r");

            _reader.onEndRead();
        }
Пример #13
0
 public void Click_Handler()
 {
     Click?.Invoke(this, new EventArgs());
 }
Пример #14
0
 // Start is called before the first frame update
 void Start()
 {
     seSource     = FindObjectOfType <AudioSource>();
     playerCredit = FindObjectOfType <Click>();
     theText.text = cost.ToString();
 }
Пример #15
0
    void Update()
    {
        Debug.Log(getobj);

        if (!GameManager.Instance.startMission) //미션 상태가 아닐 때 위치 초기화
        {
            for (int i = 0; i < gull_boy_obj_pos.Length; i++)
            {
                getobj = false;
                gull_boy_obj[i].transform.position = gull_boy_obj_pos[i];
            }

            obj_Count = 5;
        }

        if (GameManager.Instance.isMonocle)
        {
            redImg[0].SetActive(false);
            redImg[1].SetActive(false);
            if (GameManager.Instance.missionCount == 2)
            {
                boxcol.enabled = true;
                monocleObj.SetActive(true);
            }
        }
        else
        {
            monocleObj.SetActive(false);
        }

        if (GameManager.Instance.missionCount == 2 && GameManager.Instance.startMission) //2일 때 모두 온
        {
            Gull_init(true);                                                             //미션 시작 시 트루됨

            if (GameManager.Instance.isClick && Click.ReturnTag() == "Gull_Obj")
            {
                GetSound.instance.playSound();
                getobj = true;
                Debug.Log("Tag gull obj");

                if (Click.ReturnName() == "굴렁쇠")
                {
                    obj_Count = 0;
                }
                else if (Click.ReturnName() == "야구공")
                {
                    obj_Count = 1;
                }
                else if (Click.ReturnName() == "clock")
                {
                    obj_Count = 2;
                }
                else if (Click.ReturnName() == "줄넘기")
                {
                    obj_Count = 3;
                }
                else if (Click.ReturnName() == "화분")
                {
                    obj_Count = 4;
                }
            }
            else
            {
                getobj = true;
            }
        }

        if (getobj)
        {
            if (Vector3.Distance(gull_boy_obj[obj_Count].transform.position, monocleObj.transform.position) >= 2.0f)
            {
                GobackPos();//자리 초기화
                gull_boy_obj[obj_Count].transform.position = Vector3.Lerp(gull_boy_obj[obj_Count].transform.position, parentObj.transform.position, 0.2f);
            }
            else
            {
                gull_boy_obj[obj_Count].transform.position = Vector3.Lerp(gull_boy_obj[obj_Count].transform.position, monocleObj.transform.position, 0.05f);
            }
        }
        Gull_Clear();
    }
Пример #16
0
 private void overlay_Tapped(object sender, TappedRoutedEventArgs e)
 {
     Click?.Invoke(this, EventArgs.Empty);
 }
Пример #17
0
 public void ClickReturn()
 {
     Click.Play();
     StartCoroutine(SceneChenge(1));
 }
Пример #18
0
 /// <summary>
 /// Adds a Click to the collection.
 /// </summary>
 /// <param name="click">The click to add.</param>
 public void Add(Click click)
 {
     //click.Owner = this;
     List.Add(click);
 }
 private void CheckBox_Click(object sender, RoutedEventArgs e)
 {
     Click?.Invoke(this, EventArgs.Empty);
 }
Пример #20
0
	private void detach_Clicks(Click entity)
	{
		this.SendPropertyChanging();
		entity.Coupon = null;
	}
Пример #21
0
 //click
 protected void RaiseMouseClick(object sender, MouseArg e)
 {
     Click?.Invoke(sender, e);
 }
Пример #22
0
 public ClickAlreadyExistsException(Click click)
     : base(null, click)
 {
 }
        /// <summary>
        /// Raises the Click event.
        /// </summary>
        /// <param name="e">A MouseEventArgs containing the event data.</param>
        protected virtual void OnClick(MouseEventArgs e)
        {
            Click?.Invoke(this, e);

            Keyboard = false;
        }
Пример #24
0
 void IClickable.Clicked()
 {
     Click?.Invoke(this, EventArgs.Empty);
 }
Пример #25
0
 /// <summary>
 /// Event handler for when user clicks on the card picturebox
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void pbMyPictureBox_Click(object sender, EventArgs e)
 {
     Click?.Invoke(this, e);
 }
 /// <summary>
 /// Raises the Click event.
 /// </summary>
 /// <param name="sender">Source of the event.</param>
 /// <param name="e">Event arguments assocaited with the event.</param>
 protected void OnButtonClick(object sender, MouseEventArgs e)
 {
     Click?.Invoke(this, e);
 }
Пример #27
0
    // Use this for initialization
    void Start()
    {
        inputFieldA = GameObject.Find("InputFieldA").GetComponent <InputField>();
        inputFieldB = GameObject.Find("InputFieldB").GetComponent <InputField>();
        inputFieldC = GameObject.Find("InputFieldC").GetComponent <InputField>();

        gameController = GameObject.Find("GameController");

        messageText = GameObject.Find("Message").GetComponent <Text>();
        player      = GameObject.Find("Player");
        goal        = GameObject.Find("Goal");
        cl          = GetComponent <Click>();


        if (ReturnScene.SceneBefore == 3)//説明シーンから戻ってきた場合,保存していた変数を使う.
        {
            startPlayerPos            = SaveValue.saveStartPlayerPos;
            player.transform.position = SaveValue.savePlayerPos;
            goal.transform.position   = SaveValue.saveGoalPos;
            inputFieldA.text          = SaveValue.saveAnswer_a;
            inputFieldB.text          = SaveValue.saveAnswer_b;
            inputFieldC.text          = SaveValue.saveAnswer_c;
            messageText.text          = SaveValue.saveMessage;
            if (SaveValue.existStartPlayer == true)
            {
                Instantiate(startPlayer, SaveValue.saveStartPlayerPos, Quaternion.identity);
                ///ClickスクリプトのstartPlayerPosにStartPlayerPos(=StartPlayer(Clone)の子供)のTextコンポーネントを格納
                GameObject.Find("GameController").GetComponent <Click>().startPlayerPosText = GameObject.Find("StartPlayerPos").GetComponent <Text>();
            }

            if (SaveValue.saveDoShowPlayerPos == true)
            {
                GameObject.Find("PlayerPos").GetComponent <Text>().text
                    = player.name +
                      "(" + player.transform.position.x.ToString() +
                      "," + player.transform.position.y.ToString() +
                      "," + player.transform.position.z.ToString() + ")";

                cl.doShowPlayerPos = true;
                Debug.Log("cl.doShowPlayerPos = " + cl.doShowPlayerPos);
            }
            else
            {
                player.GetComponentInChildren <Text>().text = "";
                cl.doShowPlayerPos = false;
            }

            if (SaveValue.saveDoShowGoalPos == true)
            {
                GameObject.Find("GoalPos").GetComponent <Text>().text
                    = goal.name +
                      "(" + goal.transform.position.x.ToString() +
                      "," + goal.transform.position.y.ToString() +
                      "," + goal.transform.position.z.ToString() + ")";
                cl.doShowGoalPos = true;
            }
            else
            {
                goal.GetComponentInChildren <Text>().text = "";

                cl.doShowGoalPos = false;
            }
            if (SaveValue.saveDoShowStartPlayerPos == true)
            {
                GameObject.Find("StartPlayer(Clone)").GetComponentInChildren <Text>().text
                    = "Start(" + GameObject.Find("StartPlayer(Clone)").transform.position.x.ToString() +
                      "," + GameObject.Find("StartPlayer(Clone)").transform.position.y.ToString() +
                      "," + GameObject.Find("StartPlayer(Clone)").transform.position.z.ToString() + ")";

                cl.doShowStartPlayerPos = true;
            }
            else
            {
                if (GameObject.Find("StartPlayer(Clone)") != null)
                {
                    GameObject.Find("StartPlayer(Clone)").GetComponentInChildren <Text>().text = "";
                    cl.doShowStartPlayerPos = false;
                }
            }
        }
        else
        {
            RandomPlayerPos();
            RandomGoalPos();
        }
    }
Пример #28
0
 private void OnClick(object sender, MouseEventArgs e)
 {
     Click?.Invoke(this, EventArgs.Empty);
 }
Пример #29
0
        private void PressMenuCheckBox(bool keyboard)
        {
            if (keyboard)
            {
                _menuCheckBox.ViewDrawContent.ElementState = PaletteState.Pressed;
                PerformNeedPaint();
                Application.DoEvents();
            }

            // Should we automatically try and close the context menu stack
            if (_menuCheckBox.KryptonContextMenuCheckBox.AutoClose)
            {
                // Is the menu capable of being closed?
                if (_menuCheckBox.CanCloseMenu)
                {
                    // Ask the original context menu definition, if we can close
                    CancelEventArgs cea = new CancelEventArgs();
                    _menuCheckBox.Closing(cea);

                    if (!cea.Cancel)
                    {
                        // Close the menu from display and pass in the item clicked as the reason
                        _menuCheckBox.Close(new CloseReasonEventArgs(ToolStripDropDownCloseReason.ItemClicked));
                    }
                }
            }

            // Do we need to automatically change the checked/checkstate?
            if (_menuCheckBox.KryptonContextMenuCheckBox.AutoCheck)
            {
                // Grab current state from command or ourself
                CheckState state = (_menuCheckBox.KryptonContextMenuCheckBox.KryptonCommand == null ?
                                    _menuCheckBox.KryptonContextMenuCheckBox.CheckState :
                                    _menuCheckBox.KryptonContextMenuCheckBox.KryptonCommand.CheckState);

                // Change state based on the current state
                switch (state)
                {
                case CheckState.Unchecked:
                    state = CheckState.Checked;
                    break;

                case CheckState.Checked:
                    state = (_menuCheckBox.KryptonContextMenuCheckBox.ThreeState ? CheckState.Indeterminate : CheckState.Unchecked);
                    break;

                case CheckState.Indeterminate:
                    state = CheckState.Unchecked;
                    break;
                }

                // Update correct target with new state
                if (_menuCheckBox.KryptonContextMenuCheckBox.KryptonCommand != null)
                {
                    _menuCheckBox.KryptonContextMenuCheckBox.KryptonCommand.CheckState = state;
                }
                else
                {
                    _menuCheckBox.KryptonContextMenuCheckBox.CheckState = state;
                }

                // Update visual appearance to reflect new state
                _menuCheckBox.ViewDrawCheckBox.CheckState = state;
            }

            Click?.Invoke(this, EventArgs.Empty);

            if (keyboard)
            {
                UpdateTarget();
                PerformNeedPaint();
            }
        }
Пример #30
0
        void addToClickPattern(Click click, float time)
        {
            // store which click
            for (int i = 0; i < beatPattern.Length - 1; i++)
            {
                clickPattern[i] = clickPattern[i + 1];
            }
            clickPattern[beatPattern.Length - 1] = click;

            // store time since last click
            for (int i = 0; i < beatPattern.Length - 1; i++)
            {
                timeDiff[i] = timeDiff[i + 1];
            }
            timeDiff[beatPattern.Length - 1] = time;

            if (matchBeatPattern())
            {
                matchCounter++;
                if (matchCounter == MATCH_COUNTER)
                {
                    matchCounter = 0;
                    changeHeartMeter(HEART_METER_MATCH_VALUE);
                }
            }
        }
 /// <summary>
 /// Raises the Click event.
 /// </summary>
 /// <param name="e">A MouseEventArgs containing the event data.</param>
 protected virtual void OnClick(MouseEventArgs e)
 {
     Click?.Invoke(this, e);
 }
Пример #32
0
        public void AddClick(Click click)
        {
            Actions.Add(click);

            var query = Actions.Find(p => p.GetType() == typeof(Query) && (p as Query).SERPID == click.SERPID);
            Query q = query as Query;
            if (q != null)
                q.Clicks.Add(click);            
        }
Пример #33
0
 private void label1_Click(object sender, EventArgs e)
 {
     Click?.Invoke(bmp);
 }
Пример #34
0
 /// <summary>
 /// Removes Click from the collection.
 /// </summary>
 /// <param name="click">The click to remove.</param>
 public void Remove(Click click)
 {
     List.Remove(click);
 }
Пример #35
0
		public static void MapClick(int device, Click mouseClick)
		{
			switch (mouseClick)
			{
				case Click.Left:
					deviceState[device].currentClicks.leftCount++;
					break;
				case Click.Middle:
					deviceState[device].currentClicks.middleCount++;
					break;
				case Click.Right:
					deviceState[device].currentClicks.rightCount++;
					break;
				case Click.Fourth:
					deviceState[device].currentClicks.fourthCount++;
					break;
				case Click.Fifth:
					deviceState[device].currentClicks.fifthCount++;
					break;
				case Click.WUP:
					deviceState[device].currentClicks.wUpCount++;
					break;
				case Click.WDOWN:
					deviceState[device].currentClicks.wDownCount++;
					break;
			}
		}
Пример #36
0
 public void Events()
 {
     Click.Invoke();
     Resize.Invoke(100);
 }
Пример #37
0
 public static void RegisterPage(IWebDriver driver)
 {
     Click.Link(driver, DMIDashboardPage.RegisterLink);
 }
Пример #38
0
        public void ShouldBeAbleTo_CheckSelected()
        {
            new GoToUrl($"http://www.material-ui.com/#/components/checkbox")
            {
                Selenium = _selenium
            }.Execute();

            var check = new IsSelected("Simple")
            {
                Expect = false, Selenium = _selenium, WaitAfter = 700
            }.Execute();

            Assert.IsInstanceOf <SuccessAnswer>(check);

            try
            {
                check = new IsSelected("Simple")
                {
                    Expect = true, Selenium = _selenium, WaitAfter = 700
                }.Execute();
                Assert.Fail("No exception thrown");
            }
            catch (AssertionException)
            {
                Assert.Fail("No exception thrown");
            }
            catch (Exception)
            {
                // expected
            }

            check = new IsSelected("Simple")
            {
                Selenium = _selenium, WaitAfter = 700
            }.Execute();
            Assert.IsFalse((bool?)check);

            var result = new Click("Simple")
            {
                Selenium = _selenium, WaitAfter = 700
            }.Execute();

            check = new IsSelected("Simple")
            {
                Selenium = _selenium, WaitAfter = 700
            }.Execute();
            Assert.IsTrue((bool?)check);

            //new Wait(700).Execute();
            //new Click("1st Components from left") { Selenium = _selenium }.Execute();
            //new Wait(700).Execute();
            //new Click("1st Drawer from left") { Selenium = _selenium }.Execute();

            //try
            //{
            //    new Click("button Menu Item 2") { Selenium = _selenium }.Execute();
            //    Assert.Fail("Should throw exception when clicking on item in offset burger menu");
            //}
            //catch (Exception)
            //{
            //}
            //new IsVisible("Menu Item 2 left from Examples") { Selenium = _selenium, Expect = false }.Execute();
            //new Click("1st Toggle drawer from top") { Selenium = _selenium }.Execute();
            //new Wait(1200).Execute();
            //new Click("Menu Item 2 from left") { Selenium = _selenium }.Execute();
            //new Wait(900).Execute();
        }
Пример #39
0
        public ButtonForm()
        {
            SetImage(new VTex2D("Data\\UI\\Skin\\but_normal.png", LoadMethod.Single, true));
            Col = NormCol;
            void DrawFunc()
            {
                VPen.BlendMod = VBlend.Alpha;

                DrawForm(CoreTex);
                DrawText(Text, W / 2 - UI.Font.Width(Text) / 2, H / 2 - UI.Font.Height() / 2);
            }

            void MouseEnterFunc()
            {
                if (Pressed == false)
                {
                    Col = OverCol;
                }
                Over = true;
            }

            void MouseLeaveFunc()
            {
                if (Pressed == false)
                {
                    Col = NormCol;
                }
                Over = false;
            }

            void MouseMoveFunc(int x, int y, int dx, int dy)
            {
                if (Pressed)
                {
                    Drag?.Invoke(dx, dy);
                }
            }

            void MouseDownFunc(int b)
            {
                Col     = PressCol;
                Pressed = true;
            }

            void MouseUpFunc(int b)
            {
                if (Over)
                {
                    Col = OverCol;
                }
                else
                {
                    Col = NormCol;
                }
                Pressed = false;
                Click?.Invoke(b);
            }

            Draw       = DrawFunc;
            MouseEnter = MouseEnterFunc;
            MouseLeave = MouseLeaveFunc;
            MouseMove  = MouseMoveFunc;
            MouseDown  = MouseDownFunc;
            MouseUp    = MouseUpFunc;
        }
Пример #40
0
	private void attach_Clicks(Click entity)
	{
		this.SendPropertyChanging();
		entity.Coupon = this;
	}
Пример #41
0
        public void S_1_003_UsersTest()
        {
            //a
            Actor.AttemptsTo(
                Open.NavigationPanel,
                Pin.NavigationPanel
                );

            //b
            Actor.AttemptsTo(Create.Item.OfItemType("Administration/User").BySecondaryMenu());

            //f
            var userForm = Actor.AsksFor(ItemPageContent.Form);

            foreach (var property in itemProperties)
            {
                Actor.AttemptsTo(Set.NewValue(property.Value).ForProperty(property.Key).OnForm(userForm));
            }

            //f.i
            Actor.AttemptsTo(Set.ItemWithData(actorData).ForProperty("manager").OnForm(userForm).ByButton.AndDoubleClick);

            //g
            var commandBar = Actor.AsksFor(ItemPageContent.CommandBar);

            Actor.AttemptsTo(Click.On(ItemCommandBarElements.SaveButtonOf(commandBar)));

            //g.i
            Actor.ChecksThat(ItemPageState.SavingResult, Is.EqualTo(expectedSavingInfo));

            var messageBox = Actor.AsksFor(ItemPageContent.NotificationPopup);

            Actor.ChecksThat(Distance.From(PageElements.Header).To(Side.Bottom).Of(messageBox), CustomIs.InRangeFor(expectedDistance, expectedDistance));
            Actor.ChecksThat(Distance.From(messageBox).To(Side.Right).Of(PageElements.Body), CustomIs.InRangeFor(11, 11));

            //h
            Actor.AttemptsTo(Close.NotificationPopup.ByClickOnIt);

            //h.i
            Actor.ChecksThat(Presence.Of(messageBox), Is.False);

            //i
            Actor.AttemptsTo(
                Save.OpenedItem.ByDoneButton(),
                Close.ActiveItemPage.ByCloseButton
                );

            //j
            Actor.AttemptsTo(
                Open.SearchPanel.OfCurrentItemType.BySelectedSecondaryMenu,
                Clear.SearchCriteria.InMainGrid,
                Search.Simple.InMainGrid.With(new Dictionary <string, string> {
                [columnLabel] = userCarpenter.LoginName
            })
                );

            //k
            Actor.AttemptsTo(Open.Item.InMainGrid.WithValueInCell(columnLabel, userCarpenter.LoginName).ByContextMenu);

            //k.i
            itemProperties["password"]         = "******";
            itemProperties["confirm_password"] = "******";
            itemProperties["manager"]          = userWoods.FirstName + " " + userWoods.LastName;

            foreach (var property in itemProperties)
            {
                Actor.ChecksThat(ItemPageState.FieldValue(property.Key), a => Assert.AreEqual(a.ToString(), property.Value));
            }

            //l
            Actor.AttemptsTo(Close.ActiveItemPage.ByCloseButton);

            //m
            Actor.AttemptsTo(Collapse.SecondaryMenu);

            //n
            Actor.AttemptsTo(
                LogOut.FromInnovator,
                LogIn.ToInnovator.As(userCarpenter));
        }
Пример #42
0
 partial void InsertClick(Click instance);
Пример #43
0
 /// <summary>
 /// Raises the Click event.
 /// </summary>
 /// <param name="e">An EventArgs containing the event data.</param>
 protected virtual void OnClick(EventArgs e)
 {
     Click?.Invoke(_targetMain, e);
 }
Пример #44
0
 partial void DeleteClick(Click instance);
Пример #45
0
 private void OnClick()
 {
     Click?.Invoke(this, EventArgs.Empty);
 }
Пример #46
0
 protected ClickException(string message, Click click)
     : base(message)
 {
     this.Click = click;
 }
Пример #47
0
 public static void SettlementsPage(IWebDriver driver)
 {
     Click.Link(driver, DMIDashboardPage.SettlementsLink);
 }