Example #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            SpiderHost = new Spider.SpiderHost();
            SpiderHost.RegistredAppTypes.Add("main", typeof(Spider.Apps.main));
            tmrReload = new System.Windows.Forms.Timer();

            this.Controls.Add(SpiderHost);
            SpiderHost.Dock = DockStyle.Fill;
            SPListView listView = new SPListView(this.Stylesheet);
            this.Controls.Add(listView);
            listView.AddItem("Test", new Uri("leros:internal:test"));
            listView.Dock = DockStyle.Left;
            listView.Width = 270;
            SpiderHost.Navigate("spider:main:t");
        }
Example #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            SpiderHost = new Spider.SpiderHost(new DummyService());
            SpiderHost.Notify += SpiderHost_Notify;
            SpiderHost.RegistredAppTypes.Add("group", typeof(Apps.group));
            SpiderHost.RegistredAppTypes.Add("internal", typeof(Apps.@internal));
            SpiderHost.RegistredAppTypes.Add("playqueue", typeof(Apps.playqueue));
            SpiderHost.RegistredAppTypes.Add("app", typeof(Apps.app));
            SpiderHost.RegistredAppTypes.Add("artist", typeof(Apps.artist));
            SpiderHost.RegistredAppTypes.Add("album", typeof(Apps.album));
            SpiderHost.RegistredAppTypes.Add("search", typeof(Apps.search));
            SpiderHost.RegistredAppTypes.Add("user", typeof(Apps.user));
            tmrReload = new System.Windows.Forms.Timer();
            listView = new SPListView(this.Stylesheet, SpiderHost);
            this.Controls.Add(SpiderHost);
            SpiderHost.Dock = DockStyle.Fill;
            this.Controls.Add(listView);

            listView.ItemInserted += listView_ItemInserted;
            listView.AddItem(new Uri("spotify:internal:home"), true);
            listView.AddItem("-", new Uri("spotify:internal:placeholder"), true);
            listView.ItemSelected += listView_ItemSelected;
            // this.SpiderHost.MusicService.ObjectsDelivered += MusicService_ObjectsDelivered;
            listView.ItemReordered += listView_ItemReordered;
            listView.Dock = DockStyle.Left;
            listView.Width = 270;
            this.SpiderHost.MusicService.RequestUserObjects();
            this.SpiderHost.MusicService.PlaybackStarted += MusicService_PlaybackStarted;
            var panel = new AppHeader((PixelStyle)this.Stylesheet);
            panel.BackgroundImage = Properties.Resources.header;

            var panel2 = new AppHeader((PixelStyle)this.Stylesheet);
            panel2.BackgroundImage = Properties.Resources.footer;
            panel2.Dock = DockStyle.Bottom;
            panel.Dock = DockStyle.Top;
            panel2.Height = panel2.BackgroundImage.Height;
            panel2.MouseDown += panel2_MouseDown;
            panel.Height = panel.BackgroundImage.Height;
            infoBar = new infobar(this.Stylesheet);
            infoBar.Hide();
            this.Controls.Add(infoBar);
            infoBar.Dock = DockStyle.Top;
            this.Controls.Add(panel);
            panel.MouseMove += panel_MouseMove;

            this.Controls.Add(panel2);
            searchBox = new SearchBox();
            panel.Controls.Add(searchBox);
            searchBox.Left = 80;
            searchBox.Top = 26;
            searchBox.SearchClicked += searchBox_SearchClicked;

            // add some playlists
        }