cadencii.Preference.buttonWineTop_Click C# (CSharp) Method

buttonWineTop_Click() public method

public buttonWineTop_Click ( Object sender, EventArgs e ) : void
sender Object
e EventArgs
return void
        public void buttonWineTop_Click( Object sender, EventArgs e )
        {
            OpenFileDialog dialog = null;
            try {
                dialog = new OpenFileDialog();
                String dir = textWineTop.Text;
                if ( dir != null && dir.Length > 0 ) {
                    dialog.SetSelectedFile(Path.Combine( dir, "a" ));
                }
                if ( AppManager.showModalDialog( dialog, true, this ) == DialogResult.OK ) {
                    dir = dialog.FileName;
                    if (System.IO.File.Exists(dir)) {
                        // ファイルが選ばれた場合,その所属ディレクトリを値として用いる
                        dir = PortUtil.getDirectoryName( dir );
                    }
                    textWineTop.Text = dir;
                }
            } catch ( Exception ex ) {
            }
        }
Preference