public override void Awake(NSObject context) { base.Awake(context); // Configure interface objects here. Console.WriteLine("{0} awake with context", this); var stations = Stations.All; if (context is NSString) { var parameter = context.ToString(); var index = parameter.IndexOf(",", StringComparison.InvariantCultureIgnoreCase); var fromId = Convert.ToInt32(parameter.Substring(0, index)); var toId = Convert.ToInt32(parameter.Substring(index + 1)); _from = stations.FirstOrDefault(f => f.Id == fromId); _to = stations.FirstOrDefault(t => t.Id == toId); } if (_from == null) { _from = stations.First(); } if (_to == null) { _to = stations.Last(); } FromLabel.SetText(_from.Name); ToLabel.SetText(_to.Name); }
public override void ViewDidLoad() { base.ViewDidLoad(); var set = this.CreateBindingSet <FirstView, FirstViewModel>(); var model = new MvxPickerViewModel(CurrencyPicker); CurrencyPicker.Model = model; set.Bind(AmountToConvertTF) .For(v => v.Text) .To(vm => vm.PreConvertAmount) .OneWayToSource(); set.Bind(model) .For(v => v.ItemsSource) .To(vm => vm.ConversionCurrencies); set.Bind(model) .For(v => (string)v.SelectedItem) .To(vm => vm.CurrentSelectedCurrency); set.Bind(OverlayView) .For(v => v.Hidden) .To(vm => vm.ShowCurrencyPicker) .WithConversion(new MvxVisibilityValueConverter()) .OneWay(); set.Bind(ClosePickerButton) .To("StopSelectingCurrency"); set.Bind(FromLabel) .For(v => v.Text) .To(vm => vm.FromConvertType) .WithConversion(new PrefixValueConverter(), "From: ") .OneWay(); set.Bind(ToLabel) .For(v => v.Text) .To(vm => vm.ToConvertType) .WithConversion(new PrefixValueConverter(), "To: ") .OneWay(); set.Bind(FromLabel.Tap()) .For(v => v.Command) .To("SelectFromCurrencyType"); set.Bind(ToLabel.Tap()) .For(v => v.Command) .To("SelectToCurrencyType"); set.Bind(ConvertedAmountLabel) .For(v => v.Text) .To(vm => vm.ProcessedPostConvertAmount) .OneWay(); set.Apply(); }
//Shows Converter Menu private void ShowConverter() { //Show the converter menu's controls and labels CategoryLabel.Show(); CategoryComboBox.Show(); InstructionLabel.Show(); ValueOfLabel.Show(); UserInputTextBox.Show(); FromLabel.Show(); InitialUnitsComboBox.Show(); ToLabel.Show(); ResultingUnitsComboBox.Show(); BackButtonLabel.Show(); BackButton.Show(); DividerLabel.Show(); UserInputTextBox.Focus(); }
void ReleaseDesignerOutlets() { if (FromLabel != null) { FromLabel.Dispose(); FromLabel = null; } if (FromTextField != null) { FromTextField.Dispose(); FromTextField = null; } if (InputTextField != null) { InputTextField.Dispose(); InputTextField = null; } if (ToLabel != null) { ToLabel.Dispose(); ToLabel = null; } if (ToTextField != null) { ToTextField.Dispose(); ToTextField = null; } if (NextButton != null) { NextButton.Dispose(); NextButton = null; } }
void ReleaseDesignerOutlets() { if (FromLabel != null) { FromLabel.Dispose(); FromLabel = null; } if (GoButton != null) { GoButton.Dispose(); GoButton = null; } if (Map != null) { Map.Dispose(); Map = null; } if (ToLabel != null) { ToLabel.Dispose(); ToLabel = null; } if (ZoomInButton != null) { ZoomInButton.Dispose(); ZoomInButton = null; } if (ZoomOutButton != null) { ZoomOutButton.Dispose(); ZoomOutButton = null; } }
//Overrided method accepting a category parameter obtained from menu selection private void ShowConverter(String category) { //Shows the converter menu's controls and labels CategoryLabel.Show(); CategoryComboBox.Show(); InstructionLabel.Show(); ValueOfLabel.Show(); UserInputTextBox.Show(); FromLabel.Show(); InitialUnitsComboBox.Show(); ToLabel.Show(); ResultingUnitsComboBox.Show(); ConvertSubmissionButton.Show(); BackButtonLabel.Show(); BackButton.Show(); DividerLabel.Show(); //Selects the category field in the converter CategoryComboBox.SelectedIndex = CategoryComboBox.FindStringExact(category); //Shows the default units of measurement ShowDefaultUnits(category); UserInputTextBox.Focus(); }
//Hides Converter Menu private void HideConverter() { CategoryLabel.Hide(); CategoryComboBox.Hide(); InstructionLabel.Hide(); ValueOfLabel.Hide(); UserInputTextBox.Hide(); FromLabel.Hide(); InitialUnitsComboBox.Hide(); ToLabel.Hide(); ResultingUnitsComboBox.Hide(); ConvertSubmissionButton.Hide(); BackButtonLabel.Hide(); BackButton.Hide(); DividerLabel.Hide(); InitialValueLabel.Hide(); InitialUnitsLabel.Hide(); EqualsLabel.Hide(); ResultingUnitsLabel.Hide(); ResultingValueLabel.Hide(); //When navigating back to the main menu its important to clear the field values for the ComboBoxes ClearUnitsComboBoxes(); }
void ReleaseDesignerOutlets() { if (CommentsView != null) { CommentsView.Dispose(); CommentsView = null; } if (CommentTextBox != null) { CommentTextBox.Dispose(); CommentTextBox = null; } if (CostLabel != null) { CostLabel.Dispose(); CostLabel = null; } if (DateLabel != null) { DateLabel.Dispose(); DateLabel = null; } if (DistanceLabel != null) { DistanceLabel.Dispose(); DistanceLabel = null; } if (DriverLabel != null) { DriverLabel.Dispose(); DriverLabel = null; } if (EndLabel != null) { EndLabel.Dispose(); EndLabel = null; } if (FromLabel != null) { FromLabel.Dispose(); FromLabel = null; } if (MakerLabel != null) { MakerLabel.Dispose(); MakerLabel = null; } if (ModelLabel != null) { ModelLabel.Dispose(); ModelLabel = null; } if (RateLabel != null) { RateLabel.Dispose(); RateLabel = null; } if (ResumeView != null) { ResumeView.Dispose(); ResumeView = null; } if (SegmentedControl != null) { SegmentedControl.Dispose(); SegmentedControl = null; } if (StartLabel != null) { StartLabel.Dispose(); StartLabel = null; } if (ToLabel != null) { ToLabel.Dispose(); ToLabel = null; } if (VehicleImage != null) { VehicleImage.Dispose(); VehicleImage = null; } }
} // Dummy constructor public MenuRewritableItemModel(ToLabel labelFilter, Action <int, T> callback, Action <int, T> delayCallback = null, bool isLoop = true /* Metadata: 0x00614B76 */, bool isForceSkip10 = false /* Metadata: 0x00614B77 */, bool isForceSkip100 = false /* Metadata: 0x00614B78 */, bool isSkipByCount = true /* Metadata: 0x00614B79 */) { }