Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.ComponentModel;
- using System.Linq;
- using System.Runtime.CompilerServices;
- using System.ServiceModel.Channels;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Input;
- using Xamarin_Forms.Model;
- using Xamarin_Forms.Views.Popup;
- using Rg.Plugins.Popup.Extensions;
- using Xamarin.Forms;
- using Xamarin.Forms.Xaml;
- namespace Xamarin_Forms.Views
- {
- [XamlCompilation(XamlCompilationOptions.Compile)]
- public partial class woTabsParts : ContentPage
- {
- public ObservableCollection<PartDto> _parts { get; set; } = new ObservableCollection<PartDto>();
- private ChoosePartsPopup popuppage;
- public event EventHandler<PartDto> ContactUpdated;
- public woTabsParts(PartDto part)
- {
- InitializeComponent();
- popuppage = new ChoosePartsPopup();
- popuppage.CloseWhenBackgroundIsClicked = true;
- // popuppage.BackgroundClicked(new BitmapDrawable());
- // popuppage.OutsideTouchable = true;
- popuppage.Disappearing += delegate (object sender, EventArgs args)
- // delegate(object sender, PropertyChangedEventArgs args)
- {
- };
- Title = "Parts";
- if (part != null)
- {
- _parts.Add(new PartDto
- {
- Code = part.Code,
- Description = part.Description,
- Quantity = part.Quantity}
- );
- lv_partsnew.IsVisible = true;
- lv_partsnew.ItemsSource = _parts;
- }
- // BindingContext = woTabsModelLocator.MainViewModel;
- // InitializeView();
- }
- //private void InitializeView()
- //{
- // //lv_parts.SetBinding(ListView.ItemsSourceProperty, "PartsWO", BindingMode.TwoWay);
- // _parts = new ObservableCollection<PartDto>()
- // {
- // // new PartDto{ Code = "L6FT", Description = "China Cup", Quantity = "2"},
- // // new PartDto{ Code = "FIL20x50", Description = "China Plate", Quantity = "2"},
- // // new PartDto{ Code = "L4FT", Description = "China Glass", Quantity = "2"}
- // };
- // lv_partsnew.IsVisible = true;
- // lv_partsnew.ItemsSource = _parts;
- // // lv_partsnew.SetBinding(ListView.ItemsSourceProperty, "PartsWO", BindingMode.TwoWay);
- //}
- private void Handle_ItemTapped(object sender, ItemTappedEventArgs e)
- {
- throw new NotImplementedException();
- }
- private void Handle_ItemSelected(object sender, SelectedItemChangedEventArgs e)
- {
- throw new NotImplementedException();
- }
- //private async void Btn_add_camera_part_OnClicked(object sender, EventArgs e)
- //{
- // // using a plugin to do it
- // // here we have ZXingNetMobile to try
- //}
- private async void Btn_addPart_OnClicked(object sender, EventArgs e)
- {
- await Navigation.PushPopupAsync(popuppage, false);
- }
- }
- }
Add Comment
Please, Sign In to add comment