示例#1
0
 public apPhysicsPresetUnit(int uniqueID, string name, ICON icon)
 {
     _uniqueID   = uniqueID;
     _name       = name;
     _icon       = icon;
     _isReserved = false;
 }
示例#2
0
        void Show(string title, string text, Control control, ICON icon = 0, double timeOut = 0, bool focus = false)
        {
            ushort   x        = (ushort)(control.RectangleToScreen(control.ClientRectangle).Left + control.Width / 2);
            ushort   y        = (ushort)(control.RectangleToScreen(control.ClientRectangle).Top + control.Height / 2);
            TOOLINFO toolInfo = new TOOLINFO();

            toolInfo.cbSize   = (uint)Marshal.SizeOf(toolInfo);
            toolInfo.uFlags   = 0x20;   // TTF_TRACK
            toolInfo.lpszText = text;
            IntPtr pToolInfo = Marshal.AllocCoTaskMem(Marshal.SizeOf(toolInfo));

            Marshal.StructureToPtr(toolInfo, pToolInfo, false);
            byte[] buffer = Encoding.UTF8.GetBytes(title);
            buffer = buffer.Concat(new byte[] { 0 }).ToArray();
            IntPtr pszTitle = Marshal.AllocCoTaskMem(buffer.Length);

            Marshal.Copy(buffer, 0, pszTitle, buffer.Length);
            hWnd = User32.CreateWindowEx(0x8, "tooltips_class32", "", 0xC3, 0, 0, 0, 0, control.Parent.Handle, (IntPtr)0, (IntPtr)0, (IntPtr)0);
            User32.SendMessage(hWnd, 1028, (IntPtr)0, pToolInfo);               // TTM_ADDTOOL
            User32.SendMessage(hWnd, 1041, (IntPtr)1, pToolInfo);               // TTM_TRACKACTIVATE
            User32.SendMessage(hWnd, 1042, (IntPtr)0, (IntPtr)(x | (y << 16))); // TTM_TRACKPOSITION
            //User32.SendMessage(hWnd, 1043, (IntPtr)0, (IntPtr)0); // TTM_SETTIPBKCOLOR
            //User32.SendMessage(hWnd, 1044, (IntPtr)0xffff, (IntPtr)0); // TTM_SETTIPTEXTCOLOR
            User32.SendMessage(hWnd, 1056, (IntPtr)icon, pszTitle);    // TTM_SETTITLE 0:None, 1:Info, 2:Warning, 3:Error, >3:assumed to be an hIcon. ; 1057 for Unicode
            User32.SendMessage(hWnd, 1048, (IntPtr)0, (IntPtr)500);    // TTM_SETMAXTIPWIDTH
            User32.SendMessage(hWnd, 0x40c, (IntPtr)0, pToolInfo);     // TTM_UPDATETIPTEXT; 0x439 for Unicode
            Marshal.FreeCoTaskMem(pszTitle);
            Marshal.DestroyStructure(pToolInfo, typeof(TOOLINFO));
            Marshal.FreeCoTaskMem(pToolInfo);
            if (focus)
            {
                control.Focus();
            }
            // uncomment bellow to make balloon close when user changes focus,
            // starts typing, resizes/moves parent window, minimizes parent window, etc
            // adjust which control events to subscribe to depending on the control over which the balloon tip is shown

            /*control.Click += control_Event;
             * control.Leave += control_Event;
             * control.TextChanged += control_Event;
             * control.LocationChanged += control_Event;
             * control.SizeChanged += control_Event;
             * control.VisibleChanged += control_Event;
             * Control parent = control.Parent;
             * while(parent != null)
             * {
             *  parent.VisibleChanged += control_Event;
             *  parent = parent.Parent;
             * }
             * control.TopLevelControl.LocationChanged += control_Event;
             * ((Form)control.TopLevelControl).Deactivate += control_Event;*/
            timer.AutoReset = false;
            timer.Elapsed  += timer_Elapsed;
            if (timeOut > 0)
            {
                timer.Interval = timeOut;
                timer.Start();
            }
        }
示例#3
0
 void Show(string title, string text, Control control, ICON icon = 0, double timeOut = 0, bool allowMulti = false, bool focus = false, short x = 0, short y = 0)
 {
     if (!allowMulti)
         CloseAll();
     if (x == 0 && y == 0)
     {
         x = (short)(control.RectangleToScreen(control.ClientRectangle).Left + control.Width / 2);
         y = (short)(control.RectangleToScreen(control.ClientRectangle).Top + control.Height / 2);
     }
     TOOLINFO toolInfo = new TOOLINFO();
     toolInfo.cbSize = (uint)Marshal.SizeOf(toolInfo);
     toolInfo.uFlags = 0x20; // TTF_TRACK
     toolInfo.lpszText = text;
     IntPtr pToolInfo = Marshal.AllocCoTaskMem(Marshal.SizeOf(toolInfo));
     Marshal.StructureToPtr(toolInfo, pToolInfo, false);
     byte[] buffer = Encoding.UTF8.GetBytes(title);
     buffer = buffer.Concat(new byte[] { 0 }).ToArray();
     IntPtr pszTitle = Marshal.AllocCoTaskMem(buffer.Length);
     Marshal.Copy(buffer, 0, pszTitle, buffer.Length);
     hWnd = User32.CreateWindowEx(0x8, "tooltips_class32", "", 0xC3, 0, 0, 0, 0, control.Parent.Handle, (IntPtr)0, (IntPtr)0, (IntPtr)0);
     User32.SendMessage(hWnd, 1028, (IntPtr)0, pToolInfo); // TTM_ADDTOOL
     User32.SendMessage(hWnd, 1042, (IntPtr)0, (IntPtr)((ushort)x | ((ushort)y << 16))); // TTM_TRACKPOSITION
     //User32.SendMessage(hWnd, 1043, (IntPtr)0, (IntPtr)0); // TTM_SETTIPBKCOLOR
     //User32.SendMessage(hWnd, 1044, (IntPtr)0xffff, (IntPtr)0); // TTM_SETTIPTEXTCOLOR
     User32.SendMessage(hWnd, 1056, (IntPtr)icon, pszTitle); // TTM_SETTITLE 0:None, 1:Info, 2:Warning, 3:Error, >3:assumed to be an hIcon. ; 1057 for Unicode
     User32.SendMessage(hWnd, 1048, (IntPtr)0, (IntPtr)500); // TTM_SETMAXTIPWIDTH
     User32.SendMessage(hWnd, 0x40c, (IntPtr)0, pToolInfo); // TTM_UPDATETIPTEXT; 0x439 for Unicode
     User32.SendMessage(hWnd, 1041, (IntPtr)1, pToolInfo); // TTM_TRACKACTIVATE
     Marshal.FreeCoTaskMem(pszTitle);
     Marshal.DestroyStructure(pToolInfo, typeof(TOOLINFO));
     Marshal.FreeCoTaskMem(pToolInfo);
     if (focus)
         control.Focus();
     control.Enter += control_Event;
     control.Leave += control_Event;
     control.TextChanged += control_Event;
     control.KeyPress += control_Event;
     control.Click += control_Event;
     control.LocationChanged += control_Event;
     control.SizeChanged += control_Event;
     control.VisibleChanged += control_Event;
     if (control is DataGridView)
         ((DataGridView)control).CellBeginEdit += control_Event;
     Control parent = control.Parent;
     while(parent != null)
     {
         parent.VisibleChanged += control_Event;
         parent = parent.Parent;
     }
     control.TopLevelControl.LocationChanged += control_Event;
     ((Form)control.TopLevelControl).Deactivate += control_Event;
     timer.AutoReset = false;
     timer.Elapsed += timer_Elapsed;
     if (timeOut > 0)
     {
         timer.Interval = timeOut;
         timer.Start();
     }
 }
        public void Init()
        {
            _name                 = "";
            _uniqueID             = -1;
            _isReserved           = false;
            _linkedPresetID       = -1;
            _linkedPresetMaterial = null;
            _isDefault            = false;

            _icon = ICON.Unlit;

            _shaderPath_Normal_AlphaBlend        = "";
            _shaderPath_Normal_Additive          = "";
            _shaderPath_Normal_SoftAdditive      = "";
            _shaderPath_Normal_Multiplicative    = "";
            _shaderPath_Clipped_AlphaBlend       = "";
            _shaderPath_Clipped_Additive         = "";
            _shaderPath_Clipped_SoftAdditive     = "";
            _shaderPath_Clipped_Multiplicative   = "";
            _shaderPath_L_Normal_AlphaBlend      = "";
            _shaderPath_L_Normal_Additive        = "";
            _shaderPath_L_Normal_SoftAdditive    = "";
            _shaderPath_L_Normal_Multiplicative  = "";
            _shaderPath_L_Clipped_AlphaBlend     = "";
            _shaderPath_L_Clipped_Additive       = "";
            _shaderPath_L_Clipped_SoftAdditive   = "";
            _shaderPath_L_Clipped_Multiplicative = "";
            _shaderPath_AlphaMask = "";

            _shader_Normal_AlphaBlend        = null;
            _shader_Normal_Additive          = null;
            _shader_Normal_SoftAdditive      = null;
            _shader_Normal_Multiplicative    = null;
            _shader_Clipped_AlphaBlend       = null;
            _shader_Clipped_Additive         = null;
            _shader_Clipped_SoftAdditive     = null;
            _shader_Clipped_Multiplicative   = null;
            _shader_L_Normal_AlphaBlend      = null;
            _shader_L_Normal_Additive        = null;
            _shader_L_Normal_SoftAdditive    = null;
            _shader_L_Normal_Multiplicative  = null;
            _shader_L_Clipped_AlphaBlend     = null;
            _shader_L_Clipped_Additive       = null;
            _shader_L_Clipped_SoftAdditive   = null;
            _shader_L_Clipped_Multiplicative = null;
            _shader_AlphaMask = null;

            _propertySets.Clear();

            _isNeedToSetBlackColoredAmbient = false;
        }
示例#5
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="title"></param>
 /// <param name="text"></param>
 /// <param name="control">Control over which the balloon will be shown and whos events will be monitored (Leave, Click, TextChanged, etc)</param>
 /// <param name="icon"></param>
 /// <param name="timeOut"></param>
 /// <param name="allowMulti">Whether or no multtiple ballons are allowd. If not, all the other balllons will be close</param>
 /// <param name="focus">Focus control</param>
 /// <param name="x">Balloon Y position in screen coordinates</param>
 /// <param name="y">Balloon X position in screen coordinates</param>
 public BalloonTip(string title, string text, Control control, ICON icon = 0, double timeOut = 0, bool allowMulti = false, bool focus = false, short x = 0, short y = 0)
 {
     Show(title, text, control, icon, timeOut, allowMulti, focus, x, y);
     balloons.Add(this);
 }
示例#6
0
 public BalloonTip(string title, string text, Control control, ICON icon = 0, double timeOut = 0, bool focus = false)
 {
     Show(title, text, control, icon, timeOut, focus);
 }
示例#7
0
        public void Load(List <string> loadedStringSet)
        {
            _uniqueID = -1;            //<<이게 안바뀌면 실패다

            string strKey = "", strValue = "";
            string strCur = "";

            for (int i = 0; i < loadedStringSet.Count; i++)
            {
                strCur = loadedStringSet[i];
                if (strCur.Length < 3)
                {
                    continue;
                }

                strKey = strCur.Substring(0, 3);

                if (strCur.Length > 3)
                {
                    strValue = strCur.Substring(3);
                }
                else
                {
                    strValue = "";
                }

                try
                {
                    if (strKey == "UID")
                    {
                        //sw.WriteLine("UID" + _uniqueID);
                        _uniqueID = int.Parse(strValue);
                    }
                    else if (strKey == "NAM")
                    {
                        //sw.WriteLine("NAM" + _name);
                        _name = strValue;
                    }
                    else if (strKey == "ICN")
                    {
                        //sw.WriteLine("ICN" + _icon);
                        _icon = (ICON)int.Parse(strValue);
                    }
                    else if (strKey == "IMR")
                    {
                        _isRestrictMoveRange = bool.Parse(strValue);
                    }
                    else if (strKey == "ISR")
                    {
                        _isRestrictStretchRange = bool.Parse(strValue);
                    }
                    //else if (strKey == "SMN")
                    //{
                    //	//sw.WriteLine("STR" + _stretchRange);
                    //	_stretchRange_Min = float.Parse(strValue);
                    //}
                    else if (strKey == "SMX")
                    {
                        //sw.WriteLine("STR" + _stretchRange);
                        _stretchRange_Max = float.Parse(strValue);
                    }
                    else if (strKey == "MRG")
                    {
                        //sw.WriteLine("STR" + _stretchRange);
                        _moveRange = float.Parse(strValue);
                    }
                    else if (strKey == "STK")
                    {
                        //sw.WriteLine("STK" + _stretchK);
                        _stretchK = float.Parse(strValue);
                    }
                    else if (strKey == "INK")
                    {
                        //sw.WriteLine("INK" + _inertiaK);
                        _inertiaK = float.Parse(strValue);
                    }
                    else if (strKey == "DMP")
                    {
                        //sw.WriteLine("DMP" + _damping);
                        _damping = float.Parse(strValue);
                    }
                    else if (strKey == "MSS")
                    {
                        //sw.WriteLine("MSS" + _mass);
                        _mass = float.Parse(strValue);
                    }
                    else if (strKey == "GPT")
                    {
                        //sw.WriteLine("GPT" + (int)_gravityParamType);
                        _gravityParamType = (apPhysicsMeshParam.ExternalParamType)(int.Parse(strValue));
                    }
                    else if (strKey == "GVX")
                    {
                        //sw.WriteLine("GVX" + _gravityConstValue.x);
                        _gravityConstValue.x = float.Parse(strValue);
                    }
                    else if (strKey == "GVY")
                    {
                        //sw.WriteLine("GVY" + _gravityConstValue.y);
                        _gravityConstValue.y = float.Parse(strValue);
                    }
                    else if (strKey == "WPT")
                    {
                        //sw.WriteLine("WPT" + (int)_windParamType);
                        _windParamType = (apPhysicsMeshParam.ExternalParamType)(int.Parse(strValue));
                    }
                    else if (strKey == "WVX")
                    {
                        //sw.WriteLine("WVX" + _windConstValue.x);
                        _windConstValue.x = float.Parse(strValue);
                    }
                    else if (strKey == "WVY")
                    {
                        //sw.WriteLine("WVY" + _windConstValue.y);
                        _windConstValue.y = float.Parse(strValue);
                    }
                    else if (strKey == "WRX")
                    {
                        //sw.WriteLine("WRX" + _windRandomRange.x);
                        _windRandomRange.x = float.Parse(strValue);
                    }
                    else if (strKey == "WRY")
                    {
                        //sw.WriteLine("WRY" + _windRandomRange.y);
                        _windRandomRange.y = float.Parse(strValue);
                    }
                    else if (strKey == "ADG")
                    {
                        //sw.WriteLine("ADG" + _airDrag);
                        _airDrag = float.Parse(strValue);
                    }
                    else if (strKey == "VCS")
                    {
                        //sw.WriteLine("VCS" + _viscosity);
                        _viscosity = float.Parse(strValue);
                    }
                    else if (strKey == "RST")
                    {
                        //sw.WriteLine("RST" + _restoring);
                        _restoring = float.Parse(strValue);
                    }
                    else
                    {
                        Debug.LogError("Unknown PhysicPreset Load Keyword [" + strKey + "]");
                    }
                }
                catch (Exception ex)
                {
                    Debug.LogError("PhysicsPreset Load Exception : " + ex);
                }
            }
        }
示例#8
0
        void Show(string title, string text, Control control, ICON icon = 0, double timeOut = 0, bool allowMulti = false, bool focus = false, short x = 0, short y = 0)
        {
            if (!allowMulti)
            {
                CloseAll();
            }
            if (x == 0 && y == 0)
            {
                x = (short)(control.RectangleToScreen(control.ClientRectangle).Left + control.Width / 2);
                y = (short)(control.RectangleToScreen(control.ClientRectangle).Top + control.Height / 2);
            }
            TOOLINFO toolInfo = new TOOLINFO();

            toolInfo.cbSize   = (uint)Marshal.SizeOf(toolInfo);
            toolInfo.uFlags   = 0x20; // TTF_TRACK
            toolInfo.lpszText = text;
            IntPtr pToolInfo = Marshal.AllocCoTaskMem(Marshal.SizeOf(toolInfo));

            Marshal.StructureToPtr(toolInfo, pToolInfo, false);
            byte[] buffer = Encoding.UTF8.GetBytes(title);
            buffer = buffer.Concat(new byte[] { 0 }).ToArray();
            IntPtr pszTitle = Marshal.AllocCoTaskMem(buffer.Length);

            Marshal.Copy(buffer, 0, pszTitle, buffer.Length);
            hWnd = User32.CreateWindowEx(0x8, "tooltips_class32", "", 0xC3, 0, 0, 0, 0, control.Parent.Handle, (IntPtr)0, (IntPtr)0, (IntPtr)0);
            User32.SendMessage(hWnd, 1028, (IntPtr)0, pToolInfo);                               // TTM_ADDTOOL
            User32.SendMessage(hWnd, 1042, (IntPtr)0, (IntPtr)((ushort)x | ((ushort)y << 16))); // TTM_TRACKPOSITION
            //User32.SendMessage(hWnd, 1043, (IntPtr)0, (IntPtr)0); // TTM_SETTIPBKCOLOR
            //User32.SendMessage(hWnd, 1044, (IntPtr)0xffff, (IntPtr)0); // TTM_SETTIPTEXTCOLOR
            User32.SendMessage(hWnd, 1056, (IntPtr)icon, pszTitle); // TTM_SETTITLE 0:None, 1:Info, 2:Warning, 3:Error, >3:assumed to be an hIcon. ; 1057 for Unicode
            User32.SendMessage(hWnd, 1048, (IntPtr)0, (IntPtr)500); // TTM_SETMAXTIPWIDTH
            User32.SendMessage(hWnd, 0x40c, (IntPtr)0, pToolInfo);  // TTM_UPDATETIPTEXT; 0x439 for Unicode
            User32.SendMessage(hWnd, 1041, (IntPtr)1, pToolInfo);   // TTM_TRACKACTIVATE
            Marshal.FreeCoTaskMem(pszTitle);
            Marshal.DestroyStructure(pToolInfo, typeof(TOOLINFO));
            Marshal.FreeCoTaskMem(pToolInfo);
            if (focus)
            {
                control.Focus();
            }
            control.Enter           += control_Event;
            control.Leave           += control_Event;
            control.TextChanged     += control_Event;
            control.KeyPress        += control_Event;
            control.Click           += control_Event;
            control.LocationChanged += control_Event;
            control.SizeChanged     += control_Event;
            control.VisibleChanged  += control_Event;
            if (control is DataGridView)
            {
                ((DataGridView)control).CellBeginEdit += control_Event;
            }
            Control parent = control.Parent;

            while (parent != null)
            {
                parent.VisibleChanged += control_Event;
                parent = parent.Parent;
            }
            control.TopLevelControl.LocationChanged    += control_Event;
            ((Form)control.TopLevelControl).Deactivate += control_Event;
            timer.AutoReset = false;
            timer.Elapsed  += timer_Elapsed;
            if (timeOut > 0)
            {
                timer.Interval = timeOut;
                timer.Start();
            }
        }
示例#9
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="title"></param>
 /// <param name="text"></param>
 /// <param name="control">Control over which the balloon will be shown and whos events will be monitored (Leave, Click, TextChanged, etc)</param>
 /// <param name="icon"></param>
 /// <param name="timeOut"></param>
 /// <param name="allowMulti">Whether or no multtiple ballons are allowd. If not, all the other balllons will be close</param>
 /// <param name="focus">Focus control</param>
 /// <param name="x">Balloon Y position in screen coordinates</param>
 /// <param name="y">Balloon X position in screen coordinates</param>
 public BalloonTip(string title, string text, Control control, ICON icon = 0, double timeOut = 0, bool allowMulti = false, bool focus = false, short x = 0, short y = 0)
 {
     Show(title, text, control, icon, timeOut, allowMulti, focus, x, y);
     balloons.Add(this);
 }
 private static void SetIcon(IntPtr hwnd, ICON icon) => SendMessage(hwnd, WM.SETICON, (IntPtr)icon, IntPtr.Zero);
        public void Load(List <string> loadedStringSet)
        {
            _name     = "";
            _uniqueID = -1;

            string strKey   = "";
            string strValue = "";
            string strCur   = "";

            _propertySets.Clear();
            int nPropSets = 0;

            PropertySet newPropSet = null;

            for (int i = 0; i < loadedStringSet.Count; i++)
            {
                strCur = loadedStringSet[i];
                if (strCur.Length < 4)
                {
                    continue;
                }

                //Key가 4글자
                //나머지가 Value
                strKey = strCur.Substring(0, 4);

                if (strCur.Length > 4)
                {
                    strValue = strCur.Substring(4);
                }
                else
                {
                    strValue = "";
                }

                try
                {
                    if (strKey == "NAME")
                    {
                        _name = strValue;
                    }
                    else if (strKey == "UNID")
                    {
                        _uniqueID = int.Parse(strValue);
                        if (_uniqueID < 10)
                        {
                            _isReserved = true;
                        }
                        else
                        {
                            _isReserved = false;
                        }
                    }
                    else if (strKey == "ICON")
                    {
                        _icon = (ICON)(int.Parse(strValue));
                    }

                    else if (strKey == "GNAB")
                    {
                        _shaderPath_Normal_AlphaBlend = strValue;
                    }
                    else if (strKey == "GNAD")
                    {
                        _shaderPath_Normal_Additive = strValue;
                    }
                    else if (strKey == "GNSA")
                    {
                        _shaderPath_Normal_SoftAdditive = strValue;
                    }
                    else if (strKey == "GNMP")
                    {
                        _shaderPath_Normal_Multiplicative = strValue;
                    }
                    else if (strKey == "GCAB")
                    {
                        _shaderPath_Clipped_AlphaBlend = strValue;
                    }
                    else if (strKey == "GCAD")
                    {
                        _shaderPath_Clipped_Additive = strValue;
                    }
                    else if (strKey == "GCSA")
                    {
                        _shaderPath_Clipped_SoftAdditive = strValue;
                    }
                    else if (strKey == "GCMP")
                    {
                        _shaderPath_Clipped_Multiplicative = strValue;
                    }

                    else if (strKey == "LNAB")
                    {
                        _shaderPath_L_Normal_AlphaBlend = strValue;
                    }
                    else if (strKey == "LNAD")
                    {
                        _shaderPath_L_Normal_Additive = strValue;
                    }
                    else if (strKey == "LNSA")
                    {
                        _shaderPath_L_Normal_SoftAdditive = strValue;
                    }
                    else if (strKey == "LNMP")
                    {
                        _shaderPath_L_Normal_Multiplicative = strValue;
                    }
                    else if (strKey == "LCAB")
                    {
                        _shaderPath_L_Clipped_AlphaBlend = strValue;
                    }
                    else if (strKey == "LCAD")
                    {
                        _shaderPath_L_Clipped_Additive = strValue;
                    }
                    else if (strKey == "LCSA")
                    {
                        _shaderPath_L_Clipped_SoftAdditive = strValue;
                    }
                    else if (strKey == "LCMP")
                    {
                        _shaderPath_L_Clipped_Multiplicative = strValue;
                    }

                    else if (strKey == "MASK")
                    {
                        _shaderPath_AlphaMask = strValue;
                    }
                    else if (strKey == "AMBC")
                    {
                        _isNeedToSetBlackColoredAmbient = strValue.Contains("true");
                    }

                    else if (strKey == "PROP")
                    {
                        nPropSets = int.Parse(strValue);

                        if (nPropSets > 0)
                        {
                            //새로운 PropSet을 만든다.
                            newPropSet = new PropertySet();
                        }
                    }
                    else if (strKey == "PNAM")
                    {
                        if (newPropSet != null)
                        {
                            newPropSet._name = strValue;
                        }
                    }
                    else if (strKey == "PTYP")
                    {
                        if (newPropSet != null)
                        {
                            newPropSet._propType = (SHADER_PROP_TYPE)(int.Parse(strValue));
                        }
                    }
                    else if (strKey == "PTRV")
                    {
                        if (newPropSet != null)
                        {
                            newPropSet._isReserved = strValue.Contains("true");
                        }
                    }
                    else if (strKey == "PVFL")
                    {
                        if (newPropSet != null)
                        {
                            newPropSet._value_Float = float.Parse(strValue);
                        }
                    }
                    else if (strKey == "PVIT")
                    {
                        if (newPropSet != null)
                        {
                            newPropSet._value_Int = int.Parse(strValue);
                        }
                    }
                    else if (strKey == "PVVX")
                    {
                        if (newPropSet != null)
                        {
                            newPropSet._value_Vector.x = float.Parse(strValue);
                        }
                    }
                    else if (strKey == "PVVY")
                    {
                        if (newPropSet != null)
                        {
                            newPropSet._value_Vector.y = float.Parse(strValue);
                        }
                    }
                    else if (strKey == "PVVZ")
                    {
                        if (newPropSet != null)
                        {
                            newPropSet._value_Vector.z = float.Parse(strValue);
                        }
                    }
                    else if (strKey == "PVVW")
                    {
                        if (newPropSet != null)
                        {
                            newPropSet._value_Vector.w = float.Parse(strValue);
                        }
                    }
                    else if (strKey == "PVCR")
                    {
                        if (newPropSet != null)
                        {
                            newPropSet._value_Color.r = float.Parse(strValue);
                        }
                    }
                    else if (strKey == "PVCG")
                    {
                        if (newPropSet != null)
                        {
                            newPropSet._value_Color.g = float.Parse(strValue);
                        }
                    }
                    else if (strKey == "PVCB")
                    {
                        if (newPropSet != null)
                        {
                            newPropSet._value_Color.b = float.Parse(strValue);
                        }
                    }
                    else if (strKey == "PVCA")
                    {
                        if (newPropSet != null)
                        {
                            newPropSet._value_Color.a = float.Parse(strValue);
                        }
                    }
                    else if (strKey == "PCMT")
                    {
                        if (newPropSet != null)
                        {
                            newPropSet._isCommonTexture = strValue.Contains("true");
                        }
                    }
                    else if (strKey == "PCTP")
                    {
                        if (newPropSet != null)
                        {
                            newPropSet._commonTexturePath = strValue;
                        }
                    }
                    else if (strKey == ">>>>")
                    {
                        //지금까지 만든 PropSet을 리스트에 넣자.
                        if (newPropSet != null)
                        {
                            _propertySets.Add(newPropSet);
                            newPropSet = new PropertySet();                            //새로운 PropSet 생성
                        }
                    }
                }
                catch (Exception ex)
                {
                    Debug.LogError("MaterialSet Load Exception : " + ex);
                }
            }

            if (newPropSet != null)
            {
                newPropSet = null;
            }
        }
        /// <summary>
        /// MaterialSet으로 부터 생성한다.
        /// </summary>
        /// <param name="srcMat"></param>
        /// <param name="uniqueID"></param>
        /// <param name="isFromPreset"></param>
        /// <param name="isDefault"></param>
        public void CopyFromSrc(apMaterialSet srcMat, int uniqueID, bool isFromPreset, bool isPreset, bool isDefault)
        {
            _uniqueID = uniqueID;
            _name     = srcMat._name;


            if (!isPreset)
            {
                //프리셋이 아닌 경우
                _isReserved = false;
                if (isFromPreset)
                {
                    //Src가 Preset인 경우
                    _linkedPresetID       = srcMat._uniqueID;
                    _linkedPresetMaterial = srcMat;
                }
                else
                {
                    //Src가 일반 MaterialSet인 경우
                    //같은 프리셋 공유
                    _linkedPresetID       = srcMat._linkedPresetID;
                    _linkedPresetMaterial = srcMat._linkedPresetMaterial;
                }


                _isDefault = isDefault;
            }
            else
            {
                //프리셋인 경우
                _isReserved           = false;
                _linkedPresetID       = -1;
                _linkedPresetMaterial = null;
            }

            _icon = srcMat._icon;


            _shaderPath_Normal_AlphaBlend        = srcMat._shaderPath_Normal_AlphaBlend;
            _shaderPath_Normal_Additive          = srcMat._shaderPath_Normal_Additive;
            _shaderPath_Normal_SoftAdditive      = srcMat._shaderPath_Normal_SoftAdditive;
            _shaderPath_Normal_Multiplicative    = srcMat._shaderPath_Normal_Multiplicative;
            _shaderPath_Clipped_AlphaBlend       = srcMat._shaderPath_Clipped_AlphaBlend;
            _shaderPath_Clipped_Additive         = srcMat._shaderPath_Clipped_Additive;
            _shaderPath_Clipped_SoftAdditive     = srcMat._shaderPath_Clipped_SoftAdditive;
            _shaderPath_Clipped_Multiplicative   = srcMat._shaderPath_Clipped_Multiplicative;
            _shaderPath_L_Normal_AlphaBlend      = srcMat._shaderPath_L_Normal_AlphaBlend;
            _shaderPath_L_Normal_Additive        = srcMat._shaderPath_L_Normal_Additive;
            _shaderPath_L_Normal_SoftAdditive    = srcMat._shaderPath_L_Normal_SoftAdditive;
            _shaderPath_L_Normal_Multiplicative  = srcMat._shaderPath_L_Normal_Multiplicative;
            _shaderPath_L_Clipped_AlphaBlend     = srcMat._shaderPath_L_Clipped_AlphaBlend;
            _shaderPath_L_Clipped_Additive       = srcMat._shaderPath_L_Clipped_Additive;
            _shaderPath_L_Clipped_SoftAdditive   = srcMat._shaderPath_L_Clipped_SoftAdditive;
            _shaderPath_L_Clipped_Multiplicative = srcMat._shaderPath_L_Clipped_Multiplicative;
            _shaderPath_AlphaMask = srcMat._shaderPath_AlphaMask;

            _propertySets.Clear();

            _isNeedToSetBlackColoredAmbient = srcMat._isNeedToSetBlackColoredAmbient;

#if UNITY_EDITOR
            LoadShaderAssets();
#endif

            //프로퍼티 복사
            for (int i = 0; i < srcMat._propertySets.Count; i++)
            {
                PropertySet newPropSet = new PropertySet();
                newPropSet.CopyFromSrc(srcMat._propertySets[i]);

                _propertySets.Add(newPropSet);
            }
        }
        // Link
        //-----------------------------------------------



        // Functions
        //-----------------------------------------------
        public apMaterialSet MakeReserved(int uniqueID,
                                          string name,
                                          ICON icon,
                                          string shaderPath_Normal_AlphaBlend,
                                          string shaderPath_Normal_Additive,
                                          string shaderPath_Normal_SoftAdditive,
                                          string shaderPath_Normal_Multiplicative,
                                          string shaderPath_Clipped_AlphaBlend,
                                          string shaderPath_Clipped_Additive,
                                          string shaderPath_Clipped_SoftAdditive,
                                          string shaderPath_Clipped_Multiplicative,
                                          string shaderPath_L_Normal_AlphaBlend,
                                          string shaderPath_L_Normal_Additive,
                                          string shaderPath_L_Normal_SoftAdditive,
                                          string shaderPath_L_Normal_Multiplicative,
                                          string shaderPath_L_Clipped_AlphaBlend,
                                          string shaderPath_L_Clipped_Additive,
                                          string shaderPath_L_Clipped_SoftAdditive,
                                          string shaderPath_L_Clipped_Multiplicative,
                                          string shaderPath_AlphaMask,
                                          bool isNeedToSetBlackColoredAmbient
                                          )
        {
            _uniqueID = uniqueID;
            _name     = name;

            if (_uniqueID < 10)
            {
                _isReserved = true;
            }
            else
            {
                _isReserved = false;
            }
            _linkedPresetID       = -1;
            _linkedPresetMaterial = null;
            _isDefault            = false;

            _icon = icon;


            _shaderPath_Normal_AlphaBlend        = shaderPath_Normal_AlphaBlend;
            _shaderPath_Normal_Additive          = shaderPath_Normal_Additive;
            _shaderPath_Normal_SoftAdditive      = shaderPath_Normal_SoftAdditive;
            _shaderPath_Normal_Multiplicative    = shaderPath_Normal_Multiplicative;
            _shaderPath_Clipped_AlphaBlend       = shaderPath_Clipped_AlphaBlend;
            _shaderPath_Clipped_Additive         = shaderPath_Clipped_Additive;
            _shaderPath_Clipped_SoftAdditive     = shaderPath_Clipped_SoftAdditive;
            _shaderPath_Clipped_Multiplicative   = shaderPath_Clipped_Multiplicative;
            _shaderPath_L_Normal_AlphaBlend      = shaderPath_L_Normal_AlphaBlend;
            _shaderPath_L_Normal_Additive        = shaderPath_L_Normal_Additive;
            _shaderPath_L_Normal_SoftAdditive    = shaderPath_L_Normal_SoftAdditive;
            _shaderPath_L_Normal_Multiplicative  = shaderPath_L_Normal_Multiplicative;
            _shaderPath_L_Clipped_AlphaBlend     = shaderPath_L_Clipped_AlphaBlend;
            _shaderPath_L_Clipped_Additive       = shaderPath_L_Clipped_Additive;
            _shaderPath_L_Clipped_SoftAdditive   = shaderPath_L_Clipped_SoftAdditive;
            _shaderPath_L_Clipped_Multiplicative = shaderPath_L_Clipped_Multiplicative;
            _shaderPath_AlphaMask = shaderPath_AlphaMask;

            _propertySets.Clear();

            _isNeedToSetBlackColoredAmbient = isNeedToSetBlackColoredAmbient;

#if UNITY_EDITOR
            LoadShaderAssets();
#endif



            return(this);
        }