private void NewLayout(object sender, RoutedEventArgs e) { if (LayoutsListView.SelectedIndex != -1) { canvasCase.NewStandardLayout(LayoutsListView.SelectedIndex, 0); } else if (canvasCase != null) { canvasCase.NewStandardLayout(0, 0); } }
public async Task CreateAsync(int width, int height, int renderBufferCount, bool extraResources) { blendModesFolder = await CaseFolder.CreateFolderAsync("BlendModes", CreationCollisionOption.OpenIfExists); brushesFolder = await CaseFolder.CreateFolderAsync("Brushes", CreationCollisionOption.OpenIfExists); layoutsFolder = await CaseFolder.CreateFolderAsync("Layouts", CreationCollisionOption.OpenIfExists); animationsFolder = await CaseFolder.CreateFolderAsync("Animations", CreationCollisionOption.OpenIfExists); canvasCase = new CanvasCase(DeviceResources, width, height, renderBufferCount); defaultBlendModeGuid = Guid.Parse("9c9f90ac-752c-4db5-bcb5-0880c35c50bf"); await UpdateDCResource(); if (extraResources) { await UpdateDCResourcePlugin(); } await LoadBlendmodes(); await LoadBrushes(); canvasCase.PaintAgent.CurrentLayout = canvasCase.NewStandardLayout(0, 0); await SaveAsync(); canvasCase.watched = true; }