Пример #1
0
 public void updateGL(string buffer, W2GTag msgTag = W2GTag.W2G_NORMAL_DATA)
 {
     m_msgMng.updateGL(buffer, msgTag);
 }
Пример #2
0
        private void updateCamera(object sender, W2GTag tag)
        {
            if (sender is TextBox)
            {
                TextBox tb = (TextBox)sender;
                string data = "";

                if (tb.Text != "")
                {
                    data = tb.Text;
                }
                else
                {
                    data = "0";
                }
                updateGL(data, tag);
            }
        }
Пример #3
0
        public void updateGL(string buffer, W2GTag msgTag = W2GTag.W2G_NORMAL_DATA)
        {
            int len;
            byte[] charArr;
            COPYDATASTRUCT_SENDEX msgData;

            if (msgTag == W2GTag.W2G_PATH)
            {
                string artistPath = "";
                string freePath = "";
                string fontPath = "";
                string langPath = Path.GetDirectoryName(Setting.getLangPath());
                DirectoryInfo di = new DirectoryInfo(Project.Setting.getParticlePath());

                if (di.Parent != null)
                {
                    artistPath = di.Parent.FullName;
                }
                else
                {
                    artistPath = MainWindow.getArtistPath(buffer);
                }
                freePath = buffer;
                if (Setting.s_fontPath != "" && Setting.s_fontPath != null && File.Exists(Setting.s_fontPath))
                {
                    FileInfo fi = new FileInfo(Setting.s_fontPath);

                    fontPath = fi.Directory.Parent.FullName;
                }
                charArr = Encoding.Default.GetBytes(artistPath + "|" + freePath + "|" + fontPath + "|" + langPath);
            }
            else
            {
                charArr = Encoding.UTF8.GetBytes(buffer);
            }
            len = charArr.Length;
            unsafe
            {
                fixed (byte* tmpBuff = charArr)
                {
                    msgData.dwData = (IntPtr)msgTag;
                    if (len != 0)
                    {
                        msgData.lpData = (IntPtr)tmpBuff;
                    }
                    else
                    {
                        msgData.lpData = (IntPtr)0;
                    }
                    msgData.cbData = len + 1;
                    MainWindow.SendMessage(m_hwndGL, MainWindow.WM_COPYDATA, (int)m_hwndGLParent, ref msgData);
                }
            }
        }
Пример #4
0
        public void updateGL(string buffer, W2GTag msgTag = W2GTag.W2G_NORMAL_DATA)
        {
            if (m_isLockMsgPath == true && msgTag == W2GTag.W2G_PATH)
            {
                return;
            }
            if (mx_hwndDebug.Text != "")
            {
                m_msgMng.m_hwndGL = (IntPtr)long.Parse(mx_hwndDebug.Text);
            }

            m_msgMng.updateGL(buffer, msgTag);
            if (msgTag != W2GTag.W2G_SELECT_UI && msgTag != W2GTag.W2G_VIEWMODE && msgTag != W2GTag.W2G_DRAWRECT
                && msgTag != W2GTag.W2G_NORMAL_UPDATE && msgTag != W2GTag.W2G_RENDERCACHE_IMAGECOLOR)
            {
                XmlControl curXmlCtrl = XmlControl.getCurXmlControl();
                if (curXmlCtrl != null && curXmlCtrl.m_curItem != null && curXmlCtrl.m_curItem is BoloUI.Basic)
                {
                    BoloUI.Basic curUICtrl = (BoloUI.Basic)curXmlCtrl.m_curItem;

                    curUICtrl.showBlueRect();
                }
            }
            if (msgTag == W2GTag.W2G_PATH)
            {
                MoveWindow(m_msgMng.m_hwndGL, 0, 0, m_screenWidth, m_screenHeight, true);
            }
        }