Esempio n. 1
0
 private void generateReaderMotionToolStripMenuItem_Click(object sender, EventArgs e)
 {
     IOTGlobal global = (IOTGlobal)Global.getInstance();
     MoveForm f = new MoveForm();
     DialogResult r = f.ShowDialog();
     if (f.ok != true)
         return;
     int nodeCount = (int)(global.readerNum * f.nodeRatio);
     double nodeSpeed = f.nodeSpeed;
     int eventCount = f.eventCount;
     bool clear = f.clear;
     EventGenerator generator = new EventGenerator();
     if (clear)
         generator.ClearEvents("MOV");
     generator.GenerateRandomObjectMotionEvents(true, true, nodeSpeed, eventCount, nodeCount, NodeType.READER);
     MessageBox.Show("Done");
 }
Esempio n. 2
0
 private void generateObjectMotionsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     IOTGlobal global = (IOTGlobal)Global.getInstance();
     MoveForm f = new MoveForm();
     f.ShowDialog();
     if (f.ok != true)
         return;
     //if (f.DialogResult != System.Windows.Forms.DialogResult.OK)
     //    return;
     int nodeCount = (int)(global.objectNum * f.nodeRatio);
     double nodeSpeed = f.nodeSpeed;
     int eventCount = f.eventCount;
     bool clear = f.clear;
     EventGenerator generator = new EventGenerator();
     if (clear)
         generator.ClearEvents("MOV");
     generator.GenerateRandomObjectMotionEvents(true, false, nodeSpeed, eventCount, nodeCount, NodeType.OBJECT);
     MessageBox.Show("Done");
 }