/// <summary> /// Form initialization code. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SampleBrowser_Load(object sender, EventArgs e) { // Hook up Console redirect to rtbOutput _tbwOutput = new RichTextBoxWriter(rtbOutput); Console.SetOut(_tbwOutput); // Add samples to the list bsSamples.Add(new Yahoo.Samples.CSharp.AuthenticatedRequest1()); bsSamples.Add(new Yahoo.Samples.CSharp.Caching1()); bsSamples.Add(new Yahoo.Samples.CSharp.Caching2()); bsSamples.Add(new Yahoo.Samples.CSharp.SimpleGet1()); bsSamples.Add(new Yahoo.Samples.CSharp.SimpleGet2()); bsSamples.Add(new Yahoo.Samples.CSharp.SimplePost1()); bsSamples.Add(new Yahoo.Samples.CSharp.StringGet1()); bsSamples.Add(new Yahoo.Samples.CSharp.Xml1()); bsSamples.Add(new Yahoo.Samples.CSharp.Xml2()); bsSamples.Add(new Yahoo.Samples.CSharp.Xml3()); bsSamples.Add(new Yahoo.Samples.CSharp.Xml4()); bsSamples.Add(new Yahoo.Samples.CSharp.BBAuth1()); bsSamples.Add(new Yahoo.Samples.CSharp.BBAuth2()); bsSamples.Add(new Yahoo.Samples.CSharp.BBAuth3()); bsSamples.Add(new Yahoo.Samples.CSharp.BBAuth4()); bsSamples.Add(new Yahoo.Samples.VB.AuthenticatedRequest1()); bsSamples.Add(new Yahoo.Samples.VB.Caching1()); bsSamples.Add(new Yahoo.Samples.VB.Caching2()); bsSamples.Add(new Yahoo.Samples.VB.SimpleGet1()); bsSamples.Add(new Yahoo.Samples.VB.SimpleGet2()); bsSamples.Add(new Yahoo.Samples.VB.SimplePost1()); bsSamples.Add(new Yahoo.Samples.VB.StringGet1()); bsSamples.Add(new Yahoo.Samples.VB.Xml1()); bsSamples.Add(new Yahoo.Samples.VB.Xml2()); bsSamples.Add(new Yahoo.Samples.VB.Xml3()); bsSamples.Add(new Yahoo.Samples.VB.Xml4()); bsSamples.Add(new Yahoo.Samples.VB.BBAuth1()); bsSamples.Add(new Yahoo.Samples.VB.BBAuth2()); bsSamples.Add(new Yahoo.Samples.VB.BBAuth3()); bsSamples.Add(new Yahoo.Samples.VB.BBAuth4()); bsSamples.Add(new Yahoo.Samples.Wpf.Xaml1()); bsSamples.Add(new Yahoo.Samples.Wpf.Xaml2()); bsSamples.Add(new Yahoo.Samples.Wpf.Xaml3()); // Load settings, ignore all errors try { this.Location = Properties.Settings.Default.FormLocation; } catch { } try { this.ClientSize = Properties.Settings.Default.FormClientSize; } catch { } try { scMain.SplitterDistance = Properties.Settings.Default.scMainSplitterDistance; } catch { } try { scSamples.SplitterDistance = Properties.Settings.Default.scSamplesSplitterDistance; } catch { } try { scSourceOutput.SplitterDistance = Properties.Settings.Default.scSourceOutputSplitterDistance; } catch { } }