public Setup_view_bluetooth(Main_view mv)
        {
            InitializeComponent();

            this.mv   = mv;
            this.nmbr = mv.selected_index;
        }
        public Setup_view_bluetooth(Main_view mv)
        {
            InitializeComponent();

            this.mv = mv;
            this.nmbr = mv.selected_index;
        }
示例#3
0
 protected Agent(String filepath, Agenttype agenttype, Callback_on_status_changed callback, Results results, Main_view mv)
 {
     this.filepath = filepath;
     this.agenttype = agenttype;
     this.callback = callback;
     this.results = results;
     this.main_view = mv;
 }
示例#4
0
 protected Agent(String filepath, Agenttype agenttype, Callback_on_status_changed callback, Results results, Main_view mv)
 {
     this.filepath  = filepath;
     this.agenttype = agenttype;
     this.callback  = callback;
     this.results   = results;
     this.main_view = mv;
 }
        public void stop_tests(Main_view mv)
        {
            foreach (Test t in mv.tests)
            {
                t.stop_test();
            }

            mv.tests.Clear();
        }
        public void stop_tests(Main_view mv)
        {
            foreach (Test t in mv.tests)
            {
                t.stop_test();
            }

            mv.tests.Clear();
        }
        public Gsm_agent(String filepath, Agenttype agenttype, Callback_on_status_changed callback, Results results, Main_view mv) : base(filepath, agenttype, callback, results, mv)
        {

        }
示例#8
0
 public Gsm_agent(String filepath, Agenttype agenttype, Callback_on_status_changed callback, Results results, Main_view mv) : base(filepath, agenttype, callback, results, mv)
 {
 }
示例#9
0
        public Test(Testtype ttype, String filepath, String wifi_or_device_name, String ip_address_or_uuid, int port, Main_view mv)
        {
            _results = new Results(ttype);
            _main_view = mv;
                       
            _test_agents = new List<Agent>();

            _cancel_token_source = new CancellationTokenSource();
            _cancel_token = _cancel_token_source.Token;

            switch (ttype)
            {
                case Testtype.Test_1:
                    {
                        _test_agents.Add(new Wifi_agent(filepath, Agenttype.Wifi_agent, new Callback_Instance(), _results, _main_view));

                        _task = new Task(() =>
                        {
                            _test_agents.ElementAt(0).send_file(wifi_or_device_name, ip_address_or_uuid, port);

                        }, _cancel_token);
                        
                        break;
                    }

                case Testtype.Test_2:
                    {
                        _test_agents.Add(new Wifi_agent(filepath, Agenttype.Wifi_agent, new Callback_Instance(), _results, _main_view));

                        _task = new Task(() =>
                        {
                            _test_agents.ElementAt(0).receive_file(wifi_or_device_name, ip_address_or_uuid, port);

                        }, _cancel_token);                                                

                        break;
                    }

                case Testtype.Test_3:
                    {
                        _test_agents.Add(new Bluetooth_agent(filepath, Agenttype.Bluetooth_agent, new Callback_Instance(), _results, _main_view));

                        _task = new Task(() =>
                        {
                            _test_agents.ElementAt(0).send_file(wifi_or_device_name, ip_address_or_uuid, 0);

                        }, _cancel_token);

                        break;
                    }
                case Testtype.Test_4:
                    {
                        _test_agents.Add(new Bluetooth_agent(filepath, Agenttype.Bluetooth_agent, new Callback_Instance(), _results, _main_view));

                        _task = new Task(() =>
                        {
                            _test_agents.ElementAt(0).receive_file(wifi_or_device_name, ip_address_or_uuid, 0);

                        }, _cancel_token);
                    
                        break;
                    }                   
            }
        }
示例#10
0
        public Test(Testtype ttype, String filepath, String wifi_or_device_name, String ip_address_or_uuid, int port, Main_view mv)
        {
            _results   = new Results(ttype);
            _main_view = mv;

            _test_agents = new List <Agent>();

            _cancel_token_source = new CancellationTokenSource();
            _cancel_token        = _cancel_token_source.Token;

            switch (ttype)
            {
            case Testtype.Test_1:
            {
                _test_agents.Add(new Wifi_agent(filepath, Agenttype.Wifi_agent, new Callback_Instance(), _results, _main_view));

                _task = new Task(() =>
                    {
                        _test_agents.ElementAt(0).send_file(wifi_or_device_name, ip_address_or_uuid, port);
                    }, _cancel_token);

                break;
            }

            case Testtype.Test_2:
            {
                _test_agents.Add(new Wifi_agent(filepath, Agenttype.Wifi_agent, new Callback_Instance(), _results, _main_view));

                _task = new Task(() =>
                    {
                        _test_agents.ElementAt(0).receive_file(wifi_or_device_name, ip_address_or_uuid, port);
                    }, _cancel_token);

                break;
            }

            case Testtype.Test_3:
            {
                _test_agents.Add(new Bluetooth_agent(filepath, Agenttype.Bluetooth_agent, new Callback_Instance(), _results, _main_view));

                _task = new Task(() =>
                    {
                        _test_agents.ElementAt(0).send_file(wifi_or_device_name, ip_address_or_uuid, 0);
                    }, _cancel_token);

                break;
            }

            case Testtype.Test_4:
            {
                _test_agents.Add(new Bluetooth_agent(filepath, Agenttype.Bluetooth_agent, new Callback_Instance(), _results, _main_view));

                _task = new Task(() =>
                    {
                        _test_agents.ElementAt(0).receive_file(wifi_or_device_name, ip_address_or_uuid, 0);
                    }, _cancel_token);

                break;
            }
            }
        }