Beispiel #1
1
 /// <summary>
 /// Class constructor
 /// </summary>
 /// <param name="mf">View form</param>
 /// <param name="uc">Controller for logged in user</param>
 public TracksController(MainFrame mf, UserController uc)
 {
     myViewFrame = mf;
     myUserController = uc;
     userId = myUserController.getUserId();
     myTracks = new Tracks(userId);
 }
Beispiel #2
0
        private Dictionary<TabPage, Color> TabColors = new Dictionary<TabPage, Color>(); //User actions controller

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Main Frame constructor
        /// </summary>
        public MainFrame()
        {
            InitializeComponent();
            myUserController = new UserController(this);
            this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MainFrame_MouseDown);
            this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.MainFrame_MouseMove);
            this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.MainFrame_MouseUp);

            //tracksControl.TabPages.Remove(albumsPage);

            this.tracksControl.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.tracksControl_DrawItem);
            SetTabHeader(tracksPage, Color.Lavender);
            SetTabHeader(cartPage, Color.Lavender);
            SetTabHeader(myContentPage, Color.Lavender);
            SetTabHeader(regTab, Color.Lavender);
            tracksControl.TabPages.Remove(regTab);
            tracksControl.TabPages.Add(regTab);

            setGuestViewOptions();
            fillTracksGrid();
        }
Beispiel #3
0
 /// <summary>
 /// Request controller for tracks on tracks page(tab)
 /// </summary>
 private void fillTracksGrid()
 {
     myUserController = new UserController(this);
     myTracksController = new TracksController(this, myUserController);
     myTracksController.setFilters(artistBox.Text, albumBox.Text, titleBox.Text, genreBox.Text, keyBox.Text);
 }