public Window1() { InitializeComponent(); //Init the download table downloadTable = new DataTable("Downloads Table"); DataColumn primary = downloadTable.Columns.Add("Name", typeof(string)); downloadTable.Columns.Add("Progress", typeof(string)); downloadTable.Columns.Add("Status", typeof(string)); downloadTable.PrimaryKey = new DataColumn[] { primary }; ListViewDownloads.DataContext = downloadTable; //Init the server list serverList = new SynchronisedObservableCollection<ServerGameList>(this._serverList); listViewServerList.DataContext = serverList; //Init the game list gameList = new SynchronisedObservableCollection<LolGame>(this._gameList); ListViewGameList.DataContext = this.gameList; //Init the game queue gameQueue = new SynchronisedObservableCollection<GameQueueItem>(_gameQueue); //Init the background downloader backgroundDownloader.WorkerReportsProgress = true; backgroundDownloader.DoWork += new DoWorkEventHandler(backgroundDownloaderStart); backgroundDownloader.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundDownloaderDone); backgroundDownloader.ProgressChanged += new ProgressChangedEventHandler(GameDownloadProgressChanged); ListViewGameQueue.DataContext = this.gameQueue; //Refesh the server and gamelist ButtonRefreshGameList_Click(null, null); }
public MicrosoftAzure() : base("Microsoft Azure", "azure/logo") { IsExpanded = true; CommandGroups.Add(new HierarchicalResourceCommandGroup( new HierarchicalResourceCommand("add new account", Symbol.Add, AddAzureAccountAsync))); Children = new SynchronisedObservableCollection <HierarchicalResource, ConnectedAzureAccount>( ConnectedAccount.AzureAccounts, caa => new AzureAccount(caa)); }