public KontenSynchronisierenInt() { InitializeComponent(); _wertpapsynchro = (CollWertpapSynchro)Resources["wertpapsynchro"]; PrintTxtUnten("start -Statustext- "); DataContext = this; }
public SynUrlVerwalten(HauptFenster mw) { ConWrLi("---- -xx- SynUrlVerwalten"); _mw = mw; _wertpapsynchro = (CollWertpapSynchro)mw.Resources["wertpapsynchro"]; InitializeComponent(); //getxp = new GetFromXpath(); wb1.ScriptErrorsSuppressed = true; wb1.ScrollBarsEnabled = true; }
// public void Ausführen(Konten_Knotenliste_Erstellen mw) { // _mw = mw; // XPathVerwaltenAusführen(); // liUrlTeile und liUrlIndices erstellen. // } private void XPathVerwaltenAusführen() { // Liste URLTeile. // Zu jedem WP zusätzlich n Einträge mit Verweis in die URL-Teile-Tabelle. // XPath kommt aus: node = doc.GetElementbyId(uniqueId); HauptFenster _mw = GlobalRef.g_mw; string strUrl = null; string[] separators = { "/" }; string[] strsplit; int n; liUrlTeile.Clear(); liWertpaps = new List <Wertpap>(); string strIndices; _wertpapsynchro = (CollWertpapSynchro)Resources["wertpapsynchro"]; foreach (WertpapSynchro wps in _wertpapsynchro) // Loop Wertpapiere { strUrl = wps.WPSURL; // https://www.finanzen.net/fonds/sharperatio/spsw_-_whc_global_discovery Console.WriteLine("{0,-120} ", strUrl); if (strUrl.Length < 31) { Console.WriteLine("URL-Länge < 31 !!!"); continue; } strIndices = ""; strsplit = strUrl.Split(separators, StringSplitOptions.None); foreach (string teil in strsplit) // Loop UrlTeile { n = SucheInUrl(teil); if (n >= 0) { Console.Write("Drin:{0} {1} ", n, teil); } else { urlteil = new UrlTeil { Index = liUrlTeile.Count.ToString(), Teil = teil, Color = "3" }; liUrlTeile.Add(urlteil); n = SucheInUrl(teil); Console.Write("Add:{0} {1} ", n, teil); } strIndices += n.ToString() + "/"; } wertpap = new Wertpap { WPISIN = wps.WPSISIN, WPName = wps.WPSName, WPType = wps.WPSType.ToString(), WPURL = strUrl, WPXPathKurs = wps.WPXPathKurs, WPXPathAend = wps.WPXPathAend, WPXPathZeit = wps.WPXPathZeit, WPXPathSharp = wps.WPXPathSharp, WPURLIndices = strIndices, WPColor = "1" }; liWertpaps.Add(wertpap); } Console.WriteLine(); dgvUrls.ItemsSource = liWertpaps; Console.WriteLine("liWertpaps an dgvUrls gebunden: {0}", liWertpaps.Count); dgvUrls.EnableRowVirtualization = false; dgvUrls.UpdateLayout(); dgvTeile.ItemsSource = liUrlTeile; Console.WriteLine("liUrlTeile an dgvTeile gebunden: {0}", liUrlTeile.Count); dgvTeile.EnableRowVirtualization = false; dgvTeile.UpdateLayout(); }