예제 #1
0
 /// <summary>
 /// Grid click event
 /// </summary>
 /// <param name="sender">Grid row object details</param>
 /// <param name="e">Event Arguments</param>
 /// <returns>Select function name on List box</returns>
 /// 2019/07/13, Vinoth N,  Initial Version
 private void DataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     try
     {
         int selected_index = counterGrid.SelectedIndex;
         if (counterGrid.SelectedItem is CounterModel item)
         {
             if (item.Error == true)
             {
                 int errorIndex = ErrorCollection.ToList().FindIndex(a => a.Contains("<<<" + item.FunctionName + ">>>"));
                 //l_PODetails.SelectedIndex = errorIndex;
                 //l_PODetails.ScrollIntoView(l_PODetails.SelectedItem);
             }
             else
             {
                 //l_PODetails.UnselectAll();
             }
             int detailIndex = DetailCollection.ToList().FindIndex(a => a.Contains("<<<" + item.FunctionName + ">>>"));
             l_FunctionDetail.SelectedIndex = detailIndex;
             l_FunctionDetail.ScrollIntoView(l_FunctionDetail.SelectedItem);
         }
     }
     catch (Exception ex)
     {
         LogModel.Log(ex.Message);
     }
 }
예제 #2
0
        public void CanConvert_ToList()
        {
            DetailCollection collection = new DetailCollection();

            collection.AddRange(new[] { 1, 2, 3 });

            IList <int> list = collection.ToList <int>();

            Assert.That(list.Count, Is.EqualTo(3));
            Assert.That(list[0], Is.EqualTo(1));
            Assert.That(list[2], Is.EqualTo(3));
        }
예제 #3
0
		public void CanConvert_ToList()
		{
			DetailCollection collection = new DetailCollection();
			collection.AddRange(new[] { 1, 2, 3 });

			IList<int> list = collection.ToList<int>();

			Assert.That(list.Count, Is.EqualTo(3));
			Assert.That(list[0], Is.EqualTo(1));
			Assert.That(list[2], Is.EqualTo(3));
		}