Пример #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;
        }
Пример #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);
        }
Пример #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;
        }