예제 #1
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            ClusterOutput output = new ClusterOutput();

            output.hNode = drawH.hnode;
            ClusterVis wrCluster = new ClusterVis(output);

            saveFileDialog1.DefaultExt = "png";
            saveFileDialog1.Filter     = "Png files|*.png";
            DialogResult res = saveFileDialog1.ShowDialog();

            if (res == DialogResult.OK && saveFileDialog1.FileName.Length > 0)
            {
                Resolution resForm = new Resolution(buffer.Width, buffer.Height, Color.Black);
                res = resForm.ShowDialog();
                if (res == DialogResult.OK)
                {
                    Bitmap   bmp = new Bitmap(resForm.WidthR, resForm.HeightR);
                    Graphics g   = Graphics.FromImage(bmp);
                    g.Clear(Color.White);
                    drawH.PrepareGraphNodes(bmp);

                    drawH.DrawOnBuffer(bmp, resForm.ShowLegend, resForm.LineThickness, resForm.LinesColor);
                    SavePicture(saveFileDialog1.FileName, bmp);
                    drawH.PrepareGraphNodes(buffer);
                }
                //       this.SavePicture(saveFileDialog1.FileName);
            }
        }
예제 #2
0
        private void toolStripButton3_Click(object sender, EventArgs e)
        {
            ClusterOutput output = new ClusterOutput();

            output.hNode = hnode;
            ClusterVis   wrCluster = new ClusterVis(output);
            DialogResult res       = saveFileDialog1.ShowDialog();

            if (res == DialogResult.OK && saveFileDialog1.FileName.Length > 0)
            {
                Resolution resForm = new Resolution(buffer.Width, buffer.Height, Color.Black);
                res = resForm.ShowDialog();
                if (res == DialogResult.OK)
                {
                    Bitmap bmp = new Bitmap(resForm.WidthR, resForm.HeightR);
                    DrawOnBuffer(bmp, false);
                    //DrawOnBuffer(bmp, resForm.ShowLegend, resForm.LineThickness, resForm.LinesColor);
                    SavePicture(saveFileDialog1.FileName, bmp);
                    //PrepareGraphNodes(buffer);
                }
                //this.SavePicture(saveFileDialog1.FileName, buffer);
            }
        }
예제 #3
0
 private void toolStripButton1_Click(object sender, EventArgs e)
 {
     ClusterOutput output = new ClusterOutput();
     output.hNode = hnode;
     ClusterVis wrCluster=new ClusterVis(output);
     DialogResult res=saveFileDialog1.ShowDialog();
     if (res == DialogResult.OK && saveFileDialog1.FileName.Length > 0)
     {
         Resolution resForm = new Resolution(buffer.Width, buffer.Height);
         res=resForm.ShowDialog();
         if (res == DialogResult.OK)
         {
             Bitmap bmp = new Bitmap(resForm.Width, resForm.Height);
             PrepareGraphNodes(bmp);
             DrawOnBuffer(bmp);
             SavePicture(saveFileDialog1.FileName, bmp);
             PrepareGraphNodes(buffer);
         }
         //       this.SavePicture(saveFileDialog1.FileName);          
     }
 }