void ReleaseDesignerOutlets() { if (DetailsButton != null) { DetailsButton.Dispose(); DetailsButton = null; } if (FirstButton != null) { FirstButton.Dispose(); FirstButton = null; } if (GetPhotoButton != null) { GetPhotoButton.Dispose(); GetPhotoButton = null; } if (Parameter != null) { Parameter.Dispose(); Parameter = null; } }
public ProcessDefaultButton() { InitializeComponent(); _viewModel = (ProcessDefaultButtonViewModel)BindingContext; MenuButtonText = "Menu"; CloseMenuText = "Fechar Menu"; #region First Button Bindings FirstButton.SetBinding(Button.TextProperty, new Binding(nameof(FirstButtonText), source: this)); FirstButton.SetBinding(Button.IsVisibleProperty, new Binding(nameof(FirstButtonIsVisible), source: this)); FirstButton.SetBinding(Button.CommandProperty, new Binding(nameof(FirstButtonCommand), source: this)); #endregion #region Second Button Bindings SecondButton.SetBinding(Button.TextProperty, new Binding(nameof(SecondButtonText), source: this)); SecondButton.SetBinding(Button.IsVisibleProperty, new Binding(nameof(SecondButtonIsVisible), source: this)); SecondButton.SetBinding(Button.CommandProperty, new Binding(nameof(SecondButtonCommand), source: this)); #endregion #region Menu Button Bindings MenuButton.SetBinding(Button.TextProperty, new Binding(nameof(MenuButtonText), source: this)); MenuButton.SetBinding(Button.IsVisibleProperty, new Binding(nameof(MenuButtonIsVisible), source: this)); MenuButton.Clicked += MenuButtonOnClicked; #endregion }
private async void Window_Loaded(object sender, RoutedEventArgs e) { var firstButtonTask = FirstButton.ClickAsync(); var secondButtonTask = SecondButton.ClickAsync(); var labelTask = TheLabel.MouseEnterAsync(); await Task.WhenAll(firstButtonTask, secondButtonTask, labelTask); TheTextBlock.Text = "Clicked on both buttons and mouse moved over the label"; }
void ReleaseDesignerOutlets() { if (FirstButton != null) { FirstButton.Dispose(); FirstButton = null; } if (ResultTextView != null) { ResultTextView.Dispose(); ResultTextView = null; } }
void UpdateFirstButton() { _firstButton?.Hide(); if (FirstButton != null) { _firstButton = new ElmSharp.Button(_popUp) { WeightX = 1.0, WeightY = 1.0, Style = "popup/circle/left" }; if (!string.IsNullOrEmpty(FirstButton.Text)) { _firstButton.Text = FirstButton.Text; } if (FirstButton.Icon != null) { var iconPath = FirstButton.Icon.File; if (!string.IsNullOrEmpty(iconPath)) { var buttonImage = new ElmSharp.Image(_firstButton); buttonImage.LoadAsync(ResourcePath.GetPath(iconPath)); buttonImage.Show(); _firstButton.SetPartContent("elm.swallow.content", buttonImage); } } _firstButton.Clicked += (s, e) => { FirstButton.Activate(); }; if (_firstButtonBgColor != Color.Default) { Console.WriteLine($"TwoButtonPopup set first button background color:{_firstButtonBgColor.ToNative()}"); _firstButton.BackgroundColor = _firstButtonBgColor.ToNative(); } } else { _firstButton = null; } _popUp.SetPartContent("button1", _firstButton); }
public void CutBack() { if (isCorrectPositionFirst(Saw.transform.position.x)) { TrueNumber++; SetBackAnimations(true); PlayBackAnimations(); PlaySawAnimation(); CloseFirst.SetActive(false); FirstOkay.SetActive(true); FirstButton.SetActive(false); firstCutted = true; CheckTrue(); } else { WrongPlacePanel.SetActive(true); } }
void UpdateFirstButton() { _firstButton?.Hide(); if (FirstButton != null) { _firstButton = new ElmSharp.Button(_popUp) { WeightX = 1.0, WeightY = 1.0, Style = "popup/circle/left" }; if (!string.IsNullOrEmpty(FirstButton.Text)) { _firstButton.Text = FirstButton.Text; } if (FirstButton.Icon != null) { var iconPath = FirstButton.Icon.File; if (!string.IsNullOrEmpty(iconPath)) { var buttonImage = new ElmSharp.Image(_firstButton); buttonImage.LoadAsync(ResourcePath.GetPath(iconPath)); buttonImage.Show(); _firstButton.SetPartContent("elm.swallow.content", buttonImage); } } _firstButton.Clicked += (s, e) => { FirstButton.Activate(); }; } else { _firstButton = null; } _popUp.SetPartContent("button1", _firstButton); }
private void SetAllButtons(bool active) { GoBackButton.SetActive(!active); if (!firstCutted) { FirstButton.SetActive(active); FirstZoomButton.SetActive(active); } if (!secondCutted) { SecondButton.SetActive(active); SecondZoomButton.SetActive(active); } if (!thirdCutted) { ThirdButton.SetActive(active); ThirdZoomButton.SetActive(active); } }
void ReleaseDesignerOutlets() { if (FirstButton != null) { FirstButton.Dispose(); FirstButton = null; } if (SecondButton != null) { SecondButton.Dispose(); SecondButton = null; } if (ThirdButton != null) { ThirdButton.Dispose(); ThirdButton = null; } }
public void UpdateButton() { if (ChartSlider.Value == 0) { FirstButton.DisableButton(); PreviousButton.DisableButton(); } else { FirstButton.EnableButton(); PreviousButton.EnableButton(); } if (ChartSlider.Value == ChartSlider.Maximum) { NextButton.DisableButton(); LastButton.DisableButton(); } else { NextButton.EnableButton(); LastButton.EnableButton(); } }
private void FirstTButton_Click(object sender, EventArgs e) { FirstButton.PerformClick(); }