Пример #1
0
        /// <summary>
        /// Adds a GuiFilePicker to the form control collection.
        /// </summary>
        /// <param name="id">The id of this control</param>
        /// <param name="text">The visible text of this control</param>
        /// <param name="tooltip">The mouseover text of this control</param>
        /// <param name="targetcontrol">The target control (textbox) that will hold the file path.</param>
        /// <param name="picksFolder">If this is true, this FilePicker will actually pick a folder.
        /// Otherwise, the FilePicker will pick a file.</param>
        /// <returns>The newly created control.</returns>
        public GuiFilePicker AddFilePicker(string id, string text, string tooltip, string targetcontrol, bool picksFolder)
        {
            GuiFilePicker picker = new GuiFilePicker();

            picker.ID            = id;
            picker.Text          = text;
            picker.ToolTip       = tooltip;
            picker.PicksFolder   = picksFolder;
            picker.TargetControl = targetcontrol;

            AddGuiControl(picker);

            return(picker);
        }
Пример #2
0
		/// <summary>
		/// Adds a GuiFilePicker to the form control collection.
		/// </summary>
		/// <param name="id">The id of this control</param>
		/// <param name="text">The visible text of this control</param>
		/// <param name="tooltip">The mouseover text of this control</param>
		/// <param name="targetcontrol">The target control (textbox) that will hold the file path.</param>
		/// <param name="picksFolder">If this is true, this FilePicker will actually pick a folder. 
		/// Otherwise, the FilePicker will pick a file.</param>
		/// <returns>The newly created control.</returns>
		public GuiFilePicker AddFilePicker(string id, string text, string tooltip, string targetcontrol, bool picksFolder) 
		{
			GuiFilePicker picker = new GuiFilePicker();
			picker.ID = id;
			picker.Text = text;
			picker.ToolTip = tooltip;
			picker.PicksFolder = picksFolder;
			picker.TargetControl = targetcontrol;

			AddGuiControl(picker);

			return picker;
		}