コード例 #1
0
        /// <summary>
        /// Show this view in a window.
        /// </summary>
        /// <param name="title"></param>
        /// <param name="tcv"></param>
        /// <param name="maximise"></param>
        internal static void ShowInWindow(string title, TransformChainView tcv, bool maximise)
        {
            Window w = new Window
            {
                Title  = title,
                Width  = 1024,
                Height = 800,
            };

            w.Content = tcv;
            w.ShowDialog();
            if (maximise)
            {
                w.WindowState = WindowState.Maximized;
            }
        }
コード例 #2
0
            public void VisualizeTransformerChain(TransformerChain target, string folder, string modelName)
            {
#if INCLUDE_TRANSFORM_BROWSER
                int sel = 0;
                for (int i = 0; i < target.transformers.Count; i++)
                {
                    TransformResults tr = target.transformers[i].Transform.Context.Results;
                    if (tr.ErrorCount > 0)
                    {
                        sel = i;
                        break;
                    }
                }
                // We may not be on the UI thread right now, so we call the saved dispatcher.
                dispatcher.Invoke(() =>
                {
                    TransformChainView tcv  = new TransformChainView();
                    tcv.DataContext         = target;
                    tcv.SelectedTransformer = target.transformers[sel];
                    TransformChainView.ShowInWindow(modelName + " transform chain", tcv, false);
                });
#endif
            }