Beispiel #1
0
 public GraphController(GraphForm view, GraphLeftForm leftView)
 {
    this.view = view;
    this.leftView = leftView;
    view.RegisterController(this);
    leftView.RegisterController(this);
 }
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////   
        public static void drawGraph(ZArrayDescriptor someImage, int pointX, int pointY, double ratio)
        {
            int w1 = someImage.width;
            int h1 = someImage.height;
            int[] bufr = new int[w1];
            int[] bufyr = new int[h1];
            int[] bufg = new int[w1];
            int[] bufyg = new int[h1];
            int[] bufb = new int[w1];
            int[] bufyb = new int[h1];

            if (pointX >= w1 || pointY >= h1)
            {
                return;
            }

            for (int i = 0; i < w1; i++)
            {
                bufr[i] = (int) (someImage.array[i][pointY] * ratio);
                bufg[i] = (int)(someImage.array[i][pointY] * ratio);
                bufb[i] = (int)(someImage.array[i][pointY] * ratio);
            }

            for (int i = 0; i < h1; i++)
            {
                bufyr[i] = (int)(someImage.array[pointX][i] * ratio);
                bufyg[i] = (int)(someImage.array[pointX][i] * ratio);
                bufyb[i] = (int)(someImage.array[pointX][i] * ratio);
            }

            Form fo = new GraphForm(pointX, pointY, w1, h1, bufr, bufyr, bufg, bufyg, bufb, bufyb);
            fo.Show();
            fo.StartPosition = FormStartPosition.Manual;
            fo.Show();
        }
 /// <summary>
 /// This constructor will create a new graph form, but won't visualize it right now.
 /// To visualize (after adding all needed graphs) call GraphShow().
 /// </summary>
 public SimpleVisualizationHandler()
 {
     gForm = new GraphForm(this);
     dataObjectsAndColors = new Dictionary<BSDataObject, ConsoleColor>();
 }
 public void FormClosedHandler()
 {
     dataObjectsAndColors.Clear();
     gForm = new GraphForm(this);
 }
        public override void ShowResult()
        {
            var form = new GraphForm(_result);

            form.Show();
        }
        public virtual void ShowResult()
        {
            var form = new GraphForm(vertexNames, edges, result);

            form.Show();
        }
 private void btnShowGraph_Click(object sender, EventArgs e)
 {
     var graphForm = new GraphForm(PeptideAnalysis);
     graphForm.Show(DockPanel, DockState);
 }
Beispiel #8
0
 private clsGraphForm(GraphForm frmGraph)
 {
     this.FormSetting = frmGraph;
 }