Base class for implementig a FileViewer plugin.
Inheritance: System.Windows.Forms.UserControl
Ejemplo n.º 1
0
        private void SetViewer(FileViewer viewer)
        {
            if (viewer == currentViewer)
                return;

            if (currentViewer != null)
            {
                RevertMerge(menuStrip, currentViewer.Menu);
                RevertMerge(mainToolStrip, currentViewer.MainToolStrip);
                RevertMerge(statusStrip, currentViewer.StatusStrip);
                currentViewer.Visible = false;
            }
            currentViewer = viewer;
            if (viewer != null)
            {
                Merge(currentViewer.Menu, menuStrip);
                Merge(currentViewer.MainToolStrip, mainToolStrip);
                Merge(currentViewer.StatusStrip, statusStrip);
                currentViewer.Visible = true;
            }
        }
Ejemplo n.º 2
0
 private void AddViewer(FileViewer fileViewer)
 {
     if (fileViewer != null)
     {
         fileViewer.Dock = DockStyle.Fill;
         fileViewer.Visible = false;
         splitContainer.Panel2.Controls.Add(fileViewer);
         fileViewers.Add(fileViewer.GetType().AssemblyQualifiedName, fileViewer);
     }
 }