예제 #1
0
 /// <summary>
 /// Handles the DataLoaded event
 /// </summary>
 /// <param name="args">The arguments for the event</param>
 public void DataLoadedEventHandler(DataLoadedEventArgs args)
 {
     if (args.SourceMechanism == CreationType.Live)
         {
             LayoutGraph(LayoutManager.Instance.ActiveLayout, false, args.Scope);
         }
         else if (AllNodesHaveSamePosition(args.Scope))
         {
             // Layout the graph
             LayoutGraph(LayoutManager.Instance.DefaultLayout, true, args.Scope);
         }
         else
         {
             // Just resize the graph to fit
             UI.GraphViewModel graphVM = UI.ViewModelLocator.GraphDataStatic;
             graphVM.ResizeToFit();
         }
 }
예제 #2
0
 /// <summary>
 /// Event handler for the DataLoaded event
 /// </summary>
 /// <param name="args"></param>
 public void DataLoadedEventHandler(DataLoadedEventArgs args)
 {
     if (DataLoaded != null)
     {
         DataLoaded(this, args);
     }
 }
        /// <summary>
        /// Handles the DataLoaded event
        /// </summary>
        /// <param name="args">The arguments for the event</param>
        public void DataLoadedEventHandler(DataLoadedEventArgs args)
        {
            GraphComponents graph = GraphManager.Instance.GetGraphComponents(args.Scope);

                if (graph != null && graph.Data.Order > 0)
                {
                    IsEnabled = true;
                }
                else
                    IsEnabled = false;
        }
 /// <summary>
 /// Handles the DataLoaded event
 /// </summary>
 /// <param name="args">Any event arguments that might be passed</param>
 public void DataLoadedEventHandler(DataLoadedEventArgs args)
 {
     this.LiveEnabled = ConfigurationManager.Instance.CurrentConfig.LivePreferences.AutoStart;
 }
예제 #5
0
파일: LiveData.cs 프로젝트: senfo/snaglV2
        /// <summary>
        /// Event handler for the LiveDataLoaded event
        /// </summary>
        /// <param name="args">Any event arguments that might be passed</param>
        public void LiveDataLoadedEventHandler(DataLoadedEventArgs args)
        {
            lock (syncObj)
            {
                LayoutBase activeLayout = LayoutManager.Instance.ActiveLayout;

                // Refresh the graph layout
                DispatcherHelper.UIDispatcher.BeginInvoke(() => GraphManager.Instance.LayoutGraph(activeLayout, false));
            }
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="args"></param>
        public void DataLoadedEventHandler(DataLoadedEventArgs args)
        {
            Graph.GraphComponents graph = Berico.SnagL.Infrastructure.Data.GraphManager.Instance.GetGraphComponents(args.Scope);

                if (graph != null && graph.Data.Order > 0)
                {
                    this.IsEnabled = true;
                }
                else
                    this.IsEnabled = false;
        }