/// <summary> /// Copies to clip. /// </summary> /// <param name="layout">The layout.</param> /// <param name="Item">The item.</param> public void CopyToClip(string layout, object Item) { try { ILayout iLayout = _iLayoutCreator.CreateLayout(layout); iLayout.GetLayout(Item); } catch (Exception ex) { CaptureError(ex); } }
public void layoutCreatorForNullJason() { LayoutCreator layoutCreator = new LayoutCreator(); ILayout iLayout = layoutCreator.CreateLayout(Constants.Jason); var dataGrid = new DataGrid(); dataGrid.ClipboardCopyMode = DataGridClipboardCopyMode.ExcludeHeader; //dataGrid.ItemsSource = new List<Post>() { // new Post() { id = 1, body="body", title="title" , userId = 1 }, // new Post() { id = 1, body="body", title="title" , userId = 2 } //}; iLayout.GetLayout(dataGrid); }
public void layoutCreatorForText() { _iLayout = _layoutCreator.CreateLayout(Constants.Text); var dataGrid = new DataGrid(); dataGrid.ClipboardCopyMode = DataGridClipboardCopyMode.ExcludeHeader; dataGrid.ItemsSource = new List <Post>() { new Post() { id = 1, body = "body", title = "title", userId = 1 }, new Post() { id = 1, body = "body", title = "title", userId = 2 } }; _iLayout.GetLayout(dataGrid); Assert.IsTrue(dataGrid.SelectedIndex == 0); }
public void layoutCreatorForDefault() { LayoutCreator layoutCreator = new LayoutCreator(); ILayout iLayout = layoutCreator.CreateLayout("Default"); var dataGrid = new DataGrid(); dataGrid.ClipboardCopyMode = DataGridClipboardCopyMode.ExcludeHeader; dataGrid.ItemsSource = new List <Post>() { new Post() { id = 1, body = "body", title = "title", userId = 1 }, new Post() { id = 1, body = "body", title = "title", userId = 2 } }; iLayout.GetLayout(dataGrid); Assert.IsTrue(dataGrid.SelectedIndex == 0); }
public async Task <ActionResult <LayoutDTO> > GetLayout(int id) { var layout = await _layout.GetLayout(id); return(layout); }