コード例 #1
0
        public MainWindow()
        {
            InitializeComponent();
            cmb_slopeType.SelectedIndex = 2;
            pathfinder = new PathfinderController();


            String path = "Models//model1_w512_h0.1_v0.01.ppm";

            //     String path = "Models//model2_w1024_h0.1_v0.01.ppm";

            pathfinder.loadElevationModel(path);
            img_height.Source = pathfinder.getElevationModelImage();

            string slopeType = "";

            System.Windows.Controls.ComboBoxItem curItem = ((System.Windows.Controls.ComboBoxItem)cmb_slopeType.SelectedItem);

            if (curItem != null)
            {
                slopeType = curItem.Content.ToString();
            }

            pathfinder.loadSlopeModel(slopeType);
            img_slope.Source = pathfinder.getSlopeModelImage();

            pathfinder.loadHazardModel(10);
            img_hazard.Source = pathfinder.getHazardModelImage();


            populateTextDataBox(pathfinder.getElevationModel(), txt_height);
            populateTextDataBox(pathfinder.getSlopeModel(), txt_slope);
            populateTextDataBox(pathfinder.getHazardModel(), txt_hazard);
        }
コード例 #2
0
        public MainWindow()
        {
            InitializeComponent();
            cmb_slopeType.SelectedIndex = 2;
            pathfinder = new PathfinderController();

               String path = "Models//model1_w512_h0.1_v0.01.ppm";
            //     String path = "Models//model2_w1024_h0.1_v0.01.ppm";

            pathfinder.loadElevationModel(path);
            img_height.Source = pathfinder.getElevationModelImage();

            string slopeType = "";

            System.Windows.Controls.ComboBoxItem curItem = ((System.Windows.Controls.ComboBoxItem)cmb_slopeType.SelectedItem);

            if (curItem != null)
            {
                slopeType = curItem.Content.ToString();
            }

            pathfinder.loadSlopeModel(slopeType);
            img_slope.Source = pathfinder.getSlopeModelImage();

            pathfinder.loadHazardModel(10);
            img_hazard.Source = pathfinder.getHazardModelImage();

            populateTextDataBox(pathfinder.getElevationModel() , txt_height);
            populateTextDataBox(pathfinder.getSlopeModel(), txt_slope);
            populateTextDataBox(pathfinder.getHazardModel(), txt_hazard);
        }
コード例 #3
0
        private void btn_hazard_Click(object sender, RoutedEventArgs e)
        {
            int size = 10;

            try
            {
                size = int.Parse(txt_sectorSize.Text);
            }
            catch (Exception ex)
            {
            }
            pathfinder.loadHazardModel(size);
            img_hazard.Source = pathfinder.getHazardModelImage();


            populateTextDataBox(pathfinder.getHazardModel(), txt_hazard);
        }