コード例 #1
0
    static void loadTypes()
    {
        string sDir       = Path.GetDirectoryName(typeof(InitKnownTypes).Assembly.Location);
        string toolboxCfg = Path.Combine(sDir, "LimnorToolbox.xml");

        XmlUtil.AddKnownTypes(toolboxCfg);
        Type[] lst = typeof(WebMessageBox).Assembly.GetExportedTypes();
        for (int i = 0; i < lst.Length; i++)
        {
            if (lst[i].GetInterface("IWebClientControl") != null)
            {
                XmlUtil.AddKnownType(lst[i].Name, lst[i]);
            }
            else
            {
                object[] vs = lst[i].GetCustomAttributes(typeof(WebClientClassAttribute), true);
                if (vs != null && vs.Length > 0)
                {
                    XmlUtil.AddKnownType(lst[i].Name, lst[i]);
                }
                else
                {
                    if (lst[i].GetInterface("IWebServerComponentCreator") != null)
                    {
                        XmlUtil.AddKnownType(lst[i].Name, lst[i]);
                    }
                }
            }
        }
    }
コード例 #2
0
    private static void addOtherTypes()
    {
        XmlUtil.AddKnownType("CodeArgumentReferenceExpression", typeof(CodeArgumentReferenceExpression));
        XmlUtil.AddKnownType("CodeArrayCreateExpression", typeof(CodeArrayCreateExpression));
        XmlUtil.AddKnownType("CodeArrayIndexerExpression", typeof(CodeArrayIndexerExpression));
        XmlUtil.AddKnownType("CodeBaseReferenceExpression", typeof(CodeBaseReferenceExpression));
        XmlUtil.AddKnownType("CodeBinaryOperatorExpression", typeof(CodeBinaryOperatorExpression));
        XmlUtil.AddKnownType("CodeCastExpression", typeof(CodeCastExpression));
        XmlUtil.AddKnownType("CodeDefaultValueExpression", typeof(CodeDefaultValueExpression));
        XmlUtil.AddKnownType("CodeDelegateCreateExpression", typeof(CodeDelegateCreateExpression));
        XmlUtil.AddKnownType("CodeDelegateInvokeExpression", typeof(CodeDelegateInvokeExpression));
        XmlUtil.AddKnownType("CodeDirectionExpression", typeof(CodeDirectionExpression));
        XmlUtil.AddKnownType("CodeEventReferenceExpression", typeof(CodeEventReferenceExpression));
        XmlUtil.AddKnownType("CodeFieldReferenceExpression", typeof(CodeFieldReferenceExpression));
        XmlUtil.AddKnownType("CodeIndexerExpression", typeof(CodeIndexerExpression));
        XmlUtil.AddKnownType("CodeMethodInvokeExpression", typeof(CodeMethodInvokeExpression));
        XmlUtil.AddKnownType("CodeMethodReferenceExpression", typeof(CodeMethodReferenceExpression));
        XmlUtil.AddKnownType("CodeObjectCreateExpression", typeof(CodeObjectCreateExpression));
        XmlUtil.AddKnownType("CodeParameterDeclarationExpression", typeof(CodeParameterDeclarationExpression));
        XmlUtil.AddKnownType("CodePrimitiveExpression", typeof(CodePrimitiveExpression));
        XmlUtil.AddKnownType("CodePropertyReferenceExpression", typeof(CodePropertyReferenceExpression));
        XmlUtil.AddKnownType("CodePropertySetValueReferenceExpression", typeof(CodePropertySetValueReferenceExpression));
        XmlUtil.AddKnownType("CodeSnippetExpression", typeof(CodeSnippetExpression));
        XmlUtil.AddKnownType("CodeThisReferenceExpression", typeof(CodeThisReferenceExpression));
        XmlUtil.AddKnownType("CodeTypeOfExpression", typeof(CodeTypeOfExpression));
        XmlUtil.AddKnownType("CodeTypeReferenceExpression", typeof(CodeTypeReferenceExpression));
        XmlUtil.AddKnownType("CodeVariableReferenceExpression", typeof(CodeVariableReferenceExpression));
        //
        XmlUtil.AddKnownType("CodeAssignStatement", typeof(CodeAssignStatement));
        XmlUtil.AddKnownType("CodeAttachEventStatement", typeof(CodeAttachEventStatement));
        XmlUtil.AddKnownType("CodeCommentStatement", typeof(CodeCommentStatement));
        XmlUtil.AddKnownType("CodeConditionStatement", typeof(CodeConditionStatement));
        XmlUtil.AddKnownType("CodeExpressionStatement", typeof(CodeExpressionStatement));
        XmlUtil.AddKnownType("CodeGotoStatement", typeof(CodeGotoStatement));
        XmlUtil.AddKnownType("CodeIterationStatement", typeof(CodeIterationStatement));
        XmlUtil.AddKnownType("CodeLabeledStatement", typeof(CodeLabeledStatement));
        XmlUtil.AddKnownType("CodeMethodReturnStatement", typeof(CodeMethodReturnStatement));
        XmlUtil.AddKnownType("CodeRemoveEventStatement", typeof(CodeRemoveEventStatement));
        XmlUtil.AddKnownType("CodeSnippetStatement", typeof(CodeSnippetStatement));
        XmlUtil.AddKnownType("CodeThrowExceptionStatement", typeof(CodeThrowExceptionStatement));
        XmlUtil.AddKnownType("CodeTryCatchFinallyStatement", typeof(CodeTryCatchFinallyStatement));
        XmlUtil.AddKnownType("CodeVariableDeclarationStatement", typeof(CodeVariableDeclarationStatement));

        //
        XmlUtil.AddKnownType("ProjectResources", typeof(ProjectResources));
        XmlUtil.AddKnownType("ResourceCodePointer", typeof(ResourceCodePointer));
        XmlUtil.AddKnownType("ResourcePointerString", typeof(ResourcePointerString));
        XmlUtil.AddKnownType("ResourcePointerImage", typeof(ResourcePointerImage));
        XmlUtil.AddKnownType("ResourcePointerIcon", typeof(ResourcePointerIcon));
        XmlUtil.AddKnownType("ResourcePointerAudio", typeof(ResourcePointerAudio));
        XmlUtil.AddKnownType("ResourcePointerFile", typeof(ResourcePointerFile));
        XmlUtil.AddKnownType("ResourcePointerFilePath", typeof(ResourcePointerFilePath));
        //
        XmlUtil.AddKnownType("MousePointer", typeof(MousePointer));
        XmlUtil.AddKnownType("Keyboard", typeof(Keyboard));
        XmlUtil.AddKnownType("HotKeyList", typeof(HotKeyList));
        XmlUtil.AddKnownType("WindowsManager", typeof(WindowsManager));
        XmlUtil.AddKnownType("WindowsRegistry", typeof(WindowsRegistry));
        XmlUtil.AddKnownType("ExecuteFile", typeof(ExecuteFile));
        XmlUtil.AddKnownType("ApplicationConfiguration", typeof(ApplicationConfiguration));
        XmlUtil.AddKnownType("CategoryList", typeof(CategoryList));
        XmlUtil.AddKnownType("MathematicExpression", typeof(MathematicExpression));
        XmlUtil.AddKnownType("ServiceBase", typeof(ServiceBase));
        XmlUtil.AddKnownType("Environment", typeof(Environment));
        XmlUtil.AddKnownType("MailSender", typeof(MailSender));
        XmlUtil.AddKnownType("OperationFailEventArgs", typeof(OperationFailEventArgs));
        XmlUtil.AddKnownType("OperationFailHandler", typeof(OperationFailHandler));
        XmlUtil.AddKnownType("EnumCharEncode", typeof(EnumCharEncode));
        XmlUtil.AddKnownType("FtpClient", typeof(FtpClient));
        XmlUtil.AddKnownType("FtpTransferEventArgs", typeof(FtpTransferEventArgs));
        XmlUtil.AddKnownType("FtpFileInfo", typeof(FtpFileInfo));
        XmlUtil.AddKnownType("TextBoxNumber", typeof(TextBoxNumber));
        XmlUtil.AddKnownType("LabelNumber", typeof(LabelNumber));
        XmlUtil.AddKnownType("ButtonKey", typeof(ButtonKey));
        XmlUtil.AddKnownType("KeyPairList", typeof(KeyPairList));
        XmlUtil.AddKnownType("KeyPair", typeof(KeyPair));
        XmlUtil.AddKnownType("StringTool", typeof(StringTool));
        XmlUtil.AddKnownType("Capturer", typeof(Capturer));
        XmlUtil.AddKnownType("CopyProtector", typeof(CopyProtector));
        XmlUtil.AddKnownType("OskWindow", typeof(OskWindow));
        XmlUtil.AddKnownType("PrinterManager", typeof(PrinterManager));
        XmlUtil.AddKnownType("RS232", typeof(RS232));
        XmlUtil.AddKnownType("ScheduleTimer", typeof(ScheduleTimer));
        XmlUtil.AddKnownType("Scheduler", typeof(Scheduler));
        XmlUtil.AddKnownType("EnumScheduleType", typeof(EnumScheduleType));
        XmlUtil.AddKnownType("DialogStringCollection", typeof(DialogStringCollection));
        XmlUtil.AddKnownType("StringCollectionEditor", typeof(StringCollectionEditor));
        XmlUtil.AddKnownType("MciMediaPlayer", typeof(MciMediaPlayer));
        XmlUtil.AddKnownType("RemotingHost", typeof(RemotingHost));
        XmlUtil.AddKnownType("EventArgsSchedule", typeof(EventArgsSchedule));
        XmlUtil.AddKnownType("MonthCalendar", typeof(MonthCalendar));
        XmlUtil.AddKnownType("PropertyClassWebClient", typeof(PropertyClassWebClient));
        XmlUtil.AddKnownType("PropertyClassWebServer", typeof(PropertyClassWebServer));
        XmlUtil.AddKnownType("SessionVariableCollection", typeof(SessionVariableCollection));
        XmlUtil.AddKnownType("SessionVariable", typeof(SessionVariable));
        //activate TreeViewX.AddKnownTypes()
        ///////
        XmlUtil.AddKnownType("PointFX", typeof(PointFX));
        TreeViewX.Init();
        //========
        XmlUtil.AddKnownType("WebBrowserControl", typeof(WebBrowserControl));
        XmlUtil.AddKnownType("RichTextBoxEx", typeof(RichTextBoxEx));
        //
        string sDir       = Path.GetDirectoryName(typeof(DesignService).Assembly.Location);
        string toolboxCfg = Path.Combine(sDir, "LimnorToolbox.xml");

        toolboxCfg = Path.Combine(sDir, "LimnorWebToolbox.xml");
        XmlUtil.AddKnownTypes(toolboxCfg);
    }