コード例 #1
0
ファイル: FolderPath.cs プロジェクト: hlizard/boo
		/// <summary>
		/// Initializes a new instance of the <see cref="FolderPath"/> class from an existing <see cref="FilePath"/> instance.
		/// </summary>
		/// <param name="path">An existing <see cref="FolderPath"/>.</param>
		public FolderPath(FolderPath path)
		{
			if (path.Path.Length > 0)
			{
				base.Path = path.Path;
				base.FixedPath = path.FixedPath;
			}
		}
コード例 #2
0
		void ResetAdditionalContentResourceDirectory() { _AdditionalContentResourceDirectory = new FolderPath(); }
コード例 #3
0
ファイル: FolderPath.cs プロジェクト: hlizard/boo
			/// <inheritDoc/>
			public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value)
			{
				if (value is FolderPath)
				{
					object result = base.EditValue(context, provider, ((FolderPath)value).Path);
					if ((string)result == ((FolderPath)value).Path)
					{
						return value;
					}
					else
					{
						if (((string)result).Length > 0)
						{
							FolderPath newValue = new FolderPath((FolderPath)value);
							newValue.Path = (string)result;
							return newValue;
						}
						else
						{
							return new FolderPath();
						}
					}
				}
				else
				{
					return base.EditValue(context, provider, value);
				}
			}