private void VideoUpload_Click(object sender, EventArgs e) { if (openFileDialog2.ShowDialog() == DialogResult.OK) { // store the original size of the panel int width = VideoPanel.Width; int height = VideoPanel.Height; // load the selected video file video = new Video(openFileDialog2.FileName); // set the panel as the video object’s owner video.Owner = VideoPanel; // stop the video video.Stop(); // resize the video to the size original size of the panel VideoPanel.Size = new Size(width, height); } pictureBox2.Hide(); picturePlay.Show(); picturePause.Show(); pictureStop.Show(); metroApply.Show(); radioButtonMerge.Show(); radioButtonSimple.Show(); VideoLabel.Show(); }
void ReleaseDesignerOutlets() { if (SampleWorkoutAmount != null) { SampleWorkoutAmount.Dispose(); SampleWorkoutAmount = null; } if (SampleWorkoutSlider != null) { SampleWorkoutSlider.Dispose(); SampleWorkoutSlider = null; } if (SampleWorkoutView != null) { SampleWorkoutView.Dispose(); SampleWorkoutView = null; } if (StepLabel != null) { StepLabel.Dispose(); StepLabel = null; } if (VideoLabel != null) { VideoLabel.Dispose(); VideoLabel = null; } if (WorkoutAmount != null) { WorkoutAmount.Dispose(); WorkoutAmount = null; } }
/// <summary> /// 删除已经选择的标签 /// </summary> private void DeleteLabel() { TreeNode tree = treeView1.SelectedNode; if (tree == null) { return; } if (tree.Level == 0) { if (MessageBox.Show("删除父标签将删除所有子标签,是否删除?", "提示", MessageBoxButtons.OKCancel) != DialogResult.OK) { return; } TypeLabel type = Selectlabels.FirstOrDefault(t => t.Name == tree.Text); treeView1.Nodes.Remove(tree); Selectlabels.Remove(type); return; } else { TypeLabel type = Selectlabels.FirstOrDefault(t => t.Name == tree.Parent.Text); if (tree.Parent.Nodes.Count == 1) { Selectlabels.Remove(type); treeView1.Nodes.Remove(tree.Parent); return; } VideoLabel label = type.Labels.FirstOrDefault(t => t.Name == tree.Text); type.Labels.Remove(label); treeView1.Nodes.Remove(tree); } }
private void PopulatePage() { foreach (Tuple <string, string> page in pageDetails) { switch (page.Item1.ToString()) { case "title": this.Title = page.Item2.ToString(); break; // DOESN'T WORK -- TEXT DOESN'T SHOW UP // case "step": // UILabel label = new UILabel (new CGRect(UIScreen.MainScreen.Bounds.Width, UIScreen.MainScreen.Bounds.Height, UIScreen.MainScreen.Bounds.Width, 30)); // label.Lines = 1; // if (Regex.IsMatch (page.Item2.ToString (), @"^\d")) { // label.Text = "\t" + page.Item2.ToString () + "\n"; // label.Font.WithSize (18); // } else if (page.Item2.ToString ().StartsWith ("@")) { // label.Text = "\t" + page.Item2.ToString ().Substring (1) + "\n"; // label.Font.WithSize (20); // } else { // label.Text = "\n" + step + ". " + page.Item2.ToString () + "\n"; // label.Font.WithSize (24); // label.TextColor = UIColor.Blue; // step++; // } // this.View.AddSubview (label); // break; case "step": if (Regex.IsMatch(page.Item2.ToString(), @"^\d\.")) { StepLabel.Text += "\t" + page.Item2.ToString() + "\n"; } else if (page.Item2.ToString().StartsWith("@")) { StepLabel.Text += "\t" + page.Item2.ToString().Substring(1) + "\n"; } else { StepLabel.Text += "\n" + step + ". " + page.Item2.ToString() + "\n"; step++; } break; case "video": string video = null; video = findValuebyKey("video"); VideoLabel.LoadRequest(new NSUrlRequest(new NSUrl(video.ToString()))); VideoLabel.ScalesPageToFit = true; break; default: break; } } }
private void populateVideoList() { int y = 5; foreach (var video in playlistVideos) { VideoIcon vi = new VideoIcon(video.Thumbnail as string, 5); VideoLabel vl = new VideoLabel(video.Title, 35); VideoCheck vc = new VideoCheck(35); VideoField vf = new VideoField(vi, vl, vc, video.Url, y); vf.Name = video.Title; pnl_videos.Controls.Add(vf); y += 105; } }
private void PopulateVideoList() { var fieldCount = 0; foreach (var video in playlistVideos) { var vi = new VideoIcon(video.Thumbnail.ToString()); var vl = new VideoLabel(video.Title); var vc = new VideoCheck(); var vf = new VideoField(vi, vl, vc, video.Url); pnl_videos.Children.Add(vf); fieldCount++; if (fieldCount < playlistVideos.Count) { var separator = new Border { BorderThickness = new Thickness(0.5), BorderBrush = Brushes.Black, Margin = new Thickness(1, 0, 0, 0) }; pnl_videos.Children.Add(separator); } } }