Ejemplo n.º 1
0
        public py_editor(Icon _icon, i_py_api _api, string _api_doc_title, string _api_doc_str, string _api_doc_html_filename)
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
            if (m_instance == null)
            {
                m_instance = this;
            }

            check_os();

            this.Icon = _icon;

            m_api_doc_title         = _api_doc_title;
            m_api_doc_str           = _api_doc_str;
            m_api_doc_html_filename = _api_doc_html_filename;

            this.Text = CONST_EDITOR_NAME + " " + get_app_version();

            m_py_api = _api;

            py_init();

            FormClosing += new System.Windows.Forms.FormClosingEventHandler(OnFormClosing);

            OutputTextBox.Text = "Simple Python script editor ( IronPython " + m_py_engine.LanguageVersion.ToString() + " )";

            py_editor_doc_page.static_data_init();

            NewToolStripMenuItemClick(null, null);

            update_status_msg("ok!..");
        }
Ejemplo n.º 2
0
        void destroy()
        {
            foreach (TabPage page in DocPagesContainer.TabPages)
            {
                delete_page(page, true);
            }

            py_editor_doc_page.static_data_deinit();

            m_py_engine = null;
            m_py_scope  = null;

            m_py_api.deinit();
            m_py_api = null;

            m_api_doc_title         = null;
            m_api_doc_str           = null;
            m_api_doc_html_filename = null;

            if (m_instance == this)
            {
                m_instance = null;
            }
        }