示例#1
0
        private void btnDense_Click(object sender, EventArgs e)
        {
            var form = new DenseMatrixVisualizerForm();

            int rows, cols;

            if (!Util.GetDenseRandomSize(comboDenseSize.Text, 10, out rows, out cols))
            {
                return;
            }

            var A = MatrixHelper.CreateRandomDense(radioDouble.Checked, rows, cols);

            form.SetStorageAdapter(A);
            form.ShowDialog();
        }
        protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
        {
            if (windowService == null)
            {
                throw new System.ArgumentNullException("windowService");
            }
            if (objectProvider == null)
            {
                throw new System.ArgumentNullException("objectProvider");
            }

            var obj = (DenseMatrix)objectProvider.GetObject();

            using (var form = new DenseMatrixVisualizerForm())
            {
                form.SetStorageAdapter(new DenseStorageAdapter(obj));
                windowService.ShowDialog(form);
            }
        }