Beispiel #1
0
    public void New()
    {
        if (detail != null)
        {
            detail.Clear();
        }
        activeFeature = null;
        detail        = new Detail();
        var sk = new SketchFeature();

        sk.shouldHoverWhenInactive = true;
        new PointEntity(sk.GetSketch());
        detail.AddFeature(sk);
        sk = new SketchFeature();
        detail.AddFeature(sk);
        UpdateFeatures();
        ActivateFeature(sk);
    }
Beispiel #2
0
        private void OnGetdata(object obj)
        {
            Task.Factory.StartNew(() =>
            {
                try
                {
                    Enable = false;
                    //Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, new Action(() =>
                    //{
                    //}));

                    string tableName = Name;
                    if (DbHelperSqLite.Exists("select count(*) from sqlite_master where type='table' and name='BaseDataReceived_" + tableName + "'"))
                    {
                        if (DbHelperSqLite.Exists("select count(*) from BaseDataReceived_" + tableName + " where status = 1"))
                        {
                            Log.WriteLog("股票【" + tableName + "】的数据已获取,不必重新获取");
                            return;
                        }
                    }

                    string url = "http://www.aigaogao.com/tools/history.html?s=" + Name;
                    Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, new Action(() =>
                    {
                        Detail.Clear();
                        sy.WebBrowser webBrowser = new sy.WebBrowser();
                        webBrowser.Navigate(url);
                        webBrowser.DocumentCompleted += new sy.WebBrowserDocumentCompletedEventHandler(web_DocumentCompleted);
                    }));
                }
                catch (Exception ex)
                {
                    Log.WriteLog(ex.Message);
                }
                finally
                {
                    Enable = true;
                }
            });
        }
 internal static void Clear() => Detail.Clear();