示例#1
0
 public bool SetPlayerAvatarFrame(AvatarFrame frame)
 {
     if (!AvatarFrameList[frame])
     {
         return(false);
     }
     PlayerAvatarFrame = frame;
     return(true);
 }
示例#2
0
        /// <summary>
        /// Information for parameters at: <see cref="PlayerInfo"/>
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public async void CreatePlayerInfoTimer_Tick(object sender, EventArgs e)
        {
            ((Timer)sender).Enabled = false;
            ((Timer)sender).Dispose();
            //-----------------------------------------------
            PlayerName          = Username;                                  // 1
            PlayerLevel         = 0;                                         // 2
            PlayerLVLRanking    = 0;                                         // 3
            PlayerPowerRanking  = 0;                                         // 4
            PlayerGuildName     = NotSetString;                              // 5
            GuildPosition       = GuildPosition.NotJoined;                   // 6
            LastSeen            = ThereIsConstants.AppSettings.GlobalTiming; // 7
            PlayerPower         = new Unit(0);                               // 8
            PlayerIntro         = NotSetString;                              // 9
            PlayerAvatar        = Avatar.GetDefaultAvatar();                 // 10
            PlayerAvatarFrame   = AvatarFrame.GetDefaultAvatarFrame();       // 11
            PlayerVIPlvl        = 0;                                         // 12
            PlayerCurrentExp    = Unit.GetBasicUnit();                       // 13
            PlayerTotalExp      = Unit.GetBasicUnit();                       // 14
            PlayerCurrentVIPExp = Unit.GetBasicUnit();                       // 15
            ThePlayerElement    = PlayerElement.NotSet;                      // 16
            PlayerKingdom       = SAO_Kingdoms.NotSet;                       // 17
            SocialPosition      = SocialPosition.GetSocialPosition();        // 18
            //-----------------------------------------------
            var targetFile = Username + FileEndName;
            await ThereIsServer.Actions.CreateFile(ThereIsServer.ServersInfo.MyServers[0],
                                                   targetFile,
                                                   new DataBaseCreation("Testing for Creating",
                                                                        QString.Parse(PlayerInfoGetForServer())));

            //------------------------------------------------------
            StrongString myString = string.Empty;

#pragma warning disable IDE0059
            SecuredMe Hi = new SecuredMe(ref myString);
#pragma warning restore IDE0059
            await ThereIsServer.Actions.CreateFile(ThereIsServer.ServersInfo.MyServers[0],
                                                   Username + ThereIsServer.ServersInfo.EndCheckingFileName,
                                                   new DataBaseCreation("ReCreatedBySAO", QString.Parse(myString)));

            //------------------------------------------------------



            ((CreateProfileSandBox)ThereIsConstants.Forming.TheMainForm.ShowingSandBox).IsCreatingEnded1 = true;
            IsWaitingForSecuredWorking = true;

#pragma warning disable IDE0059
            SecuredMe MeSecured = new SecuredMe(true, Username, Password, this);
#pragma warning restore IDE0059
            GC.Collect();
        }
示例#3
0
 /// <summary>
 /// You can't use this directly,
 /// please use <see cref="GetPlayerInfo(string, bool)"/>
 /// instead.
 /// </summary>
 /// <param name="playerName"></param>
 private PlayerInfo(StrongString playerName)
 {
     PlayerName = playerName;
     if (PlayerName == ThereIsConstants.Path.NotSet)
     {
         IsEmpty           = true;
         PlayerAvatar      = Avatar.GetDefaultAvatar();
         PlayerAvatarFrame = AvatarFrame.GetDefaultAvatarFrame();
     }
     else
     {
         IsEmpty = false;
     }
 }
示例#4
0
        /// <summary>
        /// return the avatar Image of the player
        /// by the format.
        /// if the format was not described, this
        /// method will return null,
        /// so be carefull.
        /// </summary>
        /// <param name="format">
        /// The format of the image of this avatar.
        /// <code>---------------------</code>
        /// NOTICE: by Avatar format, I don't mean
        /// Image format(Like png or jpg or ...),
        /// I mean the format of the avatar itself that you want to
        /// get the image of it,
        /// for example <see cref="AvatarFormat.Format01"/>
        /// should be used in <see cref="GameControls.ThroneLabel"/>
        /// for getting the Avatar of the royal memebers.
        /// </param>
        /// <returns></returns>
        public Image GetImage(AvatarFormat format, AvatarFrame frame = null)
        {
            Image myImage = null;

            switch (format)
            {
            case AvatarFormat.Format01:
            case AvatarFormat.Format02:
            case AvatarFormat.Format03:
                myImage = Image.FromFile(ThereIsConstants.Path.Datas_Path +
                                         ThereIsConstants.Path.DoubleSlash +
                                         MyRes.GetString(AvatarFullName));
                break;

            default:
                // ?:|
                break;
            }
            return(myImage);
        }
示例#5
0
 private void SetParams(StrongString serverValue)
 {
     StrongString[] myStrings = serverValue.Split(CharSeparater);
     PlayerName          = myStrings[0];                                     // 1
     PlayerLevel         = myStrings[1].ToUInt16();                          // 2
     PlayerLVLRanking    = myStrings[2].ToUInt16();                          // 3
     PlayerPowerRanking  = myStrings[3].ToUInt16();                          // 4
     PlayerGuildName     = myStrings[4];                                     // 5
     GuildPosition       = (GuildPosition)myStrings[5].ToUInt16();           // 6
     LastSeen            = DateProvider.Parse(myStrings[6]);                 // 7
     PlayerPower         = Unit.ConvertToUnit(myStrings[7]);                 // 8
     PlayerIntro         = myStrings[8];                                     // 9
     PlayerAvatar        = Avatar.ConvertToAvatar(myStrings[9]);             // 10
     PlayerAvatarFrame   = AvatarFrame.ParseToAvatarFrame(myStrings[10]);    // 11
     PlayerVIPlvl        = myStrings[11].ToUInt16();                         // 12
     PlayerCurrentExp    = Unit.ConvertToUnit(myStrings[12]);                // 13
     PlayerTotalExp      = Unit.ConvertToUnit(myStrings[13]);                // 14
     PlayerCurrentVIPExp = Unit.ConvertToUnit(myStrings[14]);                // 15
     ThePlayerElement    = (PlayerElement)myStrings[15].ToUInt16();          // 16
     PlayerKingdom       = (SAO_Kingdoms)myStrings[16].ToInt32();            // 17
     SocialPosition      = SocialPosition.GetSocialPosition(myStrings[17]);  // 18
 }
示例#6
0
 public bool AddAvatarFrame(StrongString frameString)
 {
     return(AddAvatarFrame(AvatarFrame.ParseToAvatarFrame(frameString)));
 }
示例#7
0
 public bool AddAvatarFrame(AvatarFrame frame)
 {
     AvatarFrameList.AddAvatarFrame(frame);
     return(true);
 }
示例#8
0
 public bool SetPlayerAvatarFrame(StrongString frameString)
 {
     return(SetPlayerAvatarFrame(AvatarFrame.ParseToAvatarFrame(frameString)));
 }