예제 #1
0
        private void btnCfg_Click(object sender, EventArgs e)
        {
            int     val     = Config.Test(6);
            HCONFIG pConfig = Config.GetConfig();

            val = Config.GetChannelNum();

            float amp = Config.GetCrsAmplitude(pConfig);

            Config.SetCrsAmplitude(pConfig, 1.2f);
            amp = Config.GetCrsAmplitude(pConfig);

            float power = Config.GetLaserPower(pConfig, 0);

            Config.SetLaserPower(pConfig, 0, 55.0f);
            power = Config.GetLaserPower(pConfig, 0);

            val = Ats.Test(0);
            int num = Ats.Find();

            HATS pAts = Ats.Open();

            Ats.Close();

            Board_Info board_Info = new Board_Info();

            Ats.AtsGetBoardInfo(pAts, ref board_Info);
        }
예제 #2
0
        public TableAdjustment EditAts(LatticeData <Ats, AtsRow> latticeData, AtsRow atsRow)
        {
            Ats currentATS = null;

            if (atsRow.Id == 0)
            {
                currentATS = new Ats();
                _context.AtsStations.Add(currentATS);
            }
            else
            {
                currentATS = _context.AtsStations.FirstOrDefault(ats => ats.Id == atsRow.Id);
            }

            currentATS.CityAtsAttributesId          = atsRow.CityAtsAttributesId;
            currentATS.DepartmentalAtsAttributesId  = atsRow.DepartmentalAtsAttributesId;
            currentATS.InstitutionalAtsAttributesId = atsRow.InstitutionalAtsAttributesId;
            currentATS.AtsType = atsRow.AtsType;

            _context.SaveChanges();

            atsRow.Id = currentATS.Id;

            return(latticeData.Adjust(wrapper => wrapper
                                      .Update(atsRow)
//                .Message(LatticeMessage.AtsUser("success", "Editing", "Person saved!"))
                                      ));
        }
예제 #3
0
        public static IntegratorUser CreateTestIntegratorUser(this IIntegrationCommand integrationCommand, string loginId, string password, IntegratorPermissions permissions)
        {
            var system = new Ats {
                Name = loginId + " Integration System"
            };

            integrationCommand.CreateIntegrationSystem(system);

            var user = new IntegratorUser {
                LoginId = loginId, PasswordHash = HashToString(password), Permissions = permissions, IntegrationSystemId = system.Id
            };

            integrationCommand.CreateIntegratorUser(user);

            return(user);
        }
예제 #4
0
파일: WithType.cs 프로젝트: jnm2/corefx
 [ExcludeFromCodeCoverage] // Never used as a key.
 public override int GetHashCode()
 {
     Debug.Fail("If using this as a key, implement IEquatable<SymWithType>");
     return((Sym?.GetHashCode() ?? 0) + (Ats?.GetHashCode() ?? 0));
 }
 public override int GetHashCode()
 {
     return((Sym != null ? Sym.GetHashCode() : 0) +
            (Ats != null ? Ats.GetHashCode() : 0));
 }
예제 #6
0
 public override int GetHashCode()
 {
     return((Sym?.GetHashCode() ?? 0) + (Ats?.GetHashCode() ?? 0));
 }