FDO connection/data store property
        public void AddDataStoreProperty(DictionaryProperty p)
        {
            DataGridViewRow row = new DataGridViewRow();
            DataGridViewTextBoxCell nameCell = new DataGridViewTextBoxCell();
            nameCell.Value = p.LocalizedName;

            DataGridViewTextBoxCell valueCell = new DataGridViewTextBoxCell();
            if (p.IsFile || p.IsPath)
            {
                valueCell.ContextMenuStrip = ctxHelper;
                valueCell.ToolTipText = "Right click for helpful options";
            }
            valueCell.Value = p.DefaultValue;

            row.Cells.Add(nameCell);
            row.Cells.Add(valueCell);

            grdDataStoreProperties.Rows.Add(row);
        }
Exemple #2
0
        /// <summary>
        /// Gets the connect time property.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <returns></returns>
        public DictionaryProperty GetConnectTimeProperty(string name)
        {
            if (this.State != FdoConnectionState.Open && this.State != FdoConnectionState.Pending)
                throw new InvalidOperationException(Res.GetString("ERR_CONNECTION_NOT_OPEN"));

            IConnectionPropertyDictionary dict = this.InternalConnection.ConnectionInfo.ConnectionProperties;
            bool enumerable = dict.IsPropertyEnumerable(name);
            DictionaryProperty dp = null;
            if (enumerable)
            {
                EnumerableDictionaryProperty ep = new EnumerableDictionaryProperty();
                ep.Values = dict.EnumeratePropertyValues(name);
                dp = ep;
            }
            else
            {
                dp = new DictionaryProperty();
            }

            dp.Name = name;
            dp.LocalizedName = dict.GetLocalizedName(name);
            dp.DefaultValue = dict.GetPropertyDefault(name);
            dp.Protected = dict.IsPropertyProtected(name);
            dp.Required = dict.IsPropertyRequired(name);

            return dp;
        }