Exemplo n.º 1
0
        static void Main(string[] args)
        {
            dell DELEGAT_BRO = (int x, double y) =>
            {
                x++;
                y--;
                Console.WriteLine("x = " + x);
                Console.WriteLine("y = " + y + "\n");
            };

            DELEGAT_BRO += (int x, double y) =>
            {
                x += 8;
                y -= 12;
                Console.WriteLine("x = " + x);
                Console.WriteLine("y = " + y + "\n");
            };


            DELEGAT_BRO += (int x, double y) =>
            {
                x += 9;
                y /= 7;
                Console.WriteLine("x = " + x);
                Console.WriteLine("y = " + y + "\n");
            };

            Shower(DELEGAT_BRO);
        }
Exemplo n.º 2
0
        public bool select(string qry, dell del)
        {
            SQLiteConnection c = get_db_ram_connection();

            bool ok = true;

            try
            {
                SQLiteCommand    command = new SQLiteCommand(qry, c);
                SQLiteDataReader reader  = command.ExecuteReader();

                foreach (System.Data.Common.DbDataRecord record in reader)
                {
                    try
                    {
                        if (!del(record))
                        {
                            break;
                        }
                    }
                    catch (Exception ex) { MessageBox.Show("Error in db_sqlite: " + ex.Message + "\n" + ex.StackTrace); }
                }
            }
            catch (Exception ex) { ok = false; }

            return(ok);
        }
Exemplo n.º 3
0
    public static void Main(string[] argss)
    {
        dell o = new dell(display1);

        o();
        dell o1 = new dell(display2);

        o1();
        Console.ReadKey();
    }
Exemplo n.º 4
0
    public static void Main(string[] args)
    {
        deleg1 d   = new deleg1();
        dell   obj = new dell(d.display);

        obj(3, 4);
        //dell o1 = new dell(d.display2);
        //   o1(5);
        Console.ReadKey();
    }
Exemplo n.º 5
0
        public void set(int id_, bool enabled, int id_pool, string miner, string diff, string manual_diff, int min_running, dell del_)
        {
            id  = id_;
            del = del_;

            checkBox1.Checked = enabled;
            for (int i = 0; i < comboBox1.Items.Count; ++i)
            {
                base_func.ComboBoxItem it = (base_func.ComboBoxItem)comboBox1.Items[i];
                if ((int)it.Value == id_pool)
                {
                    comboBox1.SelectedIndex = i;
                    break;
                }
            }

            for (int i = 0; i < comboBox2.Items.Count; ++i)
            {
                var it = comboBox2.Items[i];
                if (it.ToString() == miner)
                {
                    comboBox2.SelectedIndex = i;
                    break;
                }
            }

            for (int i = 0; i < comboBox5.Items.Count; ++i)
            {
                var it = comboBox5.Items[i];
                if (it.ToString() == diff)
                {
                    comboBox5.SelectedIndex = i;
                    break;
                }
            }

            textBox1.Text = manual_diff;
            textBox2.Text = min_running.ToString();
        }
Exemplo n.º 6
0
 public void set_on_chhange(dell del_)
 {
     del = del_;
 }
Exemplo n.º 7
0
 static void Shower(dell del)
 {
     Console.WriteLine(" ***Вызов метода Show***\n");
     del(14, 8.8);
 }