Пример #1
0
 public MainWindow()
 {
     InitializeComponent();
     Closing        += OnWindowClosing;
     main_collection = new V2MainCollection();
     UpdateBindings();
 }
Пример #2
0
 private void NewMenuItemClicked(object sender, RoutedEventArgs e)
 {
     if (main_collection != null)
     {
         AlertIfMofified();
     }
     main_collection = new V2MainCollection();
     UpdateBindings();
 }
Пример #3
0
 private void NewCommandHandler(object sender, ExecutedRoutedEventArgs e)
 {
     if (main_collection != null)
     {
         AlertIfMofified();
     }
     main_collection = new V2MainCollection();
     UpdateBindings();
 }
Пример #4
0
 public MainWindow()
 {
     InitializeComponent();
     Closing             += OnWindowClosing;
     main_collection      = new V2MainCollection();
     dataitem             = new DataItemClass();
     this.PreviewKeyDown += new KeyEventHandler(HandleEsc);
     //FrameworkCompatibilityPreferences.KeepTextBoxDisplaySynchronizedWithTextProperty = false;
     UpdateBindings();
 }
Пример #5
0
        static void Main(string[] args)
        {
            //1
            Grid1D       x         = new Grid1D(1, 3);
            Grid1D       y         = new Grid1D(1, 3);
            V2DataOnGrid Mag_Field = new V2DataOnGrid("Mag_Field", 100, x, y);

            Mag_Field.initRandom(0, 100);
            Console.WriteLine(Mag_Field.ToLongString());
            //1.1
            V2DataCollection collection = (V2DataCollection)Mag_Field;

            Console.WriteLine(collection.ToLongString());
            //2
            V2MainCollection mainCollection = new V2MainCollection();

            mainCollection.AddDefaults();
            Console.WriteLine(mainCollection.ToString());
            //3
            Complex[] e;
            int       eps   = 10;
            int       count = 1;

            foreach (V2Data item in mainCollection)
            {
                Console.WriteLine("item " + count++.ToString());
                item.ToLongString();
                e = item.NearAverage(eps);
                Console.WriteLine($"average eps = { ++eps }");
                for (int i = 0; i < e.Length; i++)
                {
                    Console.WriteLine(e[i].ToString());
                }
            }
            Console.WriteLine("=====\n");
            mainCollection.Remove("Data", 123);
            Console.WriteLine(mainCollection.ToString());
        }