Interaction logic for VSInteractiveWindowControl.
Наследование: System.Windows.Controls.UserControl
Пример #1
0
        private void LoadDomain()
        {
            if (scriptDomain == null)
            {
                try
                {
                    AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
                    AppDomainSetup setup = new AppDomainSetup()
                    {
                        ApplicationBase = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
                        PrivateBinPath  = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
                    };
                    scriptDomain = AppDomain.CreateDomain(DomainName, AppDomain.CurrentDomain.Evidence, setup);
                    VSContext.InitializeAppDomain(scriptDomain);
#if USE_APP_DOMAIN
                    proxy = (VSInteractiveWindowProxy)scriptDomain.CreateInstanceAndUnwrap(typeof(VSInteractiveWindowProxy).Assembly.FullName, typeof(VSInteractiveWindowProxy).FullName);
                    var control = FrameworkElementAdapters.ContractToViewAdapter(proxy.CreateControl());
#else
                    var control = new VSInteractiveWindowControl();
#endif

                    grid.Children.Clear();
                    grid.Children.Add(control);
                }
                catch (Exception ex)
                {
#if DEBUG
                    System.Windows.MessageBox.Show("Loading domain failed:\n" + ex.ToString());
#endif
                }
            }
        }
Пример #2
0
 public INativeHandleContract CreateControl()
 {
     control = new VSInteractiveWindowControl();
     return(FrameworkElementAdapters.ViewToContractAdapter(control));
 }
 public INativeHandleContract CreateControl()
 {
     control = new VSInteractiveWindowControl();
     return FrameworkElementAdapters.ViewToContractAdapter(control);
 }
Пример #4
0
 public INativeHandleContract CreateControl(InteractiveExecutionInitialization interactiveExecutionInitialization)
 {
     control = new VSInteractiveWindowControl(interactiveExecutionInitialization);
     return(FrameworkElementAdapters.ViewToContractAdapter(control));
 }