public SelectByAttributeWindow(ArcMapManager mapMgr)
 {
     InitializeComponent();
     selectedLayerName = "";
     _mapMgr = mapMgr;
     _layerNames = _mapMgr.GetLayerNames();
     LayerNameCB.ItemsSource = _layerNames;
 }
示例#2
0
        public DialogueManager(string context, ArcMapManager mapMgr, string kbase)
        {
            this._context = context;
            this._dlgID = Utility.GetUniqueKey();

            this._exec = new Executor(mapMgr);
            this._kbase = new SQLiteKBase(kbase); ;
            this._participants = new ArrayList();
            
            this._initiator = null;
            this._parser = new SimpleParser();
        }
示例#3
0
文件: Executor.cs 项目: cdbean/CAGA
 public Executor(ArcMapManager mapMgr)
 {
     this._mapMgr = mapMgr;
 }
示例#4
0
        private void Initialize()
        {
            // Load the map control
            mapMgr = new ArcMapManager(this.mapGrid, this.layoutGrid, this.tocGrid);
            //mapMgr = new DSMapManager(this.mapGrid);
            //mapMgr.AddTOC(this.tocGrid);
            
            mapMgr.Initialize();
            MapPanel.Activate();
            
            //mapMgr.LoadMap(@"C:\Work\Data\GISLAB\Data\Oleader.mxd");
            //ArrayList inputLayers = new ArrayList();
            //inputLayers.Add("parcels");
            //inputLayers.Add("FloodAreas");
            //string outputFile = mapMgr.Overlay(inputLayers);

            //mapMgr.LoadMap(@"C:\Work\Data\GISLAB\Maps\test.mxd");
            //mapMgr.AddLayer(@"C:\Work\Data\World\country.shp");
            //mapMgr.AddLayer(@"C:\Work\Data\World\cities.shp");
            
            
            

            /*
            Hashtable result = mapMgr.GetFieldStatistics("parcels", "Acreage", true);
            this.statResultsWindow = new StatResultsWindow(result);
            this.statResultsWindow.Owner = this;
            this.statResultsWindow.Show();
            */

            /*
            Hashtable result = mapMgr.GetDataSummary("parcels", "Minimum.UseCode, Sum.Acreage", "UseCode", true);
            this.sumResultsWindow = new SummaryResultsWindow(result);
            this.sumResultsWindow.Owner = this;
            this.sumResultsWindow.Show();
            */
            mapMgr.PolygonDrawn += Polygon_Drawn;
            
            
            // Load the Kinect sensor
            kinectMgr = new KinectManager();
            kinectMgr.KinectStatusChanged += Kinects_StatusChanged;
            if (kinectMgr.LoadKinectSensor() == false)
            {
                Log("Kinect sensor is not ready!", "error");
                return;
            }
            else
            {
                
                Log("Kinect sensor is ready!", "info");
            }

            // Load the managers to display respective images
            kinectMgr.LoadColorManager(colorDisplay);
            kinectMgr.LoadDepthManager(depthDisplay);
            kinectMgr.LoadSkeletonDisplayManager(skeletonCanvas);

            // Load and start the speech recognition
            string grammarPath = System.IO.Path.Combine(Environment.CurrentDirectory, @"NUI\Speech\grammar.xml");
            kinectMgr.LoadSpeechRecognizer(grammarPath);
            kinectMgr.SpeechRecognized += Speech_Recognized;
            kinectMgr.StartSpeechRecognition();
            Log("Speech recognition is started!", "info");

            // Load and start the gesture recognition (not functing yet)
            kinectMgr.LoadGestureRecognizer();
            kinectMgr.GestureRecognzied += Gesture_Recognized;
            kinectMgr.StartGestureRecognition();
            Log("Gesture recognition is started!", "info");

            // Load the speech synthesizer
            speechSyn = new SpeechSynthesizer();
            speechSyn.SetOutputToDefaultAudioDevice();
            //speechSyn.SpeakStarted += new EventHandler<SpeakStartedEventArgs>(speechSyn_SpeakStarted);
            
            // Start the dialogue manager
            dlgMgr = new DialogueManager("CAGA", mapMgr, @"Dialogue\kb_caga.db");
            // use machine name + user name as id, user name as name
            dlgMgr.NewParticipant(Environment.MachineName + "-" + Environment.UserName, Environment.UserName);

            
        }