Пример #1
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);
 }
Пример #2
0
        private void FireOnHistoryRecorded(string favoriteName)
        {
            HistoryRecordedEventArgs args = new HistoryRecordedEventArgs {
                ConnectionName = favoriteName
            };

            if (this.OnHistoryRecorded != null)
            {
                this.OnHistoryRecorded(this, args);
            }
        }
Пример #3
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);
        }
Пример #4
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);
            }
        }
Пример #5
0
 private void FireOnHistoryRecorded(string favoriteName)
 {
     HistoryRecordedEventArgs args = new HistoryRecordedEventArgs {ConnectionName = favoriteName};
     if (this.OnHistoryRecorded != null)
     {
         this.OnHistoryRecorded(this, args);
     }
 }