コード例 #1
0
 /// <summary>
 /// Constructor</summary>
 /// <param name="uri">File URI</param>
 /// <param name="status">Source control status</param>
 /// <param name="headRevision">Head revision number</param>
 /// <param name="revision">Revision number</param>
 /// <param name="isLocked">True iff locked</param>
 /// <param name="otherUsers">Other file users</param>
 public SourceControlFileInfo(Uri uri, SourceControlStatus status,
     int headRevision, int revision, bool isLocked, IEnumerable<string> otherUsers)
 {
     Uri = uri;
     Status = status;
     HeadRevision = headRevision;
     Revision = revision;
     IsLocked = isLocked;
     OtherUsers = otherUsers;
 }
コード例 #2
0
 /// <summary>
 /// Constructor</summary>
 /// <param name="uri">URI for source controlled resource</param>
 /// <param name="status">Source control status of resource</param>
 public SourceControlEventArgs(Uri uri, SourceControlStatus status)
 {
     Uri = uri;
     Status = status;
 }
コード例 #3
0
 /// <summary>
 /// Gets source control staus icon
 /// </summary>
 /// <param name="uri">file uri</param>
 /// <param name="status">source control status</param>
 /// <returns></returns>
 public virtual Image GetSourceControlStatusIcon(Uri uri, SourceControlStatus status)
 {
     return null;
 }
コード例 #4
0
 /// <summary>
 /// Constructor</summary>
 /// <param name="uri">File URI</param>
 /// <param name="status">Source control status</param>
 public SourceControlFileInfo(Uri uri, SourceControlStatus status)
 {
     Uri = uri;
     Status = status;
     OtherUsers = EmptyEnumerable<string>.Instance;
 }
コード例 #5
0
ファイル: PerforceService.cs プロジェクト: sbambach/ATF
        /// <summary>
        /// Gets source control status icon</summary>
        /// <param name="uri">File URI</param>
        /// <param name="status">Source control status</param>
        /// <returns>Source control status icon image</returns>
        public override Image GetSourceControlStatusIcon(Uri uri, SourceControlStatus status)
        {
            Image result = null;
            switch (status)
            {
                case SourceControlStatus.Added:
                    result = m_statusImages[P4VFileAdd];
                    break;
                case SourceControlStatus.CheckedIn:
                    {
                        if (IsSynched(uri))
                        {
                            FileInfo info = GetInfo(uri);
                            if (string.IsNullOrEmpty(info.OtherLock))
                                result = m_statusImages[P4VFileSync];
                            else
                                result = m_statusImages[P4VFileLockOther];
                        }
                        else
                            result = m_statusImages[P4VFileNotsync];

                        break;
                    }
                case SourceControlStatus.CheckedOut:
                    {
                        FileInfo info = GetInfo(uri);
                        if (info.IsLocked)
                            result = m_statusImages[P4VFileLock];
                        else
                            result = m_statusImages[P4VFileEditHead];
                        break;
                    }
                case SourceControlStatus.NotControlled:
                    result = m_statusImages[P4VFileWs];
                    break;
            }

            return result;
        }