Exemplo n.º 1
0
        private void ShowViewer(ViewerInfo viewer)
        {
            // Either use a control provided by the viewer, or the default
            Control c = null;

            if (viewer == null || viewer.Control == null)
            {
                c = new NoViewer();
            }
            else
            {
                c = viewer.Control;
            }

            // If a view was found, show the control
            pnlContent.Controls.Clear();
            pnlContent.Controls.Add(c); c.Dock = DockStyle.Fill;
        }
Exemplo n.º 2
0
        internal List <ViewerInfo> ProcessContentType(string DataFormat, Func <string, object> GetData)
        {
            List <ViewerInfo> viewers = new List <ViewerInfo>();

            // Collect the list of plugins
            if (plugins == null)
            {
                plugins = GetPlugins(null);
            }

            // Return a list of the supported viewers
            foreach (IContentViewer icv in plugins)
            {
                ViewerInfo vi = icv.ProcessClipboardDataType(DataFormat, GetData);
                if (vi != null)
                {
                    viewers.Add(vi);
                }
            }

            return(viewers);
        }
Exemplo n.º 3
0
        private void ShowViewer(ViewerInfo viewer)
        {
            // Either use a control provided by the viewer, or the default
            Control c = null;
            if (viewer == null || viewer.Control == null) c = new NoViewer();
            else c = viewer.Control;

            // If a view was found, show the control
            pnlContent.Controls.Clear();
            pnlContent.Controls.Add(c); c.Dock = DockStyle.Fill;
        }