public async Task <StorageFile> SaveUrlInfo() { StorageFile UrlInfo = null; Updating = true; if (webURL != null) { try { UrlInfo = await localStorageFolder.GetFileAsync("UrlInfo"); using (Stream file = await UrlInfo.OpenStreamForWriteAsync()) { using (StreamWriter write = new StreamWriter(file)) { write.WriteLine(webURL.OriginalString); write.WriteLine(IsActivated.ToString()); } } } catch { UrlInfo = await CreateUrlInfo(); } } Updating = false; return(UrlInfo); }
public override int GetHashCode() { unchecked { int result = (FirstName != null ? FirstName.GetHashCode() : 0); result = (result * 397) ^ (LastName != null ? LastName.GetHashCode() : 0); result = (result * 397) ^ IsEnabled.GetHashCode(); result = (result * 397) ^ IsActivated.GetHashCode(); return(result); } }
// Start is called before the first frame update void Start() { activationTarget = GetComponent <TimeRestrictor>(); if (activationTarget == null) { activationTarget = GetComponent <Platform>(); } if (activationTarget == null) { Debug.LogError("No platform found!"); } }
public bool Equals(DestinyTalentNode input) { if (input == null) { return(false); } return (( NodeIndex == input.NodeIndex || (NodeIndex.Equals(input.NodeIndex)) ) && ( NodeHash == input.NodeHash || (NodeHash.Equals(input.NodeHash)) ) && ( State == input.State || (State != null && State.Equals(input.State)) ) && ( IsActivated == input.IsActivated || (IsActivated != null && IsActivated.Equals(input.IsActivated)) ) && ( StepIndex == input.StepIndex || (StepIndex.Equals(input.StepIndex)) ) && ( MaterialsToUpgrade == input.MaterialsToUpgrade || (MaterialsToUpgrade != null && MaterialsToUpgrade.SequenceEqual(input.MaterialsToUpgrade)) ) && ( ActivationGridLevel == input.ActivationGridLevel || (ActivationGridLevel.Equals(input.ActivationGridLevel)) ) && ( ProgressPercent == input.ProgressPercent || (ProgressPercent.Equals(input.ProgressPercent)) ) && ( Hidden == input.Hidden || (Hidden != null && Hidden.Equals(input.Hidden)) ) && ( NodeStatsBlock == input.NodeStatsBlock || (NodeStatsBlock != null && NodeStatsBlock.Equals(input.NodeStatsBlock)) )); }
/// <summary> /// Saves the door definition /// </summary> /// <param name="writer">XML writer handle</param> /// <returns></returns> public virtual bool Save(XmlWriter writer) { try { if (writer == null) { return(false); } writer.WriteStartElement("actor"); writer.WriteAttributeString("isactivated", IsActivated.ToString()); writer.WriteAttributeString("isenabled", IsEnabled.ToString()); writer.WriteEndElement(); return(true); } catch (Exception e) { return(false); } }