Пример #1
0
        public IEnumerator <object> SelectModuleTask(ProcessInfo pi, string oldText)
        {
            var fModules = Program.CallFunction <string[]>(pi, "pythonexplorer", "getModules");

            yield return(fModules);

            using (var dlg = new SelectModuleDialog()) {
                dlg.Modules.Items.AddRange(fModules.Result);
                dlg.Modules.Text = oldText;
                if (dlg.ShowDialog(this) == DialogResult.OK)
                {
                    ReplaceContext(dlg.Modules.Text);
                }
            }
        }
Пример #2
0
        public IEnumerator<object> SelectModuleTask(ProcessInfo pi, string oldText)
        {
            var fModules = Program.CallFunction<string[]>(pi, "pythonexplorer", "getModules");
            yield return fModules;

            using (var dlg = new SelectModuleDialog()) {
                dlg.Modules.Items.AddRange(fModules.Result);
                dlg.Modules.Text = oldText;
                if (dlg.ShowDialog(this) == DialogResult.OK)
                    ReplaceContext(dlg.Modules.Text);
            }
        }