public VideoPage() { this.InitializeComponent(); mediaElement.AutoPlay = true; SetMovieSource(); var cmp = new CommentPresenter(); cmp.Load("test.nicocomment"); var canvast = new CanvasTarget(canvas) { Fps = textBlockFps }; var videot = new VideoTarget(mediaElement); _timer = new DispatcherTimer() { Interval = TimeSpan.FromSeconds(1.0 / 30) }; _timer.Tick += (f, e) => { cmp.Draw(canvast, videot); }; _timer.Start(); }
public void ShowComment(DayInfoRow row) { CommentModel model = new CommentModel(); model.Comment = row.Comment; CommentView view = new CommentView(); CommentPresenter presenter = new CommentPresenter(model, view); view.ShowDialog(); if (model.HasChanged) { Presenter.GridCommentEntryHasChanged(model.Comment); } }
public Filter(double width, double height, double duration, int rowHeight) { CanvasWidth = width; CanvasHeight = height; Duration = duration; RowHeight = rowHeight; FontSize = rowHeight * 0.7; //Font= new Font("MS Pゴシック", (float)FontSize); //Font = new Font("MS PGothic", (float)FontSize, System.Drawing.FontStyle.Bold, GraphicsUnit.Pixel); Font = new Font("BIZ UDPGothic", (float)FontSize, System.Drawing.FontStyle.Bold, GraphicsUnit.Pixel); FontM = new Font("BIZ UDMincho Medium", (float)FontSize, System.Drawing.FontStyle.Bold, GraphicsUnit.Pixel); EmSize = (float)Font.Height * Font.FontFamily.GetEmHeight(Font.Style) / Font.FontFamily.GetLineSpacing(Font.Style); ErrorStr = "Comment file not specified"; cmp = new CommentPresenter(); AlphaAttr = new ImageAttributes(); AlphaAttr.SetColorMatrix(new ColorMatrix() { Matrix00 = 1, Matrix11 = 1, Matrix22 = 1, Matrix33 = 0.6F, Matrix44 = 1 }); NormalAttr = new ImageAttributes(); NormalAttr.SetColorMatrix(new ColorMatrix() { Matrix00 = 1, Matrix11 = 1, Matrix22 = 1, Matrix33 = 0.9F, Matrix44 = 1 }); Bitmap testBitmap = new Bitmap(40, 30); Scratch = Graphics.FromImage(testBitmap); DebugFont = new Font("MS PGothic", 24); FallbackBrush = System.Windows.Media.Brushes.White; //FallbackBrush.Opacity = 0; }
protected void Page_Load(object sender, EventArgs e) { int id = Convert.ToInt32(Request.QueryString["id"]); int channel = ContentManager.GetDbRecord(id).fk_channel_id; NavigationControl nav = new NavigationControl(); sidebar.InnerHtml = nav.GetHtml(channel); ContentPresenter cp = new ContentPresenter(id); content.InnerHtml = cp.GetHtml(); content.InnerHtml += "<p> </p>"; // 附件 if (ContentManager.GetAttachments(id).Count() > 0) { AttachmentPresenter ap = new AttachmentPresenter(id); TongJi.Web.Controls.HtmlDivision div = new TongJi.Web.Controls.HtmlDivision(); div.InnerHtml = ap.GetHtml(); content.Controls.Add(div); content.Controls.Add(new TongJi.Web.Controls.HtmlParagraph()); } // 评论 if (ContentManager.GetDbRecord(id).allow_comment) { if (ContentManager.GetComments(id).Count() > 0) { CommentPresenter presenter = new CommentPresenter(id); TongJi.Web.Controls.HtmlDivision div = new TongJi.Web.Controls.HtmlDivision(); div.InnerHtml = presenter.GetHtml(); content.Controls.Add(div); } CommentPoster poster = new CommentPoster(id); content.Controls.Add(poster.GetControl()); poster.Post += new EventHandler(poster_Post); } }
protected override void Context() { _view = A.Fake <ICommentView>(); sut = new CommentPresenter(_view); }