Exemplo n.º 1
0
        public BindViewModel CreateNewBind()
        {
            BindViewModel result = new BindViewModel();

            Binds.Add(result);
            OnPropertyChanged("Binds");
            return(result);
        }
Exemplo n.º 2
0
 public VMRecyclerAdapter(Context Context, ObservableCollection <T> Collection, int ItemLayoutId, BindEvents BindEvents, BindViewModel BindViewModel)
     : base()
 {
     this.context       = Context;
     this.Collection    = Collection;
     this.itemLayoutId  = ItemLayoutId;
     this.bindEvents    = BindEvents;
     this.bindViewModel = BindViewModel;
 }
Exemplo n.º 3
0
        public void OpenBindsInPath(string path)
        {
            LastPath = path;
            ClearBinds();
            Bind[] binds = JsonUtilities.Deserialize <Bind[]>(File.ReadAllText(LastPath));
            int    count = 0;
            var    temp  = new List <BindViewModel>();

            foreach (Bind b in binds)
            {
                var bindVM = new BindViewModel(b);
                temp.Add(bindVM);

                if (count++ % 5 == 0)
                {
                    temp.ForEach(bvm => Binds.Add(bvm)); OnPropertyChanged("Binds");
                    temp.Clear();
                }
            }
            temp.ForEach(bvm => Binds.Add(bvm)); OnPropertyChanged("Binds");
        }
Exemplo n.º 4
0
 public bool RemoveBind(BindViewModel toRemove)
 {
     toRemove.Bind.Dispose();
     OnPropertyChanged("Binds");
     return(Binds.Remove(toRemove));
 }
Exemplo n.º 5
0
 public BindControl(MainWindow mainWindow)
 {
     InitializeComponent();
     //  DataContext = null;
     DataContext = new BindViewModel(mainWindow);
 }