Exemplo n.º 1
0
        private void OhMyDanmaku_Init()
        {
            setSize(GlobalVariable._user_render_width, GlobalVariable._user_render_height);
            setPosition(0, 0);

            engine = new WPFDanmakuEngine(
                engineBehavior: new EngineBehavior(DrawMode.WPF, CollisionPrevention.Enabled),
                defaultStyle: new DanmakuStyle(
                    Duration: GlobalVariable._user_danmaku_Duration,
                    ColorR: GlobalVariable._user_danmaku_colorR,
                    ColorG: GlobalVariable._user_danmaku_colorG,
                    ColorB: GlobalVariable._user_danmaku_colorB,
                    FontSize: GlobalVariable._user_danmaku_FontSize,
                    OutlineEnabled: GlobalVariable._user_danmaku_EnableOutline,
                    ShadowEnabled: GlobalVariable._user_danmaku_EnableShadow,
                    PositionX: GlobalVariable._user_render_width
                    ),
                targetCanvas: danmakuRender
                );

            if (GlobalVariable._user_audit_enabled)
            {
                auditWindow = new Audit(this);
                auditWindow.Show();
            }

            networkThread = new Thread(() => networkListenLoop(GlobalVariable._user_com_port, GlobalVariable._user_audit_enabled));
            networkThread.IsBackground = true;
            networkThread.Name         = "CommunicationThread";
            networkThread.Start();

            InitCompleted();
        }
Exemplo n.º 2
0
        private void OhMyDanmaku_Init()
        {
            setSize(GlobalVariable._RENDER_WIDTH, GlobalVariable._RENDER_HEIGHT);

            lib = new wpfDanmakulib(
                danmakuRender,
                ra,
                true,
                InitCompleted,
                GlobalVariable._user_danmaku_Duration,
                GlobalVariable._user_danmaku_FontSize,
                GlobalVariable._user_danmaku_EnableShadow,
                GlobalVariable._user_danmaku_colorR,
                GlobalVariable._user_danmaku_colorG,
                GlobalVariable._user_danmaku_colorB
                );

            if (GlobalVariable._user_audit)
            {
                auditWindow = new Audit(this);
                auditWindow.Show();
            }

            networkThread = new Thread(() => networkListenLoop(GlobalVariable._user_com_port, GlobalVariable._user_audit));
            networkThread.IsBackground = true;
            networkThread.Name         = "CommunicationThread";
            networkThread.Start(); //Start listener thread
        }
Exemplo n.º 3
0
        private void OhMyDanmaku_Init()
        {
            setSize(GlobalVariable._RENDER_WIDTH, GlobalVariable._RENDER_HEIGHT);

            lib = new wpfDanmakulib(
                danmakuRender,
                ra,
                true,
                InitCompleted,
                GlobalVariable._user_danmaku_Duration,
                GlobalVariable._user_danmaku_FontSize,
                GlobalVariable._user_danmaku_EnableShadow,
                GlobalVariable._user_danmaku_colorR,
                GlobalVariable._user_danmaku_colorG,
                GlobalVariable._user_danmaku_colorB
                );

            if (GlobalVariable._user_audit)
            {
                auditWindow = new Audit(this);
                auditWindow.Show();
            }

            networkThread = new Thread(() => networkListenLoop(GlobalVariable._user_com_port, GlobalVariable._user_audit));
            networkThread.IsBackground = true;
            networkThread.Name = "CommunicationThread";
            networkThread.Start(); //Start listener thread
        }