Exemplo n.º 1
0
        public SpiderView(SpiderHost host)
        {
            this.Host         = host;
            this.Scripting    = new Scripting.LuaInterpreter(this);
            this.Preprocessor = new Preprocessor.LuaMako(this);
            this.Scripting.RegisterFunction("refresh", GetType().GetMethod("refresh"), this);

            this.timer = new Timer();
            InitializeComponent();
            this.tabBar   = new TabBar(this);
            this.deck     = new Panel();
            tabBar.Dock   = DockStyle.Top;
            tabBar.Height = 23;
            this.Controls.Add(deck);
            this.Controls.Add(tabBar);
            deck.Dock              = DockStyle.Fill;
            this.tabBar.Dock       = DockStyle.Top;
            Block                  = Stylesheet.Blocks["Body"];
            this.BackColor         = Block.BackColor;
            this.ForeColor         = Block.ForeColor;
            this.tabBar.TabChange += tabBar_TabChange;
            this.timer.Tick       += timer_Tick;
            this.timer.Interval    = 1000;
            this.Click            += SpiderView_Click;
        }
Exemplo n.º 2
0
        public SpiderView(SpiderHost host)
        {
            this.Host = host;
            this.Scripting = new Scripting.LuaInterpreter(this);
            this.Preprocessor = new Preprocessor.LuaMako(this);
            this.Scripting.RegisterFunction("refresh", GetType().GetMethod("refresh"), this);

            this.timer = new Timer();
            InitializeComponent();
            this.tabBar = new TabBar(this);
            this.deck = new Panel();
            tabBar.Dock = DockStyle.Top;
            tabBar.Height = 23;
            this.Controls.Add(deck);
            this.Controls.Add(tabBar);
            deck.Dock = DockStyle.Fill;
            this.tabBar.Dock = DockStyle.Top;
            Block = Stylesheet.Blocks["Body"];
            this.BackColor = Block.BackColor;
            this.ForeColor = Block.ForeColor;
            this.tabBar.TabChange += tabBar_TabChange;
            this.timer.Tick += timer_Tick;
            this.timer.Interval = 1000;
            this.Click += SpiderView_Click;
        }
Exemplo n.º 3
0
        public playlist(SpiderHost host, String[] arguments)
            : base(host, arguments)
        {
            Template = "views\\playlist.xml";

            InitializeComponent();
            Start();
        }
Exemplo n.º 4
0
 public App(SpiderHost host, String[] arguments)
 {
     this.Arguments = arguments;
     InitializeComponent();
     this.Host       = host;
     this.spiderView = new SpiderView(host);
     //this.board =  new Board(this);
     this.Controls.Add(spiderView);
     this.spiderView.Dock = DockStyle.Fill;
     spiderView.Dock      = DockStyle.Fill;
     spiderView.Navigate += spiderView_Navigate;
 }
Exemplo n.º 5
0
 public App(SpiderHost host, String[] arguments)
 {
     this.Arguments = arguments;
     InitializeComponent();
     this.Host = host;
     this.spiderView = new SpiderView(host);
     //this.board =  new Board(this);
     this.Controls.Add(spiderView);
     this.spiderView.Dock = DockStyle.Fill;
     spiderView.Dock = DockStyle.Fill;
     spiderView.Navigate += spiderView_Navigate;
 }
Exemplo n.º 6
0
        public SPListView(Spider.Skinning.Style stylesheet, SpiderHost host)
        {
            this.Host = host;
            InitializeComponent();
            this.Items = new List<SPListItem>();

            this.stylesheet = stylesheet;
            this.SelectedBlock = (Block)stylesheet.Blocks["::selection"].Clone();
            this.Block = (Block)stylesheet.Blocks["ListView"].Clone();
            this.AllowDrop = true;
            this.DragEnter += SPListView_DragEnter;
            this.DragOver += SPListView_DragOver;
            this.DragDrop += SPListView_DragDrop;
            this.MouseMove +=SPListView_MouseMove;
        }
Exemplo n.º 7
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");
        }
Exemplo n.º 8
0
        public SPListView(Spider.Skinning.Style stylesheet, SpiderHost host)
        {
            this.Host = host;
            InitializeComponent();
            this.Items = new List<SPListItem>();

            this.stylesheet = stylesheet;
            this.SelectedBlock = (Block)stylesheet.Blocks["::selection"].Clone();
            this.Block = (Block)stylesheet.Blocks["ListView"].Clone();
            this.AllowDrop = true;
            this.DragEnter += SPListView_DragEnter;
            this.DragOver += SPListView_DragOver;
            this.DragDrop += SPListView_DragDrop;
            this.MouseMove +=SPListView_MouseMove;
        }
Exemplo n.º 9
0
 public whatsnew(SpiderHost host, String[] arguments)
     : base(host, arguments)
 {
     InitializeComponent();
     Start();
 }
Exemplo n.º 10
0
 public artist(SpiderHost host, String[] uri)
     : base(host, uri)
 {
     this.Template = "Views\\artist.xml";
 }
Exemplo n.º 11
0
        public app(SpiderHost host, String[] arguments, String[] uri)
            : base(host, uri)
            
        {
            this.arguments = arguments;
            InitializeComponent();
            this.Template = (folder + "\\Spotify\\" + arguments[2] + "\\index.xml");
          //  LoadScheme(folder + "\\spider\\" + arguments[0] + "\\view.proto");


          
            // Register the send object
            this.spiderView.Scripting.RegisterFunction("sendRequest", new lua_send_request(luaSendRequest), "");
            this.spiderView.Scripting.RegisterFunction("alax", new lua_alax(alax), "");
          //  this.spiderView.Scripting.RegisterFunction("setEntity", (object)this, typeof(app).GetMethod("setEntity"));
            this.spiderView.Scripting.RegisterFunction("ask", typeof(app).GetMethod("ask"), (object)this);

      //      Start();
            // Load Manifest
            using (StreamReader sr = new StreamReader(folder + "\\Spotify\\" + arguments[2] + "\\manifest.json"))
            {
                String data = sr.ReadToEnd();


                Manifest = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(data);
            }
        }
Exemplo n.º 12
0
 public search(SpiderHost host, String[] uri)
     : base(host, uri)
 {
     InitializeComponent();
 }
Exemplo n.º 13
0
 public SPSidebar(SpiderHost host, Skinning.Style style)
 {
     InitializeComponent();
     this.ListView = new SPListView(style, host);
 }
Exemplo n.º 14
0
 public user(SpiderHost host, String[] uri)
     : base(host, uri)
 {
 }
Exemplo n.º 15
0
 public group(SpiderHost host, String[] arguments)
     : base(host, arguments)
 {
     InitializeComponent();
 }
Exemplo n.º 16
0
 public SPCoverBar(SpiderHost host, Skinning.Style style)
 {
     this.Host  = host;
     this.Style = style;
 }
Exemplo n.º 17
0
 public SPCoverBar(SpiderHost host, Skinning.Style style)
 {
     this.Host = host;
     this.Style = style;
 }
Exemplo n.º 18
0
 public playqueue(SpiderHost host, String[] arguments)
     : base(host, arguments)
 {
     InitializeComponent();
 }
Exemplo n.º 19
0
 public @internal(SpiderHost host, String[] arguments)
     : base(host, arguments)
 {
     InitializeComponent();
 }
Exemplo n.º 20
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
        }
Exemplo n.º 21
0
 public album(SpiderHost host, String[] uri)
     : base(host, uri)
 {
     InitializeComponent();
     Start();
 }