public MainLayout(DockPanel panel, List<ToolStripComboBox> comboBoxes, List<ToolStripButton> buttons, TrackBar trackBar, string path) { Logger = LogManager.GetLogger(Settings.Default.ApplicationLogger); Panel = panel; ComboBoxes = comboBoxes; Buttons = buttons; TrackBar = trackBar; if (!Directory.Exists(path)) Directory.CreateDirectory(path); DockConfigPath = Path.Combine(path, Settings.Default.DockingConfigurationPath); TreeView = new TreeViewFrame(); TreeView.SelectedDatabaseChanged += TreeView_SlectedDatabaseChanged; TreeView.PropertiesClick += TreeView_PropertiesClick; StepFrames = new Dictionary<TestMethod, StepFrame>(); LogFrame = new LogFrame(); PropertiesFrame = new PropertiesFrame(); PropertiesFrame.Caller = TreeView; foreach (TestMethod method in GetTestMethods()) StepFrames[method] = CreateStepFrame(method); }
public void ShowPropertiesFrame() { if (!PropertiesFrame.IsDisposed) { PropertiesFrame.Show(Panel); PropertiesFrame.DockState = DockState.DockRight; } else { PropertiesFrame = new PropertiesFrame(); PropertiesFrame.Show(Panel); PropertiesFrame.DockState = DockState.DockRight; PropertiesFrame.Text = "Properties"; var database = TreeView.GetSelectedDatabase(); if (database != null) { PropertiesFrame.Caller = TreeView; PropertiesFrame.SetProperties(database); } } }