Exemplo n.º 1
0
 private void LoadNextForm()
 {
     if ((_rootFormHost != null) && (_rootFormHost.NextRequest != null))
     {
         IWebFormInterface newForm = (IWebFormInterface)NodeTypeTable.CreateInstance("FormInterface");
         newForm.OnClosing += new CancelEventHandler(MainFormClosing);
         newForm.OnClosed  += new EventHandler(MainFormClosed);
         newForm            = (IWebFormInterface)_rootFormHost.LoadNext(newForm);
         _rootFormHost.Open();
         newForm.Show();
     }
 }
Exemplo n.º 2
0
        public void SetFormDesigner()
        {
            using (DAE.Runtime.Data.Scalar nodeTable = DataSession.Evaluate(FormDesignerNodeTypesExpression))
            {
                NodeTypeTable.Clear();
                NodeTypeTable.LoadFromString(nodeTable.AsString);
            }

            // Load the files required to register any nodes, if necessary
            if (DataSession.Server is DAE.Server.LocalServer)
            {
                IServerCursor cursor = DataSession.OpenCursor(GetFormDesignerLibraryFilesExpression);
                try
                {
                    using (DAE.Runtime.Data.IRow row = cursor.Plan.RequestRow())
                    {
                        bool          shouldLoad;
                        List <string> filesToLoad = new List <string>();

                        while (cursor.Next())
                        {
                            cursor.Select(row);
                            string fullFileName =
                                ((DAE.Server.LocalServer)DataSession.Server).GetFile
                                (
                                    (DAE.Server.LocalProcess)cursor.Plan.Process,
                                    (string)row["Library_Name"],
                                    (string)row["Name"],
                                    (DateTime)row["TimeStamp"],
                                    (bool)row["IsDotNetAssembly"],
                                    out shouldLoad
                                );
                            if (shouldLoad)
                            {
                                filesToLoad.Add(fullFileName);
                            }
                        }

                        // Load each file to ensure they can be reached by the assembly resolver hack (see AssemblyUtility)
                        foreach (string fullFileName in filesToLoad)
                        {
                            Assembly.LoadFrom(fullFileName);
                        }
                    }
                }
                finally
                {
                    DataSession.CloseCursor(cursor);
                }
            }
        }
Exemplo n.º 3
0
 public void SetLibrary(string libraryName)
 {
     DAE.Runtime.DataParams paramsValue = new DAE.Runtime.DataParams();
     paramsValue.Add(DAE.Runtime.DataParam.Create(Pipe.Process, "ALibraryName", libraryName));
     using
     (
         DAE.Runtime.Data.Scalar nodeTable =
             DataSession.Evaluate
             (
                 LibraryNodeTypesExpression,
                 paramsValue
             )
     )
     {
         NodeTypeTable.Clear();
         NodeTypeTable.LoadFromString(nodeTable.AsString);
     }
     ValidateNodeTypeTable();
 }