Exemple #1
0
        private void BtReplicationClick(object sender, EventArgs e)
        {
            var form   = new Dialog.NodeActionForm("replication");
            var result = form.ShowDialog();

            if (result == DialogResult.OK)
            {
                ReplicationFactorDelegate del = new ReplicationFactorDelegate(ReplicationFactor);
                var workTask = Task.Run(() => del.Invoke(form.item1));
            }
        }
Exemple #2
0
        private void BtClientClick(object sender, EventArgs e)
        {
            var form   = new Dialog.NodeActionForm("client");
            var result = form.ShowDialog();

            if (result == DialogResult.OK)
            {
                String[] args = new string[3];
                args[0] = form.item1;
                args[1] = form.item2;
                args[2] = form.item3;
                CreateClientDelegate del = new CreateClientDelegate(CreateClient);
                var workTask             = Task.Run(() => del.Invoke(args));
            }
        }
Exemple #3
0
        private void BtServerClick(object sender, EventArgs e)
        {
            var form   = new Dialog.NodeActionForm("server");
            var result = form.ShowDialog();

            if (result == DialogResult.OK)
            {
                String[] args = new String[4];
                args[0] = form.item1;
                args[1] = form.item2;
                args[2] = form.item3;
                args[3] = form.item4;
                CreateServerDelegate del = new CreateServerDelegate(CreateServer);
                var workTask             = Task.Run(() => del.Invoke(args));
            }
        }
Exemple #4
0
        private void BtPartitionClick(object sender, EventArgs e)
        {
            var form   = new Dialog.NodeActionForm("partition");
            var result = form.ShowDialog();

            if (result == DialogResult.OK)
            {
                int      server_count = Int32.Parse(form.item1);
                String[] args         = new String[2 + server_count];
                args[0] = form.item1;
                args[1] = form.item2;
                // Send ids as separate list item to be processed the same way as if it were a script
                String   ids      = form.item3;
                String[] ids_list = ids.Split(" ");
                for (int i = 0; i < server_count; i++)
                {
                    args[i + 2] = ids_list[i];
                }
                PartitionDelegate del = new PartitionDelegate(Partition);
                var workTask          = Task.Run(() => del.Invoke(args));
            }
        }