Esempio n. 1
0
 public SVNLogEntry(SVNMonitor.Entities.Source source, long revision, string author, DateTime date, string message)
 {
     Source = source;
     Revision = revision;
     Author = author;
     CommitedOn = date;
     Message = message;
 }
Esempio n. 2
0
 public static DialogResult Recommend(SVNMonitor.Entities.Source source, long revision)
 {
     RecommendWizard wizard = new RecommendWizard
     {
         Source = source,
         Revision = revision,
         CommitMessage = ApplicationSettingsManager.Settings.RecommendationMessage.Replace("${REVISION}", revision.ToString())
     };
     return wizard.ShowDialog();
 }
Esempio n. 3
0
 internal static SVNInfo Create(SVNMonitor.Entities.Source source)
 {
     SVNInfo info = null;
     try
     {
         info = SVNFactory.GetInfo(source);
     }
     catch (Exception ex)
     {
         ErrorHandler.Append(Strings.ErrorGettingInfoOfSource_FORMAT.FormatWith(new object[]
         {
             source.Name
         }), source, ex);
     }
     return info;
 }
 public AssociatedUserActionAttribute(SVNMonitor.Helpers.UserAction userAction)
 {
     UserAction = userAction;
 }
Esempio n. 5
0
 public static long Log(SVNMonitor.EventLogEntryType type, string message, object sourceObject, Exception ex)
 {
     if ((ex != null) && KnownIssuesHelper.IsKnownIssue(ex))
     {
         return 0L;
     }
     Logger.Log.InfoFormat("Event-Log: Type={0}, Message={1}, HasException={2}", type, message, ex != null);
     SVNMonitor.EventLogEntry tempLocal0 = new SVNMonitor.EventLogEntry
     {
         DateTime = DateTime.Now,
         Type = type,
         Message = message,
         SourceObject = sourceObject,
         Exception = ex
     };
     SVNMonitor.EventLogEntry entry = tempLocal0;
     List.Add(entry);
     OnAfterLog();
     return entry.ID;
 }
Esempio n. 6
0
 public static long Log(SVNMonitor.EventLogEntryType type, string message, object sourceObject)
 {
     return Log(type, message, sourceObject, null);
 }
Esempio n. 7
0
        internal static Image GetImageByEventType(SVNMonitor.EventLogEntryType type)
        {
            Image image = Images.information;
            switch (type)
            {
                case SVNMonitor.EventLogEntryType.Error:
                    return Images.error;

                case SVNMonitor.EventLogEntryType.Info:
                    return Images.information;

                case SVNMonitor.EventLogEntryType.Warning:
                    return Images.warning;

                case SVNMonitor.EventLogEntryType.Monitor:
                    return Images.satellite_dish;

                case SVNMonitor.EventLogEntryType.CheckingUpdates:
                    return Images.data_refresh;

                case SVNMonitor.EventLogEntryType.AvailableUpdates:
                    return Images.arrow_down_green;

                case SVNMonitor.EventLogEntryType.System:
                    return Images.SVNMonitor_04;

                case SVNMonitor.EventLogEntryType.Source:
                    return Images.data;

                case SVNMonitor.EventLogEntryType.Conflict:
                    return Images.warning;

                case SVNMonitor.EventLogEntryType.Recommended:
                    return Images.star_yellow;
            }
            return image;
        }
Esempio n. 8
0
 public static KeyInfo GetKeyInfo(ModifierKey modifier, SVNMonitor.Helpers.Key key)
 {
     if ((modifier == ModifierKey.None) || (key == SVNMonitor.Helpers.Key.None))
     {
         return None;
     }
     return new KeyInfo
     {
         Modifier = modifier,
         Key = key
     };
 }
Esempio n. 9
0
 private bool IgnoreMonitor(SVNMonitor.Entities.Monitor monitor)
 {
     return ((monitor == null) || (!monitor.Enabled || monitor.IsInEditMode));
 }
Esempio n. 10
0
 private string GetMonitorStatusString(SVNMonitor.Entities.Monitor monitor)
 {
     if (monitor != null)
     {
         string disabled = !monitor.Enabled ? "v" : "x";
         string edit = monitor.IsInEditMode ? "v" : "x";
         return string.Format("Disabled[{0}] Edit[{1}]", disabled, edit);
     }
     return "Monitor is NULL";
 }
Esempio n. 11
0
 private void CheckMonitor(SVNMonitor.Entities.Monitor monitor, List<SVNLogEntry> updates)
 {
     try
     {
         if (IgnoreMonitor(monitor))
         {
             string status = GetMonitorStatusString(monitor);
             Logger.Log.DebugFormat("Ignoring monitor '{0}'", monitor.Name);
             Logger.Log.DebugFormat("Status: {0}", status);
         }
         else
         {
             List<SVNLogEntry> matchingLogEntries = updates;
             List<SVNPath> matchingPaths = new List<SVNPath>();
             GridEXFilterCondition condition = monitor.FilterCondition;
             int matchesCount = matchingLogEntries.Count;
             if (condition != null)
             {
                 matchesCount = GetMatches(condition, ref matchingLogEntries, matchingPaths);
             }
             if (matchesCount > 0)
             {
                 monitor.Trigger(matchingLogEntries, matchingPaths);
             }
         }
     }
     catch (Exception ex)
     {
         ErrorHandler.HandleEntityException(monitor, ex);
     }
 }
 public SourcePropertiesDialog(SVNMonitor.Entities.Source source)
     : this()
 {
     Source = source;
 }
 public static DialogResult ShowDialog(SVNMonitor.Entities.Source source)
 {
     SourcePropertiesDialog dialog = new SourcePropertiesDialog(source);
     return dialog.ShowDialog();
 }
 public static DialogResult ShowDialog(SVNMonitor.Entities.Monitor monitor)
 {
     MonitorPropertiesDialog dialog = new MonitorPropertiesDialog(monitor);
     return dialog.ShowDialog();
 }
 public MonitorPropertiesDialog(SVNMonitor.Entities.Monitor monitor)
     : this()
 {
     Monitor = monitor;
     filterEditor1.SourceControl = Updater.Instance.UpdatesGrid;
 }
Esempio n. 16
0
 internal static SVNStatus Create(SVNMonitor.Entities.Source source, StatusCreationOption option)
 {
     try
     {
         bool getRemote = option == StatusCreationOption.LocalAndRemote;
         return SVNFactory.GetStatus(source, getRemote);
     }
     catch (Exception ex)
     {
         ErrorHandler.HandleEntityException(source, ex);
     }
     return Empty();
 }