コード例 #1
0
        /// <summary>
        /// Resets the properties of a common dialog to their default values.
        /// </summary>
        public override void Reset()
        {
            UseSpecialFolderRoot = true;
            RootSpecialFolder = Environment.SpecialFolder.Desktop;
            RootPath = string.Empty;
            Title = string.Empty;

            // default options
            _dialogOptions = FolderBrowserOptions.ShowEditBox
                             | FolderBrowserOptions.UseNewStyle
                             | FolderBrowserOptions.BrowseShares
                             | FolderBrowserOptions.ShowStatusText
                             | FolderBrowserOptions.ValidateResult;
        }
コード例 #2
0
        void Init()
        {
            Title = string.Empty;

            // default options
            _dialogOptions = FolderBrowserOptions.ShowEditBox
                             | FolderBrowserOptions.UseNewStyle
                             | FolderBrowserOptions.BrowseShares
                             | FolderBrowserOptions.ShowStatusText
                             | FolderBrowserOptions.ValidateResult;
        }
コード例 #3
0
 void SetOption(FolderBrowserOptions option, bool value)
 {
     if (value) _dialogOptions |= option;
     else _dialogOptions &= ~option;
 }
コード例 #4
0
 bool GetOption(FolderBrowserOptions option) => _dialogOptions.HasFlag(option);