private static object GetState() { #if UNITY_5_0 return(StateProperty.GetValue(AnimationWindow, null)); #else return(StateField.GetValue(AnimEditor)); #endif }
public void InputContactInformation(String address, String city, String stateCode, String zip, String contactPhone, String emailAddress) { AddressField.SendKeys(address); CityField.SendKeys(city); StateField.SendKeys(stateCode); ZipField.SendKeys(zip); ContactPhoneNumber.SendKeys(contactPhone); EmailField.SendKeys(emailAddress); if (IsElementDisplayed(ConfirmEmailField)) { ConfirmEmailField.SendKeys(emailAddress); } NextButton.Click(); }
public void FillForm(AutomationPracticeModel user) { FirstName.SendKeys(user.FirstName); LastName.SendKeys(user.LastName); Password.SendKeys(user.Password); Address.SendKeys(user.Address); City.SendKeys(user.City); CountryField.SendKeys(user.CountryField + Keys.Tab); StateField.SendKeys(user.CountryField + Keys.Tab); //CountryFieldd(user.CountryField).Click(); //StateFieldd(user.StateField).Click(); PostalCode.SendKeys(user.PostalCode); PhoneNumber.SendKeys(user.PhoneNumber); ScrollTo(RegisterButton).Click(); }
public void ApplyTraceData(StateField type, byte[] data) { if (type >= StateField.GPR0 && type <= StateField.GPR31) { gpr[type - StateField.GPR] = BitConverter.ToUInt32(data, 0); } else if (type >= StateField.FPR0 && type <= StateField.FPR31) { // TODO: Implement me } else if (type >= StateField.GQR0 && type <= StateField.GQR7) { // TODO: Implement me } else if (type == StateField.CR) { crf = BitConverter.ToUInt32(data, 0); } else if (type == StateField.XER) { // TODO: Implement me } else if (type == StateField.LR) { lr = BitConverter.ToUInt32(data, 0); } else if (type == StateField.CTR) { ctr = BitConverter.ToUInt32(data, 0); } else if (type == StateField.FPSCR) { // TODO: Implement me } else { Debug.Assert(false); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { BindCountry(); BindState(); // Edit check if (EditMode) // Someone requested edit this record { //True is use is editing himself, false if is edited by an admin selfEdit = (userName == PortalSettings.CurrentUser.Identity.Email); // Removed by Mario Endara <*****@*****.**> (2004/11/04) // if (PortalSecurity.IsInRoles("Admins") || selfEdit) if (PortalSecurity.HasEditPermissions(ModuleID) || PortalSecurity.HasAddPermissions(ModuleID) || selfEdit) { //We can edit // Hide RequiredPassword.Visible = false; RequiredConfirm.Visible = false; EditPasswordRow.Visible = true; SaveChangesBtn.Visible = true; RegisterBtn.Visible = false; // Obtain a single row of event information UsersDB accountSystem = new UsersDB(); RainbowUser memberUser = accountSystem.GetSingleUser(userName); try { originalUserID = memberUser.ProviderUserKey; NameField.Text = memberUser.Name; EmailField.Text = memberUser.Email; CompanyField.Text = memberUser.Company; AddressField.Text = memberUser.Address; ZipField.Text = memberUser.Zip; CityField.Text = memberUser.City; CountryField.ClearSelection(); if (CountryField.Items.FindByValue(memberUser.CountryID) != null) { CountryField.Items.FindByValue(memberUser.CountryID).Selected = true; } BindState(); StateField.ClearSelection(); if (StateField.Items.Count > 0 && StateField.Items.FindByValue(memberUser.StateID.ToString()) != null) { StateField.Items.FindByValue(memberUser.StateID.ToString()).Selected = true; } FaxField.Text = memberUser.Fax; PhoneField.Text = memberUser.Phone; SendNewsletter.Checked = memberUser.SendNewsletter; //stores original password for later check // originalPassword = memberUser.GetPassword(); NOT STILL SUPPORTED } catch (System.ArgumentNullException error) { // no existe el usuario; } } else { //We do not have rights to do it! PortalSecurity.AccessDeniedEdit(); } } else { BindState(); //No edit RequiredPassword.Visible = true; RequiredConfirm.Visible = true; EditPasswordRow.Visible = false; SaveChangesBtn.Visible = false; RegisterBtn.Visible = true; } string termsOfService = portalSettings.GetTermsOfService; //Verify if we have to show conditions if (termsOfService.Length != 0) { //Shows conditions FieldConditions.Text = termsOfService; ConditionsRow.Visible = true; } else { //Hides conditions ConditionsRow.Visible = false; } } }
/// <summary> /// This method will take a vessel and update all it's parts and proto based on a protovessel we received /// Protovessel --------------> Vessel & ProtoVessel /// This way we avoid having to unload and reload a vessel with it's terrible performance /// </summary> public static void UpdateVesselPartsFromProtoVessel(Vessel vessel, ProtoVessel protoVessel, IEnumerable <uint> vesselPartsId = null) { if (vessel == null || protoVessel == null || vessel.state == Vessel.State.DEAD) { return; } if (vessel.id != protoVessel.vesselID) { LunaLog.LogError($"Tried to update a vessel id {vessel.id} with a protovessel of vessel id {protoVessel.vesselID}"); return; } var vesselProtoPartIds = vesselPartsId ?? protoVessel.protoPartSnapshots.Select(p => p.flightID); //If vessel is UNLOADED it won't have parts so we must take them from the proto... var vesselPartsIds = vessel.loaded ? vessel.parts.Select(p => p.flightID) : vessel.protoVessel.protoPartSnapshots.Select(p => p.flightID); var hasMissingparts = vesselProtoPartIds.Except(vesselPartsIds).Any(); if (hasMissingparts || !VesselCommon.IsSpectating && (vessel.isEVA && vessel.situation != protoVessel.situation || !vessel.Landed && protoVessel.landed || !vessel.Splashed && protoVessel.splashed || vessel.situation != protoVessel.situation && HighLogic.LoadedScene == GameScenes.TRACKSTATION)) { //Reload the whole vessel if vessel lands/splashes as otherwise map view puts the vessel next to the other player. //Also reload the whole vesse if it's a EVA and situation changed or in track station.... //Better to reload if has missing parts as creating them dinamically is a PIA VesselLoader.ReloadVessel(protoVessel); return; } var hasCrewChanges = false; //Never do vessel.protoVessel = protoVessel; not even if the vessel is not loaded as when it gets loaded the parts are created in the active vessel //and not on the target vessel //Run trough all the vessel parts and protoparts. //Vessel.parts will be empty if vessel is unloaded. var protoPartsToRemove = new List <ProtoPartSnapshot>(); for (var i = 0; i < vessel.protoVessel.protoPartSnapshots.Count; i++) { var protoPartToUpdate = vessel.protoVessel.protoPartSnapshots[i]; var partSnapshot = VesselCommon.FindProtoPartInProtovessel(protoVessel, protoPartToUpdate.flightID); if (partSnapshot == null) //Part does not exist in the protovessel definition so kill it { protoPartsToRemove.Add(protoPartToUpdate); continue; } AdjustCrewMembersInProtoPart(protoPartToUpdate, partSnapshot); protoPartToUpdate.state = partSnapshot.state; UpdatePartModulesInProtoPart(protoPartToUpdate, partSnapshot); UpdateProtoVesselResources(protoPartToUpdate, partSnapshot); var part = protoPartToUpdate.partRef; if (part != null) //Part can be null if the vessel is unloaded!! { //Remove or add crew members in given part and detect if there have been any change hasCrewChanges |= AdjustCrewMembersInPart(part, partSnapshot); //Set part "state" field... Important for fairings for example... StateField?.SetValue(part, partSnapshot.state); part.ResumeState = part.State; UpdatePartModules(partSnapshot, part); UpdateVesselResources(partSnapshot, part); UpdatePartFairings(partSnapshot, part); } } //Now kill both parts and protoparts that don't exist for (var i = 0; i < protoPartsToRemove.Count; i++) { //Part can be null if the vessel is unloaded. In this case, no need to kill it as it's already gone from the game. if (protoPartsToRemove[i].partRef != null) { if (protoPartsToRemove[i].partRef.FindModuleImplementing <ModuleDecouple>() != null) { protoPartsToRemove[i].partRef.decouple(); } else { protoPartsToRemove[i].partRef.Die(); } } vessel.protoVessel.protoPartSnapshots.Remove(protoPartsToRemove[i]); } if (hasCrewChanges) { //We must always refresh the crew in every part of the vessel, even if we don't spectate vessel.RebuildCrewList(); //IF we are spectating we must fix the portraits of the kerbals if (FlightGlobals.ActiveVessel?.id == vessel.id) { //If you don't call spawn crew and you do a crew transfer the transfered crew won't appear in the portraits... Client.Singleton.StartCoroutine(CallbackUtil.DelayedCallback(0.25f, () => { FlightGlobals.ActiveVessel?.SpawnCrew(); })); //If you don't call this the kerbal portraits appear in black... Client.Singleton.StartCoroutine(CallbackUtil.DelayedCallback(0.5f, () => { KerbalPortraitGallery.Instance?.SetActivePortraitsForVessel(FlightGlobals.ActiveVessel); })); } } }
private static object GetState() { return(StateField.GetValue(AnimEditor)); }
public void InputState(String state) { StateField.SendKeys(state); }