Ejemplo n.º 1
0
        private void rozciaganieToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int TabPageIndex = this.tabControl1.SelectedIndex;

            using (Progowanie window = new Progowanie())
            {
                window.index   = TabPageIndex;
                window.bitmap  = ArrayBitMap[TabPageIndex];
                window.type    = 5;
                window.variant = 1;
                window.ShowDialog();
                ArrayBitMap[TabPageIndex] = window.bitmap;
            }

            tabControl1.SelectedTab.Controls.Clear();
            PictureBox newPictureBox = new PictureBox();

            tabControl1.SelectedTab.Controls.Add(newPictureBox);
            newPictureBox.Size = new Size(840, 900);

            newPictureBox.Anchor   = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Top);
            newPictureBox.SizeMode = PictureBoxSizeMode.StretchImage;

            newPictureBox.Image = ArrayBitMap[TabPageIndex];


            PlotView myPlot  = new PlotView();
            var      myModel = new PlotModel {
                Title = "Histogram"
            };

            myModel.Series.Add(Histogram.GetFunction(bmp.getArrayBMP(ArrayBitMap[TabPageIndex])));
            myPlot.Model    = myModel;
            myPlot.Dock     = DockStyle.Right;
            myPlot.Location = new Point(0, 0);
            myPlot.Size     = new Size(800, 500);
            myPlot.TabIndex = 0;
            tabControl1.SelectedTab.Controls.Add(myPlot);
        }
Ejemplo n.º 2
0
        private void operatorProgToolStripMenuItem_Click(object sender, EventArgs e)   //progowanie
        {
            int TabPageIndex = this.tabControl1.SelectedIndex;

            using (Progowanie window = new Progowanie()) //otwieramy nowa formatke do operacji jednoargumentowych
            {
                window.index  = TabPageIndex;            //ustawiam zmienne w nowej formatce
                window.bitmap = ArrayBitMap[TabPageIndex];
                window.type   = 1;
                window.ShowDialog();
                ArrayBitMap[TabPageIndex] = window.bitmap;
            }
            //ponizej formatowanie i ustawianie
            tabControl1.SelectedTab.Controls.Clear();
            PictureBox newPictureBox = new PictureBox();

            tabControl1.SelectedTab.Controls.Add(newPictureBox);
            newPictureBox.Size = new Size(840, 900);

            newPictureBox.Anchor   = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Top);
            newPictureBox.SizeMode = PictureBoxSizeMode.StretchImage;

            newPictureBox.Image = ArrayBitMap[TabPageIndex];


            PlotView myPlot  = new PlotView();
            var      myModel = new PlotModel {
                Title = "Histogram"
            };

            myModel.Series.Add(Histogram.GetFunction(bmp.getArrayBMP(ArrayBitMap[TabPageIndex])));
            myPlot.Model    = myModel;
            myPlot.Dock     = DockStyle.Right;
            myPlot.Location = new Point(0, 0);
            myPlot.Size     = new Size(800, 500);
            myPlot.TabIndex = 0;
            tabControl1.SelectedTab.Controls.Add(myPlot);
        }