Exemple #1
0
        public void Embed()
        {
            EmbeddingControl = EmbeddingX.CreateDefaultEmbeddingControl();
            var timer = new Timer((obj) => ViewModel.NotifyPropertyChanged(nameof(ViewModel.ViewModel)));

            timer.Change(0, 25);


            EmbeddingControl.Graph = ViewModel.Graph?.Convert((n) => new EDND(1.0, n.Data.CommunityId.ToString(), n.Data, 0), (edge) => new EDED(1.0), (g) => new EDGD());



            EmbeddingControl?.Start();
        }
Exemple #2
0
        public void Embed()
        {
            if (ViewModel.Graph != null)
            {
                if (!isRunning)
                {
                    embeddingControl = EmbeddingX.CreateDefaultEmbeddingControl();
                    timer            = new Timer((obj) => ViewModel.NotifyPropertyChanged("Graph"));
                    timer.Change(0, 25);

                    embeddingControl.Graph = ViewModel.Graph?.Convert((n) => new EDND(1.0, "default", n.Data, 0), (edge) => new EDED(1.0), (g) => new EDGD());

                    embeddingControl?.Start();
                    isRunning = true;
                }
                else
                {
                    embeddingControl.Stop();
                    timer.Dispose();
                    isRunning = false;
                }
            }
        }