示例#1
0
        public System.Windows.Forms.DialogResult ShowDialog()
        {
            ofd                  = new System.Windows.Forms.OpenFileDialog();
            ofd.Multiselect      = Multiselect;
            ofd.InitialDirectory = InitialDirectory;
            ofd.Filter           = Filter;
            ofd.Title            = Title;

            System.Windows.Forms.DialogResult result;
            var wrapperForm = new WrapperForm(ofd);

            System.Windows.Forms.Application.Run(wrapperForm);
            FileName  = wrapperForm.FileName;
            FileNames = wrapperForm.FileNames;
            result    = wrapperForm.Result;
            ofd       = null;
            return(result);
        }
示例#2
0
        public System.Windows.Forms.DialogResult ShowDialog()
        {
            ofd.Multiselect      = Multiselect;
            ofd.InitialDirectory = InitialDirectory;
            ofd.Filter           = Filter;
            ofd.Title            = Title;

#if LINUX
            var wrapperForm = new WrapperForm(ofd);
            System.Windows.Forms.Application.Run(wrapperForm);
            System.Windows.Forms.Application.Exit();
            FileName  = wrapperForm.FileName;
            FileNames = wrapperForm.FileNames;
            return(wrapperForm.Result);
#else
            var result = ofd.ShowDialog();
            FileName  = ofd.FileName;
            FileNames = ofd.FileNames;
            return(result);
#endif
        }