private void clickButton(FileKinectButton button) { this.Executor.BeginInvoke("open", button.FileName, null, null); setTileAsSelected(button); }
public void LoadFilesFromFolder(string folderPath) { this.wrapPanel.Children.Clear(); string[] filePaths = Directory.GetFiles(folderPath); for (int i = 0; i < filePaths.Length; ++i) { string file = filePaths[i]; FileKinectButton tile = new FileKinectButton(); tile.Label = i.ToString() + " " + System.IO.Path.GetFileName(file); tile.FileName = System.IO.Path.GetFileName(file); setTileAsNormal(tile); this.wrapPanel.Children.Add(tile); } this.wrapPanel.Height = ( (filePaths.Length + 2) / 3) * 220; }