Exemplo n.º 1
0
        void Now_Registr(string autor)
        {
            _Visibility_off();
            Login    = "";
            Password = "";

            if (is_ok)
            {
                Indecs MainWindows = new Indecs();

                IndecsViewModel viewModelIndex = new IndecsViewModel(autor);



                MainWindows.DataContext = viewModelIndex;

                MainWindows.ShowDialog();
                viewModelIndex.Save();
            }
            else if (is_no)
            {
            }
            else if (is_none_user)
            {
                Registration view_registration = new Registration();

                RegistrationViewModel View_model_reg = new RegistrationViewModel();

                if (View_model_reg._OK == null)
                {
                    View_model_reg._OK = new Action(view_registration.Ok);
                }

                view_registration.DataContext = View_model_reg;

                view_registration.ShowDialog();
            }
            my_users.Load("user");

            _Visibility_on();
        }
Exemplo n.º 2
0
 public RegistrationViewModel()
 {
     my_users = new СontainerUser();
     my_users.SetSerializer(new XMLSerializer());
     my_users.Load("user");
 }