Exemplo n.º 1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (this.DesignMode)
                return;

            this.repositoryTree.BeginUpdate();

            listView1.SelectedIndexChanged += new EventHandler(listView1_SelectedIndexChanged);
            listView1.ItemChecked += new ItemCheckedEventHandler(listView1_ItemChecked);

            this.repositories = new List<ScriptRepository>();

            JsonFileHandler<ScriptRepositoryList> h = new JsonFileHandler<ScriptRepositoryList>();
            this.repositoryList = h.Read(repositoryListFile);
            if (this.repositoryList != null)
            {
                foreach (ScriptRepositoryReference r in this.repositoryList.Repositories)
                {
                    this.repositoryTree.Nodes.Add(String.Format("{0} - {1}", r.Name, r.URI));
                }
            }

            this.repositoryTree.EndUpdate();
        }
 public void testInit()
 {
     this.repoList = new ScriptRepositoryList();
     this.repoList.Repositories.Add(new ScriptRepositoryReference("Pier's Scripts", "http://script.threesixty.nl/"));
     this.repoList.Repositories.Add(new ScriptRepositoryReference("ScriptSpot", "http://www.scriptspot.com"));
 }