Exemple #1
0
        private void btnCreateQueue_Click(object sender, EventArgs e)
        {
            string[]     items = { tbQueueName.Text, cmbQueueType.Text, tbQueueSize.Text };
            ListViewItem lvi   = new ListViewItem(items);

            lvQueue.Items.Add(lvi);

            string d;

            if (string.IsNullOrEmpty(tbQueueSize.Text))
            {
                d = "-1";
            }
            else
            {
                d = tbQueueSize.Text;
            }
            RequestQueue a = new RequestQueue(KolQueue, cmbQueueType.Text, tbQueueName.Text, Convert.ToInt32(d));

            QueueList.Add(a);
            cmbDeviceQueueName.Items.Add(KolQueue);
            lvQueueStatistic.Columns.Add(tbQueueName.Text, 100);
            lbLog.Items.Add("Создана очередь, Имя = " + tbQueueName.Text + "; Тип=" + cmbQueueType.Text + "; Размер=" + d);
            KolQueue++;
        }
 public Device(int id, RequestQueue q, RandomGenerator g, int c)
 {
     ID = id;
     Q = q;
     Dist = g;
     Channels = c;
     FreeChannels = c;
     ProcessingNow = 0;
     Active_Apps = new List<RequestForServ>();
 }
 public Device(int id, RequestQueue q, RandomGenerator g, int c)
 {
     ID            = id;
     Q             = q;
     Dist          = g;
     Channels      = c;
     FreeChannels  = c;
     ProcessingNow = 0;
     Active_Apps   = new List <RequestForServ>();
 }
        private void btnCreateQueue_Click(object sender, EventArgs e)
        {
            string[] items = { tbQueueName.Text, cmbQueueType.Text, tbQueueSize.Text };
            ListViewItem lvi = new ListViewItem(items);
            lvQueue.Items.Add(lvi);

            string d;
            if (string.IsNullOrEmpty(tbQueueSize.Text)) d = "-1";
            else d = tbQueueSize.Text;
            RequestQueue a = new RequestQueue(KolQueue, cmbQueueType.Text, tbQueueName.Text, Convert.ToInt32(d));
            QueueList.Add(a);
            cmbDeviceQueueName.Items.Add(KolQueue);
            lvQueueStatistic.Columns.Add(tbQueueName.Text, 100);
            lbLog.Items.Add("Создана очередь, Имя = " + tbQueueName.Text + "; Тип=" + cmbQueueType.Text + "; Размер=" + d);
            KolQueue++;
        }