Exemplo n.º 1
0
        public DataManipulation(string token, DataManipulator dataManipulator)
        {
            InitializeComponent();
            this.token           = token;
            this.dataManipulator = dataManipulator;
            listOfTables         = new List <Table>();

            foreach (var tableName in tableNames)
            {
                Table table = dataManipulator.GetTable(token, tableName);
                if (table != null)
                {
                    AddTableTab(table);
                    listOfTables.Add(table);
                }
            }
        }
Exemplo n.º 2
0
        private void LogInButtonClick(object sender, RoutedEventArgs e)
        {
            string          login    = textBoxLogin.Text;
            string          password = textBoxPass.Password;
            SslTcpClient    c        = new SslTcpClient();
            DataManipulator data     = new DataManipulator(c);
            string          token    = data.LogIn(login, password);

            if (token.CompareTo("") != 0)
            {
                DataManipulation win2 = new DataManipulation(token, data);
                win2.Show();
                this.Close();
            }
            else
            {
                MessageBox.Show("Credentials incorrect");
            }
        }