Ejemplo n.º 1
0
        /// <summary>
        /// Refresh Conflicts
        /// </summary>
        protected void RefreshConflictList()
        {
            conflictTable.Clear();

            try
            {
                Conflict[] conflictList = ifws.GetiFolderConflicts(ifolder.ID);
                foreach (Conflict con in conflictList)
                {
                    if (!con.IsNameConflict)
                    {
                        ConflictHolder ch = new ConflictHolder(con, ifolder.UnManagedPath);
                        ConflictTreeStore.AppendValues(ch);
                    }
                    else
                    {
                        String key = "";
                        if ((con.LocalFullPath != null) &&
                            (con.LocalFullPath.Length > 0))
                        {
                            key = con.LocalFullPath;
                        }
                        else
                        {
                            key = con.ServerFullPath;
                        }

//						Debug.PrintLine("Key = {0}", key);

                        if (conflictTable.ContainsKey(key))
                        {
//							Debug.PrintLine("Found key, adding to holder");
                            ConflictHolder ch =
                                (ConflictHolder)conflictTable[key];
                            ch.AddNameConflict(con);
                        }
                        else
                        {
//							Debug.PrintLine("No key, New holder");
                            ConflictHolder ch = new ConflictHolder(con, ifolder.UnManagedPath);
                            if (con.LocalFullPath != null)
                            {
                                ConflictTreeStore.AppendValues(ch);
                            }
                            conflictTable.Add(key, ch);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Debug.PrintLine(ex.Message);
            }
        }