Example #1
0
        public void Subgroup_IsNot_Over_2()
        {
            Settings set = new Settings();

            int sub = set.Subgroup;

            if (sub > 2)
                Assert.Fail("Error");
        }
Example #2
0
 public void ChangeSettings(Settings set)
 {
     Encoding enc = Encoding.GetEncoding(1251);
     try
     {
         string[] settings = new string[] { set.Subgroup.ToString(), set.Minor, set.Address, set.TimeToReady, set.Transport };
         File.WriteAllLines(@"..\\..\\Settings.txt", settings, enc);
     }
     catch { MessageBox.Show("Programm cannot find a file with settings", "Error", MessageBoxButton.OK, MessageBoxImage.Error); }
 }