示例#1
0
        private static void TestKarnoov()
        {
            KarnoovProces proces1 = new KarnoovProces();

            proces1.PostaviStanje(1, (60 * Math.Pow(10, 5)), null, 900);
            proces1.PostaviStanje(3, (1 * Math.Pow(10, 5)), null, 300);

            proces1.R = 287;
            proces1.K = 287;

            proces1.Analiza();

            proces1.Izvestaj();
        }
        private void button7_Click(object sender, EventArgs e)
        {
            var poruka = this.Provera();

            if (!string.IsNullOrWhiteSpace(poruka))
            {
                MessageBox.Show(this, poruka, @"Greska !", MessageBoxButtons.OK);

                return;
            }

            var tProces = new KarnoovProces();

            tProces.R = this.R;
            tProces.K = this.K;

            foreach (var key in this.parametri.Keys)
            {
                tProces.PostaviStanje(key, parametri[key].Item1, parametri[key].Item2, parametri[key].Item3);
            }

            try
            {
                tProces.Analiza();
            }
            catch (Exception exception)
            {
                this.scintilla1.Text = exception.Message + Environment.NewLine + exception.Source;
            }


            IzvestajIzProcesa(tProces);
        }
        private void IzvestajBezAnalize()
        {
            var tProces = new KarnoovProces();

            tProces.R = this.R;
            tProces.K = this.K;

            foreach (var key in this.parametri.Keys)
            {
                tProces.PostaviStanje(key, parametri[key].Item1, parametri[key].Item2, parametri[key].Item3);
            }

            IzvestajIzProcesa(tProces);
        }