示例#1
0
        private void button5_Click(object sender, EventArgs e)
        {
            SelectedListViewItemCollection fileItems = listView1.SelectedItems;
            SelectedListViewItemCollection userItems = listView2.SelectedItems;
            int fileItemsCount = fileItems.Count;
            int userItemsCount = userItems.Count;

            if (fileItemsCount > 0 && userItemsCount > 0)
            {
                GraphForm graphForm = new GraphForm(fileItems, userItems);
                graphForm.Show();
            }
            else
            {
                if (fileItemsCount == 0 && userItemsCount == 0)
                {
                    DialogWithOneButtom error =
                        new DialogWithOneButtom(Сonstants.SelectUserAndFileError);
                    error.ShowDialog();
                }
                else if (userItemsCount == 0)
                {
                    DialogWithOneButtom error =
                        new DialogWithOneButtom(Сonstants.SelectUserError);
                    error.ShowDialog();
                }
                else
                {
                    DialogWithOneButtom error =
                        new DialogWithOneButtom(Сonstants.SelectFileError);
                    error.ShowDialog();
                }
            }
        }
示例#2
0
        private void BuildModel()
        {
            int    n     = 0;
            double coeff = 0;

            try
            {
                n     = (int)numericUpDownN.Value;
                coeff = (double)numericUpDownK.Value;
            }
            catch
            {
                MessageBox.Show("Неверный формат входных параметров!");
                return;
            }
            int countOfResolution = 9;

            CriticalParamsService.TextBoxLog = textBoxState;
            //List<ParamsPolygon> polygons = await CriticalParamsService.GetPolygonsOfCriticalArea(n, coeff, countOfResolution, 1);
            //var paramsModel3D = CriticalParamsService.GetCriticalArea(n, coeff, countOfResolution, 1);
            var paramsModel3D = CriticalParamsService.GetCriticalAreaSpecialEditionOfTheBestPractises(n, coeff, countOfResolution, 1);

            //GraphForm graphForm = new GraphForm(polygons, this);
            if (graphForm == null || !graphForm.Visible)
            {
                graphForm = new GraphForm(paramsModel3D, this);
                graphForm.Show();
            }
            else if (graphForm.Visible)
            {
                graphForm.Focus();
            }
        }
示例#3
0
        private void ShowSingleGraph(params double[][] data)
        {
            GraphForm form = new GraphForm();

            double labelMax;

            double[] label = GetLabel(out labelMax);

            for (int i = 0; i < data.Length; ++i)
            {
                int k = i % pens.Length;
                form.Graph.AddEntry(label, data[i], pens[k]);
            }

            form.Graph.SetXAxis(0, labelMax, 4, font, brush);
            if (this.checkYAxisAuto.Checked)
            {
                form.Graph.SetYAxis(0, 0, 5, font, brush);
                form.Graph.AutoScaleY();
            }
            else
            {
                double min = double.Parse(this.textYMin.Text);
                double max = double.Parse(this.textYMax.Text);
                form.Graph.SetYAxis(min, max, 5, font, brush);
            }

            form.Text      = this.Text;
            form.MdiParent = this.MdiParent;
            form.Show();
        }
示例#4
0
 private void Click_OpGraph(object sender, EventArgs e)
 {
     foreach (ListInstanceItem item in ListInstances.SelectedItems)
     {
         GraphForm.Show(item.Core.Network);
     }
 }
示例#5
0
        private void textDisplayItem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            GraphForm graph = new GraphForm();

            graph.MdiParent = this;

            graph.Show();
        }
示例#6
0
        private void button4_Click(object sender, EventArgs e)
        {
            if (comboBox1.Text == "")
            {
                MessageBox.Show("请选择类型");
                return;
            }
            else if (cbPatient.Text == "")
            {
                MessageBox.Show("请选择病人");
                return;
            }
            GraphForm graphForm = new GraphForm();

            graphForm.Show();
        }
示例#7
0
        private void button2_Click(object sender, EventArgs e)
        {
            long now  = DateTime.Now.Ticks;
            var  area = CriticalParamsService.GetCriticalArea(4, 1000, 10f, 1);

            using (Graphics g = CreateGraphics())
            {
                Point[] points = area.Select(p => { return(new Point((int)p.X + 1300, (int)p.Y + 300)); }).ToArray();
                g.DrawLines(Pens.Black, points);
                //foreach(Point3D point in area){
                //    g.DrawEllipse(Pens.Black, point.X+1300, point.Y+300, 1, 1);
                //}
            }
            GraphForm graphForm = new GraphForm {
                Area = area
            };

            graphForm.Show();
            double time = ((double)(DateTime.Now.Ticks - now)) / 10000000;
        }
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////   
        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();
        }
示例#9
0
        private void btnShowGraph_Click(object sender, EventArgs e)
        {
            var graphForm = new GraphForm(PeptideAnalysis);

            graphForm.Show(DockPanel, DockState);
        }
        public override void ShowResult()
        {
            var form = new GraphForm(_result);

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

            form.Show();
        }
示例#12
0
 private void btnShowGraph_Click(object sender, EventArgs e)
 {
     var graphForm = new GraphForm(PeptideAnalysis);
     graphForm.Show(DockPanel, DockState);
 }