Пример #1
0
 public GraphController(GraphForm view, GraphLeftForm leftView)
 {
    this.view = view;
    this.leftView = leftView;
    view.RegisterController(this);
    leftView.RegisterController(this);
 }
Пример #2
0
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////   
        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();
        }
Пример #6
0
        public virtual void ShowResult()
        {
            var form = new GraphForm(vertexNames, edges, result);

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