コード例 #1
0
        /// <summary>
        /// Gets the new/edited <code>PropertyItem</code>
        /// </summary>
        public SvnPropertyValue GetPropertyItem()
        {
            SvnPropertyValue result = this._currentEditor == null ? null : this._currentEditor.PropertyItem;

            if (result != null)
            {
                if (!_currentEditor.AllowNodeKind(_currentNodeKind))
                {
                    MessageBox.Show(
                        "Can not set a file property on a directory. ",
                        "Invalid Directory Property", MessageBoxButtons.OK,
                        MessageBoxIcon.Hand);
                    return(null);
                }
                string propertyName = this.nameComboBox.Text;
                if (string.IsNullOrEmpty(propertyName))
                {
                    result = null;
                }
                else
                {
                    if (result.Key != propertyName)
                    {
                        result = new SvnPropertyValue(propertyName, (byte[])result.RawValue);
                    }
                }
            }
            return(result);
        }
コード例 #2
0
        /// <summary>
        /// Adds the property editor if it allows the current SvnItem's node kind
        /// </summary>
        /// <param name="propEditor">IPropertyEditor</param>
        private void AddPropertyEditor(PropertyEditControl propEditor)
        {
            if (!propEditor.AllowNodeKind(_currentNodeKind))
            {
                return;
            }

            // TODO: Perhaps allow applying file properties recursively on a folder

            string key = propEditor.ToString();

            this.keyPropEditor.Add(key, propEditor);
        }
コード例 #3
0
ファイル: PropertyDialog.cs プロジェクト: necora/ank_git
        /// <summary>
        /// Adds the property editor if it allows the current SvnItem's node kind
        /// </summary>
        /// <param name="propEditor">IPropertyEditor</param>
        private void AddPropertyEditor(PropertyEditControl propEditor)
        {
            if (!propEditor.AllowNodeKind(_currentNodeKind))
                return;

            // TODO: Perhaps allow applying file properties recursively on a folder

            string key = propEditor.ToString();
            this.keyPropEditor.Add(key, propEditor);
        }