Beispiel #1
0
 protected bool IsEditEnabled(TreeNodeAdv node)
 {
     if (EditEnabled)
     {
         NodeControlValueEventArgs args = new NodeControlValueEventArgs(node);
         args.Value = true;
         OnIsEditEnabledValueNeeded(args);
         return Convert.ToBoolean(args.Value);
     }
     else
         return false;
 }
        void ValueNodeTextBox_IsEditEnabledValueNeeded(object sender, NodeControlValueEventArgs e)
        {
            VariableNode node = e.Node.Tag as VariableNode;

            if (node == null || node.Variable == null)
            {
                e.Value = false;
                return;
            }
            int type = node.Variable.getValue().getType();

            // FDB only allows setting the value of scalar variables.
            // Strings can be null, however there is no way with FDB of discerning this case.
            if (node.Variable.isAttributeSet(VariableAttribute_.READ_ONLY) || type != VariableType_.BOOLEAN && type != VariableType_.NUMBER && type != VariableType_.STRING)
            {
                e.Value = false;
            }
        }
Beispiel #3
0
        private void ValuePushed(object sender, NodeControlValueEventArgs e)
        {
            if (e.Node != null && e.Node.Tag != null)
            {
                GrtTreeNode node = e.Node.Tag as GrtTreeNode;

                if (node != null)
                {
                    int index = GetColumnIndex(sender as NodeControl);
                    if (index > -1)
                    {
                        NodeTextBox tnode = sender as NodeTextBox;
                        model.set_convert_field(node.NodeId, index, e.Value as String);
                    }
                    treeControl.Refresh();
                }
            }
        }
        /// <summary>
        /// Event handler that gets the icon for the node
        /// </summary>
        /// <param name="sender">The object triggering the event</param>
        /// <param name="e">The event parameter</param>
        private void IconNeeded(object sender, NodeControlValueEventArgs e)
        {
            if (e.Node != null && e.Node.Tag != null)
            {
                // Use the GRT Icon manager to get the correct icon
                GrtListNode node = e.Node.Tag as GrtListNode;

                if (node != null)
                {
                    int   iconId = GrtList.get_field_icon(node.NodeId, 0, IconSize.Icon16);
                    Image icon   = IconManagerWrapper.get_instance().get_icon(iconId);

                    if (icon != null)
                    {
                        e.Value = icon;
                    }
                }
            }
        }
        /// <summary>
        /// Event handler that gets the caption for the value column
        /// </summary>
        /// <param name="sender">The object triggering the event</param>
        /// <param name="e">The event parameter</param>
        private void ValueNeeded(object sender, NodeControlValueEventArgs e)
        {
            if (e.Node != null && e.Node.Tag != null)
            {
                GrtTreeNode node = e.Node.Tag as GrtTreeNode;

                if (node != null)
                {
                    int index = GetColumnIndex(sender as NodeControl);
                    if (index > -1)
                    {
                        string caption;

                        model.get_field(node.NodeId, index, out caption);
                        e.Value = caption;
                    }
                }
            }
        }
Beispiel #6
0
        /// <summary>
        /// Event handler that sets the new value for the value column
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ValuePushed(object sender, NodeControlValueEventArgs e)
        {
            if (e.Node != null && e.Node.Tag != null)
            {
                GrtListNode node = e.Node.Tag as GrtListNode;

                if (node != null)
                {
                    if (sender == columnEnabledFkNodeControl)
                    {
                        bool isFK = (CheckState)e.Value == CheckState.Checked;
                        if (((FKConstraintColumnsListWrapper)grtList).set_column_is_fk(node.NodeId, isFK) && isFK)
                        {
                            // Sart editing the column only if it is enabled as FK column.
                            targetColumnNodeControl.Parent.SelectedNode = e.Node;
                            targetColumnNodeControl.BeginEdit();
                        }
                    }
                    else if (sender == nameNodeControl)
                    {
                        String value = e.Value as String;
                        if (value != null)
                        {
                            grtList.set_field(node.NodeId, (int)FKConstraintColumnsListWrapper.FKConstraintColumnsListColumns.Column, e.Value as String);
                        }
                    }
                    else if (sender == targetColumnNodeControl)
                    {
                        String value = e.Value as String;
                        if (value != null)
                        {
                            grtList.set_field(node.NodeId, (int)FKConstraintColumnsListWrapper.FKConstraintColumnsListColumns.RefColumn, e.Value as String);

                            // Setting a target column implicitly enables this columns a FK column.
                            ((FKConstraintColumnsListWrapper)grtList).set_column_is_fk(node.NodeId, true);
                        }
                    }

                    RefreshModel();
                }
            }
        }
        /// <summary>
        /// Gets called when a value for the message column is needed.
        /// </summary>
        /// <param name="sender">The sender of the event.</param>
        /// <param name="e">More information about the event.</param>
        void nodeIconMessages_ValueNeeded(object sender, NodeControlValueEventArgs e)
        {
            TestCase testCase = e.Node.Tag as TestCase;

            if (testCase != null)
            {
                if (testCase.Messages.Any(m => m.Severity == MessageSeverity.Error))
                {
                    e.Value = Resources.Error;
                }
                else if (testCase.Messages.Any(m => m.Severity == MessageSeverity.Warning))
                {
                    e.Value = Resources.Warning;
                }
                else if (testCase.Messages.Any(m => m.Severity == MessageSeverity.Info))
                {
                    e.Value = Resources.Info;
                }
            }
        }
Beispiel #8
0
        void IsCheckBoxEnabled(object sender, NodeControlValueEventArgs e)
        {
            bool          result = true;
            ComponentNode node   = e.Node.Tag as ComponentNode;

            if (node != null)
            {
                ComponentWrapper component = node.TypedContent;
                if (this.References.IsFeatureReadOnly(component) == false)
                {
                    if (component.Checked == true)
                    {
                        List <ComponentWrapper> refList;
                        this.References.GetRefList(component, out refList);
                        if (refList.Count != 0)
                        {
                            StringBuilder builder = new StringBuilder();
                            builder.AppendFormat("Component \"{0}\" has checked dependencies:\r\n", component.Name);
                            foreach (ComponentWrapper dependency in refList)
                            {
                                builder.AppendFormat("\"{0}\"\r\n", dependency.Name);
                            }
                            builder.AppendFormat("Try to uncheck them?");
                            if (MessageBox.Show(this, builder.ToString(), "Unresolved dependencies", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.OK)
                            {
                                RecursiveCheckComponent(component);
                            }
                            else
                            {
                                result = false;
                            }
                        }
                    }
                }
                else
                {
                    result = false;
                }
            }
            e.Value = result;
        }
Beispiel #9
0
 public virtual object GetValue(TreeNodeAdv node)
 {
     if (VirtualMode)
     {
         NodeControlValueEventArgs args = new NodeControlValueEventArgs(node);
         OnValueNeeded(args);
         return args.Value;
     }
     else
     {
         try
         {
             return GetMemberAdapter(node).Value;
         }
         catch (TargetInvocationException ex)
         {
             if (ex.InnerException != null)
                 throw new ArgumentException(ex.InnerException.Message, ex.InnerException);
             else
                 throw new ArgumentException(ex.Message);
         }
     }
 }
Beispiel #10
0
        /// <summary>
        /// Event handler that gets the caption for the value column
        /// </summary>
        /// <param name="sender">The object triggering the event</param>
        /// <param name="e">The event parameter</param>
        private void ValueNeeded(object sender, NodeControlValueEventArgs e)
        {
            if (e.Node != null && e.Node.Tag != null)
            {
                GrtListNode node = e.Node.Tag as GrtListNode;

                if (node != null)
                {
                    foreach (ColumnContent column in columns)
                    {
                        if (sender == column.control)
                        {
                            string caption;

                            grtList.get_field(node.NodeId, column.index, out caption);

                            e.Value = caption;
                            break;
                        }
                    }
                }
            }
        }
        /// <summary>
        /// Event handler that gets the icon for the node in a given column.
        /// </summary>
        /// <param name="sender">The object triggering the event</param>
        /// <param name="e">The event parameter</param>
        protected override void StateIconNeeded(object sender, NodeControlValueEventArgs e)
        {
            if (e.Node != null && e.Node.Tag != null)
            {
                // Use the GRT Icon manager to get the correct icon
                GrtTreeNode node = e.Node.Tag as GrtTreeNode;

                if (node != null)
                {
                    int index = GetColumnIndex(sender as NodeControl);
                    if (index > -1)
                    {
                        int   iconId = GrtTree.get_field_icon(node.NodeId, index, IconSize.Icon16);
                        Image icon   = IconManagerWrapper.get_instance().get_icon(iconId);

                        if (icon != null)
                        {
                            e.Value = icon;
                        }
                    }
                }
            }
        }
Beispiel #12
0
        /// <summary>
        /// Event handler that sets the new value for the value column
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ValuePushed(object sender, NodeControlValueEventArgs e)
        {
            if (e.Node != null && e.Node.Tag != null)
            {
                int selIndex = e.Node.Index;

                GrtListNode node = e.Node.Tag as GrtListNode;

                // Activate column placeholder row if we a value for it must be set here.
                if (e.Node.Index == TreeView.Root.Children.Count - 1)
                {
                    activateColumnPlaceholder(node.NodeId);
                }

                if (node != null)
                {
                    if (sender == nameNodeControl)
                    {
                        String value = e.Value as String;
                        if (value != null)
                        {
                            grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.Name, e.Value as String);
                        }
                    }
                    else if (sender == datatypeComboBoxNodeControl)
                    {
                        String value = e.Value as String;
                        if (value != null)
                        {
                            if (!grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.Type, e.Value as String))
                            {
                                CustomMessageBox.Show(MessageType.MessageError, "Could not set new data type",
                                                      "The given data type\n\n" + value + "\n\ncontains errors and cannot be accepted. " +
                                                      "The previous value is kept instead.", "Close");
                            }
                        }
                    }
                    else if (sender == pkNodeControl)
                    {
                        int intValue = Convert.ToInt16(e.Value);
                        grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsPK, intValue);
                    }
                    else if (sender == nnNodeControl)
                    {
                        int intValue = Convert.ToInt16(e.Value);
                        grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsNotNull, intValue);
                    }
                    else if (sender == uqNodeControl)
                    {
                        int intValue = Convert.ToInt16(e.Value);
                        grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsUnique, intValue);
                    }
                    else if (sender == binNodeControl)
                    {
                        int intValue = Convert.ToInt16(e.Value);
                        grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsBinary, intValue);
                    }
                    else if (sender == unNodeControl)
                    {
                        int intValue = Convert.ToInt16(e.Value);
                        grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsUnsigned, intValue);
                    }
                    else if (sender == zfNodeControl)
                    {
                        int intValue = Convert.ToInt16(e.Value);
                        grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsZerofill, intValue);
                    }
                    else if (sender == aiNodeControl)
                    {
                        int intValue = Convert.ToInt16(e.Value);
                        grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsAutoIncrement, intValue);
                    }
                    else if (sender == gNodeControl)
                    {
                        int intValue = Convert.ToInt16(e.Value);
                        grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsGenerated, intValue);
                    }
                    else if (sender == defaultNodeControl)
                    {
                        String value = e.Value as String;
                        if (value != null)
                        {
                            grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.Default, e.Value as String);
                        }
                    }

                    RefreshModel();

                    if (selIndex > -1)
                    {
                        TreeView.SelectedNode = TreeView.Root.Children[selIndex];
                    }

                    if (listener != null)
                    {
                        listener.ValueChanged(sender as BindableControl, e.Value);
                    }
                }
            }
        }
Beispiel #13
0
        /// <summary>
        /// Event handler that gets the caption for the value column
        /// </summary>
        /// <param name="sender">The object triggering the event</param>
        /// <param name="e">The event parameter</param>
        private void ValueNeeded(object sender, NodeControlValueEventArgs e)
        {
            if (e.Node != null && e.Node.Tag != null)
            {
                GrtListNode node = e.Node.Tag as GrtListNode;

                if (node != null)
                {
                    if (sender == nameNodeControl)
                    {
                        string caption;

                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.Name, out caption))
                        {
                            e.Value = caption;
                        }
                    }
                    else if (sender == datatypeComboBoxNodeControl)
                    {
                        string caption;

                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.Type, out caption))
                        {
                            e.Value = caption;
                        }
                    }
                    else if (sender == pkNodeControl)
                    {
                        int value;

                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsPK, out value))
                        {
                            e.Value = (value == 1);
                        }
                    }
                    else if (sender == nnNodeControl)
                    {
                        int notNull;

                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsNotNull, out notNull))
                        {
                            e.Value = (notNull == 1);
                        }
                    }
                    else if (sender == uqNodeControl)
                    {
                        int unique;

                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsUnique, out unique))
                        {
                            e.Value = (unique == 1);
                        }
                    }
                    else if (sender == binNodeControl)
                    {
                        int value;

                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsBinary, out value))
                        {
                            e.Value = (value == 1);
                        }
                    }
                    else if (sender == unNodeControl)
                    {
                        int value;

                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsUnsigned, out value))
                        {
                            e.Value = (value == 1);
                        }
                    }
                    else if (sender == zfNodeControl)
                    {
                        int value;

                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsZerofill, out value))
                        {
                            e.Value = (value == 1);
                        }
                    }
                    else if (sender == aiNodeControl)
                    {
                        int autoInc;

                        // Show the actual value, even if the field would not allow auto increment.
                        // While editing allow to reset the auto inc value but prevent setting it if the
                        // column data type does not allow it.

                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsAutoIncrement, out autoInc))
                        {
                            e.Value = (autoInc == 1);
                        }
                    }
                    else if (sender == gNodeControl)
                    {
                        int generated;
                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsGenerated, out generated))
                        {
                            e.Value = (generated == 1);
                        }
                    }
                    else if (sender == defaultNodeControl)
                    {
                        string caption;

                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.Default, out caption))
                        {
                            e.Value = caption;
                        }
                    }
                }
            }
        }
 /// <summary>
 /// Gets called when a value for the state column is needed.
 /// </summary>
 /// <param name="sender">The sender of the event.</param>
 /// <param name="e">More information about the event.</param>
 private void nodeControlStatus_ValueNeeded(object sender, NodeControlValueEventArgs e)
 {
     e.Value = e.Node.Tag as TestCaseBase;
 }
        /// <summary>
        /// Event handler that sets the new value for the value column
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ValuePushed(object sender, NodeControlValueEventArgs e)
        {
            if (e.Node != null && e.Node.Tag != null)
            {
                GrtListNode node = e.Node.Tag as GrtListNode;

                if (node != null)
                {
                    if (sender == enabledNodeControl)
                    {
                        ((IndexColumnsListWrapper)grtList).set_column_enabled(node.NodeId, (CheckState)e.Value == CheckState.Checked);
                    }
                    else if (sender == nameNodeControl)
                    {
                        String value = e.Value as String;
                        if (value != null)
                        {
                            grtList.set_field(node.NodeId, (int)IndexColumnsListWrapper.IndexColumnsListColumns.Name, value);
                        }
                    }
                    else if (sender == orderNodeControl)
                    {
                        String value = e.Value as String;
                        if (value != null)
                        {
                            //int intValue = Convert.ToInt32(value);
                            int intValue = 0;
                            try
                            {
                                intValue = Convert.ToInt32(value);
                                grtList.set_field(node.NodeId, (int)IndexColumnsListWrapper.IndexColumnsListColumns.OrderIndex, intValue);
                            }
                            catch (FormatException)
                            {
                            }
                        }
                    }
                    if (sender == storageNodeControl)
                    {
                        String value = e.Value as String;

                        if (value != null)
                        {
                            int intValue = 0;
                            if (value.Equals("DESC"))
                            {
                                intValue = 1;
                            }

                            grtList.set_field(node.NodeId, (int)IndexColumnsListWrapper.IndexColumnsListColumns.Descending, intValue);
                        }
                    }
                    else if (sender == lengthNodeControl)
                    {
                        String value = e.Value as String;
                        if (value != null)
                        {
                            try
                            {
                                int intValue = Convert.ToInt32(value);
                                grtList.set_field(node.NodeId, (int)IndexColumnsListWrapper.IndexColumnsListColumns.Length, intValue);
                            }
                            catch (Exception)
                            {
                                grtList.set_field(node.NodeId, (int)IndexColumnsListWrapper.IndexColumnsListColumns.Length, "");
                            }
                        }
                    }
                    RefreshModel();
                }
            }
        }
Beispiel #16
0
 private void NodeCheckBox_IsVisibleValueNeeded(object sender, NodeControlValueEventArgs e)
 {
     e.Value = (e.Node.Tag is SensorNode node) && plotMenuItem.Checked;
 }
		protected void OnValuePushed(NodeControlValueEventArgs args)
		{
			if(ValuePushed!=null)
				ValuePushed(this, args);
		}
 private void CheckIsEditEnabledValueNeeded(object sender, NodeControlValueEventArgs e)
 {
     e.Value = !(e.Node.Tag is ChildTrackingVariableRowModel);
 }
		void CheckIndex(object sender, NodeControlValueEventArgs e)
		{
			e.Value = (e.Node.Index % 2 == 0);
		}
Beispiel #20
0
        /// <summary>
        /// Determines whether the nodeCheckBox control is visible for the specified node.
        /// </summary>
        private void nodeCheckBox_IsVisibleValueNeeded(object sender, NodeControlValueEventArgs e)
        {
            BaseSceneTreeNode node = e.Node.Tag as BaseSceneTreeNode;

            e.Value = node != null ? node.AllowVisible : false;
        }
Beispiel #21
0
 protected virtual void OnIsVisibleValueNeeded(NodeControlValueEventArgs args)
 {
     if (IsVisibleValueNeeded != null)
         IsVisibleValueNeeded(this, args);
 }
Beispiel #22
0
 public bool IsVisible(TreeNodeAdv node)
 {
     NodeControlValueEventArgs args = new NodeControlValueEventArgs(node);
     args.Value = true;
     OnIsVisibleValueNeeded(args);
     return Convert.ToBoolean(args.Value);
 }
Beispiel #23
0
 void CheckIndex(object sender, NodeControlValueEventArgs e)
 {
     e.Value = (e.Node.Index % 2 == 0);
 }
 void checkBox_IsVisibleValueNeeded(object sender, NodeControlValueEventArgs e)
 {
     e.Value = e.Node.Tag is ComponentNode;
 }
Beispiel #25
0
 protected override void OnIsVisibleValueNeeded(NodeControlValueEventArgs args)
 {
     args.Value = isInProgress(args.Node);
     base.OnIsVisibleValueNeeded(args);
 }
Beispiel #26
0
 private void m_inflNotCheckBox_IsVisibleValueNeeded(object sender, NodeControlValueEventArgs e)
 {
     e.Value = e.Node.Tag is ClosedFeatureNode;
 }
		protected override void OnIsVisibleValueNeeded(NodeControlValueEventArgs args)
		{
			args.Value=args.Node.IsExpandingNow;
			base.OnIsVisibleValueNeeded(args);
		}
Beispiel #28
0
 private void m_valueComboBox_IsEditEnabledValueNeeded(object sender, NodeControlValueEventArgs e)
 {
     e.Value = e.Node.Tag is ClosedFeatureNode;
 }
Beispiel #29
0
 void NameNodeTextBox_IsEditEnabledValueNeeded(object sender, NodeControlValueEventArgs e)
 {
     e.Value = false;
 }
Beispiel #30
0
 void NameNodeTextBox_IsEditEnabledValueNeeded(object sender, NodeControlValueEventArgs e)
 {
     e.Value = e.Node.Level == 1;
 }
        /// <summary>
        /// Event handler that gets the caption for the value column
        /// </summary>
        /// <param name="sender">The object triggering the event</param>
        /// <param name="e">The event parameter</param>
        private void ValueNeeded(object sender, NodeControlValueEventArgs e)
        {
            if (e.Node != null && e.Node.Tag != null)
            {
                GrtListNode node = e.Node.Tag as GrtListNode;

                if (node != null)
                {
                    if (sender == enabledNodeControl)
                    {
                        e.Value = ((IndexColumnsListWrapper)grtList).get_column_enabled(node.NodeId);
                    }
                    else if (sender == nameNodeControl)
                    {
                        string caption;

                        grtList.get_field(node.NodeId, (int)IndexColumnsListWrapper.IndexColumnsListColumns.Name, out caption);

                        e.Value = caption;
                    }
                    else if (sender == orderNodeControl)
                    {
                        string caption;

                        grtList.get_field(node.NodeId, (int)IndexColumnsListWrapper.IndexColumnsListColumns.OrderIndex, out caption);

                        e.Value = caption;
                    }
                    else if (sender == storageNodeControl)
                    {
                        int val;

                        grtList.get_field(node.NodeId, (int)IndexColumnsListWrapper.IndexColumnsListColumns.Descending, out val);

                        if (val == 1)
                        {
                            e.Value = "DESC";
                        }
                        else
                        {
                            e.Value = "ASC";
                        }
                    }
                    else if (sender == lengthNodeControl)
                    {
                        int val;

                        grtList.get_field(node.NodeId, (int)IndexColumnsListWrapper.IndexColumnsListColumns.Length, out val);

                        if (val > 0)
                        {
                            e.Value = Convert.ToString(val);
                        }
                        else
                        {
                            e.Value = "";
                        }
                    }
                }
            }
        }
		public override void SetValue(TreeNodeAdv node, object value)
		{
			if(VirtualMode)
			{
				NodeControlValueEventArgs args=new NodeControlValueEventArgs(node);
				args.Value=value;
				OnValuePushed(args);
			}
			else
			{
				try
				{
					MemberAdapter ma=GetMemberAdapter(node);
					((ProgressData)(ma.Value)).Text=(string)value;
				}
				catch(TargetInvocationException ex)
				{
					if(ex.InnerException!=null)
						throw new ArgumentException(ex.InnerException.Message, ex.InnerException);
					else
						throw new ArgumentException(ex.Message);
				}
			}
		}
Beispiel #33
0
 private void nodeComboBoxAC_IsVisibleValueNeeded(object sender,
                                                  NodeControlValueEventArgs e)
 {
     e.Value = (null != e.Node.Tag as SettingNode) && (!(e.Node.Tag as SettingNode).isRangeSetting);
 }
 /// <summary>
 /// Gets called when the icon column needs an image.
 /// </summary>
 /// <param name="sender">The sender of the event.</param>
 /// <param name="e">More information about the ebent.</param>
 private void nodeFileIcon_ValueNeeded(object sender, NodeControlValueEventArgs e)
 {
     e.Value = e.Node.Tag is TestCaseCSharp ? Resources.CSharpFile : (e.Node.Tag is TestCaseAssembly ? Resources.AssemblyFile : Resources.Folder);
 }
        private void nodeCheckBox_IsVisibleValueNeeded(object sender, NodeControlValueEventArgs e)
        {
            SensorNode node = e.Node.Tag as SensorNode;

            e.Value = (node != null) && plotMenuItem.Checked;
        }
		private void OnValueNeeded(NodeControlValueEventArgs args)
		{
			if(ValueNeeded!=null)
				ValueNeeded(this, args);
		}
Beispiel #37
0
 void EventSetReadOnly(object sender, NodeControlValueEventArgs e)
 {
     e.Value = false;
 }
        /// <summary>
        /// This method is called when a new value for the result percentage column is needed.
        /// </summary>
        /// <param name="sender">The sender of the event.</param>
        /// <param name="e">More information about the event.</param>
        void nodeControlPercent_ValueNeeded(object sender, NodeControlValueEventArgs e)
        {
            ObjectField field = e.Node.Tag as ObjectField;

            e.Value = Comparer.GetResult(field);
        }
Beispiel #39
0
 private void OnIsEditEnabledValueNeeded(NodeControlValueEventArgs args)
 {
     if (IsEditEnabledValueNeeded != null)
         IsEditEnabledValueNeeded(this, args);
 }
Beispiel #40
0
 /// <summary>
 /// Determines whether the combobox is visible for the specified tree node.
 /// </summary>
 private void nodeComboBox_IsVisibleValueNeeded(object sender, NodeControlValueEventArgs e)
 {
     e.Value = e.Node.Tag is ItemForDeletionTreeNode;
 }