Beispiel #1
0
        private void createReportToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            ListView.SelectedIndexCollection indexes = this.listViewHeap.SelectedIndices;

            int indexesCount = indexes.Count;

            if (indexesCount == 0) return;

            request RQuest = new request();
            Control[] ButtonControl = RQuest.Controls.Find("buttonCreateGrid", false);
            ButtonControl[0].Text = "Create Report";

            Control[] ButtonControl1 = RQuest.Controls.Find("label1", false);
            ButtonControl1[0].Text = "Zoom (%)";

            ButtonControl = RQuest.Controls.Find("numericUpDownGridSize", false);
            NumericUpDown TmpNum = (NumericUpDown)ButtonControl[0];
            TmpNum.Maximum = 100;
            TmpNum.Value = 100;

            ButtonControl = RQuest.Controls.Find("numericUpDownImPerLine", false);
            TmpNum = (NumericUpDown)ButtonControl[0];
            TmpNum.Visible = true;
            TmpNum.Maximum = TmpNum.Value = indexesCount;

            ButtonControl = RQuest.Controls.Find("label2", false);
            System.Windows.Forms.Label Tmplabel = (System.Windows.Forms.Label)ButtonControl[0];
            Tmplabel.Visible = true;

            if (RQuest.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            string sTime = DateTime.Now.ToString("yyyy-MM-dd mm-ss");
            ReportWriter rw = new ReportWriter(sTime);

            rw.create("HeapReport" + sTime + ".xml");
            rw.setInfo("Image Heap Report", "Report" + sTime, "", (int)TmpNum.Value, (int)RQuest.numericUpDownGridSizeValue);

            for (int i = 0; i < indexesCount; i++)
            {
                Image3D TmpIm = ((Image3D)(this.listViewHeap.Items[indexes[i]].Tag));

                rw.addThumbnailImage(TmpIm, "Index" + i, "Image " + i, UpdateInfoPicture(TmpIm));
            }

            rw.close();
            rw.openReport();
        }
Beispiel #2
0
        private void createReportToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ListView.SelectedIndexCollection indexes = this.listViewHeap.SelectedIndices;
            if (indexes.Count == 0)
            {
                return;
            }
            else
            {

                Image3D Result = new Image3D(((Image3D)(this.listViewHeap.Items[indexes[0]].Tag)).Width,
                    ((Image3D)(this.listViewHeap.Items[indexes[0]].Tag)).Height,
                    ((Image3D)(this.listViewHeap.Items[indexes[0]].Tag)).Depth,
                    ((Image3D)(this.listViewHeap.Items[indexes[0]].Tag)).NumBands);

                ReportWriter rw = new ReportWriter();
                rw.create("tellme.xml");
                rw.setInfo("First Report", "Don't know name", "Description", 5, 100);

                int indexesCount = indexes.Count;
                for (int i = 0; i < indexesCount; i++)
                {
                    Image3D TmpIm = ((Image3D)(this.listViewHeap.Items[indexes[i]].Tag));
                    rw.addThumbnailImage(TmpIm, "Test" + i, "", "essai");
                    //rw.addThumbnailImage(TmpIm, "Test"+i, TmpIm.Name, "essai");
                }
                rw.close();

            }
        }