public TestLineControls CreateControls(Grid grid) { var controls = new TestLineControls { Icon = icon, Path = path, Run = run, Status = status }; int rowIndex = grid.RowDefinitions.Count; grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(30) }); mainPanel.Children.Remove(namePanel); grid.Add(namePanel, rowIndex, 0); mainPanel.Children.Remove(status); grid.Add(status, rowIndex, 1); return(controls); }
public TestLineDriver(TestLineControls controls, Test test, Action<Test> queueAction) { _controls = controls; _test = test; _queueAction = queueAction; _controls.Run.Click += (s, e) => _queueAction(_test); }
public TestLineDriver(TestLineControls controls, Test test, Action <Test> queueAction) { _controls = controls; _test = test; _queueAction = queueAction; _controls.Run.Click += (s, e) => _queueAction(_test); }
public void SetUp() { queuedTest = null; controls = new TestLineControls { Icon = new TextBlock(), Path = new Label(), Run = new Button(), Status = new Label() }; test = new Test("some test"); driver = new TestLineDriver(controls, test, queueTest); }
public TestLineControls CreateControls(Grid grid) { var controls = new TestLineControls { Icon = icon, Path = path, Run = run, Status = status }; int rowIndex = grid.RowDefinitions.Count; grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(30) }); mainPanel.Children.Remove(namePanel); grid.Add(namePanel, rowIndex, 0); mainPanel.Children.Remove(status); grid.Add(status, rowIndex, 1); return controls; }