コード例 #1
0
 public void Create(string userName)
 {
     Untappd = new Untappd(GetUntappdUserName(userName));
     InitializeUntappdEvent?.Invoke(Untappd);
     UpdateUntappdUserNameEvent?.Invoke(Untappd.UserName);
     ResetСhanges();
 }
コード例 #2
0
        public void UpdateUntappdUserName(string untappdUserName)
        {
            if (Untappd.UserName.Equals(untappdUserName))
            {
                return;
            }

            Untappd.SetUserName(GetUntappdUserName(untappdUserName));
            UpdateUntappdUserNameEvent?.Invoke(Untappd.UserName);
        }
コード例 #3
0
        public void Initialize(string filePath, string userName = null)
        {
            switch (FileHelper.GetExtensionWihtoutPoint(filePath))
            {
            case Extensions.CSV:
                InitializeToCSV(filePath, userName);
                break;

            case Extensions.UNTP:
                InitializeToUNTP(filePath);
                break;

            default:
                throw new ArgumentException(String.Format(Properties.Resources.ArgumentExceptionInitializeUntappd, filePath));
            }
            FilePath = filePath;
            InitializeUntappdEvent?.Invoke(Untappd);
            UpdateUntappdUserNameEvent?.Invoke(Untappd.UserName);
            ResetСhanges();
        }