Beispiel #1
0
        private ControlBar MakeControlBar(DirectoryInfo parentDir, ControlBar.ControlBarOptions options)
        {
            var controlUi = new ControlBar(parentDir, options);

            controlUi.ParentClickEvent      += ControlUi_ParentClickEvent;
            controlUi.BackClickEvent        += ControlUi_BackClickEvent;
            controlUi.RefreshClickEvent     += ControlUi_RefreshClickEvent;
            controlUi.InvestigateClickEvent += ControlUi_InvestigateClickEvent;
            controlUi.DeleteClickEvent      += ControlUi_DeleteClickEvent;
            return(controlUi);
        }
Beispiel #2
0
        private void DrawControlBar(DirectoryInfo parentDir)
        {
            if (flowLayoutPanel1.Controls.Contains(activeControlBar))
            {
                flowLayoutPanel1.Controls.Remove(activeControlBar);
            }
            var uiComponent = MakeControlBar(parentDir, activeControlBarOpts);

            activeControlBar = uiComponent;
            flowLayoutPanel1.Controls.Add(activeControlBar);
        }