Example #1
0
 private void FireOnHistoryRecorded(IFavorite favorite)
 {
     if (this.HistoryRecorded != null)
     {
         var args = new HistoryRecordedEventArgs(favorite);
         this.HistoryRecorded(args);
     }
 }
Example #2
0
        private void InsertRecordedNode(GroupTreeNode todayGroup, HistoryRecordedEventArgs args)
        {
            var favorite = args.Favorite;

            if (favorite != null) // shouldnt happen, because the favorite was actualy processed
            {
                var nodes = new TreeListNodes(todayGroup.Nodes, this.toolTipBuilder, this.favoriteIcons);
                nodes.InsertFavorite(favorite);
            }
        }
Example #3
0
 /// <summary>
 ///     add new history item in todays list and/or perform full refresh,
 ///     if day has changed since last refresh
 /// </summary>
 private void OnHistoryRecorded(ConnectionHistory sender, HistoryRecordedEventArgs args)
 {
     if (this.IsDayGone())
     {
         this.RefreshAllExpanded();
     }
     else
     {
         this.InsertRecordedNode(args);
     }
 }
Example #4
0
 /// <summary>
 /// add new history item in todays list and/or perform full refresh,
 /// if day has changed since last refresh
 /// </summary>
 private void HistoryRecorded(HistoryRecordedEventArgs args)
 {
     if (IsDayGone())
     {
         RefreshAllExpanded();
     }
     else
     {
         this.InsertRecordedNode(args);
     }
 }
Example #5
0
        private static void InsertRecordedNode(TagTreeNode todayGroup, HistoryRecordedEventArgs args)
        {
            FavoriteConfigurationElement favorite = Settings.GetOneFavorite(args.ConnectionName, false);

            // shouldn't happen, because the favorite was actualy processed
            if (favorite != null)
            {
                int insertIndex = TreeListLoader.FindFavoriteNodeInsertIndex(todayGroup.Nodes, favorite);
                FavoriteTreeNode favoriteNode = new FavoriteTreeNode(favorite);
                todayGroup.Nodes.Insert(insertIndex, favoriteNode);
            }
        }
Example #6
0
        private void InsertRecordedNode(HistoryRecordedEventArgs args)
        {
            TagTreeNode todayGroup = this.Nodes[HistoryByFavorite.TODAY] as TagTreeNode;

            if (todayGroup.NotLoadedYet)
            {
                return;
            }

            if (!todayGroup.ContainsFavoriteNode(args.ConnectionName))
            {
                InsertRecordedNode(todayGroup, args);
            }
        }
Example #7
0
        private void InsertRecordedNode(HistoryRecordedEventArgs args)
        {
            var todayGroup = this.Nodes[HistoryIntervals.TODAY] as GroupTreeNode;

            if (todayGroup.NotLoadedYet)
            {
                return;
            }

            if (!todayGroup.ContainsFavoriteNode(args.Favorite))
            {
                InsertRecordedNode(todayGroup, args);
            }
        }
 private void ConnectionHistory_OnHistoryRecorded(HistoryRecordedEventArgs args)
 {
     this.historyRecordedCount++;
 }