/// <summary>
 /// Consume the passed in CIMView. Call the base constructor to wire up the CIMView.
 /// </summary>
 public ImpersonateMapPane1ViewModel(CIMView view)
     : base(view)
 {
     //Set to true to change docking behavior
     _dockUnderMapView = false;
     _viewDefinition   = FormatXml(view.ToXml());
 }
 /// <summary>
 /// Consume the passed in CIMView. Call the base constructor to wire up the CIMView.
 /// </summary>
 public SLR_PaneViewModel(CIMView view)
     : base(view)
 {
     _landusechartResult = new ObservableCollection <KeyValueWithTooltip>();
     _parcelchartResult  = new ObservableCollection <KeyValueWithTooltip>();
     _streetchartResult  = new ObservableCollection <KeyValueWithTooltip>();
 }
Beispiel #3
0
 /// <summary>
 /// Consume the passed in CIMView. Call the base constructor to wire up the CIMView.
 /// </summary>
 public CustomPaneViewModel(CIMView view)
     : base(view)
 {
     timer = new DispatcherTimer(new TimeSpan(0, 0, 0, 0, 50), DispatcherPriority.Background,
                                 timer_Tick, Dispatcher.CurrentDispatcher);
     timer.IsEnabled = true;
 }
Beispiel #4
0
        /// <summary>
        /// Default construction - Consume the passed in CIMView. Call the base constructor to wire up the CIMView.
        /// </summary>
        /// <param name="view"></param>
        public LayersPaneViewModel(CIMView view)
            : base(view)
        {
            _path = view.ViewXML;

            //register
            LayersPaneUtils.PaneCreated(this);

            //get the active map
            MapView activeView = MapView.Active;

            //get all the layers in the active map
            _allMapLayers = activeView.Map.GetLayersAsFlattenedList().OfType <FeatureLayer>().ToList();
            //set the selected layer to be the first one from the list
            if (_allMapLayers.Count > 0)
            {
                _selectedLayer = _allMapLayers[0];
            }

            ListOfRows = new List <DynamicDataRow>();
            //Enable collection mods in the background
            BindingOperations.EnableCollectionSynchronization(ListOfRows, _theLock);
            //set up the command for the query
            QueryRowsCommand = new RelayCommand(new Action <object>(async(qry) => await QueryRows(qry)), CanQueryRows);
        }
Beispiel #5
0
 /// <summary>
 /// Creates a new view model and wires up the specified CIM view.
 /// </summary>
 /// <param name="view">The CIM view.</param>
 /// <param param name="layer">The feature layer of the pane.</param>
 public DatasetsPaneViewModel(CIMView view, FeatureLayer layer) : base(view)
 {
     _path  = view.ViewXML;
     _layer = layer;
     _viewModels.TryAdd(layer, this);
     Caption = string.Format(@"Pane {0}", layer.Name);
 }
        /// <summary>
        /// Consume the passed in CIMView. Call the base constructor to wire up the CIMView.
        /// </summary>
        public ImpersonateMapPane1ViewModel(CIMView view)
            : base(view)
        {
            //Set to true to change docking behavior
            _dockUnderMapView = false;
            //At 2.x - using Xml
            //_viewDefinition = FormatXml(view.ToXml());

            _viewDefinition = view.ToJson();//Json at 3.0
        }
        /// <summary>
        /// Default construction - Consume the passed in CIMView. Call the base constructor to wire up the CIMView.
        /// </summary>
        /// <param name="view"></param>
        public LayersPaneViewModel(CIMView view)
            : base(view)
        {
            _path = view.ViewXML;

            //register 
            LayersPaneUtils.PaneCreated(this);

            //get the active map
            MapView activeView = MapView.Active;
            //get all the layers in the active map
            _allMapLayers = activeView.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().ToList();
            //set the selected layer to be the first one from the list
            if (_allMapLayers.Count > 0)
                _selectedLayer = _allMapLayers[0];

            //set up the command for the query
            QueryRowsCommand = new RelayCommand(new Action<object>(async (qry) => await QueryRows(qry)), CanQueryRows);
        }
Beispiel #8
0
        /// <summary>
        /// Default construction - Consume the passed in CIMView. Call the base constructor to wire up the CIMView.
        /// </summary>
        /// <param name="view"></param>
        public LayersPaneViewModel(CIMView view)
            : base(view)
        {
            _path = view.ViewXML;

            //register 
            LayersPaneUtils.PaneCreated(this);

            //get the active map
            MapView activeView = MapView.Active;
            //get all the layers in the active map
            _allMapLayers = activeView.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().ToList();
            //set the selected layer to be the first one from the list
            if (_allMapLayers.Count > 0)
                _selectedLayer = _allMapLayers[0];

            //set up the command for the query
            QueryRowsCommand = new RelayCommand(new Action<object>(async (qry) => await QueryRows(qry)), CanQueryRows);
        }
        /// <summary>
        /// Default constructor - consume the passed in CIMView. Call the
        /// base constructor to wire up the CIMView
        /// </summary>
        /// <param name="view"></param>
        public LayersPaneViewModel(CIMView view)
            : base(view)
        {
            _path = view.ViewXML;

            //register 
            LayersPaneUtils.PaneCreated(this);

            //get the active map
            MapView activeView = ProSDKSampleModule.ActiveMapView;
            //get all the layers in the active map
            _allMapLayers = activeView.Map.GetFlattenedLayers().OfType<FeatureLayer>().ToList();
            //set the selected layer to be the first one from the list
            if (_allMapLayers.Count > 0)
                _selectedLayer = _allMapLayers[0];
            ListOfRows = new List<DynamicDataRow>();
            //Enable collection mods in the background
            BindingOperations.EnableCollectionSynchronization(ListOfRows, _theLock);
            //set up the command for the query
            QueryRowsCommand = new RelayCommand(new Action<object>(async (qry) => await QueryRows(qry)), CanQueryRows);
        }
Beispiel #10
0
        /// <summary>
        ///     Consume the passed in CIMView. Call the base constructor to wire up the CIMView.
        /// </summary>
        public NaicsFinderPaneViewModel(CIMView view)
            : base(view)
        {
            var documentsFolder = Path.Combine(AddinAssemblyLocation(), "NaicsDocuments");

            _twoDigitCodesPath = Path.Combine(documentsFolder, "2_6_digit_2017_Codes.xlsx");
            _allNaicsPath      = Path.Combine(documentsFolder, "2017_NAICS_Index_File.xlsx");

            FilteredNaics = new ReadOnlyObservableCollection <NaicsModel>(NaicsModels);

            var categories = new List <KeyValuePair <object, string> >(26)
            {
                new KeyValuePair <object, string>(11, "Agriculture, Forestry, Fishing and Hunting"),
                new KeyValuePair <object, string>(21, "Mining, Quarrying, and Oil and Gas Extraction"),
                new KeyValuePair <object, string>(22, "Utilities"),
                new KeyValuePair <object, string>(23, "Construction"),
                new KeyValuePair <object, string>("31-33", "Manufacturing"),
                new KeyValuePair <object, string>(42, "Wholesale Trade"),
                new KeyValuePair <object, string>("44-45", "Retail Trade"),
                new KeyValuePair <object, string>("48-49", "Transportation and Warehousing"),
                new KeyValuePair <object, string>(51, "Information"),
                new KeyValuePair <object, string>(52, "Finance and Insurance"),
                new KeyValuePair <object, string>(53, "Real Estate and Rental and Leasing"),
                new KeyValuePair <object, string>(54, "Professional, Scientific, and Technical Services"),
                new KeyValuePair <object, string>(55, "Management of Companies and Enterprises"),
                new KeyValuePair <object, string>(56,
                                                  "Administrative and Support and Waste Management and Remediation Services"),
                new KeyValuePair <object, string>(61, "Educational Services"),
                new KeyValuePair <object, string>(62, "Health Care and Social Assistance"),
                new KeyValuePair <object, string>(71, "Arts, Entertainment, and Recreation"),
                new KeyValuePair <object, string>(72, "Accommodation and Food Services"),
                new KeyValuePair <object, string>(81, "Other Services (except Public Administration)"),
                new KeyValuePair <object, string>(92, "Public Administration")
            };

            NaicsCategories = new ObservableCollection <KeyValuePair <object, string> >(categories);
        }
 /// <summary>
 /// Consume the passed in CIMView. Call the base constructor to wire up the CIMView.
 /// </summary>
 public WebViewBrowserViewModel(CIMView view)
     : base(view)
 {
     _NavList.CollectionChanged += _NavList_CollectionChanged;
     _NavList.Add(StartUri);
 }
Beispiel #12
0
 /// <summary>
 /// Consume the passed in CIMView. Call the base constructor to wire up the CIMView.
 /// </summary>
 public ChromePaneViewModel(CIMView view)
     : base(view)
 {
 }
 /// <summary>
 /// Consume the passed in CIMView. Call the base constructor to wire up the CIMView.
 /// </summary>
 public Pane1ViewModel(CIMView view)
     : base(view)
 {
 }