public static UpdateGridVm BlockPicker() { var initData = SimGridIntSamples.SquareRandBits(512, 5213); var ugvm = new UpdateGridVm(data: initData, proc: ProcMarkBlocks, update_params: UpdateParams); BlockPick.Init(initData.Data, initData.Width, 4); ugvm.GraphLatticeVm.SetUpdater(GraphLatticeVmEx.DrawGridCell_int_BW_mod256, initData); ugvm.UpdateVm.OnUpdateUI.Subscribe(p => UpdateGraphLatticeWithGrid(p, ugvm)); return(ugvm); }
public static void UpdateGraphLatticeWithGrid(ProcResult result, UpdateGridVm ugvm) { ugvm.GraphLatticeVm.Update(result.Data["Grid"]); }