Beispiel #1
0
        void v_MouseClick(object sender, MouseEventArgs e)
        {
            ViewerAnnot v = (ViewerAnnot)sender;

            if (lastClicked == v)
            {
                return;
            }

            SelectablePanel p = (SelectablePanel)v.Parent;

            p.SuspendLayout();
            v.SuspendLayout();

            UnselectAll();

            //p.Padding = new Padding(5);
            p._selected = true;

            v.ResumeLayout();
            p.ResumeLayout();

            lastClicked = v;

            if (SelectedIndexChanged != null)
            {
                SelectedIndexChanged(this, EventArgs.Empty);
            }

            this.Invalidate(true);
        }
Beispiel #2
0
        void p_MouseLeave(object sender, EventArgs e)
        {
            ViewerAnnot     v = (ViewerAnnot)sender;
            SelectablePanel p = (SelectablePanel)v.Parent;

            p.Hover = false;
        }
Beispiel #3
0
        void p_MouseEnter(object sender, EventArgs e)
        {
            ViewerAnnot     v = (ViewerAnnot)sender;
            SelectablePanel p = (SelectablePanel)v.Parent;

            p.Hover = true;
        }
Beispiel #4
0
 // Set ViewerAnnot to the specified position of the multiplexer
 public void SetViewerAnnot(int row, int col, ViewerAnnot v)
 {
     if ((row >= 0) && (col >= 0) && (row < rows) && (col < cols))
     {
         v.AutoScroll  = this.AutoScroll;
         v.MouseClick += new MouseEventHandler(v_MouseClick);
         ViewerAnnotPanes[row, col].Controls.Add(v);
     }
 }
Beispiel #5
0
        private void InitPaneWindows()
        {
            this.Controls.Clear();
            ViewerAnnotPanes = null;
            ViewerAnnotPanes = new Control[rows, cols];

            // Add Panels
            for (int i = 0; i < rows; i++)
            {
                for (int j = 0; j < cols; j++)
                {
                    SelectablePanel p = new SelectablePanel();
                    p.Padding = new Padding(5);
                    //p.BackColor = ngMediImage.GetColorConfig().MultiPaneBackColor;

                    this.Controls.Add(p);
                    p.SelectedChanged += new EventHandler(p_SelectedChanged);

                    ViewerAnnotPanes[i, j] = p;
                }
            }

            // Add ViewerAnnots
            for (int i = 0; i < this.Rows; i++)
            {
                for (int j = 0; j < this.Cols; j++)
                {
                    ViewerAnnot v = new ViewerAnnot();
                    //v.Size = new Size(50, 50);
                    v.Dock = DockStyle.Fill;
                    //v.Viewer.ZoomFitForMultiPane();

                    this.SetViewerAnnot(i, j, v);
                }
            }
        }
Beispiel #6
0
 // On mouse down in camera window
 private void Control_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     lastClicked = (ViewerAnnot)sender;
 }
Beispiel #7
0
        void v_MouseClick(object sender, MouseEventArgs e)
        {
            ViewerAnnot v = (ViewerAnnot)sender;

            if (lastClicked == v)
                return;

            SelectablePanel p = (SelectablePanel)v.Parent;
            
            p.SuspendLayout();
            v.SuspendLayout();

            UnselectAll();
            
            //p.Padding = new Padding(5);
            p._selected = true;

            v.ResumeLayout();
            p.ResumeLayout();            

            lastClicked = v;

            if (SelectedIndexChanged != null)
            {
                SelectedIndexChanged(this, EventArgs.Empty);
            }

            this.Invalidate(true);
        }
Beispiel #8
0
 // On mouse down in camera window
 private void Control_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     lastClicked = (ViewerAnnot)sender;
 }
Beispiel #9
0
 // Set ViewerAnnot to the specified position of the multiplexer
 public void SetViewerAnnot(int row, int col, ViewerAnnot v)
 {
     if ((row >= 0) && (col >= 0) && (row < rows) && (col < cols))
     {
         v.AutoScroll = this.AutoScroll;
         v.MouseClick += new MouseEventHandler(v_MouseClick);
         ViewerAnnotPanes[row, col].Controls.Add(v);
     }
 }
Beispiel #10
0
        private void InitPaneWindows()
        {
            this.Controls.Clear();
            ViewerAnnotPanes = null;
            ViewerAnnotPanes = new Control[rows, cols];
            
            // Add Panels
            for (int i = 0; i < rows; i++)
            {
                for (int j = 0; j < cols; j++)
                {
                    SelectablePanel p = new SelectablePanel();                    
                    p.Padding = new Padding(5);
                    //p.BackColor = ngMediImage.GetColorConfig().MultiPaneBackColor;

                    this.Controls.Add(p);
                    p.SelectedChanged += new EventHandler(p_SelectedChanged);

                    ViewerAnnotPanes[i, j] = p;
                }
            }

            // Add ViewerAnnots
            for (int i = 0; i < this.Rows; i++)
            {
                for (int j = 0; j < this.Cols; j++)
                {
                    ViewerAnnot v = new ViewerAnnot();
                    //v.Size = new Size(50, 50);
                    v.Dock = DockStyle.Fill;
                    //v.Viewer.ZoomFitForMultiPane();

                    this.SetViewerAnnot(i, j, v);
                }
            }
        }