/// <summary> /// The method called when the left button is clicked /// </summary> /// <param name="sender">Button instance</param> /// <param name="e">Event arguments</param> private void Button1Clicked(object sender, Button.ClickEventArgs e) { ColumnCnt = ColumnCnt - 1 > 0 ? ColumnCnt - 1 : 1; var MyGridLayout = TopView.Layout as GridLayout; MyGridLayout.Columns = ColumnCnt; }
public override void OnClick(Button button, Button.ClickEventArgs eventArgs) { if (button as Switch == null) { throw new Exception("SlidingSwitchExtension must be used within a SwitchStyle or derived class."); } var switchButton = (Switch)button; var track = switchButton.GetCurrentTrack(this); var thumb = switchButton.GetCurrentThumb(this); if (track == null || thumb == null || null == slidingAnimation) { return; } if (slidingAnimation.State == Animation.States.Playing) { slidingAnimation.Stop(); } slidingAnimation.Clear(); slidingAnimation.AnimateTo(thumb, "PositionX", track.Size.Width - thumb.Size.Width - thumb.Position.X); slidingAnimation.Play(); }
/// <summary> /// The method called when the right button is clicked /// </summary> /// <param name="sender">Button instance</param> /// <param name="e">Event arguments</param> private void Button2Clicked(object sender, Button.ClickEventArgs e) { ++ColumnCnt; var MyGridLayout = TopView.Layout as GridLayout; MyGridLayout.Columns = ColumnCnt; }
private void B1_ClickEvent(object sender, Button.ClickEventArgs e) { string n = "CH" + (v.ChildCount + 1); var ch = new TextLabel(); Random r = new Random(); int so = r.Next(0, (int)v.ChildCount); ch.Size = new Size(W2, H2); ch.Position = new Position(100, 900); ch.BackgroundColor = new Color((float)r.NextDouble(), (float)r.NextDouble(), (float)r.NextDouble(), 0.5f); ch.MultiLine = true; ch.Name = n; v.Add(ch); // SiblingOrder can set the order of mine in the sibling list owned by parent. // the lower value of SiblingOrder means it goes lower to the bottom so that it will be covered by higher valued siblings. // (Vise versa, if SiblingOrder goes to high, the object will be up to the top which can be said as a screen.) //if new added sibling has same value with previously existed sibling, the existed siblings, which have higer value than new sibling, will get +1 and will be rearranged. // (this means the new added sibling will be placed right under the old sibling that has same SiblingOrder value) //Therefore, SiblingOrder will be automatically set as parent's ChildCount + 1 when child itself is added to parent by "Add()". ch.SiblingOrder = so; ch.Text = ch.Name + " SO=" + ch.SiblingOrder; var a = new Animation(500); var targetposition = GetPositionFromSiblingOrder(ch.SiblingOrder); a.AnimateTo(ch, "position", new Position((targetposition.X + W2 / 2), (targetposition.Y + H2 / 2), 0)); a.Play(); a.Finished += A_Finished; }
/// <summary> /// The method called when the right button is clicked /// </summary> /// <param name="sender">Button instance</param> /// <param name="e">Event arguments</param> private void Button2Clicked(object sender, Button.ClickEventArgs e) { ++ColumnCnt; GridLayout MyGridLayout = new GridLayout(); MyGridLayout.Columns = ColumnCnt; TopView.Layout = MyGridLayout; }
private void B3_ClickEvent(object sender, Button.ClickEventArgs e) { for (int i = 0; i < v.ChildCount; i++) { var ch = v.GetChildAt((uint)i); var ani = new Animation(500); ani.AnimateTo(ch, "position", GetPositionFromSiblingOrder(i), new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOut)); ani.Play(); } }
private void Btn1_ClickEvent(object sender, Button.ClickEventArgs e) { GridLayout layout = new GridLayout(); layout.Columns = 5; layout.LinearOrientation = GridLayout.Orientation.Vertical; layoutView.Layout = layout; layoutOption = 1; layout.LayoutWithTransition = true; }
private void B2_ClickEvent(object sender, Button.ClickEventArgs e) { for (int i = 0; i < v.ChildCount; i++) { var ch = v.GetChildAt((uint)i) as TextLabel; if (ch != null) { ch.Text = ch.Name + " SO=" + ch.SiblingOrder; } } }
private void Btn2_ClickEvent(object sender, Button.ClickEventArgs e) { GridLayout layout = new GridLayout(); layout.LayoutWithTransition = true; layout.Rows = 5; layout.LinearOrientation = GridLayout.Orientation.Horizontal; layoutView.Layout = layout; layoutOption = 2; }
/// <summary> /// The method called when the button 2 is clicked /// </summary> /// <param name="sender">Button instance</param> /// <param name="e">Event arguments</param> private void Button2Clicked(object sender, Button.ClickEventArgs e) { FlexLayout Layout = (FlexLayout)FlexView.Layout; FlexLayout.FlexJustification newJust = Layout.Justification + 1; if (newJust > FlexLayout.FlexJustification.SpaceAround) { newJust = FlexLayout.FlexJustification.FlexStart; } Layout.Justification = newJust; FlexView.Layout = Layout; }
/// <summary> /// The method called when the button 3 is clicked /// </summary> /// <param name="sender">Button instance</param> /// <param name="e">Event arguments</param> private void Button3Clicked(object sender, Button.ClickEventArgs e) { FlexLayout Layout = (FlexLayout)FlexView.Layout; FlexLayout.AlignmentType newAlign = Layout.Alignment + 1; if (newAlign > FlexLayout.AlignmentType.Stretch) { newAlign = FlexLayout.AlignmentType.Auto; } Layout.Alignment = newAlign; FlexView.Layout = Layout; }
private void But2_ClickEvent1(object sender, Button.ClickEventArgs e) { tlog.Fatal(tag, $"But2_ClickEvent1()!"); var src = sender as Button; if (src != null) { box2.image.FrameDelay += 100; box2.image.Play(); box2.status.Text = $"playing now, frame delay: {box2.image.FrameDelay}ms, loop count: {box2.image.LoopCount}"; } }
/// <summary> /// The method called when the button 1 is clicked /// </summary> /// <param name="sender">Button instance</param> /// <param name="e">Event arguments</param> private void Button1Clicked(object sender, Button.ClickEventArgs e) { FlexLayout Layout = (FlexLayout)FlexView.Layout; FlexLayout.FlexDirection newDirection = Layout.Direction + 1; if (newDirection > FlexLayout.FlexDirection.RowReverse) { newDirection = FlexLayout.FlexDirection.Column; } Layout.Direction = newDirection; FlexView.Layout = Layout; }
/// <summary> /// The method called when the button 4 is clicked /// </summary> /// <param name="sender">Button instance</param> /// <param name="e">Event arguments</param> private void Button4Clicked(object sender, Button.ClickEventArgs e) { FlexLayout Layout = (FlexLayout)FlexView.Layout; if (Layout.WrapType == FlexLayout.FlexWrapType.Wrap) { Layout.WrapType = FlexLayout.FlexWrapType.NoWrap; } else { Layout.WrapType = FlexLayout.FlexWrapType.Wrap; } FlexView.Layout = Layout; }
private void ButtonClickEvent(object sender, Button.ClickEventArgs e) { if (popup.LayoutDirection == ViewLayoutDirectionType.LTR) { popup.LayoutDirection = ViewLayoutDirectionType.RTL; popup2.LayoutDirection = ViewLayoutDirectionType.RTL; button.Style.Text.Text = "LayoutDirection is right to left"; } else { popup.LayoutDirection = ViewLayoutDirectionType.LTR; popup2.LayoutDirection = ViewLayoutDirectionType.LTR; button.Style.Text.Text = "LayoutDirection is left to right"; } }
private void ButtonClickEvent2(object sender, Button.ClickEventArgs e) { if (tab.LayoutDirection == ViewLayoutDirectionType.LTR) { tab.LayoutDirection = ViewLayoutDirectionType.RTL; tab2.LayoutDirection = ViewLayoutDirectionType.RTL; button2.Style.Text.Text = "LayoutDirection is right to left"; } else { tab.LayoutDirection = ViewLayoutDirectionType.LTR; tab2.LayoutDirection = ViewLayoutDirectionType.LTR; button2.Style.Text.Text = "LayoutDirection is left to right"; } }
private void ButtonClickEvent(object sender, Button.ClickEventArgs e) { if (PopupButtonClickedEvent != null && buttonList != null) { Button button = sender as Button; for (int i = 0; i < buttonList.Count; i++) { if (button == buttonList[i]) { ButtonClickEventArgs args = new ButtonClickEventArgs(); args.ButtonIndex = i; PopupButtonClickedEvent(this, args); } } } }
private void ButtonClickEvent(object sender, Button.ClickEventArgs e) { index = (index + 1) % 4; button.Style.Text.Text = mode[index]; tab.Style.UnderLine.BackgroundColor = color[index]; tab.Style.Text.TextColor = new Selector <Color> { Normal = Color.Black, Selected = color[index], }; tab2.Style.UnderLine.BackgroundColor = color[index]; tab2.Style.Text.TextColor = new Selector <Color> { Normal = Color.Black, Selected = color[index], }; }
private void But2_ClickEvent(object sender, Button.ClickEventArgs e) { tlog.Fatal(tag, $"But2_ClickEvent()!"); var src = sender as Button; if (src != null) { if (src.IsSelected) { box.image.Stop(); box.status.Text = "stopped"; } else { box.image.Play(); box.status.Text = "playing now"; } } }
/// <summary> /// The method called when the button is clicked /// </summary> /// <param name="sender">Button instance</param> /// <param name="e">Event arguments</param> private void ButtonClicked(object sender, Button.ClickEventArgs e) { // clear the previous view, unparent and set to null to dispose of ChildView.Unparent(); ParentView.Unparent(); ChildView.Dispose(); ParentView.Dispose(); ChildView = null; ParentView = null; // update current view to next view if (CurrentView == 1) { View2(); CurrentView = 2; } else if (CurrentView == 2) { View3(); CurrentView = 3; } else if (CurrentView == 3) { View4(); CurrentView = 4; } else if (CurrentView == 4) { View5(); CurrentView = 5; } else if (CurrentView == 5) { View6(); CurrentView = 6; } else if (CurrentView == 6) { View1(); CurrentView = 1; } }
private void But1_ClickEvent(object sender, Button.ClickEventArgs e) { tlog.Fatal(tag, $"But1_ClickEvent()!"); var src = sender as Button; if (src != null) { tlog.Fatal(tag, $"is selected: {src.IsSelected}"); if (src.IsSelected) { box.image.Pause(); box.status.Text = "paused"; } else { box.image.Play(); box.status.Text = "playing now"; } } }
private void But1_ClickEvent1(object sender, Button.ClickEventArgs e) { tlog.Fatal(tag, $"But1_ClickEvent1()!"); var src = sender as Button; if (src != null) { tlog.Fatal(tag, $"is selected: {src.IsSelected}"); if (src.IsSelected) { box2.image.Pause(); box2.status.Text = $"paused, frame delay: {box2.image.FrameDelay}ms, loop count: {box2.image.LoopCount}"; } else { box2.image.FrameDelay = 0; box2.image.LoopCount = -1; box2.image.Play(); box2.status.Text = $"playing now, frame delay: {box2.image.FrameDelay}ms, loop count: {box2.image.LoopCount}"; } } }
private void LeftButton_ClickEvent(object sender, Button.ClickEventArgs e) { myContent1.TextColor = Color.Yellow; }
private void Btn6_ClickEvent(object sender, Button.ClickEventArgs e) { ObjectProcess(false); }
private void WidgetAddBtn_ClickEvent(object sender, Button.ClickEventArgs e) { addWidgetHandler(sender, e); }
private void RightButton_ClickEvent(object sender, Button.ClickEventArgs e) { popup.Dismiss(); }
private void Button_ClickEvent(object sender, Button.ClickEventArgs e) { PopupPost(); }
private void LeftButton_ClickEvent(object sender, Button.ClickEventArgs e) { myPopup1.Dismiss(); }
public virtual void OnClick(Button button, Button.ClickEventArgs eventArgs) { }
public bool OnWidgetAdd(object sender, Button.ClickEventArgs e) { wmViewer.ShowViewer(Window.Instance); return(false); }