Exemplo n.º 1
0
        /// <summary>
        /// click event for editing the playlist.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtmEdit_Click(object sender, RoutedEventArgs e)
        {
            ((ViewModel.PlayListVM)playListVM).SendParameters();
            Window editor = new PlayListEditor();

            WindowLocationSeter.changeWindow(editor);
            this.Close();
        }
Exemplo n.º 2
0
        /// <summary>
        /// click event for save the database and going back to the welcome window.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtmExit_Click(object sender, RoutedEventArgs e)
        {
            ((ViewModel.PlayListVM)playListVM).SaveAndExit();
            Window mainWin = new MainWindow();

            WindowLocationSeter.changeWindow(mainWin);
            this.Close();
        }
Exemplo n.º 3
0
        /// <summary>
        /// cancel and move to the login window.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CancelBtn_Click(object sender, RoutedEventArgs e)
        {
            ((ViewModel.RegistrationVM)registrationVM).resetinput();
            Login win = new Login();

            WindowLocationSeter.changeWindow(win);
            this.Close();
        }
Exemplo n.º 4
0
        /// <summary>
        /// click event for random songs from random areas.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void RandomBtn_click(object sender, RoutedEventArgs e)
        {
            ((ViewModel.CountryChooserVM)countryChooserVM).ChooseRandom();
            Window playlist = new PlayList();

            WindowLocationSeter.changeWindow(playlist);
            this.Close();
        }
Exemplo n.º 5
0
        /// <summary>
        /// Login constructor.
        /// </summary>>
        public Login()
        {
            InitializeComponent();

            ViewModel.BaseVM baseVM = ViewModel.BaseVM.GetInstance;
            loginVM = baseVM._LoginVM;
            WindowLocationSeter.CenterWindowOnScreen(this);
            this.DataContext = loginVM;
        }
 /// <summary>
 /// click event for next button after choosing area in the map.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BtnNext_Click(object sender, RoutedEventArgs e)
 {
     if (((ViewModel.LocationMapChooserVM)locationChooserVM).Finish())
     {
         Window chooser = new CountryChooser();
         WindowLocationSeter.changeWindow(chooser);
         this.Close();
     }
 }
Exemplo n.º 7
0
 /// <summary>
 /// click event for showing the playlist after choosing sons from areas.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ContinueBtn_Click(object sender, RoutedEventArgs e)
 {
     if (((ViewModel.CountryChooserVM)countryChooserVM).chooseCountry())
     {
         Window playlist = new PlayList();
         WindowLocationSeter.changeWindow(playlist);
         this.Close();
     }
 }
Exemplo n.º 8
0
        /// <summary>
        /// click event for moving to registration.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnSignUp_Click(object sender, RoutedEventArgs e)
        {
            ((ViewModel.LoginVM)loginVM).clear();
            Window reg = new Registration();

            WindowLocationSeter.changeWindow(reg);
            System.Threading.Thread.Sleep(300);
            this.Close();
        }
Exemplo n.º 9
0
        /// <summary>
        /// click event for submit the changes and moving to the playlist.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SubmitBtn_Click(object sender, RoutedEventArgs e)
        {
            editorVM.SendParameters();
            Window playList = new PlayList();

            WindowLocationSeter.changeWindow(playList);
            //App.Current.MainWindow = playList;
            this.Close();
            //playList.Show();
        }
Exemplo n.º 10
0
        /// <summary>
        /// click event for submit buttn after filling the username and password.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnSubmit_Click(object sender, RoutedEventArgs e)
        {
            Boolean result = ((ViewModel.LoginVM)loginVM).Confirm();

            if (result)
            {
                Window playList = new PlayList();
                WindowLocationSeter.changeWindow(playList);
                this.Close();
            }
        }
Exemplo n.º 11
0
        /// <summary>
        /// click event for submiting the user name and password.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SubmitBtn_Click(object sender, RoutedEventArgs e)
        {
            Boolean result = ((ViewModel.RegistrationVM)registrationVM).CheckRegistraion();

            if (result)
            {
                Window chooser = new LocationMapChooser();
                WindowLocationSeter.changeWindow(chooser);
                System.Threading.Thread.Sleep(300);
                this.Close();
            }
        }
Exemplo n.º 12
0
 /// <summary>
 ///play list constructor.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public PlayList()
 {
     InitializeComponent();
     WindowLocationSeter.CenterWindowOnScreen(this);
     this.DataContext = playListVM;
 }
Exemplo n.º 13
0
 /// <summary>
 /// Location map chooser constructor.
 /// </summary>
 public LocationMapChooser()
 {
     InitializeComponent();
     WindowLocationSeter.CenterWindowOnScreen(this);
     this.DataContext = locationChooserVM;
 }
 /// <summary>
 /// Country Choose constructor.
 /// </summary>
 public CountryChooser()
 {
     InitializeComponent();
     WindowLocationSeter.CenterWindowOnScreen(this);
     DataContext = countryChooserVM;
 }
Exemplo n.º 15
0
 /// <summary>
 /// registration constructor.
 /// </summary>
 public Registration()
 {
     InitializeComponent();
     WindowLocationSeter.CenterWindowOnScreen(this);
     this.DataContext = registrationVM;
 }