private bool filterSet; // filters can only be set once

        #region Constructors

        /// <summary>
        /// Creates a new instance of this class.
        /// </summary>
        protected CommonFileDialog()
        {
            filenames = new Collection<string>();
            filters = new CommonFileDialogFilterCollection();
            items = new Collection<IShellItem>();
            controls = new CommonFileDialogControlCollection<CommonFileDialogControl>(this);
        }
示例#2
0
		private bool filterSet; // filters can only be set once

		#region Constructors

		/// <summary>
		/// Creates a new instance of this class.
		/// </summary>
		protected CommonFileDialog() {
			if (!CoreHelpers.RunningOnVista) {
				throw new PlatformNotSupportedException(LocalizedMessages.CommonFileDialogRequiresVista);
			}

			filenames = new Collection<string>();
			filters = new CommonFileDialogFilterCollection();
			items = new Collection<IShellItem>();
			controls = new CommonFileDialogControlCollection<CommonFileDialogControl>(this);
		}
示例#3
0
        /// <summary>
        /// Creates a new instance of this class.
        /// </summary>
        protected CommonFileDialog()
        {
            if (!CoreHelpers.RunningOnVista)
                throw new PlatformNotSupportedException(
                    "Common File Dialog requires Windows Vista or later.");

            fileNames = new Collection<string>();
            filters = new CommonFileDialogFilterCollection();
            items = new Collection<IShellItem>();
            controls = new CommonFileDialogControlCollection<CommonFileDialogControl>(this);
        }
示例#4
0
        private bool filterSet; // filters can only be set once

        #region Constructors

        /// <summary>
        /// Creates a new instance of this class.
        /// </summary>
        protected CommonFileDialog()
        {
            if (!CoreHelpers.RunningOnVista)
            {
                throw new PlatformNotSupportedException(LocalizedMessages.CommonFileDialogRequiresVista);
            }

            filenames = new Collection <string>();
            filters   = new CommonFileDialogFilterCollection();
            items     = new Collection <IShellItem>();
            controls  = new CommonFileDialogControlCollection <CommonFileDialogControl>(this);
        }