public OrderOfBattleViewModel()
        {
            Mediator.Register(Constants.ACTION_CANCEL, DoActionCancel);
            Mediator.Register(Constants.ACTION_ITEM_WITH_GUID_REMOVED, DoActionItemWithGuidRemoved);
            Mediator.Register(Constants.ACTION_ITEM_WITH_GUID_ADDED, DoActionItemWithGuidAdded);

            // Check the ArcGIS Runtime is initialized
            if (!ArcGISRuntimeEnvironment.IsInitialized)
            {
                ArcGISRuntimeEnvironment.Initialize();
            }

            // hook the commands
            SearchCommand = new RelayCommand(OnSearch);
            SymbolChangedCommand = new RelayCommand(OnSymbolChanged);

            // Create a new MilitarySymbolDictionary instance
            MilitarySymbolDictionary = new SymbolDictionary(SymbolDictionaryType.Mil2525c);

            // Collection of view models for the displayed list of symbols
            Symbols = new ObservableCollection<SymbolViewModel>();

            // Set the image size
            _imageSize = 96;

            // org tree view
            _groupSymbol = new SymbolGroupViewModel(SymbolLoader.LoadSymbolWrapper());

            ExpandGroupSymbol(_groupSymbol);
        }
        public ViewShedToolViewModel()
        {
            StartViewShedCommand = new RelayCommand(OnStartViewShedCommand);
            CloseViewShedCommand = new RelayCommand(OnCloseViewShedCommand);

            _gpTask = new Geoprocessor(new Uri(ViewshedServiceUrl));
        }
        public MainWindowViewModel()
        {
            try
            {
                ArcGISRuntimeEnvironment.Initialize();
            }
            catch (Exception ex)
            {
                Console.WriteLine(@"Unable to initialize the ArcGIS Runtime with the client id provided: " + ex.Message);
            }

            Mediator.Register(Constants.ACTION_PHASE_ADDED, DoPhaseAdded);
            Mediator.Register(Constants.ACTION_PHASE_INDEX_CHANGED, DoPhaseIndexChanged);
            Mediator.Register(Constants.ACTION_MISSION_LOADED, DoMissionLoaded);

            CancelCommand = new RelayCommand(OnCancelCommand);
            DeleteCommand = new RelayCommand(OnDeleteCommand);
            SaveCommand = new RelayCommand(OnSaveCommand);
            OpenCommand = new RelayCommand(OnOpenCommand);
            CloseCommand = new RelayCommand(OnCloseCommand);
            NewCommand = new RelayCommand(OnNewCommand);
            EditMissionPhasesCommand = new RelayCommand(OnEditMissionPhases);
            EditGeometryCommand = new RelayCommand(OnEditGeometryCommand);
            EditGeometryRedoCommand = new RelayCommand(OnEditGeometryRedoCommand);
            EditGeometryUndoCommand = new RelayCommand(OnEditGeometryUndoCommand);

            SearchView = new PaletteSearchView();
            OOBView = new OrderOfBattleView();
            MapView = new MapView();
            MTLView = new MissionTimeLineView();
        }
コード例 #4
0
        public MissionViewModel()
        {
            // Create a new MilitarySymbolDictionary instance
            SymbolLoader.MilitarySymbolDictionary = new SymbolDictionary(SymbolDictionaryType.Mil2525c);

            // use this for testing
            //CurrentMission =  Mission.Load(@".\data\missions\testMission.xml");

            Mediator.Register(Constants.ACTION_MISSION_CLONED, OnMissionCloned);
            Mediator.Register(Constants.ACTION_PHASE_INDEX_CHANGED, OnPhaseIndexChanged);

            PhaseBackCommand = new RelayCommand(OnPhaseBack);
            PhaseNextCommand = new RelayCommand(OnPhaseNext);
            DeletePhaseCommand = new RelayCommand(OnDeletePhase);
        }
 public NetworkingToolViewModel()
 {
     GetDirectionsCommand = new RelayCommand(OnGetDirectionsCommand);
 }
 public BaseToolViewModel()
 {
     OpenToolCommand = new RelayCommand(OnOpenToolCommand);
     CloseToolCommand = new RelayCommand(OnCloseToolCommand);
 }
コード例 #7
0
        public MapViewModel()
        {
            Mediator.Register(Constants.ACTION_SELECTED_SYMBOL_CHANGED, DoActionSymbolChanged);
            Mediator.Register(Constants.ACTION_CANCEL, DoActionCancel);
            Mediator.Register(Constants.ACTION_DELETE, DoActionDelete);
            Mediator.Register(Constants.ACTION_DRAG_DROP_STARTED, DoDragDropStarted);
            Mediator.Register(Constants.ACTION_PHASE_NEXT, DoSliderPhaseNext);
            Mediator.Register(Constants.ACTION_PHASE_BACK, DoSliderPhaseBack);
            Mediator.Register(Constants.ACTION_SAVE_MISSION, DoSaveMission);
            Mediator.Register(Constants.ACTION_OPEN_MISSION, DoOpenMission);
            Mediator.Register(Constants.ACTION_EDIT_MISSION_PHASES, DoEditMissionPhases);
            Mediator.Register(Constants.ACTION_EDIT_GEOMETRY, DoEditGeometry);
            Mediator.Register(Constants.ACTION_EDIT_REDO, DoEditRedo);
            Mediator.Register(Constants.ACTION_EDIT_UNDO, DoEditUndo);
            Mediator.Register(Constants.ACTION_CLONE_MISSION, DoCloneMission);
            Mediator.Register(Constants.ACTION_NEW_MISSION, DoNewMission);

            SetMapCommand = new RelayCommand(OnSetMap);
            PhaseAddCommand = new RelayCommand(OnPhaseAdd);
            PhaseBackCommand = new RelayCommand(OnPhaseBack);
            PhaseNextCommand = new RelayCommand(OnPhaseNext);

            SaveCommand = new RelayCommand(OnSaveCommand);
            LoadCommand = new RelayCommand(OnLoadCommand);
            MeasureCommand = new RelayCommand(OnMeasureCommand);

            CoordinateReadoutFormatCommand = new RelayCommand(OnCoordinateReadoutFormatCommand);

            ToggleViewShedToolCommand = new RelayCommand(OnToggleViewShedToolCommand);
            ToggleGotoXYToolCommand = new RelayCommand(OnToggleGotoXYToolCommand);
            ToggleNetworkingToolCommand = new RelayCommand(OnToggleNetworkingToolCommand);
            ToggleBasemapGalleryCommand = new RelayCommand(OnToggleBasemapGalleryCommand);
        }
 public BasemapGalleryViewModel()
 {
     ChangeBasemapCommand = new RelayCommand(OnChangeBasemapCommand);
 }