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);
        }
コード例 #2
0
ファイル: RegisteredUser.cs プロジェクト: formist/LinkMe
 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);
     }
 }
コード例 #3
0
 // 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!");
     }
 }
コード例 #4
0
        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))
                 ));
        }
コード例 #5
0
        /// <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);
            }
        }