Exemplo n.º 1
0
 private void generateObjectMotionToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Global global = Global.getInstance();
     EventGenerator generator = new EventGenerator();
     generator.GenerateRandomObjectMotionEvents(true, 30, 5, global.objectNum, NodeType.OBJECT, global.eventsFileName);
     EventManager manager = new EventManager();
     manager.LoadEvents(true);
 }
Exemplo n.º 2
0
 private void generateEventToolStripMenuItem_Click(object sender, EventArgs e)
 {
     EventGenerator generator = new EventGenerator();
     //generator.GenerateEvents(true);
 }
Exemplo n.º 3
0
 private void generateSendDataToolStripMenuItem_Click(object sender, EventArgs e)
 {
     IOTGlobal global = (IOTGlobal)Global.getInstance();
     EventGenerator generator = new EventGenerator();
     generator.ClearEvents(global.eventsFileName, "SND_DATA");
     generator.GenerateSendEvents(true, false, global.objects, global.orgs, "SND_DATA");
     MessageBox.Show("Done");
 }
Exemplo n.º 4
0
 private void generateReaderMotionToolStripMenuItem_Click(object sender, EventArgs e)
 {
     IOTGlobal global = (IOTGlobal)Global.getInstance();
     TrustArch.MoveForm f = new TrustArch.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(global.eventsFileName, "MOV");
     generator.GenerateRandomObjectMotionEvents(true, nodeSpeed, eventCount, nodeCount, NodeType.READER, global.eventsFileName);
     IOTEventManager manager = new IOTEventManager();
     manager.LoadEvents(clear);
     MessageBox.Show("Done");
 }
Exemplo n.º 5
0
 private void generateObjectMotionsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     IOTGlobal global = (IOTGlobal)Global.getInstance();
     TrustArch.MoveForm f = new TrustArch.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(global.eventsFileName, "MOV");
     generator.GenerateRandomObjectMotionEvents(true, nodeSpeed, eventCount, nodeCount, NodeType.OBJECT, global.eventsFileName);
     MessageBox.Show("Done");
 }
Exemplo n.º 6
0
        private void generateReaderMotionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            HFGlobal global = (HFGlobal)Global.getInstance();
            MoveForm f = new MoveForm();
            f.nodeNum = global.readerNum;
            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;
            string filename = f.filename;
            EventGenerator generator = new EventGenerator();

            File.Copy(global.eventsFileName, filename, true);
            if (clear)
                generator.ClearEvents(filename, "MOV");
            generator.GenerateRandomObjectMotionEvents(true, nodeSpeed, eventCount, nodeCount, NodeType.READER, filename);
            HFEventManager manager = new HFEventManager();
            manager.LoadEvents(clear);
            if (f.outputAsDefault)
                global.eventsFileName = f.filename;
            MessageBox.Show("Done");
        }