コード例 #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        public AuthorityGroupEditorComponentControl(AuthorityGroupEditorComponent component)
			:base(component)
        {
            InitializeComponent();

            _component = component;

            _authorityGroupName.DataBindings.Add("Value", _component, "Name", true, DataSourceUpdateMode.OnPropertyChanged);
            _authorityGroupDescription.DataBindings.Add("Value", _component, "Description", true, DataSourceUpdateMode.OnPropertyChanged);
            _authorityGroupDataGroup.DataBindings.Add("Checked", _component, "DataGroup", true,
                                                      DataSourceUpdateMode.OnPropertyChanged);

			// build the authority token tree

			// ignore check state change events while building the tree 
			using(new IgnoreCheckStateEventsScope())
			{
				BuildTree(_component.AuthorityTokens);

				// initially expand only the mixed nodes
				ExpandMixedNodes(_tokenTreeView.Nodes);

				// make sure a node is selected prior to displaying the tree ctrl, otherwise it does some annoying things
				Node firstNode = CollectionUtils.FirstElement<Node>(_tokenTreeView.Nodes);
				if (firstNode != null)
					firstNode.Select();
			}
		}
コード例 #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        public AuthorityGroupEditorComponentControl(AuthorityGroupEditorComponent component)
            : base(component)
        {
            InitializeComponent();

            _component = component;

            _authorityGroupName.DataBindings.Add("Value", _component, "Name", true, DataSourceUpdateMode.OnPropertyChanged);
            _authorityGroupDescription.DataBindings.Add("Value", _component, "Description", true, DataSourceUpdateMode.OnPropertyChanged);
            _authorityGroupDataGroup.DataBindings.Add("Checked", _component, "DataGroup", true,
                                                      DataSourceUpdateMode.OnPropertyChanged);

            // build the authority token tree

            // ignore check state change events while building the tree
            using (new IgnoreCheckStateEventsScope())
            {
                BuildTree(_component.AuthorityTokens);

                // initially expand only the mixed nodes
                ExpandMixedNodes(_tokenTreeView.Nodes);

                // make sure a node is selected prior to displaying the tree ctrl, otherwise it does some annoying things
                Node firstNode = CollectionUtils.FirstElement <Node>(_tokenTreeView.Nodes);
                if (firstNode != null)
                {
                    firstNode.Select();
                }
            }
        }
コード例 #3
0
 public void SetComponent(IApplicationComponent component)
 {
     _component = (AuthorityGroupEditorComponent)component;
 }
コード例 #4
0
 public void SetComponent(IApplicationComponent component)
 {
     _component = (AuthorityGroupEditorComponent)component;
 }