Ejemplo n.º 1
0
 /// <summary>
 /// Execute is called when the user chooses the feature action from the feature actions context menu. Only called if
 /// CanExecute returned true.
 /// </summary>
 public void Execute(ESRI.ArcGIS.OperationsDashboard.DataSource dataSource, client.Graphic feature)
 {
     try
     {
         // For example, in the MapWidget that ultimately provides the data source, show the popup window for the feature.
         MapWidget mw = MapWidget.FindMapWidget(dataSource);
         foreach (var widget in OperationsDashboard.Instance.Widgets)
         {
             if (widget is RangeFanWid)
             {
                 RangeFanWid pWidget = (RangeFanWid)widget;
                 pWidget.addToList(feature);
                 return;
             }
         }
     }
     catch (Exception ex)
     {
         System.Diagnostics.Debug.WriteLine(ex.Message);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Execute is called when the user chooses the feature action from the feature actions context menu. Only called if
 /// CanExecute returned true.
 /// </summary>
 public void Execute(ESRI.ArcGIS.OperationsDashboard.DataSource dataSource, client.Graphic feature)
 {
     try
     {
         // Provide feature action implementation.
         // Check if the data source and feature can be used with this feature action.
         foreach (var widget in OperationsDashboard.Instance.Widgets)
         {
             if (widget is RangeFanWid)
             {
                 //((RangeFanWidget)widget).Visibility = System.Windows.Visibility.Visible;
                 RangeFanWid pWidget = (RangeFanWid)widget;
                 pWidget.removefromList(feature);
                 return;
             }
         }
     }
     catch (Exception ex)
     {
         System.Diagnostics.Debug.WriteLine(ex.Message);
     }
 }