Exemplo n.º 1
0
        static void DeserializeV1(guiComposition opr, DirectoryInfo oprPath, out List <UIModel> models, out List <UIConnection> connections)
        {
            CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;

            try
            {
                Thread.CurrentThread.CurrentCulture = new CultureInfo("");

                models      = DeserializeModelsV1(opr, oprPath);
                connections = DeserializeConnectionsV1(opr, models);
            }
            finally
            {
                Thread.CurrentThread.CurrentCulture = currentCulture;
            }
        }
Exemplo n.º 2
0
        static List <UIModel> DeserializeModelsV1(guiComposition opr, DirectoryInfo oprPath)
        {
            throw new NotImplementedException();
#if DEPRECATED
            if (opr.models != null)
            {
                UIModel  uiModel;
                FileInfo omiFile;

                foreach (guiCompositionModel oprModel in opr.models)
                {
                    try
                    {
                        omiFile = Utils.GetAbsoluteOmiFile(
                            oprModel.omi, oprPath);

                        uiModel = new UIModel();
                        uiModel.OmiDeserializeAndInitialize(omiFile);

                        uiModel.Rect.X      = Int32.Parse(oprModel.rect_x);
                        uiModel.Rect.Y      = Int32.Parse(oprModel.rect_y);
                        uiModel.Rect.Width  = Int32.Parse(oprModel.rect_width);
                        uiModel.Rect.Height = Int32.Parse(oprModel.rect_height);

                        ModelAdd(uiModel);
                    }
                    catch (Exception e)
                    {
                        throw new Exception("Cannot add model " + oprModel.omi, e);
                    }
                }

                // TODO ADH Connections
            }
#endif
        }