Пример #1
0
        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);
            }
        }
Пример #2
0
 private void TreeView_SlectedDatabaseChanged(Object obj)
 {
     if (!PropertiesFrame.IsDisposed)
     {
         PropertiesFrame.SetProperties(obj);
     }
 }
Пример #3
0
        public void Reset()
        {
            TreeView.Dispose();
            ShowTreeViewFrame();
            TreeView.ExpandAll();

            ShowStepFrames();
            StepFrames[TestMethod.Write].Activate();

            LogFrame.Dispose();
            ShowLogFrame();

            PropertiesFrame.Dispose();
            ShowPropertiesFrame();

            Initialize();
        }
Пример #4
0
        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);
                }
            }
        }
Пример #5
0
 public void RefreshPropertiesFrame()
 {
     PropertiesFrame.SetProperties(TreeView.GetSelectedDatabase());
 }