Пример #1
0
        public void SaveResultsToBitmap(object sender, UserEventArgs <BaseModelParameters> e)
        {
            var bmp        = MatrixAdapter.instance.DrawToBitmap(e.item);
            var type       = BitmapType.Матрица;
            var nameDialog = new AskBlockNameDialog();

            nameDialog.bmpType = type;
            nameDialog.ShowDialog();
            if (nameDialog.OKExited && nameDialog.OutText != null)
            {
                var element = new LocalDataGraphicsElement(nameDialog.OutText, bmp, type);
                LocalDataBase.AddData(element);
                System.Windows.Forms.MessageBox.Show("Данные успешно внесены!");
            }
        }
Пример #2
0
        //Сохранение в рисунок
        private void SaveCurves(object sender, EventArgs e)
        {
            var bmp        = GraphicsAdapter.instance.DrawToBitmap();
            var type       = BitmapType.График;
            var nameDialog = new AskBlockNameDialog();

            nameDialog.bmpType = type;
            nameDialog.ShowDialog();
            if (nameDialog.OKExited && nameDialog.OutText != null)
            {
                var element = new LocalDataGraphicsElement(nameDialog.OutText, bmp, type);
                LocalDataBase.AddData(element);
                System.Windows.Forms.MessageBox.Show("Данные успешно внесены!");
            }
        }