Exemplo n.º 1
0
        private void openFile()
        {
            if( this.filename == null )
            {
                return;
            }
            this.Text = Path.GetFileName( this.filename );
            this.seek = new FileSeeker( this.filename );

            try
            {
                this.vis.FromFile( this.filename );
                this.numericUpDownX.Maximum = this.vis.I-1;
                this.numericUpDownY.Maximum = this.vis.J-1;
                this.switchButtonVector.Enabled
                = this.checkBoxVectorMode.Enabled = this.checkBoxVectorMode.Checked = this.vis.HasVectorData;
                if( !this.vis.HasVectorData )
                {
                    this.vis.VectorSetting.Show = false;
                    this.switchButtonVector.Checked = false;
                }
                this.draw();
                this.toolStripStatusLabel.Text = (this.vis.HasVectorData) ? "ベクトルデータ" : "スカラーデータ";
                this.toolStripStatusLabel.Text += " (" + this.vis.I.ToString() + "x" + this.vis.J.ToString() + ")";
            }
            catch( DataColumnNotFoundException ex )
            {
                this.toolStripStatusLabel.Text = ex.Message;
            }
            catch( FileCouldNotReadException ex )
            {
                this.toolStripStatusLabel.Text = ex.Message;
                this.Text = this.Text + "(***)";
                this.filename = null;
            }
            catch( Exception ex )
            {
                MessageBox.Show( ex.Message );
                this.filename = null;
            }
        }
Exemplo n.º 2
0
        private void ContaForm_Load( object sender, EventArgs e )
        {
            this.Size = new Size( 652, 481 );

            this.vis = new Visualize( this.panelBmp.Height-20, this.panelBmp.Width-20 );

            this.arrowDlg = new ArrowDialog( this.vis.VectorSetting );
            this.colorDlg = new CrossViewColorDialog( this.vis.CrossViewSetting );
            this.seek = new FileSeeker();

            this.groupBoxContour.Visible = false;
            this.groupBoxVector.Visible = false;
            this.groupBoxCrossView.Visible = false;
            this.comboBoxSizeMode.SelectedIndex = 0;
            this.textBoxMinColor.DataBindings.Add( "Text", this.vis.ContourSetting, "MinValue" );
            this.textBoxMaxColor.DataBindings.Add( "Text", this.vis.ContourSetting, "MaxValue" );
            this.textBoxScale.DataBindings.Add( "Text", this.vis.CrossViewSetting, "Scale" );
            this.textBoxRefVectorLength.DataBindings.Add( "Text", this.vis.VectorSetting, "ReferredLength" );
            this.textBoxRefCrossView.DataBindings.Add( "Text", this.vis.CrossViewSetting, "ReferredLength" );
        }