예제 #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();
        }