Exemple #1
0
        private void ShowDemoInformation(DemoItem info)
        {
            SelectedItem = info;

            pbPreview.ImageLocation = info.GetPreviewImagePath(Application.StartupPath);
            btnOpenFolder.Enabled   = !String.IsNullOrEmpty(info.GetProjectPath(Application.StartupPath));
            btnRun.Enabled          = !String.IsNullOrEmpty(info.GetApplicationPath(Application.StartupPath));
            btnYouTube.Enabled      = !String.IsNullOrEmpty(info.YouTube);
            btnGitHub.Enabled       = !String.IsNullOrEmpty(info.GitHub);
            string desc = info.Description;

            desc             = desc.Replace("\n", "\r\n");
            txtContents.Text = desc;

            List <string> api = info.GetApi(Application.StartupPath);

            lbAPI.Text = string.Format("Items = {0:N0} EA", api.Count);
            lvAPI.BeginUpdate();
            lvAPI.Items.Clear();
            foreach (string item in api)
            {
                ListViewItem lvi = new ListViewItem(new string[] { item });
                lvAPI.Items.Add(lvi);
            }
            lvAPI.EndUpdate();
        }
Exemple #2
0
        private void btnOpenFolder_Click(object sender, EventArgs e)
        {
            if (SelectedItem == null)
            {
                return;
            }
            string path = SelectedItem.GetProjectPath(Application.StartupPath);

            System.Diagnostics.Process.Start("explorer.exe", string.Format("/select,\"{0}\"", path));
        }