コード例 #1
0
        private void Login(object obj)
        {
            var manager = new AlertsManager();

            try
            {
                Database.Instance.Connect();
                var gateway = new UsersGateway();

                if (gateway.IsValid(_nick, _password, Database.Instance))
                {
                    var user = new User(_nick);
                    OnUserLogged(user);
                    Visible = false;
                }
                else
                {
                    manager.Show("Niepoprawna nazwa użytkownika lub hasło.", Alerts.Warning);
                }
            }
            catch (Exception)
            {
                manager.Show("Problem z połączeniem z internetem.", Alerts.Warning);
            }
        }
コード例 #2
0
        /* ******************
         * Send tab actions:
         * ******************
         */
        private void Send(object obj)
        {
            _user.Send(CategoryName);
            var manager = new AlertsManager();

            manager.Show("Wysłano", Alerts.Success);
        }
コード例 #3
0
        /* ***********************
         * My categories actions:
         * ***********************
         */
        private void Load(object obj)
        {
            _user.LoadCardsDB(obj as string);
            FlierKey = _user.Cards[0][0];
            var manager = new AlertsManager();

            manager.Show("Załadowano pomyślnie", Alerts.Success);
        }