Exemple #1
0
        public FormFireForestBeltManage()
        {
            InitializeComponent();

            this.m_ForestBeltController              = new ForestBeltPointController();
            this.m_ForestBeltController.QueryEvent  += m_ForestBeltController_QueryEvent;
            this.m_ForestBeltController.DeleteEvent += m_ForestBeltController_DeleteEvent;
        }
Exemple #2
0
        public void DeleteTest1()
        {
            ForestBeltPointController forestBeltPointController;

            forestBeltPointController = new ForestBeltPointController();
            forestBeltPointController.Delete((string)null);
            Assert.IsNotNull((object)forestBeltPointController);
            Assert.AreEqual <string>
                ("127.0.0.1", ((BaseService)forestBeltPointController).Server);
            Assert.AreEqual <int>(8080, ((BaseService)forestBeltPointController).Port);
        }
Exemple #3
0
        public FormFireForestBelt(OperationType type, Fire_ForestBeltPoint fireForestBelt = null)
        {
            InitializeComponent();

            this.m_OperationType        = type;
            this.m_FireForestBelt       = fireForestBelt;
            this.m_ForestBeltController = new ForestBeltPointController();

            this.m_ForestBeltController.AddEvent  += m_ForestBeltControllerr_AddEvent;
            this.m_ForestBeltController.EditEvent += m_ForestBeltController_EditEvent;
        }
Exemple #4
0
        public void EditTest()
        {
            ForestBeltPointController forestBeltPointController;

            // 测试用例1
            forestBeltPointController = new ForestBeltPointController();
            forestBeltPointController.Edit((Fire_ForestBeltPoint)null);
            Assert.IsNotNull((object)forestBeltPointController);
            Assert.AreEqual <string>
                ("127.0.0.1", ((BaseService)forestBeltPointController).Server);
            Assert.AreEqual <int>(8080, ((BaseService)forestBeltPointController).Port);

            // 测试用例2
            forestBeltPointController = new ForestBeltPointController();
            Fire_ForestBeltPoint s0 = new Fire_ForestBeltPoint();

            s0.OBJECTID        = 0;
            s0.SHAPE           = (string)null;
            s0.start_addr      = (string)null;
            s0.stop_addr       = (string)null;
            s0.name            = (string)null;
            s0.build_addr      = (string)null;
            s0.build_year      = (string)null;
            s0.tree_type       = (string)null;
            s0.type            = (string)null;
            s0.build_unit      = (string)null;
            s0.belt_len        = default(double?);
            s0.belt_width      = default(double?);
            s0.status          = 0;
            s0.picture1        = (string)null;
            s0.picture2        = (string)null;
            s0.video           = (string)null;
            s0.note            = (string)null;
            s0.longitude       = 0;
            s0.latitude        = 0;
            s0.row_spacing     = (string)null;
            s0.id              = (string)null;
            s0.management_unit = (string)null;
            s0.phone           = (string)null;
            s0.manager         = (string)null;
            s0.pac             = (string)null;
            s0.city_name       = (string)null;
            s0.county_name     = (string)null;
            s0.mediaByteDict   = (Dictionary <string, object>)null;
            s0.mediaFiles      = (List <MediaFile>)null;
            forestBeltPointController.Edit(s0);
            Assert.IsNotNull((object)forestBeltPointController);
            Assert.AreEqual <string>
                ("127.0.0.1", ((BaseService)forestBeltPointController).Server);
            Assert.AreEqual <int>(8080, ((BaseService)forestBeltPointController).Port);
        }
Exemple #5
0
        public void DeleteTest()
        {
            ForestBeltPointController forestBeltPointController;

            // 测试用例1
            forestBeltPointController = new ForestBeltPointController();
            forestBeltPointController.Delete((Dictionary <string, object>)null);
            Assert.IsNotNull((object)forestBeltPointController);
            Assert.AreEqual <string>
                ("127.0.0.1", ((BaseService)forestBeltPointController).Server);
            Assert.AreEqual <int>(8080, ((BaseService)forestBeltPointController).Port);

            // 测试用例2
            Dictionary <string, object> dictionary;

            forestBeltPointController = new ForestBeltPointController();
            dictionary     = new Dictionary <string, object>(0);
            dictionary[""] = (object)null;
            forestBeltPointController.Delete(dictionary);
            Assert.IsNotNull((object)forestBeltPointController);
            Assert.AreEqual <string>
                ("127.0.0.1", ((BaseService)forestBeltPointController).Server);
            Assert.AreEqual <int>(8080, ((BaseService)forestBeltPointController).Port);
        }