コード例 #1
0
 /// <summary>
 /// Construct a default B52WeaponLoader object
 /// </summary>
 public B52WeaponLoader()
 {
     InitializeComponent();
     b52 = new B52();
     WeightLabel.Content = b52.CalcWeight();
     FuelLabel.Content   = b52.Fuel;
 }
コード例 #2
0
        /// <summary>
        /// Open and read data into application
        /// </summary>
        private void OpenMenuItem_Click(object sender, RoutedEventArgs e)
        {
            Microsoft.Win32.OpenFileDialog openFileDialog = new OpenFileDialog();
            openFileDialog.Title      = "Open loading data from file";
            openFileDialog.DefaultExt = ".b52";
            openFileDialog.Filter     = "B52 Config |*.b52";
            if (openFileDialog.ShowDialog() == true && openFileDialog.FileName != "")
            {
                b52 = b52.ReadFromFile(openFileDialog.FileName);
            }

            IsReady();
            WeightLabel.Content = b52.CalcWeight();
            FuelLabel.Content   = b52.Fuel;
        }