예제 #1
0
 public void Reset()
 {
     this.m_lines.Clear();
     this._bitrateGraphCanvas.IfNotNull <Canvas>((Canvas i) => i.Children.Clear());
     this.m_currentBitrateGraph  = new BitrateGraphControl.BitrateGraph(new SolidColorBrush(Colors.Red));
     this.m_highestPlayableGraph = new BitrateGraphControl.BitrateGraph(new SolidColorBrush(Colors.Green));
 }
예제 #2
0
 private void RepaintGraph(BitrateGraphControl.BitrateGraph graph, ulong bitrate)
 {
     if (graph.CurrentLine != null)
     {
         if (graph.LastBitrate != bitrate)
         {
             Line line = this.CreateGraphLine(graph.CurrentLine.X2, this.ComputeBitrateGraphValue(bitrate), graph.CurrentLine.X2, this.ComputeBitrateGraphValue(bitrate), graph.Color);
             this._bitrateGraphCanvas.Children.Add(line);
             Line line1 = this.CreateGraphLine(graph.CurrentLine.X2, graph.CurrentLine.Y1, graph.CurrentLine.X2, line.Y1, graph.Color);
             this._bitrateGraphCanvas.Children.Add(line1);
             graph.CurrentLine = line;
         }
         else if (graph.CurrentLine.X2 >= 500)
         {
             foreach (Line mLine in this.m_lines)
             {
                 if ((mLine == null ? false : mLine.Visibility == Visibility.Visible))
                 {
                     if (mLine.X1 > 60)
                     {
                         Line x1 = mLine;
                         x1.X1 = x1.X1 - 1;
                     }
                     if (mLine.X2 <= 60)
                     {
                         mLine.Visibility = Visibility.Collapsed;
                     }
                     else
                     {
                         Line x2 = mLine;
                         x2.X2 = x2.X2 - 1;
                     }
                 }
             }
             Line currentLine = graph.CurrentLine;
             currentLine.X2 = currentLine.X2 + 1;
         }
         else
         {
             Line currentLine1 = graph.CurrentLine;
             currentLine1.X2 = currentLine1.X2 + 1;
         }
         graph.LastBitrate = bitrate;
     }
     else
     {
         graph.LastBitrate = bitrate;
         graph.CurrentLine = this.CreateGraphLine(60, this.ComputeBitrateGraphValue(bitrate), 60, this.ComputeBitrateGraphValue(bitrate), graph.Color);
         this._bitrateGraphCanvas.Children.Add(graph.CurrentLine);
     }
 }
 public void Reset()
 {
     this.m_lines.Clear();
     this._bitrateGraphCanvas.IfNotNull<Canvas>((Canvas i) => i.Children.Clear());
     this.m_currentBitrateGraph = new BitrateGraphControl.BitrateGraph(new SolidColorBrush(Colors.Red));
     this.m_highestPlayableGraph = new BitrateGraphControl.BitrateGraph(new SolidColorBrush(Colors.Green));
 }