当前位置: 首页>>代码示例>>Python>>正文


Python WizardPage.go_next方法代码示例

本文整理汇总了Python中workbench.ui.WizardPage.go_next方法的典型用法代码示例。如果您正苦于以下问题:Python WizardPage.go_next方法的具体用法?Python WizardPage.go_next怎么用?Python WizardPage.go_next使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在workbench.ui.WizardPage的用法示例。


在下文中一共展示了WizardPage.go_next方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: go_next

# 需要导入模块: from workbench.ui import WizardPage [as 别名]
# 或者: from workbench.ui.WizardPage import go_next [as 别名]
    def go_next(self):
        self.main.plan.state.objectCreationParams["KeepSchemata"] = self._keep_schema.get_active()

        self.main.plan.state.objectCreationParams["CreateInDB"] = self._create_db.get_active()    

        if self._create_script.get_active():
            path = self._create_script_file.get_string_value()
            if not path or not os.path.isdir(os.path.dirname(path)):
                mforms.Utilities.show_error("Create Script File", "Create Script File option was enabled, but the provided path is invalid.\nPlease correct and retry.",
                                            "OK", "", "")
                return

            if os.path.isdir(path):
                mforms.Utilities.show_error("Create Script File", "'%s' is a directory name. Please provide a file name for saving the script as and retry." % path,
                                            "OK", "", "")
                return

            if os.path.exists(path) and self._check_file_duplicate:
                if mforms.Utilities.show_error("Create Script File", "The file '%s' provided for the SQL script already exists. Do you want to replace it?" % path,
                                            "Replace", "Cancel", "") == mforms.ResultCancel:
                    return
            self.main.plan.state.objectCreationParams["CreateSQLFile"] = path
        elif self.main.plan.state.objectCreationParams.has_key("CreateSQLFile"):
            del self.main.plan.state.objectCreationParams["CreateSQLFile"]
        
        WizardPage.go_next(self)
开发者ID:alMysql,项目名称:mysql-workbench,代码行数:28,代码来源:migration_schema_creation.py

示例2: go_next

# 需要导入模块: from workbench.ui import WizardPage [as 别名]
# 或者: from workbench.ui.WizardPage import go_next [as 别名]
    def go_next(self):
        i = self._worker_count.get_string_value()
        try:
            count = int(i)
            if count < 1:
                raise Exception("Bad value")
        except Exception:
            mforms.Utilities.show_error("Invalid Value", "Worker thread count must be a number larger than 0.", "OK", "", "")
            return
        self.main.plan.state.dataBulkTransferParams["workerCount"] = count
        #if self.dump_to_file.get_active():
        #   self.main.plan.state.dataBulkTransferParams["GenerateDumpScript"] = self.dump_to_file_entry.get_string_value()
        #else:
        #    if "GenerateDumpScript" in self.main.plan.state.dataBulkTransferParams:
        #       del self.main.plan.state.dataBulkTransferParams["GenerateDumpScript"]

        if self.copy_script_checkbox.get_active():
            self.main.plan.state.dataBulkTransferParams["GenerateCopyScript"] = self.copy_script_entry.get_string_value()
        else:
            if self.main.plan.state.dataBulkTransferParams.has_key("GenerateCopyScript"):
                del self.main.plan.state.dataBulkTransferParams["GenerateCopyScript"]

        self.main.plan.state.dataBulkTransferParams["LiveDataCopy"] = 1 if self._copy_db.get_active() else 0
        self.main.plan.state.dataBulkTransferParams["DebugTableCopy"] = 1 if self._debug_copy.get_active() else 0
        self.main.plan.state.dataBulkTransferParams["TruncateTargetTables"] = 1 if self._truncate_db.get_active() else 0

        for key in self.main.plan.state.dataBulkTransferParams.keys():
            if key.endswith(":rangeKey"):
                del self.main.plan.state.dataBulkTransferParams[key]
            if key.endswith(":rangeStart"):
                del self.main.plan.state.dataBulkTransferParams[key]
            if key.endswith(":rangeEnd"):
                del self.main.plan.state.dataBulkTransferParams[key]
            if key.endswith(":rowCount"):
                del self.main.plan.state.dataBulkTransferParams[key]

        tables_to_copy = []
        for row in range(self._tree.count()):
            n = self._tree.node_at_row(row)
            table = self._tables_by_id[n.get_tag()]

            count = n.get_string(1)
            if not count:
                tables_to_copy.append(table)
            else:
                try:
                    count = int(count)
                    if count > 0:
                        # tables_to_copy.append(table)
                        self.main.plan.state.dataBulkTransferParams["%s:rowCount" % table.__id__] = count
                except:
                    grt.log_error("Invalid value in Migration DataCopy tree: %s"%count)

        self.main.plan.state.dataBulkTransferParams["tableList"] = tables_to_copy

        if self._copy_db.get_active() or self.copy_script_checkbox.get_active():
            return WizardPage.go_next(self)
        else:
            self.main.go_next_page(2)
            return
开发者ID:verflucht,项目名称:unlock_repo_feria,代码行数:62,代码来源:migration_data_transfer.py

示例3: go_next

# 需要导入模块: from workbench.ui import WizardPage [as 别名]
# 或者: from workbench.ui.WizardPage import go_next [as 别名]
 def go_next(self):
     dic = self.main.plan.state.objectMigrationParams
     for item, name, getter in self._db_options:
         dic[name] = getter()
     WizardPage.go_next(self)
开发者ID:verflucht,项目名称:unlock_repo_feria,代码行数:7,代码来源:migration_object_migration.py

示例4: go_next

# 需要导入模块: from workbench.ui import WizardPage [as 别名]
# 或者: from workbench.ui.WizardPage import go_next [as 别名]
 def go_next(self):
     if self.validate():
         self.main.plan.migrationUpdate()
         WizardPage.go_next(self)
开发者ID:pk-codebox-evo,项目名称:mysql-workbench,代码行数:6,代码来源:migration_object_editing.py

示例5: go_next

# 需要导入模块: from workbench.ui import WizardPage [as 别名]
# 或者: from workbench.ui.WizardPage import go_next [as 别名]
 def go_next(self):
     if self.validate():
         WizardPage.go_next(self)
开发者ID:verflucht,项目名称:unlock_repo_feria,代码行数:5,代码来源:migration_object_editing.py


注:本文中的workbench.ui.WizardPage.go_next方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。