コード例 #1
0
 private void UpdateTagsList()
 {
     LabelsCollection.Clear();
     foreach (string CurrentTag in _LabelsList)
     {
         LabelsCollection.Add(new StringObject {
             Value = CurrentTag
         });
     }
 }
コード例 #2
0
 /// <summary>
 /// If chart is running and no data received, last value is copied
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void _oneSecondTimer_Tick(object sender, EventArgs e)
 {
     if (SamplesCollection[0].Values.Count > 0)
     {
         SamplesCollection[0].Values.Add(SamplesCollection[0].Values[SamplesCollection[0].Values.Count - 1]);
     }
     else
     {
         SamplesCollection[0].Values.Add(0.0);
     }
     LabelsCollection.Add(DateTime.Now.ToString());
 }
コード例 #3
0
        /// <summary>
        /// Main point of collection data, all class from ISamples send dataReceived event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void _data_DataReceived(object sender, List <double> e)
        {
            _oneSecondTimer.Stop();

            var newSamples = new ObservableCollection <double>(e);

            foreach (var item in newSamples)
            {
                SamplesCollection[0].Values.Add(item);
                LabelsCollection.Add(DateTime.Now.ToString());
            }

            _oneSecondTimer.Start();
        }
コード例 #4
0
ファイル: Assembler.cs プロジェクト: sps014/8085-Simulator
        private static void ExtractLabel(ref string line, int number)
        {
            var match = Regex.Match(line, @"\b([\w]*)\s*\:");

            if (match.Success)
            {
                var gp = match.Groups[1].Value.ToUpper();
                line = line.Replace(match.Groups[0].Value, string.Empty);

                if (!LabelsCollection.ContainsKey(gp))
                {
                    LabelsCollection.Add(gp, number);
                }
            }
        }