Esempio n. 1
0
        private void frm_Main_Load(object sender, EventArgs e)
        {
            chkEnableSound.Checked = true;//Judge whether it is the allowed sound
            //The initial value of the character superposition
            pShowTime     = true;
            pTextPointSet = new PointF(100, 10);
            pTimePointSet = new PointF(200, 30);
            pFontSet      = this.Font;
            pBrushSet     = new SolidBrush(Color.Red);
            pDisplayText  = "";
            //Setting screen controls available properties
            SetOpenCloseFileControl(0);
            //Play data callback settings
            playCBFun = new DecCBFun(pDecCBFun);
            SetCallBackTypeCheck(stmType);
            mnuSizeTrue_Click(null, null);
            //Character superposition settings
            dFun = new DrawFun(DrawFun);
            NETPlay.NETRigisterDrawFun(0, dFun, 0);//Character overlay function demonstration

            StringUtil.InitControlText(this);
        }
Esempio n. 2
0
        private void frm_Main_Load(object sender, EventArgs e)
        {
            chkEnableSound.Checked = true;//判断是不是允许声音
            //字符叠加设置初始值
            pShowTime     = true;
            pTextPointSet = new PointF(100, 10);
            pTimePointSet = new PointF(200, 30);
            pFontSet      = this.Font;
            pBrushSet     = new SolidBrush(Color.Red);
            pDisplayText  = "";
            //设置画面控件可用属性
            SetOpenCloseFileControl(0);
            //播放数据回调设置
            playCBFun = new DecCBFun(pDecCBFun);
            SetCallBackTypeCheck(stmType);
            mnuSizeTrue_Click(null, null);
            //字符叠加设置
            dFun = new DrawFun(DrawFun);
            DHPlay.DHRigisterDrawFun(0, dFun, 0);//字符叠加功能演示

            StringUtil.InitControlText(this);
        }
Esempio n. 3
0
 public static extern bool PlayM4_RigisterDrawFun(int nPort, DrawFun df, int nUser);
Esempio n. 4
0
 public static extern bool PlayM4_RigisterDrawFun(int nPort, DrawFun DrawFun, int nUser);
Esempio n. 5
0
 public static extern bool MP4_ClientRigisterDrawFun(int StockHandle, DrawFun x, int nUser);
Esempio n. 6
0
 public static extern int RegisterDrawFun(ulong nport, DrawFun df, long nUser);
 public static extern bool NET_DVR_RigisterDrawFun(int lRealHandle, DrawFun fDrawFun, uint dwUser);
Esempio n. 8
0
 private static extern bool PLAY_RigisterDrawFun(int nPort, DrawFun privateDrawFun, int nUser);
Esempio n. 9
0
 /// <summary>
 /// 注册一个回调函数,获得当前表面的device context, 你可以在这个DC上画图(或写字),就好像在窗口的客户区DC上绘图,
 /// 但这个DC不是窗口客户区的DC,而是DirectDraw里的Off-Screen表面的DC。注意,如果是使用overlay表面,这个接口无效,
 /// 你可以直接在窗口上绘图,只要不是透明色就不会被覆盖。
 /// </summary>
 /// <param name="nPort">播放器通道号</param>
 /// <param name="privateDrawFun">回调函数句柄</param>
 /// <param name="nUser">用户数据</param>
 /// <returns>true:成功;false:失败</returns>
 public static bool DHRigisterDrawFun(int nPort, DrawFun privateDrawFun, int nUser)
 {
     bool returnValue = false;
     returnValue = PLAY_RigisterDrawFun(nPort, privateDrawFun, nUser);
     DHThrowLastError(nPort);
     return returnValue;
 }
Esempio n. 10
0
 private void Update()
 {
     if (shaderPropertyGroups != null)
     {
         drawList.Clear();
         for (int i = 0; i < shaderPropertyGroups.Count; ++i)
         {
             ShaderGroupInstance sgi = shaderPropertyGroups[i];
             if (sgi.hasCustomGroup)
             {
                 sgi.spiList.Sort((x, y) =>
                 {
                     int idx = x.scp != null ? x.scp.indexInGroup : 0;
                     int idy = y.scp != null ? y.scp.indexInGroup : 0;
                     return(idx - idy);
                 });
             }
             bool hasBeginFun = false;
             for (int j = 0; j < sgi.spiList.Count; ++j)
             {
                 ShaderPropertyInstance spi = sgi.spiList[j];
                 var sf = spi.shaderFeature;
                 if (j == 0 && (sf.indexInGroup >= 0 || sf.type == AssetsConfig.ShaderPropertyType.CustomGroup))
                 {
                     DrawPropertyContext context = new DrawPropertyContext();
                     context.fun = drawGroupBegin;
                     context.sgi = sgi;
                     drawList.Add(context);
                     hasBeginFun = true;
                 }
                 if (sf.type == AssetsConfig.ShaderPropertyType.CustomFun)
                 {
                     DrawFun fun = null;
                     if (customFunc.TryGetValue(sf.name, out fun))
                     {
                         DrawPropertyContext context = new DrawPropertyContext();
                         context.fun            = fun;
                         context.material       = m_Material;
                         context.materialEditor = m_MaterialEditor;
                         context.hasDepency     = hasDepency;
                         context.spi            = spi;
                         context.dd             = dd;
                         drawList.Add(context);
                     }
                 }
                 else
                 {
                     bool show = true;
                     if (sf.dependencyPropertys != null && sf.dependencyPropertys.dependencyShaderProperty.Count > 0)
                     {
                         bool hasFeature = false;
                         for (int k = 0; k < sf.dependencyPropertys.dependencyShaderProperty.Count; ++k)
                         {
                             string featureName = sf.dependencyPropertys.dependencyShaderProperty[k];
                             if (sf.dependencyPropertys.dependencyType == AssetsConfig.DependencyType.Or)
                             {
                                 hasFeature |= hasDepency.Contains(featureName);
                                 if (hasFeature)
                                 {
                                     break;
                                 }
                             }
                             else if (sf.dependencyPropertys.dependencyType == AssetsConfig.DependencyType.And)
                             {
                                 hasFeature &= hasDepency.Contains(featureName);
                                 if (!hasFeature)
                                 {
                                     break;
                                 }
                             }
                         }
                         if (sf.dependencyPropertys.isNor)
                         {
                             hasFeature = !hasFeature;
                         }
                         show = hasFeature;
                     }
                     if (show && !sf.hide)
                     {
                         var drawFun = drawPropertyFun[(int)sf.type];
                         if (drawFun != null)
                         {
                             DrawPropertyContext context = new DrawPropertyContext();
                             context.fun            = drawFun;
                             context.material       = m_Material;
                             context.materialEditor = m_MaterialEditor;
                             context.hasDepency     = hasDepency;
                             context.spi            = spi;
                             context.dd             = dd;
                             context.sgi            = sgi;
                             drawList.Add(context);
                         }
                     }
                     if (j == sgi.spiList.Count - 1 && hasBeginFun)
                     {
                         DrawPropertyContext context = new DrawPropertyContext();
                         context.fun = drawGroupEnd;
                         context.sgi = sgi;
                         drawList.Add(context);
                     }
                 }
             }
         }
     }
 }
Esempio n. 11
0
 private void frm_Main_Load(object sender, EventArgs e)
 {
     chkEnableSound.Checked = true;//判断是不是允许声音
     //字符叠加设置初始值
     pShowTime =true;
     pTextPointSet = new PointF(100,10);
     pTimePointSet = new PointF(200,30);
     pFontSet = this.Font;
     pBrushSet = new SolidBrush(Color.Red);
     pDisplayText = "";
     //设置画面控件可用属性
     SetOpenCloseFileControl(0);
     //播放数据回调设置
     playCBFun = new DecCBFun(pDecCBFun);
     SetCallBackTypeCheck(stmType);
     mnuSizeTrue_Click(null, null);
     //字符叠加设置
     dFun = new DrawFun(DrawFun);
     DHPlay.DHRigisterDrawFun(0, dFun, 0);//字符叠加功能演示
 }