Exemple #1
0
        public ILView(IILPanelForm panel, IILShellControl shell, IILUserInterfaceControls controlsProvider)
        {
            m_shell = shell;
            m_shell.CommandEntered += (s, arg) => {
                Evaluate(arg.Command);
            };
            m_shell.CompletionRequested += (s, arg) => {
                Completion(arg);
            };

            m_panel         = panel;
            m_panel.Closed += (s, arg) => {
                ExitThread();
            };
            m_panel.Load += (s, arg) => {
                if (Load != null)
                {
                    Load(s, arg);
                }
            };
            // TODO: this does obviously not work in a multi-window setup!
            ILShellBaseClass.Panel = m_panel.Panel;
            ILShellBaseClass.View  = this;

            m_controlsProv = controlsProvider;
            m_controlsProv.ShellVisibleChanged += (s, arg) => {
                m_shell.Visible = arg.Visible;
            };
            m_controlsProv.SourceChanged += (s, arg) => {
                Source = arg.Source;
            };
            m_controlsProv.ExportPNG += m_controlsProv_ExportPNG;
            m_controlsProv.ExportSVG += m_controlsProv_ExportSVG;
        }
Exemple #2
0
        public ILView(IILPanelForm panel, IILShellControl shell, IILUserInterfaceControls controlsProvider)
        {
            m_shell = shell;
            m_shell.CommandEntered += (s, arg) => {
                Evaluate(arg.Command);
            };
            m_shell.CompletionRequested += (s, arg) => {
                Completion(arg);
            };

            m_panel = panel;
            m_panel.Closed += (s, arg) => {
                ExitThread();
            };
            m_panel.Load += (s, arg) => {
                if (Load != null) {
                    Load(s, arg);
                }
            };
            // TODO: this does obviously not work in a multi-window setup!
            ILShellBaseClass.Panel = m_panel.Panel;
            ILShellBaseClass.View = this;

            m_controlsProv = controlsProvider;
            m_controlsProv.ShellVisibleChanged += (s, arg) => {
                m_shell.Visible = arg.Visible;
            };
            m_controlsProv.SourceChanged += (s, arg) => {
                Source = arg.Source;
            };
            m_controlsProv.ExportPNG += m_controlsProv_ExportPNG;
            m_controlsProv.ExportSVG += m_controlsProv_ExportSVG;
        }