/// <summary> /// Adds the object node. /// </summary> /// <param name="nodeName">Name of the node.</param> /// <param name="ImageIndex">Index of the image.</param> /// <param name="result">The result.</param> /// <param name="nodes">The nodes.</param> /// <returns></returns> private TreeNode AddObjectNode(string nodeName, int ImageIndex, CompareResultBase result, TreeNodeCollection nodes) { TreeNode node = nodes.Add(nodeName, nodeName, ImageIndex, ImageIndex); node.Tag = result; if (IsNotEqual(node)) { node.Checked = true; } return(node); }
private void treeViewDestination_AfterCheck(object sender, TreeViewEventArgs e) { TreeNode node = e.Node; if (node.Tag == null) { return; } CompareResultBase compareResult = (CompareResultBase)node.Tag; compareResult.IsSync = node.Checked; if (node.Checked == false) { treeViewDestination.UncheckNodes(node.Nodes); } if (compareResult is ObjectResult) { ObjectResult objectResult = (ObjectResult)compareResult; throw new NotImplementedException("Need uncomment code"); //if (node.Checked) //{ // if (node.Parent != null && node.Parent.Parent != null) // node.Parent.Parent.Checked = true; // if (_filter.PrimitivesKeys.Count == 0) // objectResult.Primitives.SyncAll(); // else // objectResult.Primitives.Sync(_filter.PrimitivesKeys); //} //else //{ // if (_filter.PrimitivesKeys.Count == 0) // objectResult.Primitives.UnSyncAll(); // else // objectResult.Primitives.UnSync(_filter.PrimitivesKeys); //} } }
/// <summary> /// Adds the object result. /// </summary> /// <param name="type">The type.</param> /// <param name="result">The result.</param> /// <param name="nodesSource">The nodes source.</param> /// <param name="nodesDestionation">The nodes destionation.</param> private void AddObjectResult(ResultType type, CompareResultBase result, TreeNodeCollection nodesSource, TreeNodeCollection nodesDestionation) { //TODO::Uncomment //string nodeName = (result.Source != null) ? GetObjectName(result.Source) : // GetObjectName(result.Destination); ////TreeNode sourceNode = AddObjectNode( //// nodeName, //// (int)sourceResultTypeToObjImage[type], //// result, //// nodesSource); ////TreeNode destionationNode = AddObjectNode( //// nodeName, //// (int)destionationResultTypeToObjImage[type], //// result, //// nodesDestionation); //////AddObjectsNode(result.Results.Values.OfType<ObjectResult>(), sourceNode.Nodes, destionationNode.Nodes); //////AddDictionariesNodes(result.Results.OfType<KeyValuePair<string, DictionaryResult>>(), sourceNode.Nodes, destionationNode.Nodes); }