Exemplo n.º 1
0
        void newChart(BarList bl)
        {
            if (!blbox.ContainsKey(bl.Symbol))
            {
                blbox.Add(bl.Symbol, bl);
            }
            else
            {
                blbox[bl.Symbol] = bl;
            }

            Chart c = new Chart(bl, false);

            c.Symbol = bl.Symbol;
            try
            {
                c.StartPosition = FormStartPosition.Manual;
                c.Location      = Chartographer.Properties.Settings.Default.chartstart;
            }
            catch (NullReferenceException) { }
            newChartData += new BarListDelegate(c.NewBarList);
            c.Move       += new EventHandler(c_Move);
            c.Icon        = Chartographer.Properties.Resources.chart;
            if (maxchartbox.Checked)
            {
                c.WindowState = FormWindowState.Maximized;
            }
            if (blackbackground.Checked)
            {
                c.chartControl1.BackColor = Color.Black;
            }
            c.Show();
        }
Exemplo n.º 2
0
        void newChart(BarList bl)
        {
            if (InvokeRequired)
            {
                Invoke(new BarListDelegate(newChart), new object[] { bl });
            }
            else
            {
                Chart c = new Chart(bl, false);
                c.Symbol = bl.Symbol;
                c.chartControl1.SendDebug += new DebugDelegate(debug);


                try
                {
                    c.StartPosition = FormStartPosition.Manual;
                    c.Location      = Chartographer.Properties.Settings.Default.chartstart;
                }
                catch (NullReferenceException) { }
                newChartData += new BarListDelegate(c.NewBarList);
                c.Move       += new EventHandler(c_Move);
                c.Icon        = Chartographer.Properties.Resources.chart;
                if (usemax)
                {
                    c.WindowState = FormWindowState.Maximized;
                }
                if (useblack)
                {
                    c.chartControl1.BackColor = Color.Black;
                }
                c.Show();
            }
        }
Exemplo n.º 3
0
 public static bool DayFromGoogleAsync(string Symbol, BarListDelegate resultHandler, bool appendAmexOnFail)
 {
     System.Net.WebClient wc = new System.Net.WebClient();
     wc.DownloadStringCompleted += new System.Net.DownloadStringCompletedEventHandler(wc_DownloadStringCompleted);
     try
     {
         wc.DownloadStringAsync(new Uri(GOOGURL + Symbol), new BarListDownload(Symbol, resultHandler, appendAmexOnFail));
     }
     catch (System.Net.WebException) { return(false); }
     catch (Exception) { return(false); }
     return(true);
 }
Exemplo n.º 4
0
 public static bool DayFromGoogleAsync(string Symbol, BarListDelegate resultHandler, bool appendAmexOnFail)
 {
     System.Net.WebClient wc = new System.Net.WebClient();
     wc.DownloadStringCompleted +=new System.Net.DownloadStringCompletedEventHandler(wc_DownloadStringCompleted);
     try
     {
         wc.DownloadStringAsync(new Uri(GOOGURL + Symbol), new BarListDownload(Symbol, resultHandler,appendAmexOnFail));
     }
     catch (System.Net.WebException) { return false; }
     catch (Exception) { return false; }
     return true;
 }
Exemplo n.º 5
0
 public static bool DayFromGoogleAsync(string Symbol, BarListDelegate resultHandler)
 {
     return DayFromGoogleAsync(Symbol, resultHandler, true);
 }
Exemplo n.º 6
0
 public BarListDownload(string Symbol, BarListDelegate bld,bool appendAMEX)
 {
     AppendAMEXonFail = appendAMEX;
     this.Symbol = Symbol;
     DoResults = bld;
 }
Exemplo n.º 7
0
 public BarListDownload(string Symbol, BarListDelegate bld, bool appendAMEX)
 {
     AppendAMEXonFail = appendAMEX;
     this.Symbol      = Symbol;
     DoResults        = bld;
 }
Exemplo n.º 8
0
 public static bool DayFromGoogleAsync(string Symbol, BarListDelegate resultHandler)
 {
     return(DayFromGoogleAsync(Symbol, resultHandler, true));
 }
Exemplo n.º 9
0
        void newChart(BarList bl)
        {
            if (InvokeRequired)
                Invoke(new BarListDelegate(newChart), new object[] { bl });
            else
            {

                Chart c = new Chart(bl, false);
                c.Symbol = bl.Symbol;
                c.chartControl1.SendDebug += new DebugDelegate(debug);


                try
                {
                    c.StartPosition = FormStartPosition.Manual;
                    c.Location = Chartographer.Properties.Settings.Default.chartstart;
                }
                catch (NullReferenceException) { }
                newChartData += new BarListDelegate(c.NewBarList);
                c.Move += new EventHandler(c_Move);
                c.Icon = Chartographer.Properties.Resources.chart;
                if (usemax)
                    c.WindowState = FormWindowState.Maximized;
                if (useblack)
                    c.chartControl1.BackColor = Color.Black;
                c.Show();
            }
        }
Exemplo n.º 10
0
        void newChart(BarList bl)
        {
            if (!blbox.ContainsKey(bl.Symbol))
                blbox.Add(bl.Symbol, bl);
            else blbox[bl.Symbol] = bl;

            Chart c = new Chart(bl, false);
            c.Symbol = bl.Symbol;
            try
            {
                c.StartPosition = FormStartPosition.Manual;
                c.Location = Chartographer.Properties.Settings.Default.chartstart;
            }
            catch (NullReferenceException) { }
            newChartData += new BarListDelegate(c.NewBarList);
            c.Move += new EventHandler(c_Move);
            c.Icon = Chartographer.Properties.Resources.chart;
            if (maxchartbox.Checked) c.WindowState = FormWindowState.Maximized;
            if (blackbackground.Checked) c.chartControl1.BackColor = Color.Black;
            c.Show();
        }