예제 #1
0
파일: ILView.cs 프로젝트: Hengle/ILView
        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;
        }
예제 #2
0
파일: ILView.cs 프로젝트: hokb/ILView
        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;
        }