コード例 #1
0
        private static bool CheckClickArgs(EventArgs e)
        {
            if (e is VideoPlayBackArgs)
            {
                VideoPlayBackArgs m_Arg = e as VideoPlayBackArgs;

                if (m_Arg == null)
                {
                    return(false);
                }

                if (VideoPlayBackManager.DataSource == null)
                {
                    return(false);
                }

                if (m_Arg.RowIndicators == null || m_Arg.RowIndicators.Count <= 0)
                {
                    Webb.Utilities.TopMostMessageBox.ShowMessage("No Associated Plays", MessageBoxButtons.OK);

                    mouse_event(0x0004, 0, 0, 0, 0);

                    return(false);
                }
            }

            return(true);
        }
コード例 #2
0
 private void SetCellValueWithClickEvent(int i_Row, int i_Col, object i_Value, FormatTypes i_Type, Int32Collection i_Rows)
 {
     if (i_Value != null)
     {
         DataSet m_DBSet = this.ExControl.DataSource as DataSet;
         Webb.Reports.DataProvider.VideoPlayBackArgs m_args = new Webb.Reports.DataProvider.VideoPlayBackArgs(m_DBSet, i_Rows);
         (this.PrintingTable.GetCell(i_Row, i_Col) as WebbTableCell).ClickEventArg = m_args;
         this.PrintingTable.GetCell(i_Row, i_Col).Text = this.FormatValue(i_Value, i_Type);
     }
 }
コード例 #3
0
        private void SetColWithClickEvent(int nCol, RectangleF rcRect, Int32Collection arrRows)
        {
            WebbTableCell cell = this.PrintingTable.GetCell(0, nCol) as WebbTableCell;

            cell.CellStyle.BorderColor = Color.Transparent;

            DataSet m_DBSet = this.ExControl.DataSource as DataSet;

            Webb.Reports.DataProvider.VideoPlayBackArgs m_args = new Webb.Reports.DataProvider.VideoPlayBackArgs(m_DBSet, arrRows);

            cell.ClickEventArg = m_args;
        }
コード例 #4
0
        public static void OnClickEvent(object Sender, EventArgs e)
        {
            if (IsDoubleClick(Sender))
            {
                return;
            }

            if (!CheckClickArgs(e))
            {
                return;
            }

            VideoPlayBackArgs m_Arg = e as VideoPlayBackArgs;

            CurVideoPlayBackArgs = m_Arg;

            if (CurEventArgs != null && CurEventArgs.Button == MouseButtons.Right)
            {            //Right click
                if (PublicBrowser == null)
                {
                    return;
                }

                ContextMenu menu = new ContextMenu(new MenuItem[] { new MenuItem("Save As Cutup", new EventHandler(OnSaveToEdl)) });

                System.Drawing.Point pos = Cursor.Position;

                menu.Show(PublicBrowser, pos);
            }
            else
            {            //left click
                Webb.Utilities.WaitingForm.ShowWaitingForm();

                try
                {
                    VideoInfoCollection m_videoInfo = PublicDBProvider.LoadVideoInfo(VideoPlayBackManager.DataSource, m_Arg.RowIndicators);

                    if (m_videoInfo == null || m_videoInfo.Count == 0)
                    {
                        Webb.Utilities.WaitingForm.CloseWaitingForm();

                        Webb.Utilities.TopMostMessageBox.ShowMessage("No Associated Video", MessageBoxButtons.OK);

                        mouse_event(0x0004, 0, 0, 0, 0);

                        return;
                    }
                    //If advantage report , don't play video , send message back to advantage.
                    if (VideoPlayBackManager.PublicDBProvider == null)
                    {
                        Webb.Utilities.TopMostMessageBox.ShowMessage("Can't find Data Provider.", MessageBoxButtons.OK);

                        return;
                    }

                    int type = (int)VideoPlayBackManager.PublicDBProvider.DBSourceConfig.WebbDBType;

                    if (type == (int)WebbDBTypes.WebbAdvantageFootball || (type > 0 && type < 9))
                    {
                        IRMSG msg = new IRMSG();

                        ProcessInfo.SetMsg(ref msg, 0, 0x0201, 0, 0, "Video Playback");

                        IREDIT[] edits = MakeEdits(m_videoInfo);

                        ProcessInfo.SendMemoryMessage(msg, edits);

                        Webb.Utilities.WaitingForm.CloseWaitingForm();

                        return;
                    }

//					MoviePlayer.VPManager.MoviePlayer.AddVideos(m_videoInfo);
//
//					if(m_videoInfo.Count > 0)
//					{
//						MoviePlayer.VPManager.MoviePlayer.ShowWindow();
//
//						MoviePlayer.VPManager.MoviePlayer.Play(PlayTypes.Play);
//					}
                }
                catch (Exception ex)
                {
                    Webb.Utilities.TopMostMessageBox.ShowMessage(string.Format("Click event error. Please contact Webb for help. Error message:{0}", ex.Message), MessageBoxButtons.OK);
                }
                finally
                {
                    Webb.Utilities.WaitingForm.CloseWaitingForm();
                }
            }
        }