Exemplo n.º 1
0
        public static void Dump()
        {
            try
            {
                UserDefinFunItem[] nodes = new UserDefinFunItem[UserFuncDic.Count];
                int i = 0;

                foreach (KeyValuePair <string, string> pair in UserFuncDic)
                {
                    nodes[i]                 = new UserDefinFunItem();
                    nodes[i].UfuncName       = pair.Key;
                    nodes[i].UfuncExpression = pair.Value;
                    i++;
                }

                UFuncs temp = new UFuncs();
                temp.Items = nodes;

                SerializerHelper.XMLSerialize(FILENAME, temp);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
        static void LoadUfuncs()
        {
            if (!File.Exists(FILENAME))
            {
                //nothing
            }
            else
            {
                try
                {
                    _uFuncs = SerializerHelper.XMLDeSerialize <UFuncs>(FILENAME);
                }
                catch (Exception ex)
                {
                    throw ex;
                }

                if (_uFuncs != null)
                {
                    foreach (UserDefinFunItem n in _uFuncs.Items)
                    {
                        CreateUfunc(n.UfuncName, n.UfuncExpression);
                    }
                }
            }
        }
Exemplo n.º 3
0
        static void LoadUfuncs()
        {
            if (!File.Exists(FILENAME))
            {
                //nothing
            }
            else
            {
                try
                {
                    _uFuncs = SerializerHelper.XMLDeSerialize<UFuncs>(FILENAME);
                }
                catch (Exception ex)
                {
                    throw ex;
                }

                if (_uFuncs != null)
                {
                    foreach (UserDefinFunItem n in _uFuncs.Items)
                    {
                        CreateUfunc(n.UfuncName, n.UfuncExpression);
                    }
                }
            }
        }
Exemplo n.º 4
0
        public static void Dump()
        {
            try
            {
                UserDefinFunItem[] nodes = new UserDefinFunItem[UserFuncDic.Count];
                int i = 0;

                foreach (KeyValuePair<string, string> pair in UserFuncDic)
                {
                    nodes[i] = new UserDefinFunItem();
                    nodes[i].UfuncName = pair.Key;
                    nodes[i].UfuncExpression = pair.Value;
                    i++;
                }

                UFuncs temp = new UFuncs();
                temp.Items = nodes;

                SerializerHelper.XMLSerialize(FILENAME, temp);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }