コード例 #1
0
ファイル: SscOperations.cs プロジェクト: solsab/sql-scripts
        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);
            }));
        }
コード例 #2
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);
                                                       }));
        }