public void ToChooseFlowchart()
        {
            ChooseFlowchartView chooseFlowchartView = new ChooseFlowchartView(data);

            view.Hide();
            chooseFlowchartView.Show();
        }
Пример #2
0
        public ChooseFlowchartPresenter(DataManagement data, ChooseFlowchartView view)
        {
            this.view = view;
            this.data = data;
            DataTable table = data.GetNamesAndLogins();

            view.SetFlowchartsTable(table);
        }
Пример #3
0
        public void Login(string login, string password)
        {
            if (login == "" ||
                password == "")
            {
                throw new Exception("Enter login and password");
            }
            if (data.IsUserExist(login, password))
            {
                data.SetLogin(login);

                ChooseFlowchartView chooseFlowchartView = new ChooseFlowchartView(data);
                ((EnterView)view).Hide();
                chooseFlowchartView.Show();
            }
            else
            {
                throw new Exception("Incorrect login or password");
            }
        }