示例#1
0
        public ChytanieVVForm(Jadro jadro)
        {
            _jadro = jadro;
            InitializeComponent();

            webBrowser1.Url = new Uri("http://www.stargate-game.cz/vesmir.php?page=1&id_rasa=11");
        }
示例#2
0
        public PlanetaDetail(object p1, DataGridViewRow dataGridViewRow, Jadro jadro)
        {
            _jadro = jadro;
            _jadro.ZmenaPlanety += ZobrazTypPlanety;
            InitializeComponent();
            _najdena = false;

            var index = dataGridViewRow.Index;
            var c     = p1.GetType().ToString();

            if (p1.GetType().ToString() == "System.Collections.Generic.List`1[WebBrowser.PomocneTriedy.Planeta]")
            {
                var list = (List <Planeta>)p1;
                _listPlanetHraca         = (List <Planeta>)jadro.ParsujPlanetyHraca(list[index].Sektor, list[index].Pozicia);
                _listPlanetHracaHladanie = _listPlanetHraca;
                dataGridView1.DataSource = _listPlanetHraca;
            }
            if (p1.GetType().ToString() == "System.Collections.Generic.List`1[WebBrowser.PomocneTriedy.SektorPlanety]")
            {
                var list = (List <SektorPlanety>)p1;
                _listPlanetHraca         = (List <Planeta>)jadro.ParsujPlanetyHraca(list[index].Sektor, list[index].Pozicia);
                _listPlanetHracaHladanie = _listPlanetHraca;
                dataGridView1.DataSource = _listPlanetHraca;
                //_jadro.VlozZaznamOnlineDB(_listPlanetHraca.First());
            }

            comboBox1.SelectedIndex = 0;
        }
示例#3
0
        private void button1_Click(object sender, EventArgs e)
        {
            listView1.Items.Clear();
            pocetPod05  = 0;
            pocet05az1  = 0;
            pocet1az15  = 0;
            pocet15az25 = 0;
            pocetnad25  = 0;

            pocetPod05perc  = 0;
            pocet05az1perc  = 0;
            pocet1az15perc  = 0;
            pocet15az25perc = 0;
            pocetnad25perc  = 0;

            Jadro jadro = new Jadro(IEXTrading_API_URL, Token);
            List <HistoryStockPrice> res = jadro.GetPiatkoveCeny(textBox1.Text, checkBox1.Checked, int.Parse(textBox3.Text));

            Statistics stats = jadro.GetStatistics(res, listView1);

            textBox2.Text = string.Empty;
            textBox2.Text = "Pocet pod 0.5          - " + stats.PocetPod05 + Environment.NewLine +
                            "Pocet medzi 0.5 - 1.0  - " + stats.Pocet05Az1 + Environment.NewLine +
                            "Pocet medzi 1 - 1.5    - " + stats.Pocet1Az15 + Environment.NewLine +
                            "Pocet medzi 1.5 - 2.5  - " + stats.Pocet15Az25 + Environment.NewLine +
                            "Pocet nad 2.5          - " + stats.Pocetnad25 +
                            Environment.NewLine + " ================================ " + Environment.NewLine +
                            "Pocet pod 0.5 %         - " + stats.PocetPod05Perc + Environment.NewLine +
                            "Pocet medzi 0.5 - 1.0 % - " + stats.Pocet05Az1Perc + Environment.NewLine +
                            "Pocet medzi 1 - 1.5 %   - " + stats.Pocet1Az15Perc + Environment.NewLine +
                            "Pocet medzi 1.5 - 2.5 % - " + stats.Pocet15Az25Perc + Environment.NewLine +
                            "Pocet nad 2.5 %         - " + stats.Pocetnad25Perc;
        }
 public SpravaSpecifikacii(Jadro jadro)
 {
     _jadro = jadro;
     InitializeComponent();
     var kontrakty = _jadro.LoadKontrakty();
     listBox1.DataSource = kontrakty.GetRange(1, kontrakty.Count - 1);
 }
示例#5
0
        public ChytanieNNForm(Jadro jadro)
        {
            InitializeComponent();
            textBoxCena.Text = Config.CenaNN.ToString();
            //ClientSize = new System.Drawing.Size(1325, Screen.PrimaryScreen.WorkingArea.Size.Height-50);
            this._jadro     = jadro;
            webBrowser1.Url = new Uri("http://www.stargate-game.cz/obchod.php?page=6#pl-prodej");
            webBrowser1.ScriptErrorsSuppressed = true;
            _pocetLoad = 0;
            _koniec    = false;
            TopMost    = false;

            textBoxRelatX.Text = Config.RelativnaSuradnicaX;
            textBoxRelatY.Text = Config.RelativnaSuradnicaY;

            DomainUpDown.DomainUpDownItemCollection itemsHodiny = domainUpDownHodiny.Items;
            for (int i = 23; i >= 0; i--)
            {
                itemsHodiny.Add(i);
            }
            DomainUpDown.DomainUpDownItemCollection itemsMinuty = domainUpDownMinuty.Items;
            for (int i = 59; i >= 0; i--)
            {
                itemsMinuty.Add(i);
            }

            textNp     = Config.TextNp;
            NNMinMinut = int.Parse(Config.NNMinMinut);
            NNMaxMinut = int.Parse(Config.NNMaxMinut);
        }
        public ObchodyForm(Jadro jadro, Form1 form)
        {
            InitializeComponent();
            _jadro = jadro;
            _form = form;

            dataGridView1.DataSource = _jadro.NacitajObchody();
        }
示例#7
0
 public ZoznamHracovForm(string sektor, Jadro jadro, string title)
 {
     InitializeComponent();
     _jadro = jadro;
     Text   = title;
     dataGridView1.DataSource = jadro.ZobrazSektor(sektor);
     _sektor = sektor;
 }
 public DownloadManager(Jadro jadro)
 {
     _jadro = jadro;
     _jadro.VytvorDownloadManagera();
     InitializeComponent();
     comboBoxPocetRokov.SelectedIndex = 0;
     comboBoxKomodita.DataSource = _jadro.LoadKontrakty();
 }
示例#9
0
        public ZoznamHracovForm(List <SektorPlanety> najdenePlanety, Jadro jadro, string title, string sektor)
        {
            InitializeComponent();
            _jadro  = jadro;
            Text    = title;
            _sektor = sektor;
            _rasa   = title.Substring(title.IndexOf(": ", System.StringComparison.Ordinal) + 2);

            dataGridView1.DataSource = najdenePlanety;
        }
示例#10
0
 public ChytanieTrolovForm(Jadro jadro)
 {
     InitializeComponent();
     _jadro          = jadro;
     _pocetLoad      = 1;
     _chytanieTrolov = new ChytanieTrolov(this, jadro);
     _webBrowser1    = new System.Windows.Forms.WebBrowser {
         Url = new Uri("http://www.stargate-game.cz/vesmir.php")
     };
     comboBox1.DataSource = RasyId.ListId.Keys.ToList();
 }
示例#11
0
 public ChytanieTrolov(ChytanieTrolovForm chytanieTrolovForm, Jadro jadro)
 {
     _jadro = jadro;
     _chytanieTrolovForm = chytanieTrolovForm;
     // HracExistuje += HracExistujePotvrdenie;
     UtokJeMozny += UtokMozny;
     wbJednotky   = new System.Windows.Forms.WebBrowser
     {
         Url = new Uri("http://www.stargate-game.cz/jednotky.php?page=3")
     };
 }
示例#12
0
        public OnlineStatistikyForm(Jadro jadro)
        {
            InitializeComponent();
            var data = jadro.VytvorOnlineStatistiky();

            labelPocetPlanet.Text               = data.Values.Sum().ToString();
            labelText.Text                      = @"Pocet planet od " + Config.ZaciatokVeku.ToShortDateString();
            dataGridView1.DataSource            = null;
            dataGridView1.DataSource            = data.ToList();
            dataGridView1.Columns[0].HeaderText = @"Hrac";
            dataGridView1.Columns[1].HeaderText = @"Pocet vlozenych";
        }
示例#13
0
 public HladanieForm(Jadro jadro)
 {
     _jadro = jadro;
     _jadro.ZmenaPoradiaHladania += UpdateProgressBar;
     _jadro.KoniecVlakna         += KoniecVlakana;
     InitializeComponent();
     comboBox1.DataSource              = RasyId.ListId.Keys.ToList();
     comboBoxRasaPovodna.DataSource    = RasyId.ListId.Keys.ToList();
     comboBoxRasaSucasna.DataSource    = RasyId.ListId.Keys.ToList();
     comboBox2.DataSource              = _jadro.NaplnSektory();
     comboBoxRasaTypPlanety.DataSource = RasyId.ListId.Keys.ToList();
     comboBoxTypPlanety.DataSource     = _jadro.NaplnTypyPlanet();
 }
示例#14
0
 public PlanetaDetail(List <Planeta> list, Jadro jadro, string title)
 {
     if (!list.Any())
     {
         MessageBox.Show(@"Ziadna planeta nenajdena", @"Najdene planety", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
     }
     else
     {
         _jadro = jadro;
         InitializeComponent();
         Text = title;
         _listPlanetHracaHladanie = new List <Planeta>(list);
         dataGridView1.DataSource = list;
     }
 }
示例#15
0
        public Form1()
        {
            InitializeComponent();
            comboBoxKontrakt1.SelectedIndex = 0;
            comboBoxKontrakt2.SelectedIndex = 0;

            //zg1.Visible = false;
            _jadro = new Jadro();
            _pracaSGrafmi = new PracasGrafmiVS(chart1);
            _jadro.ZmenaPopisu += ZmenPopis;
            labelHodnotaBodu.Text = _jadro.HodnotaBodu;
            comboBoxRokyKorelacie.SelectedIndex = 0;
            listBox1.DataSource = _jadro.SledovaneSpready.PopisSpreadov();
            //contextMenuStrip1.Items.Add("Zmazat");
            textBoxPoznamky.Text = _jadro.NacitajPoznamky();
        }
示例#16
0
 public DohadzovanieForm(Jadro jadro, HlavneOkno form1, string mode, List <HracPodmienky> schema, int refreshCas, int casSpom)
 {
     // TODO: Complete member initialization
     InitializeComponent();
     log          = textBoxLog;
     kontrolaSily = false;
     this.jadro   = jadro;
     form         = form1;
     listPodm     = schema;
     if (schema == null)
     {
         listPodm = new List <HracPodmienky>();
     }
     textBox1.Text   = refreshCas.ToString();
     textBox2.Text   = casSpom.ToString();
     webBrowser1.Url = new Uri("http://www.stargate-game.cz/jednotky.php?vyber=3");
     webBrowser2.Url = new Uri("http://www.stargate-game.cz/vesmir.php?page=1&id_rasa=6&sort=2");
 }
示例#17
0
        public NastavenieNN(Jadro jadro)
        {
            _jadro = jadro;
            InitializeComponent();
            textBoxVhod0.Text   = (double.Parse(Config.Vhodnost0) / 100).ToString(CultureInfo.InvariantCulture);
            textBoxVhod5.Text   = (double.Parse(Config.Vhodnost5) / 100).ToString(CultureInfo.InvariantCulture);
            textBoxVhod10.Text  = (double.Parse(Config.Vhodnost10) / 100).ToString(CultureInfo.InvariantCulture);
            textBoxVhod25.Text  = (double.Parse(Config.Vhodnost25) / 100).ToString(CultureInfo.InvariantCulture);
            textBoxVhod50.Text  = (double.Parse(Config.Vhodnost50) / 100).ToString(CultureInfo.InvariantCulture);
            textBoxVhodDef.Text = (double.Parse(Config.VhodnostDefault) / 100).ToString(CultureInfo.InvariantCulture);

            textBoxPocetMiest130.Text = (double.Parse(Config.PocetMiest130) / 100).ToString(CultureInfo.InvariantCulture);
            textBoxPocetMiest110.Text = (double.Parse(Config.PocetMiest110) / 100).ToString(CultureInfo.InvariantCulture);
            textBoxPocetMiest100.Text = (double.Parse(Config.PocetMiest100) / 100).ToString(CultureInfo.InvariantCulture);
            textBoxPocetMiest90.Text  = (double.Parse(Config.PocetMiest90) / 100).ToString(CultureInfo.InvariantCulture);
            textBoxPocetMiestDef.Text = (double.Parse(Config.PocetMiestDefault) / 100).ToString(CultureInfo.InvariantCulture);
            textBoxNP.Text            = Config.TextNp;
            textBoxMinMinut.Text      = Config.NNMinMinut;
            textBoxMaxMinut.Text      = Config.NNMaxMinut;
        }
示例#18
0
        public SpravaDat(Jadro jadro)
        {
            InitializeComponent();
            listView1.Columns.AddRange(new[]
            {
                new ColumnHeader
                {
                    Text = @"Komodita"
                },
                new ColumnHeader
                {
                    Text = @"Pocet stiahnutych kontraktov"
                }
            });

            listView1.BeginUpdate();
            listView1.Items.AddRange(jadro.PocetKontraktov());
            listView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
            listView1.EndUpdate();
        }
示例#19
0
        private string GetDenneLimity(System.DayOfWeek day)
        {
            Jadro jadro = new Jadro(IEXTrading_API_URL, Token);
            List <HistoryStockPrice> res = jadro.GetPiatkoveCeny(textBox1.Text, checkBox1.Checked, int.Parse(textBox3.Text), day);

            Statistics stats = jadro.GetStatistics(res);

            var result = string.Empty;

            result = //"Pocet pod 0.5          - " + stats.PocetPod05 + Environment.NewLine +
                     //"Pocet medzi 0.5 - 1.0  - " + stats.Pocet05Az1 + Environment.NewLine +
                     //"Pocet medzi 1 - 1.5    - " + stats.Pocet1Az15 + Environment.NewLine +
                     //"Pocet medzi 1.5 - 2.5  - " + stats.Pocet15Az25 + Environment.NewLine +
                     //"Pocet nad 2.5          - " + stats.Pocetnad25 +
                     Environment.NewLine + " ----------------------- " + Environment.NewLine +
                     "Pocet pod 0.5 %         - " + stats.PocetPod05Perc + Environment.NewLine +
                     "Pocet medzi 0.5 - 1.0 % - " + stats.Pocet05Az1Perc + Environment.NewLine +
                     "Pocet medzi 1 - 1.5 %   - " + stats.Pocet1Az15Perc + Environment.NewLine +
                     "Pocet medzi 1.5 - 2.5 % - " + stats.Pocet15Az25Perc + Environment.NewLine +
                     "Pocet nad 2.5 %         - " + stats.Pocetnad25Perc;

            return(result);
        }
示例#20
0
        private void button2_Click(object sender, EventArgs e)
        {
            InitColumnCompletScan();

            Jadro jadro = new Jadro(IEXTrading_API_URL, Token);

            var symbols = File.ReadAllLines("SP500.txt");

            //jadro.LoadSymbols();

            foreach (var symbol in symbols)
            {
                if (!symbol.Contains("-"))
                {
                    List <HistoryStockPrice> res = jadro.GetPiatkoveCeny(symbol, checkBox1.Checked, int.Parse(textBox3.Text));
                    Statistics stats             = jadro.GetStatistics(res);

                    string[] row =
                    {
                        symbol,
                        stats.Cena.ToString("F"),
                        stats.PocetPod05Perc.ToString(),
                        stats.Pocet05Az1Perc.ToString(),
                        stats.Pocet1Az15Perc.ToString(),
                        stats.Pocet15Az25Perc.ToString(),
                        stats.Pocetnad25Perc.ToString()
                    };
                    var listViewItem = new ListViewItem(row);
                    listView1.Items.Add(listViewItem);
                    listView1.Refresh();

                    Thread.Sleep(1100);
                }
            }

            MessageBox.Show("Koniec");
        }
示例#21
0
        public HlavneOkno()
        {
            ChangeUserAgent();
            InitializeComponent();

            _jadro = new Jadro(webBrowser1, this);
            dataGridView1.DataSource = _jadro.PrehladSektorovList;

            labelInfo.Text = _jadro.PrehladSektorovList.Count + @" / 200";

            _jadro.Zmeneno                  += StavZarovkyZmenenObsluha;
            _jadro.ZmenaSektora             += AktualizujSektory;
            _jadro.AktualizujAktualnySektor += AktualizujAktualnySektor;

            var userData = SpravaHesiel.SpravaHesiel.LoadHesla();

            if (userData != null)
            {
                username.Text = userData.Login;
                password.Text = userData.Heslo;
            }

            dateTimePicker1.Value = Config.ZaciatokVeku;
        }
示例#22
0
 public HviezdnaBranaForm(Jadro jadro)
 {
     _jadro = jadro;
     InitializeComponent();
 }