Exemplo n.º 1
0
        protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
        {
            try
            {
                var data = (ChannelGraphData)objectProvider.GetObject();

                Graph graph = new ChannelGraphGenerator().CreateGraph(data);

                using (var form = new GraphVisualizerForm(graph, "Channel Visualizer"))
                    windowService.ShowDialog(form);
            }
            catch (InvalidCastException)
            {
                MessageBox.Show("The selected data is not of a type compatible with this visualizer.",
                                GetType().ToString());
            }
        }
Exemplo n.º 2
0
        protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
        {
            try
            {
                var data = (ChannelGraphData)objectProvider.GetObject();

                Graph graph = new ChannelGraphGenerator().CreateGraph(data);

                using (var form = new GraphVisualizerForm(graph, "Channel Visualizer"))
                    windowService.ShowDialog(form);
            }
            catch (InvalidCastException)
            {
                MessageBox.Show("The selected data is not of a type compatible with this visualizer.",
                                GetType().ToString());
            }
        }