public Grid2RowViewModel(int row, Grid2DataProvider provider)
 {
     this.row      = row;
     this.provider = provider;
     this.header   = new NotifyProperty <string>(nameof(Header), this, row.ToString());
     this.cells    = new Lazy <IReadOnlyCollection <Grid2CellViewModel> >(CreateCells);
 }
예제 #2
0
        public Grid2ViewModel(IVisualizerObjectProvider2 objectProvider)
        {
            IReadOnlyCollection <Grid2ColumnViewModel> initialColumns = new ReadOnlyCollection <Grid2ColumnViewModel>(new List <Grid2ColumnViewModel>());
            IReadOnlyCollection <Grid2RowViewModel>    initialRows    = new ReadOnlyCollection <Grid2RowViewModel>(new List <Grid2RowViewModel>());

            this.provider = new Grid2DataProvider(objectProvider);
            this.columns  = new NotifyProperty <IReadOnlyCollection <Grid2ColumnViewModel> >(nameof(Columns), this, initialColumns);
            this.rows     = new NotifyProperty <IReadOnlyCollection <Grid2RowViewModel> >(nameof(Rows), this, initialRows);

            this.provider.Initialize(); //.InitializeAsync().ContinueWith(t =>
            //{
            Columns = CreateColumns();
            Rows    = CreateRows();
            //});
        }
 public Grid2DataProvider(IVisualizerObjectProvider2 objectProvider)
 {
     this.objectProvider = objectProvider;
     this.isLoading      = new NotifyProperty <bool>(nameof(IsLoading), this);
     this.bounds         = new NotifyProperty <Point2>(nameof(Bounds), this, Point2.Zero);
 }
 internal RemoteValue(Grid2DataProvider provider, Point2 point)
 {
     this.provider = provider;
     this.point    = point;
     this.value    = new NotifyProperty <object>(nameof(Value), this);
 }
 internal Grid2ColumnViewModel(int column)
 {
     this.column = column;
     this.header = new NotifyProperty <string>(nameof(Header), this, column.ToString());
 }