Beispiel #1
0
        // This method raises the NewColor event
        private void RaiseCursorMovedEvent(IEnumerable <CurrentChartItem> items)
        {
            var eventArgs = new CursorMovedRoutedEventArgs(items);

            eventArgs.RoutedEvent = ChartHost.CursorMovedEvent;
            RaiseEvent(eventArgs);
        }
Beispiel #2
0
 private void volumn_CursorMoved(object sender, CursorMovedRoutedEventArgs e)
 {
     if (e != null && e.CurrentItems != null)
     {
         volumnOutput.Text = string.Join(",", e.CurrentItems.Select(item =>
         {
             if (item.Item != null)
             {
                 var realItem = item.Item as VolumnItem;
                 if (realItem != null)
                 {
                     return(string.Format("{0}|{1}", item.Id, item.Item));
                 }
             }
             return("null");
         }));
     }
 }
Beispiel #3
0
 private void price_CursorMoved(object sender, CursorMovedRoutedEventArgs e)
 {
     if (e != null && e.CurrentItems != null)
     {
         priceOutput.Text = string.Join(",", e.CurrentItems.Select(item =>
         {
             if (item.Item != null)
             {
                 var realItem = item.Item as StockItem;
                 if (realItem != null)
                 {
                     return(string.Format("{0}|{1}", item.Id, item.Item));
                 }
                 else
                 {
                     var mRealItem = item.Item as MultipleChartItem;
                     if (mRealItem == null)
                     {
                         if (ViewModel.IsTime)
                         {
                             return(string.Format("{0}|{1}|{2:F2}|{3:P2}", item.Id, item.Item.Date.ToString("hh:mm:ss"), item.Item.Value, item.Item.ValueChange));
                         }
                         else
                         {
                             return(string.Format("{0}|{1}", item.Id, item.Item));
                         }
                     }
                     else
                     {
                         return(string.Format("{0}|{1}", item.Id, item.Item));
                     }
                 }
             }
             else
             {
                 return("null");
             }
         }));
     }
 }