Example #1
0
        public static ServerPropertiesDialog NewPropertiesDialog(Server server, Form parentForm)
        {
            ServerPropertiesDialog serverPropertiesDialog = new ServerPropertiesDialog(server, server.DisplayName + " 配置", "OK", parentForm);

            serverPropertiesDialog.CreateServerPropertiesPage(server);
            serverPropertiesDialog.CreateControls(server);
            if (server.FileGroup == null)
            {
                serverPropertiesDialog.PropertiesPage.SetParentDropDown(server.Parent as GroupBase);
            }
            serverPropertiesDialog.PropertiesPage.PopulateParentDropDown(null, server.Parent as GroupBase);
            return(serverPropertiesDialog);
        }
Example #2
0
        public static ServerPropertiesDialog NewImportDialog(GroupBase parent)
        {
            Server server = Server.CreateForAddDialog();
            ServerPropertiesDialog serverPropertiesDialog = new ServerPropertiesDialog(server, "导入服务器配置", "导入", null);            //(server, "Import Servers", "Import", null)

            serverPropertiesDialog.CreateImportServersPage(server);
            serverPropertiesDialog.CreateControls(server);
            if (!serverPropertiesDialog.PropertiesPage.PopulateParentDropDown(null, parent))
            {
                serverPropertiesDialog.Dispose();
                return(null);
            }
            return(serverPropertiesDialog);
        }
Example #3
0
        public static ServerPropertiesDialog NewAddDialog(GroupBase parent)
        {
            Server server = Server.CreateForAddDialog();
            ServerPropertiesDialog serverPropertiesDialog = new ServerPropertiesDialog(server, "添加服务器", "添加", null);            //(server, "Add Server", "Add", null)

            serverPropertiesDialog.CreateServerPropertiesPage(server);
            serverPropertiesDialog.CreateControls(server);
            if (!serverPropertiesDialog.PropertiesPage.PopulateParentDropDown(null, parent))
            {
                serverPropertiesDialog.Dispose();
                return(null);
            }
            return(serverPropertiesDialog);
        }