private async void button_Click(object sender, RoutedEventArgs e) { try { if (System.IO.File.Exists(_dllPath)) { System.IO.File.Delete(_dllPath); Sources sources = this.FindParent <Sources>(); sources.container.Children.Clear(); sources.ItemsCount = 0; if (Directory.Exists("News")) { foreach (string file in System.IO.Directory.GetFiles("News", "*.news")) { await sources.AddSource(file); } } } } catch { } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 11 "..\..\..\..\Applets\Settings.xaml" ((System.Windows.Controls.Grid)(target)).SizeChanged += new System.Windows.SizeChangedEventHandler(this.Grid_SizeChanged); #line default #line hidden return; case 2: this.Header = ((System.Windows.Controls.Label)(target)); return; case 3: this.GeneralHeader = ((System.Windows.Controls.Label)(target)); return; case 4: this.startPage = ((System.Windows.Controls.Label)(target)); return; case 5: this.textBox = ((System.Windows.Controls.TextBox)(target)); return; case 6: this.comboBox = ((System.Windows.Controls.ComboBox)(target)); return; case 7: this.searchEngine = ((System.Windows.Controls.Label)(target)); return; case 8: this.PrivacyHeader = ((System.Windows.Controls.Label)(target)); return; case 9: this.ClearHistoryBtn = ((System.Windows.Controls.Button)(target)); #line 47 "..\..\..\..\Applets\Settings.xaml" this.ClearHistoryBtn.Click += new System.Windows.RoutedEventHandler(this.ClearHistoryBtn_Click); #line default #line hidden return; case 10: this.ClearCookiesBtn = ((System.Windows.Controls.Button)(target)); #line 55 "..\..\..\..\Applets\Settings.xaml" this.ClearCookiesBtn.Click += new System.Windows.RoutedEventHandler(this.ClearCookiesBtn_Click); #line default #line hidden return; case 11: this.NewsHeader = ((System.Windows.Controls.Label)(target)); return; case 12: this.InfoCheck = ((System.Windows.Controls.CheckBox)(target)); return; case 13: this.MotoCheck = ((System.Windows.Controls.CheckBox)(target)); return; case 14: this.BusCheck = ((System.Windows.Controls.CheckBox)(target)); return; case 15: this.EnterCheck = ((System.Windows.Controls.CheckBox)(target)); return; case 16: this.SportCheck = ((System.Windows.Controls.CheckBox)(target)); return; case 17: this.WeatherHeader = ((System.Windows.Controls.Label)(target)); return; case 18: this.WeatherCity = ((System.Windows.Controls.Label)(target)); return; case 19: this.textBox2 = ((System.Windows.Controls.TextBox)(target)); return; case 20: this.Categories = ((System.Windows.Controls.Label)(target)); return; case 21: this.SourcesText = ((System.Windows.Controls.Label)(target)); return; case 22: this.Sources = ((WebExpress.Sources)(target)); return; } this._contentLoaded = true; }