Exemplo n.º 1
0
        public void OpenSscQuery(string queryId)
        {
            Task <ScriptItem> t = Task.Factory.StartNew(() => GetScriptItem(queryId));

            t.ContinueWith(task => m_Dispatcher.Invoke(() =>
            {
                QueryWindowHeader queryWindowHeader = new QueryWindowHeader(task.Result);

                var windowsFormsHost = new WindowsFormsHost
                {
                    Child  = queryWindowHeader,
                    Height = queryWindowHeader.Height
                }.ToRemotedElement();

                m_SsmsOperations.CreateAugmentedQueryWindow(task.Result.SqlScript, task.Result.Title, windowsFormsHost);
            }));
        }