コード例 #1
0
        private void Add_Default_V4DataCollection_Click(object sender, RoutedEventArgs e)
        {
            V4DataCollection item = new V4DataCollection("random V4DC", 9d);

            item.InitRandom(5, 4, 4, 0, 9);
            V4MC.Add(item);
        }
コード例 #2
0
        public void AddCustom()
        {
            V4DataCollection item = new V4DataCollection(Info, 0.9d);

            item.InitRandom(NumOfElements, 0.1f, 1.9f, MinValue, MaxValue);
            v4mc.Add(item);
            OnPropertyChanged("Info");
        }
コード例 #3
0
        public void AddCustom()
        {
            float            freq = 2;
            V4DataCollection item = new V4DataCollection(info, freq);

            item.InitRandom(num, 5, 5, minValue, maxValue);
            V4Item.Add(item);
            OnPropertyChanged("info");
        }
コード例 #4
0
        public void Adding()
        {
            Random           rnd       = new Random();
            string           info      = Name;
            double           meas_info = MInfo;
            V4DataCollection data      = new V4DataCollection(info, meas_info);

            data.InitRandom(count, MinValue, MaxValue, (double)MinValue, (double)MaxValue);
            MainColl.Add(data);
        }
コード例 #5
0
 private void Item_DefaultColl_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var rand = new Random();
         V4DataCollection coll = new V4DataCollection("def_col", 12.3);
         coll.InitRandom(4, (float)2.0, (float)2.0, 1.0, 1.0);
         MainColl.Add(coll);
     }
     catch (Exception ex)
     {
         MessageBox.Show("Item_DefaultColl_Click \n" + ex.Message);
     }
 }
コード例 #6
0
 private void Add_Element_from_File_Click(object sender, RoutedEventArgs e)
 {
     Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
     try
     {
         if (dlg.ShowDialog() == true)
         {
             string           filename = dlg.FileName;
             V4DataCollection item     = new V4DataCollection(filename);
             V4MC.Add(item);
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(exception.Message);
     }
 }
コード例 #7
0
        private void Item_AddFromFile_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog dialog = new OpenFileDialog();

            dialog.InitialDirectory = Directory.GetCurrentDirectory();
            dialog.RestoreDirectory = true;
            dialog.Filter           = "dat files (*.dat)|*.dat|All files (*.*)|*.*";
            if (dialog.ShowDialog() == true)
            {
                try
                {
                    V4DataCollection coll = new V4DataCollection(dialog.FileName);
                    MainColl.Add(coll);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }