Example #1
0
 public void OnPointerUp(PointerEventData pointer)
 {
     Clicked?.Invoke(this);
 }
 public void doDownloadId(string id)
 {
     Log.Debug("_____updater.doDownloadId({0})", id);
     Clicked?.Invoke(id);
 }
Example #3
0
 public void Fire()
 {
     Clicked?.Invoke(this, EventArgs.Empty);
 }
Example #4
0
 private void OnButtonTapped(object sender, EventArgs e)
 {
     Clicked?.Invoke(this, EventArgs.Empty);
 }
Example #5
0
 private void Button_Clicked(object sender, EventArgs e)
 {
     DLoggerManager.Instance.Logger.Log(devoctomy.DFramework.Logging.Interfaces.LoggerMessageType.VerboseMed | devoctomy.DFramework.Logging.Interfaces.LoggerMessageType.Information, "Tab button '{0}' clicked.", Text);
     IsPressed = true;
     Clicked?.Invoke(this, EventArgs.Empty);
 }
Example #6
0
 protected override void OnPointerUp()
 {
     Clicked?.Invoke(this);
 }
Example #7
0
 protected virtual void OnClicked(EventArgs e)
 {
     Clicked?.Invoke(this, e);
 }
Example #8
0
File: Button.cs Project: hevey/maui
 void IButtonElement.PropagateUpClicked() => Clicked?.Invoke(this, EventArgs.Empty);
 /// <summary>
 /// To broadcast a click event to subscribers
 /// </summary>
 public void SendClicked()
 {
     Clicked?.Invoke(this, EventArgs.Empty);
 }
Example #10
0
 private new void MouseClick(object sender, MouseEventArgs e)
 {
     Clicked?.Invoke(this, e);
 }
 protected Task ClickHandler()
 {
     return(Clicked.InvokeAsync(null));
 }
Example #12
0
 protected void ClickHandler()
 {
     Clicked?.Invoke();
     ParentTabs?.SelectTab(Name);
 }
 public void ExportXML(Clicked click, String path)
 {
     System.IO.StreamWriter stream;
     XmlSerializer ser;
     switch (click)
     {
         case (Clicked.Jedis):
             stream = new System.IO.StreamWriter(@path + "\\ListeJedis.txt");
             ser = new XmlSerializer(typeof(List<Jedi>));
             ser.Serialize(stream, data.getAllJedi());
             stream.Close();
             break;
         case (Clicked.Stades):
             stream = new System.IO.StreamWriter(@path + "\\ListeStades.txt");
             ser = new XmlSerializer(typeof(List<Stade>));
             ser.Serialize(stream, data.getAllStade());
             stream.Close();
             break;
         case (Clicked.Matchs):
             stream = new System.IO.StreamWriter(@path + "\\ListeMatchs.txt");
             ser = new XmlSerializer(typeof(List<Match>));
             ser.Serialize(stream, data.getAllMatch());
             stream.Close();
             break;
         case (Clicked.Caracteristiques):
             stream = new System.IO.StreamWriter(@path + "\\ListeCaracteristiques.txt");
             ser = new XmlSerializer(typeof(List<Caracteristique>));
             ser.Serialize(stream, data.getAllCaracteristic());
             stream.Close();
             break;
         default:
             break;
     }
 }
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 public static void ShowNow(int identifier, string caption, string message, Type type, string button1Text, string button2Text, Clicked clicked)
 {
     Show(identifier, caption, message, type, button1Text, button2Text, clicked);
     mAlpha.Value = 1;
     mState = States.Running;
     mYesButton.enable = true;
     mNoButton.enable = true;
 }
Example #15
0
 protected void SendNavigationEvent(NavigationType navigationType)
 {
     Clicked.SafeRaise(navigationType);
 }
Example #16
0
 private void OnTabClicked(Tab tab)
 {
     Clicked?.Invoke(this);
 }
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 public static void Show(int identifier, string caption, string message, Type type, string button1Text, string button2Text, Clicked clicked, ThreadStart tStart, float minTime)
 {
     Show(identifier, caption, message, type, button1Text, button2Text, clicked);
     mMinTime = minTime;
     mCount = 0;
     mThread = new Thread(tStart);
     mThread.Start();
     while (!mThread.IsAlive);
 }
 protected void ClickHandler()
 {
     Clicked?.Invoke();
 }
Example #19
0
 protected void ClickHandler(UIMouseEventArgs eventArgs)
 {
     Clicked?.Invoke(Page);
 }
 private void OnClicked(EventArgs e)
 {
     Clicked?.Invoke(this, e);
 }
Example #21
0
 public override void Click()
 {
     Clicked.Invoke(this, EventArgs.Empty);
     isChecked = !isChecked;
 }
Example #22
0
 private void OnLeftClicked()
 {
     Clicked?.Invoke(this, new ClickEventArgs(Mouse.Button.Left));
 }
Example #23
0
        public RadioButton(Array labels,
                           string checkValue             = "",
                           double fontSize               = 20,
                           string fontFamily             = "Arial",
                           FontAttributes fontAttributes = FontAttributes.None,
                           Color?textColor               = null)
        {
            Padding = new Thickness(0);
            Margin  = new Thickness(40, 20, 40, 20);

            var categoryLabels = new List <string>();

            foreach (var label in labels)
            {
                if (!string.IsNullOrEmpty(checkValue) && checkValue.Contains(label.ToString()))
                {
                    categoryLabels.Add(checkValue);
                    continue;
                }
                if (!label.ToString().Contains("\u25CB") || !label.ToString().Contains("\u25CF"))
                {
                    categoryLabels.Add(label.ToString().Insert(0, "\u25CB "));
                }
            }

            var dataTemplate = new DataTemplate(() =>
            {
                var templateGrid = new Grid
                {
                    RowSpacing    = 1,
                    ColumnSpacing = 1,
                };

                var labelText = new Label
                {
                    FontFamily            = fontFamily,
                    FontSize              = fontSize,
                    FontAttributes        = fontAttributes,
                    TextColor             = textColor ?? Color.Black,
                    VerticalTextAlignment = TextAlignment.Center,
                    Margin = new Thickness(10, 0, 10, 0)
                };

                labelText.SetBinding(Label.TextProperty, ".");

                //var checBoxLabel = new Label()
                //{
                //    Text = string.IsNullOrEmpty(checkValue) ? $"\u25CB {labelText.Text}" : $"{checkValue} {labelText.Text}",
                //    FontFamily = fontFamily,
                //    FontSize = fontSize * 2,
                //    TextColor = Color.FromHex("#7f8082")
                //};

                var tapGestureRecognizer     = new TapGestureRecognizer();
                tapGestureRecognizer.Tapped += (sender, args) =>
                {
                    labelText.Text = labelText.Text.Contains("\u25CB") ? labelText.Text.Replace("\u25CB", "\u25CF") : labelText.Text.Replace("\u25CF", "\u25CB");
                    CheckedValue   = labelText.Text;
                    Clicked?.Invoke(this, args);
                };

                foreach (var label in labels)
                {
                    templateGrid.RowDefinitions.Add(new RowDefinition {
                        Height = new GridLength(1, GridUnitType.Auto)
                    });
                }

                StackLayout stackLayout = new StackLayout()
                {
                    Orientation       = StackOrientation.Horizontal,
                    HorizontalOptions = LayoutOptions.StartAndExpand,
                    Children          = { labelText }
                };

                stackLayout.GestureRecognizers.Add(tapGestureRecognizer);
                templateGrid.Children.Add(stackLayout, 0, labels.Length);

                return(new ViewCell {
                    View = templateGrid
                });
            });

            Content = new ListView
            {
                ItemsSource   = categoryLabels,
                ItemTemplate  = dataTemplate,
                Margin        = 5,
                SelectionMode = ListViewSelectionMode.None
            };
        }
Example #24
0
 void OnClick()
 {
     Clicked?.Invoke();
     Blur();
 }
 public void doDownload()
 {
     Log.Debug("_____updater.doDownload()");
     Clicked?.Invoke();
 }
Example #26
0
 protected virtual void OnClicked()
 {
     Clicked?.Invoke(this, EventArgs.Empty);
 }
Example #27
0
 protected void ClickHandler()
 {
     Clicked.InvokeAsync(null);
 }
Example #28
0
 protected virtual void OnClicked(LoadLevelButton obj) => Clicked?.Invoke(obj);
Example #29
0
 public void Click()
 {
     Console.WriteLine("Somebody has clicked a button. Let's raise the event...");
     Clicked?.Invoke(this, EventArgs.Empty);
     Console.WriteLine("All listeners are notified.");
 }
Example #30
0
 public void PropagateUpClicked() =>
 Clicked?.Invoke(this, EventArgs.Empty);
Example #31
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     Clicked?.Invoke(new CancelEventArgs());
 }
Example #32
0
 /// <summary>
 /// Creates and initializes a new instance of Image class.
 /// </summary>
 /// <param name="parent">The parent is a given container which will be attached by Image as a child. It's <see cref="EvasObject"/> type.</param>
 /// <since_tizen> preview </since_tizen>
 public Image(EvasObject parent) : base(parent)
 {
     _clicked     = new SmartEvent(this, "clicked");
     _clicked.On += (s, e) => Clicked?.Invoke(this, EventArgs.Empty);
 }
Example #33
0
 protected void HandleClick(UIMouseEventArgs e)
 {
     Clicked.InvokeAsync(EventArgsMapper.ToMouseEventArgs(e));
 }
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        public static void Show(int identifier, string caption, string message, Type type, string button1Text, string button2Text, Clicked clicked)
        {
            mCaption = caption;
            mMessage = message;
            mType = type;

            //int caption_h, message_h;
            //CalcContentY(caption, message, out caption_h, out message_h);

            if(mType == Type.YesNo) {
                mYesButton.Position(new Rect(((Screen.width - mBUTTONS_SEPARATION) / 2) - ButtonProperties.buttonSize, mBUTTONS_Y, ButtonProperties.buttonSize, ButtonProperties.buttonSize));
            } else {
                mYesButton.Position(new Rect((Screen.width - ButtonProperties.buttonSize) / 2, mBUTTONS_Y, ButtonProperties.buttonSize, ButtonProperties.buttonSize));
            }

            mYesButton.Text = button1Text;
            mYesButton.enable = false;
            mNoButton.Text = button2Text;
            mNoButton.enable = false;

            mAlpha.Reset(1, mAnimationDuration, true, 0);
            mState = States.Showing;
            mIdentifier = identifier;
            mClicked = clicked;
            mThread = null;
        }