private void CancelClick(object sender, RoutedEventArgs e)
 {
     if (CancelClicked != null)
     {
         CancelClicked.Invoke(this, e);
     }
 }
예제 #2
0
 private void btnCancel_Click(object sender, RoutedEventArgs e)
 {
     if (CancelClicked != null)
     {
         CancelClicked.Invoke(this, EventArgs.Empty);
     }
 }
예제 #3
0
 private void btnCancel_Click(object sender, EventArgs e)
 {
     if (!_initialized)
     {
         return;
     }
     CancelClicked?.Invoke(this, new EventArgs());
 }
        private void OnCancelClicked()
        {
            Hide();

            chooseButton.interactable = false;

            DeactiveAllSelectedClasses();

            CancelClicked?.Invoke();
        }
예제 #5
0
        internal async void CancelClickedInternal()
        {
            CancelClicked?.Invoke(this, EventArgs.Empty);
            if (CancelCommand is not CancelSheetCommand)
            {
                IsOpen = false;
                return;
            }

            if (CancelCommand is CancelSheetCommand cancelSheetCommand &&
                await cancelSheetCommand.CanCloseSheet(CancelCommandParameter))
            {
                IsOpen = false;
            }
        }
        public DatePickerView()
        {
            _datePicker = new BlankDatePicker
            {
                BackgroundColor = Color.Transparent
            };
            Input = _datePicker;
            _datePicker.SetBinding(Entry.TextProperty,
                                   new Binding(nameof(EntryText))
            {
                Source = this, Mode = BindingMode.TwoWay
            });
            _datePicker.SetBinding(Entry.FontAttributesProperty,
                                   new Binding(nameof(EntryFontAttributes))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(Entry.FontFamilyProperty,
                                   new Binding(nameof(EntryFontFamily))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(Entry.FontSizeProperty,
                                   new Binding(nameof(EntryFontSize))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(Entry.PlaceholderProperty,
                                   new Binding(nameof(EntryPlaceholder))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(Entry.PlaceholderColorProperty,
                                   new Binding(nameof(EntryPlaceholderColor))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(Entry.HorizontalTextAlignmentProperty,
                                   new Binding(nameof(EntryHorizontalTextAlignment))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(Entry.TextColorProperty,
                                   new Binding(nameof(EntryTextColor))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(HeightRequestProperty,
                                   new Binding(nameof(EntryHeightRequest))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(MarginProperty,
                                   new Binding(nameof(EntryMargin))
            {
                Source = this, Mode = BindingMode.OneWay
            });

            //_datePicker.SetBinding(BlankDatePicker.FormatProperty,
            //    new Binding(nameof(Format)) { Source = this, Mode = BindingMode.OneWay });
            //_datePicker.SetBinding(BlankDatePicker.MinimumDateProperty,
            //    new Binding(nameof(MinimumDate)) { Source = this, Mode = BindingMode.OneWay });
            //_datePicker.SetBinding(BlankDatePicker.MaximumDateProperty,
            //    new Binding(nameof(MaximumDate)) { Source = this, Mode = BindingMode.OneWay });
            //_datePicker.SetBinding(BlankDatePicker.DateProperty,
            //    new Binding(nameof(Date)) { Source = this, Mode = BindingMode.TwoWay });

            _datePicker.SetBinding(IsEnabledProperty,
                                   new Binding(nameof(IsReadOnly))
            {
                Source = this, Mode = BindingMode.OneWay, Converter = new InverseBooleanConverter()
            });
            _datePicker.SetBinding(InputTransparentProperty,
                                   new Binding(nameof(IsReadOnly))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(HeightRequestProperty,
                                   new Binding(nameof(EntryHeightRequest))
            {
                Source = this, Mode = BindingMode.OneWay
            });

            _datePicker.SetBinding(BlankDatePicker.DoneButtonTextProperty,
                                   new Binding(nameof(DoneButtonText))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(BlankDatePicker.CancelButtonTextProperty,
                                   new Binding(nameof(CancelButtonText))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(BlankDatePicker.UpdateModeProperty,
                                   new Binding(nameof(UpdateMode))
            {
                Source = this, Mode = BindingMode.OneWay
            });


            _datePicker.Focused      += FocusEntry;
            _datePicker.Unfocused    += UnfocusEntry;
            _datePicker.DateSelected += Date_Selected;
            _datePicker.TextChanged  += SendEntryTextChanged;

            _datePicker.DoneClicked   += (sender, e) => DoneClicked?.Invoke(this, e);
            _datePicker.CancelClicked += (sender, e) => CancelClicked?.Invoke(this, e);

            FloatingLabelWithoutAnimation();

            Children.Add(_datePicker, 2, 3, 1, 2);
        }
 private void btnCancel_Click(object sender, RoutedEventArgs e)
 {
     CancelChanges();
     CancelClicked?.Invoke(this, e);
 }
예제 #8
0
 /// <summary>
 /// The on cancel clicked.
 /// </summary>
 public void OnCancelClicked()
 {
     CancelClicked?.Invoke(this, new RoutedEventArgs());
 }
예제 #9
0
 private void Button_cancel_Click(object sender, EventArgs e)
 {
     // fire the external event so the subscribed presenter can react
     CancelClicked?.Invoke(this, e);
 }
예제 #10
0
 /// <summary>
 /// The button cancel_ click.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The e.</param>
 private void OnCancelButtonClick(object sender, RoutedEventArgs e)
 {
     CancelClicked?.Invoke(this, new RoutedEventArgs());
 }
예제 #11
0
 private void OnCancelClicked()
 {
     CancelClicked?.Invoke(this, new EventArgs());
 }
예제 #12
0
 public void OnCancelClicked(object pSender, EventArgs pEventArgs)
 {
     CancelClicked?.Invoke(this, pEventArgs);
     DialogResult = DialogResult.Cancel;
     base.Close();
 }
예제 #13
0
 private void CancelTransfer_Click(object sender, EventArgs e)
 {
     CancelClicked?.Invoke(sender, e);
 }
예제 #14
0
 private void OnCancel()
 {
     CancelClicked?.Invoke(this);
 }
예제 #15
0
        public DatePickerView()
        {
            _datePicker = new BlankDatePicker
            {
                BackgroundColor   = Color.Transparent,
                HorizontalOptions = LayoutOptions.FillAndExpand
            };
            _datePicker.SetBinding(DatePicker.FontAttributesProperty,
                                   new Binding(nameof(EntryFontAttributes))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(DatePicker.FontFamilyProperty,
                                   new Binding(nameof(EntryFontFamily))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(DatePicker.FontSizeProperty,
                                   new Binding(nameof(EntryFontSize))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(BlankDatePicker.PlaceholderProperty,
                                   new Binding(nameof(EntryPlaceholder))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(BlankDatePicker.PlaceholderColorProperty,
                                   new Binding(nameof(EntryPlaceholderColor))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(BlankDatePicker.HorizontalTextAlignmentProperty,
                                   new Binding(nameof(EntryHorizontalTextAlignment))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(DatePicker.TextColorProperty,
                                   new Binding(nameof(EntryTextColor))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(HeightRequestProperty,
                                   new Binding(nameof(EntryHeightRequest))
            {
                Source = this, Mode = BindingMode.OneWay
            });

            _datePicker.SetBinding(DatePicker.FormatProperty,
                                   new Binding(nameof(Format))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(DatePicker.MinimumDateProperty,
                                   new Binding(nameof(MinimumDate))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(DatePicker.MaximumDateProperty,
                                   new Binding(nameof(MaximumDate))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(DatePicker.DateProperty,
                                   new Binding(nameof(Date))
            {
                Source = this, Mode = BindingMode.TwoWay
            });

            _datePicker.SetBinding(BlankDatePicker.DoneButtonTextProperty,
                                   new Binding(nameof(DoneButtonText))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _datePicker.SetBinding(BlankDatePicker.CancelButtonTextProperty,
                                   new Binding(nameof(CancelButtonText))
            {
                Source = this, Mode = BindingMode.OneWay
            });

            _pFrame = new Frame
            {
                Padding         = 0,
                HasShadow       = false,
                BackgroundColor = Color.Transparent,
                Content         = _datePicker
            };
            _pFrame.SetBinding(IsEnabledProperty,
                               new Binding(nameof(IsReadOnly))
            {
                Source = this, Mode = BindingMode.OneWay, Converter = new InverseBooleanConverter()
            });
            _pFrame.SetBinding(InputTransparentProperty,
                               new Binding(nameof(IsReadOnly))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _pFrame.SetBinding(HeightRequestProperty,
                               new Binding(nameof(EntryHeightRequest))
            {
                Source = this, Mode = BindingMode.OneWay
            });

            TextAlignmentCommand = new Command(() => TextAlignmentChanged());

            _datePicker.Focused      += FocusEntry;
            _datePicker.Unfocused    += UnfocusEntry;
            _datePicker.DateSelected += Date_Selected;

            _datePicker.DoneClicked   += (sender, e) => DoneClicked?.Invoke(this, e);
            _datePicker.CancelClicked += (sender, e) => CancelClicked?.Invoke(this, e);

            Children.Add(_pFrame, 2, 3, 1, 2);
        }
예제 #16
0
 /// <summary>
 /// Helper functions to let renderers to fire the CancelClicked event
 /// </summary>
 public void FireCancelEvent()
 {
     CancelClicked?.Invoke(this, EventArgs.Empty);
 }
예제 #17
0
 /// <summary>
 /// Fires the Cancel Clicked event.
 /// </summary>
 protected virtual void OnCancelClicked()
 {
     CancelClicked?.Invoke(this, EventArgs.Empty);
 }
예제 #18
0
        public PickerView()
        {
            _picker = new BlankPicker
            {
                BackgroundColor = Color.Transparent,
            };
            _picker.SetBinding(Picker.FontAttributesProperty,
                               new Binding(nameof(EntryFontAttributes))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _picker.SetBinding(Picker.FontFamilyProperty,
                               new Binding(nameof(EntryFontFamily))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _picker.SetBinding(Picker.FontSizeProperty,
                               new Binding(nameof(EntryFontSize))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _picker.SetBinding(BlankPicker.PlaceholderProperty,
                               new Binding(nameof(EntryPlaceholder))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _picker.SetBinding(BlankPicker.PlaceholderColorProperty,
                               new Binding(nameof(EntryPlaceholderColor))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _picker.SetBinding(BlankPicker.HorizontalTextAlignmentProperty,
                               new Binding(nameof(EntryHorizontalTextAlignment))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _picker.SetBinding(Picker.TextColorProperty,
                               new Binding(nameof(EntryTextColor))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _picker.SetBinding(HeightRequestProperty,
                               new Binding(nameof(EntryHeightRequest))
            {
                Source = this, Mode = BindingMode.OneWay
            });

            _picker.SetBinding(Picker.ItemsSourceProperty,
                               new Binding(nameof(ItemsSource))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _picker.SetBinding(Picker.SelectedIndexProperty,
                               new Binding(nameof(SelectedIndex))
            {
                Source = this, Mode = BindingMode.TwoWay
            });
            _picker.SetBinding(Picker.SelectedItemProperty,
                               new Binding(nameof(SelectedItem))
            {
                Source = this, Mode = BindingMode.TwoWay
            });
            _picker.SetBinding(Picker.TitleProperty,
                               new Binding(nameof(Title))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            //Todo For Xamarin.Forms 4.0
            //_picker.SetBinding(Picker.TitleColorProperty,
            //new Binding(nameof(TitleColor)) { Source = this, Mode = BindingMode.OneWay });

            _picker.SetBinding(BlankPicker.DoneButtonTextProperty,
                               new Binding(nameof(DoneButtonText))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _picker.SetBinding(BlankPicker.CancelButtonTextProperty,
                               new Binding(nameof(CancelButtonText))
            {
                Source = this, Mode = BindingMode.OneWay
            });

            _pFrame = new Frame
            {
                Padding         = 0,
                HasShadow       = false,
                BackgroundColor = Color.Transparent,
                Content         = _picker
            };
            _pFrame.SetBinding(IsEnabledProperty,
                               new Binding(nameof(IsReadOnly))
            {
                Source = this, Mode = BindingMode.OneWay, Converter = new InverseBooleanConverter()
            });
            _pFrame.SetBinding(InputTransparentProperty,
                               new Binding(nameof(IsReadOnly))
            {
                Source = this, Mode = BindingMode.OneWay
            });
            _pFrame.SetBinding(HeightRequestProperty,
                               new Binding(nameof(EntryHeightRequest))
            {
                Source = this, Mode = BindingMode.OneWay
            });

            TextAlignmentCommand = new Command(() => TextAlignmentChanged());

            _picker.Focused              += FocusEntry;
            _picker.Unfocused            += UnfocusEntry;
            _picker.SelectedIndexChanged += IndexChanged;

            _picker.DoneClicked   += (sender, e) => DoneClicked?.Invoke(this, e);
            _picker.CancelClicked += (sender, e) => CancelClicked?.Invoke(this, e);

            Children.Add(_pFrame, 2, 3, 1, 2);
        }
예제 #19
0
 private void BtnCancel_LeftClick(object sender, EventArgs e)
 {
     Hide();
     CancelClicked?.Invoke(this, EventArgs.Empty);
 }
예제 #20
0
 private void buttonCancel_Click(object sender, EventArgs e)
 {
     CancelClicked?.Invoke(sender, e);
 }
예제 #21
0
 private void CancelSync()
 {
     CancelClicked?.Invoke(this, new EventArgs());
 }
예제 #22
0
 private void CancelButton_OnClick(object sender, RoutedEventArgs e)
 {
     CancelClicked?.Invoke(this, EventArgs.Empty);
 }
 protected void btnCancel_Click(object sender, EventArgs e)
 {
     CancelClicked?.Invoke(sender, e);
 }
예제 #24
0
 protected virtual void OnCancelClicked(EventArgs e)
 {
     CancelClicked?.Invoke(this, e);
 }
예제 #25
0
 private void OnCancelClicked(object sender, EventArgs e)
 {
     CancelClicked?.Invoke(this, e);
 }