Exemplo n.º 1
0
 public Graph(dataset data, bool timestamps)
 {
     InitializeComponent();
     graph = pnlGraph.CreateGraphics();
     Data = data;
     this.timestamps = timestamps;
 }
Exemplo n.º 2
0
 void currentprofittime()
 {
     if (File.Exists("currentprofittime.txt"))
     {
         using (StreamReader sr = new StreamReader("currentprofittime.txt"))
         {
             List<double> x = new List<double>();
             List<double> y = new List<double>();
             while (!sr.EndOfStream)
             {
                 string tmp = sr.ReadLine();
                 DateTime dt = DateTime.Parse(tmp.Split('|')[0]);
                 x.Add(dt.Ticks);
                 y.Add(dparse(tmp.Split('|')[1]));
             }
             dataset ds = new dataset();
             ds.XAxis = "Time";
             ds.YAxis = "Profit";
             ds.XValues = x.ToArray();
             ds.YValues = y.ToArray();
             new Graph(ds,true).Show();
         }
     }
     else
     {
         MessageBox.Show("Could not retrieve data. Try placing a few bets first", "SORRY", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 3
0
 void bankrollbet()
 {
     if (File.Exists("bankrollbet.txt"))
     {
         using (StreamReader sr = new StreamReader("bankrollbet.txt"))
         {
             List<double> x = new List<double>();
             List<double> y = new List<double>();
             while (!sr.EndOfStream)
             {
                 string tmp = sr.ReadLine();
                 x.Add(dparse(tmp.Split('|')[0]));
                 y.Add(dparse(tmp.Split('|')[1]));
             }
             dataset ds = new dataset();
             ds.XAxis = "Bets";
             ds.YAxis = "Bankroll";
             ds.XValues = x.ToArray();
             ds.YValues = y.ToArray();
             new Graph(ds, false).Show();
         }
     }
     else
     {
         MessageBox.Show("Could not retrieve data. Try placing a few bets first", "SORRY", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 4
0
        //button for generating random charts - for testing purposes
        private void button1_Click(object sender, EventArgs e)
        {
            List<double> x = new List<double>();
            List<double> y = new List<double>();
            double previous = 0;
            for (int i = 0; i < r.Next(1000, 100000); i++)
            {
                x.Add(i);
                int tmp = r.Next(0, 10);
                if (tmp % 2 == 0)
                {
                    previous -= tmp;
                }
                else
                    previous += tmp;
                y.Add(previous);
            }

            dataset ds = new dataset();
            ds.XValues = x.ToArray();
            ds.YValues = y.ToArray();
            ds.XAxis = "Time/Bets";
            ds.YAxis = "Profit/Loss/Wagered";
            Graph g = new Graph(ds, false);
            g.Show();
        }
Exemplo n.º 5
0
 void sitebet()
 {
     if (File.Exists("siteprofit.txt"))
     {
         using (StreamReader sr = new StreamReader("siteprofit.txt"))
         {
             List<double> x = new List<double>();
             List<double> y = new List<double>();
             while (!sr.EndOfStream)
             {
                 string tmp = sr.ReadLine();
                 DateTime dt = DateTime.Parse(tmp.Split('|')[0]);
                 x.Add(dt.Ticks);
                 y.Add(dparse(tmp.Split('|')[1]));
             }
             dataset ds = new dataset();
             ds.XAxis = "Time";
             ds.YAxis = "Site Profit";
             ds.XValues = x.ToArray();
             ds.YValues = y.ToArray();
             new Graph(ds,true).Show();
         }
     }
     else
     {
         MessageBox.Show("Could not retrieve data. Please wait a few minutes so the bot can start collecting data", "SORRY", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }