### Quick Start Guide Source: https://context7_llms This section provides a quick start guide for developing with GrapeCity Huozige, covering the initial setup and basic steps. ```Markdown [快速开始](https://www.grapecity.com.cn/solutions/huozige/help/docs/process-manual/development-guide/quick-start.md) ``` -------------------------------- ### Installation Guide Source: https://context7_llms General installation instructions for Huozige components, including load balancing and security providers. ```GrapeCity Huozige // No specific code provided, but refers to 'install' and 'installation'. ``` -------------------------------- ### Generate Plugin Zip Package with Maven Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/java-adapter/java-server-command/quick-start This snippet demonstrates how to generate a plugin's zip package using Maven's 'package' command. After generating the package, you can manually install it in GrapeCity Huozige Designer. Alternatively, using Maven's 'install' command will automatically install the plugin. ```bash mvn package ``` ```bash mvn install ``` -------------------------------- ### Java Server Command Quick Start Source: https://context7_llms A quick start guide for developing Java server commands in Huozige. This is for users looking to build server-side logic using Java. ```Markdown [Java服务端命令插件快速入门](https://www.grapecity.com.cn/solutions/huozige/help/docs/java-adapter/java-server-command/quick-start.md) ``` -------------------------------- ### Quick Start for ListView Report in Huozige Source: https://context7_llms Get started with ListView reports in GrapeCity Huozige with this quick start guide. It covers the essential steps to begin creating and using ListView reports. ```markdown - [快速入门](https://www.grapecity.com.cn/solutions/huozige/help/docs/listview-report/quick-start.md) ``` -------------------------------- ### Generate Java Web API Project with GrapeCity Tool Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/java-adapter/java This snippet describes the process of using the GrapeCity Java Web API generation tool to create a new Web API project. It involves selecting the 'Web Api' tab, naming the API, and specifying the GrapeCity Designer installation path. ```Java // No specific code provided for this step, but it involves using a GUI tool. // The process includes: // 1. Downloading the GrapeCity Java Web API Generation Tool. // 2. Running the tool and selecting the 'Web Api' tab. // 3. Setting the Web Api name. // 4. Specifying the GrapeCity Designer installation path. // 5. Clicking 'Create Web Api'. ``` -------------------------------- ### Install Huozige Designer Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/installationanduninstallation/installdesigner This section details the steps to install the Huozige Designer. It requires the installation package and a prepared environment. The process involves running an executable, accepting the license agreement, choosing an installation path, and waiting for the installation to complete. ```bash Double-click the "Huozige Designer.exe" file from the extracted installation package. Accept the user license agreement and choose a custom or default installation path. Click "Install" and wait approximately 30 seconds for the installation to complete. A shortcut will be generated on the desktop. ``` -------------------------------- ### Run Huozige Application Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/process-manual/development-guide/quick-start This snippet details how to run the Huozige application. It involves pressing the F5 key on the keyboard to launch the application, allowing users to interact with the created processes. ```Keyboard Shortcut Press the F5 key to start the application. ``` -------------------------------- ### Create a New Process in Huozige Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/process-manual/development-guide/quick-start This snippet explains how to create a new process in Huozige. It involves right-clicking on the 'Process' tab in the object manager and selecting 'New Process' from the context menu. The system automatically creates supporting pages and views. ```UI Interaction In the object manager's Process tab, right-click and select "New Process" from the context menu. The system will create auxiliary pages and views. ``` -------------------------------- ### Run Elasticsearch as a Specific User Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/serversetting/log-and-monitor/log/install-elasticsearch Command to switch to a newly created user and start the Elasticsearch service. ```Shell sudo -u elasticsearch /path/to/elasticsearch/bin/elasticsearch ``` -------------------------------- ### Start Elasticsearch Instance Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/serversetting/log-and-monitor/log/install-elasticsearch This command starts an Elasticsearch instance. It is a prerequisite for resetting passwords, as the Elasticsearch instance must be running for the password reset process to succeed. ```bash ./bin/elasticsearch ``` -------------------------------- ### Enable Huozige Process Functionality Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/process-manual/development-guide/quick-start This snippet describes how to enable the process functionality within Huozige by clicking a gear icon and checking the 'Process' option in the object manager sidebar. ```UI Interaction Click the ⚙️ button in the object manager sidebar and check "Process" to enable process functionality. ``` -------------------------------- ### Initiate a Process in Huozige Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/process-manual/development-guide/quick-start This snippet describes the steps to initiate a process within the Huozige application. After launching the application, users click the 'Initiate Process' button and then the 'Initiate' button in the dropdown. The process then moves to the first form-filling node. ```UI Interaction In the browser, click the "Initiate Process" button. In the dropdown, click the "Initiate" button. The process will then enter the first form-filling node. ``` -------------------------------- ### Run Forguncy Server Installer (Linux) Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/installationanduninstallation/installserveronlinux Executes the 'installForguncy_cn.sh' script with superuser privileges to install Forguncy Server. This script handles the installation of .netCore and GDI+ packages, followed by the server installation. ```Shell sudo bash installForguncy_cn.sh ``` -------------------------------- ### Add Application Resource in HuoZiGe Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/multi-language This describes the process of adding a new application resource, which involves providing a key and the corresponding text for each language. -------------------------------- ### Upload Java Web API to GrapeCity Designer Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/java-adapter/java This snippet explains the final step of deploying the built Java Web API. After building the project and obtaining the JAR file (e.g., custom-api-1.0.0-jar-with-dependencies.fgcjwa.zip), it needs to be uploaded to GrapeCity Designer via the 'File - Settings - Custom Web API' menu. ```Java // After building the project, a zip file like 'custom-api-1.0.0-jar-with-dependencies.fgcjwa.zip' is generated. // To upload this to GrapeCity Designer: // 1. Open GrapeCity Designer. // 2. Navigate to 'File' > 'Settings' > 'Custom Web API'. // 3. Click 'Upload Web API'. // 4. Select the generated zip file from your file explorer. // The uploaded API will then appear in the API list. ``` -------------------------------- ### Build Java Web API with Maven Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/java-adapter/java This section details how to build the generated Java Web API project using Maven. It explains that GrapeCity Java Web APIs use Maven for dependency management and how to initiate the build process within an IDE like IntelliJ IDEA. ```Java // After opening the project in IntelliJ IDEA and installing Maven if prompted: // 1. Locate the Maven tool window. // 2. Navigate to the lifecycle phase. // 3. Double-click 'install' or right-click and select 'Run Maven Build' for 'install'. // This process compiles the code and packages it into a JAR file. ``` -------------------------------- ### Prepare Installation Package Source: https://context7_llms Instructions on preparing the installation package for Huozige plugins or applications. This involves bundling all necessary files and configurations. ```Markdown [准备安装包](https://www.grapecity.com.cn/solutions/huozige/help/docs/installationanduninstallation/preparepackage.md) ``` -------------------------------- ### 关联数据 - 特定行 Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/process-manual/System-Characteristics/client-command/start-process 根据查询条件关联特定的数据行到发起流程。如果查询返回多行,则只关联第一条匹配的数据。适用于需要根据业务逻辑筛选数据进行流程关联的场景。 ```JavaScript function associateSpecificRow(processInstance, queryParams) { // 假设有一个函数可以根据queryParams查询数据并返回第一行 console.log('Associating specific row data based on query parameters.'); // ... logic to query data and associate the first row ... return processInstance; } ``` -------------------------------- ### Install Elasticsearch for Logging Source: https://context7_llms A guide on installing Elasticsearch for logging and monitoring purposes in GrapeCity Huozige server settings. ```Markdown [安装Elasticsearch](https://www.grapecity.com.cn/solutions/huozige/help/docs/serversetting/log-and-monitor/log/install-elasticsearch.md) ``` -------------------------------- ### 在线激活活字格服务端 Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/softwarelicenseandversionhistory/activateserver 通过活字格管理控制台在线激活服务端。需要登录管理控制台,进入许可列表,增加许可并输入激活码。此过程需要管理员权限。 ```zh 1. 登录到活字格管理控制台。 默认用户名为:Administrator,密码:123456。 2. 选择“帮助支持->许可列表”,进入“许可列表”页面。 3. 单击“许可信息”下的“增加许可”。 4. 在弹出的“注册服务器激活码”窗口中输入激活码并单击“注册”。 5. 增加许可后,在许可信息的列表中可以看到增加的产品授权码、过期日期、模块授权及用户授权。 ``` -------------------------------- ### 离线激活活字格服务端 Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/softwarelicenseandversionhistory/activateserver 当无法在线激活时,可使用离线激活方式。此方法需要联系活字格售后服务获取激活码。步骤包括登录管理控制台,进入许可列表,点击增加许可,在连接失败时选择离线激活,然后将生成码发送给售后服务。 ```zh 1. 登录到活字格管理控制台。 默认用户名为:Administrator,密码:123456。 2. 选择“帮助支持->许可列表”,进入“许可列表”页面。 3. 单击“基本服务器许可”下的“增加许可”。在弹出的“注册服务器激活码”窗口中输入激活码并单击“注册”。 4. 连接激活服务器失败时,会弹出对话框,提示您连接失败,单击“离线激活”。 5. 在弹出的离线激活对话框中,将文本框中的生成码发给活字格售后服务,或通过扫码提取生成码。 活字格售后服务会使用生成码来生成激活码,请将售后服务提供的激活码输入到第二个文本框也就是激活码的文本框中。 单击“离线激活”按钮,就会离线激活成功。 6. 增加许可后,在许可信息的列表中可以看到增加的产品授权码、过期日期、模块授权及用户授权。 ``` -------------------------------- ### 关联数据 - 当前行 Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/process-manual/System-Characteristics/client-command/start-process 将当前页面上的数据行关联到发起流程的操作中。这通常用于在创建新业务单据后,将其数据传递给新启动的流程。 ```JavaScript function associateCurrentRow(processInstance) { // 假设 processInstance 对象有方法来关联当前行 console.log('Associating current row data to the process.'); // ... logic to get current row data and associate ... return processInstance; } ``` -------------------------------- ### Call Java Web API via HTTP Request in JavaScript Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/java-adapter/java This snippet demonstrates how to invoke a Java Web API by sending an HTTP request from a JavaScript command. It's useful for integrating backend Java services into a web application. The example shows a typical client-side call that triggers the server-side logic. ```JavaScript // Example of calling a server-side command that sends an HTTP request // This would typically be part of a larger JavaScript function triggered by a user action. // For instance, a button click event handler. // Assuming 'serverCommand' is a function provided by the framework to execute server-side logic // and that this server-side logic is configured to send an HTTP request to a Java Web API. // Example placeholder for the server command call: // serverCommand('yourServerCommandName', { /* parameters if any */ }); // To view results, one would typically open the browser's developer console (F12) and check the 'Console' tab. // The server-side command execution and its HTTP request result would be logged there. ``` -------------------------------- ### IBindingColumnDataSource GUID Property Source: https://www.grapecity.com.cn/solutions/huozige/help/apis/dotnet/GrapeCity.Forguncy.Plugin.IBindingColumnDataSource.html This C# code snippet shows the 'GUID' property of the IBindingColumnDataSource interface. It is used to get and set a unique identifier for the bound column as a string. ```csharp string GUID { get; set; } ``` -------------------------------- ### Publish to Server Command Help - ForguncyConsole Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/publishapp/ci-cd This snippet shows the command to execute for publishing to a server using ForguncyConsole.exe and how to access its help documentation for additional parameters. ```bash ForguncyConsole.exe Action=PublishToServer /help ``` -------------------------------- ### StartWhenServerStart Property - C# Source: https://www.grapecity.com.cn/solutions/huozige/help/apis/dotnet/GrapeCity.Forguncy.ServerApi.ScheduleApiAttribute.html Gets a value indicating whether to start scheduling when the Forguncy Server starts. This property returns a boolean value. ```csharp public bool StartWhenServerStart { get; } ``` -------------------------------- ### Get Tab Count - JavaScript Source: https://www.grapecity.com.cn/solutions/huozige/help/apis/javascript/classes/Forguncy.Forguncy.TabControlCell Retrieves the total number of tabs within a TabControlCell. This method is specific to tab-type cells. The example provided seems to incorrectly use this method to get the active tab index. ```javascript var page = Forguncy.Page; var tabControlCell = page.getCell("tabControl"); var activeTabIndex = tabControlCell.getActiveTabIndex(); alert(activeTabIndex); ``` -------------------------------- ### Installation and Deployment Source: https://context7_llms Instructions for installing Huozige server on different operating systems, including Linux, and offline publishing. This covers the deployment aspects of the platform. ```Markdown - [离线发布](https://www.grapecity.com.cn/solutions/huozige/help/docs/publishapp/offline-publish-on-admin-portal.md) - [安装活字格服务端](https://www.grapecity.com.cn/solutions/huozige/help/docs/installationanduninstallation/installserver.md) - [安装活字格服务端到Linux系统](https://www.grapecity.com.cn/solutions/huozige/help/docs/installationanduninstallation/installserveronlinux.md) ``` -------------------------------- ### Get All User Infos Example Source: https://www.grapecity.com.cn/solutions/huozige/help/apis/dotnet/GrapeCity.Forguncy.ServerApi.IUserInfos.html An example demonstrating the usage of the GetUserInfos method to retrieve all registered user account information and print it to the console. It iterates through the list of users and accesses their properties. ```csharp public class SampleApi : ForguncyApi { [Get] public void TestGetUser() { var userInfos = this.UserInfos.GetUserInfos(); for (int i = 0; i < userInfos.Count; i++) { var userInfo = userInfos[i]; Console.Write(userInfo.UserName); Console.Write(userInfo.Email); Console.Write(userInfo.GetPropertyValue("上级")); //获取名为'上级'的扩展属性 } } } ``` -------------------------------- ### Activate Huozige Designer Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/installationanduninstallation/installdesigner This process describes how to activate the Huozige Designer after installation, enabling unlimited usage. Activation is done via email after obtaining an activation code by registering or logging into a GrapeCity Passport. ```bash Launch the Huozige Designer. A free registration window will appear. Click "Get Activation Code" to navigate to the activation code acquisition page. Log in or register for a GrapeCity Passport to obtain the activation code. If you have an existing Passport, log in. Otherwise, register by clicking "Register" or scanning a QR code. After obtaining the code, enter your email address (QQ Mail recommended) and click "Get Designer Activation Code". Check your email for the activation code from GrapeCity, copy it, paste it into the free registration dialog, and click "Use Designer". ``` -------------------------------- ### Get User Info Async Example Source: https://www.grapecity.com.cn/solutions/huozige/help/apis/dotnet/GrapeCity.Forguncy.ServerApi.IUserInfos.html An example demonstrating how to use the GetUserInfoAsync method to fetch user details and print them to the console. It shows how to access properties like UserName and Email, and custom properties. ```csharp public class SampleApi : ForguncyApi { [Get] public async Task TestGetUser() { var userInfo = await this.UserInfos.GetUserInfoAsync("TestUser"); Console.Write(userInfo.UserName); Console.Write(userInfo.Email); Console.Write(userInfo.GetPropertyValue("Title")); } } ``` -------------------------------- ### Get Tab Page - JavaScript Source: https://www.grapecity.com.cn/solutions/huozige/help/apis/javascript/classes/Forguncy.Forguncy.TabControlCell Retrieves the sub-page object for a specific tab within a TabControlCell. This allows access to cells and elements within that tab. The example shows how to get a cell's value from a specific tab's sub-page. ```javascript var page = Forguncy.Page; var tabControlCell = page.getCell("tabControl"); var tab1 = tabControlCell.getTabPage(0); var subPageCell = tab1.getCell("myCell"); alert(subPageCell.getValue()); ``` -------------------------------- ### Create Java Web API with Annotations Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/java-adapter/basic-introduce Demonstrates how to create different types of Web APIs (GET, POST, Scheduled) by annotating methods within a class that extends ForguncyApi. These methods can interact with databases, users, organizations, and roles. ```Java public class MyApi extends ForguncyApi { @GetApi public String getSomeData() { // Method implementation to retrieve data return "Some data"; } @PostApi public void postSomeData(String data) { // Method implementation to process incoming data } @ScheduleApi(cron = "0 0 * * * ?") public void scheduledTask() { // Method implementation for scheduled tasks } } ``` -------------------------------- ### Get and Set Cell Value Source: https://www.grapecity.com.cn/solutions/huozige/help/apis/javascript/classes/Forguncy.Forguncy.SubPage This example shows how to retrieve a specific cell by its name from a sub-page and then set its value. It involves getting the current page, accessing a container cell, obtaining the sub-page, and finally interacting with the target cell. ```javascript // 下面的示例代码中,通过getCell方法,获取一个单元格实例,并设置单元格的值。 // 获取当前页面 var page = Forguncy.Page; // 获取页面容器 var containerCell = page.getCell("container"); // 获取页面容器的子页面 var subPage = containerCell.getContentPage(); // 获取单元格对象 var cell = subPage.getCell("myCell"); // 设置单元格的值 cell.setValue("活字格"); ``` -------------------------------- ### 购买活字格许可 Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/softwarelicenseandversionhistory/activateserver 联系活字格服务团队购买许可。提供了服务电话和邮箱信息。 ```zh 电话: 400-657-6008 邮箱: info.xa@grapecity.com ``` -------------------------------- ### Get Application Resource by Name (C#) Source: https://www.grapecity.com.cn/solutions/huozige/help/apis/dotnet/GrapeCity.Forguncy.Commands.Command.html Retrieves a specific application resource by its name. The resource name should start with '~'. ```csharp public string GetApplicationResource(string name) ``` -------------------------------- ### Partition Function Example Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/report/expression/commonfunction/processfunction Shows an example of the Partition function, which categorizes a number into a specified range. Partition(230, 1, 1000, 100) returns '201:300', indicating that 230 falls within the range starting from 201 and ending at 300, with intervals of 100. ```Expression Partition(230,1,1000,100) ``` -------------------------------- ### Display Help - Command Line Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/appmaintenance/commandlinebackup Displays the help manual for the command-line utility. This is useful for understanding all available commands and their syntax. ```Batch \? or \help ``` -------------------------------- ### 发起流程 - 通过流程名称 Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/process-manual/System-Characteristics/client-command/start-process 通过指定的流程名称在页面上发起一个流程。这需要流程名称在对象管理器中存在。适用于需要根据已定义的流程名称启动流程的场景。 ```JavaScript function startProcessByName(processName) { // 假设有一个API或函数可以根据名称启动流程 console.log(`Initiating process with name: ${processName}`); // ... actual process initiation logic ... } ``` -------------------------------- ### Example: Using EnumAllListViewInfos for ListViewName Combo Box (C#) Source: https://www.grapecity.com.cn/solutions/huozige/help/apis/dotnet/GrapeCity.Forguncy.Plugin.IBuilderContextBase.html Illustrates how to use the EnumAllListViewInfos method to populate a combo box with list view names. This example is within a CommandDesigner, showing how to get all list views for the current page (by passing null) and extract their names. ```csharp public class WorkflowCommandDesigner : CommandDesigner { public string ListViewName { get; set; } public override EditorSetting GetEditorSetting(PropertyDescriptor property, IBuilderCommandContext builderContext) { if(property.Name == "ListViewName") { return new ComboEditorSetting(new List (builderContext.EnumAllListViewInfos(null).Select(i=>i.ListViewName))); } return base.GetEditorSetting(property, builderContext); } } ``` -------------------------------- ### Get Editor Setting for Property Source: https://www.grapecity.com.cn/solutions/huozige/help/apis/dotnet/GrapeCity.Forguncy.Plugin.ObjectDesigner.html Retrieves the appropriate editor setting for a given property descriptor and context. This example shows how to return a TextEditorSetting for a property named 'Text'. ```csharp public class MyObjectDesigner : ObjectDesigner { public override EditorSetting GetEditorSetting(PropertyDescriptor property, IBuilderContextBase contextBase) { if(property.Name == "Text") { return new TextEditorSetting(); } } } ``` -------------------------------- ### Navigate to Directory (Linux) Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/installationanduninstallation/installserveronlinux Changes the current directory to the /tmp folder on a Linux system. This is a common first step before executing installation or extraction commands. ```Shell cd /tmp ``` -------------------------------- ### LLM Question Answering with GrapeCity Huozige Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/publishapp/ci-cd This code example demonstrates how to implement a question-answering system using an LLM integrated with GrapeCity Huozige. It shows how to provide context and a question to get an answer. ```python def answer_question(context, question, model_name="default_model"): # Placeholder for actual LLM API call for question answering print(f"Answering question: '{question}' with context using model: {model_name}") # Example: response = huozige_llm_client.answer(context=context, question=question, model=model_name) # return response.answer return "This is the answer to the question based on the context." ``` -------------------------------- ### 刷新流程命令条操作 Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/process-manual/System-Characteristics/process-command-bar 流程命令条的唯一可用操作是刷新,用于刷新任务的节点操作按钮列表。您可以将此操作拖拽到页面上,以生成操作单元格命令。 ```活字格 将 "刷新" 拖拽到页面上以生成操作单元格命令。 ``` -------------------------------- ### Get Forguncy Plugin Root Path Source: https://www.grapecity.com.cn/solutions/huozige/help/apis/javascript/classes/Forguncy.Forguncy.SpecialPath Retrieves the network root path for a specified plugin using its unique identifier (GUID). This is vital for accessing plugin-specific resources and functionalities. ```javascript var pluginPath = helper.SpecialPath.getPluginRootPath(pluginGuid); ``` -------------------------------- ### Publish Plugin Source: https://context7_llms Instructions on how to publish plugins developed for Huozige. ```Markdown - [发布](https://www.grapecity.com.cn/solutions/huozige/help/docs/plugindevelopment/publish.md) ``` -------------------------------- ### Auto-detect Resources in HuoZiGe Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/multi-language This feature automatically detects resources in the current project and replaces them with resource formulas. New resources are added if they don't exist. -------------------------------- ### Manage Forguncy Server Service (Linux) Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/installationanduninstallation/installserveronlinux Provides commands to manage the Forguncy Server service on Linux systems, including restarting, stopping, starting, and checking the status of the service. ```Shell sudo service ForguncyServerService restart ``` ```Shell sudo service ForguncyServerService stop ``` ```Shell sudo service ForguncyServerService start ``` ```Shell sudo service ForguncyServerService status ``` -------------------------------- ### 实现服务端命令插件 (C#) Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/plugindevelopment/plugindevelop/developservercommandplugin/asimpleservercommandplugin 定义一个服务端命令插件,包含图标、设计器、公式属性以及服务端执行逻辑。该插件实现了加法功能,并将结果存储在指定的属性中。 ```C# [Icon("pack://application:,,,/MyPlugin;component/Resources/Icon.png")] [Designer("MyPlugin.Designer.MyPluginServerCommandDesigner, MyPlugin")] public class MyPluginServerCommand : Command, ICommandExecutableInServerSideAsync { [FormulaProperty] [DisplayName("加数1")] public object AddNumber1 { get; set; } [FormulaProperty] [DisplayName("加数2")] public object AddNumber2 { get; set; } [ResultToProperty] [DisplayName("相加结果")] public string ResultTo { get; set; } = "结果"; public async Task ExecuteAsync(IServerCommandExecuteContext dataContext) { var add1 = await dataContext.EvaluateFormulaAsync(AddNumber1); // 计算的一个加数的公式值 var add2 = await dataContext.EvaluateFormulaAsync(AddNumber2); // 计算第二个家属的公式值 double.TryParse(add1?.ToString(), out var add1Number); // 对第一个加数做类型转换 double.TryParse(add2?.ToString(), out var add2Number); // 对第二个加数做类型转换 dataContext.Parameters[ResultTo] = add1Number + add2Number; // 把计算的结果设置到结果变量中 return new ExecuteResult(); } public override string ToString() { return "我的插件服务端命令"; } public override CommandScope GetCommandScope() { return CommandScope.ExecutableInServer; } } ``` -------------------------------- ### Uninstall Huozige Designer Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/installationanduninstallation/installdesigner This section provides two methods for uninstalling the Huozige Designer if it is no longer needed. Both methods are straightforward and aim to remove the software from the computer. ```bash Method 1 (Recommended): Locate the "Huozige Designer (*10.0.1.0*).exe" file used during installation, double-click it, and click "Uninstall". Wait for approximately 30 seconds for the uninstallation to complete. Method 2: Open the Control Panel, navigate to "Programs -> Uninstall a program", find "GrapeCity Huozige Designer", double-click it, or right-click and select "Uninstall/Change", then click "Uninstall/Change". Wait for approximately 30 seconds. ``` -------------------------------- ### 通过 IApplicationInformationService 获取用户信息 (C#) Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/plugindevelopment/plugindevelop/developcustommiddleware/useapplicationservices 演示了如何通过 `IApplicationInformationService` 的 `UserInfos` 属性获取用户信息,包括获取所有用户信息、根据用户名获取详细信息以及获取用户角色。 ```csharp var appService = context.RequestServices.GetService(); // 获取用户服务 var userInfos = appService.UserInfos; // 获取所有用户信息 var users = await userInfos.GetUserInfosAsync(); var userName = "Administrator"; // 使用用户名获取用户的详细信息 var user = await userInfos.GetUserInfoAsync(userName); // 使用用户名获取用户的权限信息 var permissions = await userInfos.GetRolesOfUserOwnedPermissionsAsync(userName); ``` -------------------------------- ### Build and Package Security Provider with Maven Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/java-adapter/java-security-provider/install After creating the security provider project, you will use IntelliJ IDEA to build and package it. This involves opening the project in IntelliJ, navigating to the Maven lifecycle, and executing 'clean' followed by 'install'. This process generates a zip package ready for deployment. ```bash 1. Open the generated Java project in IntelliJ IDEA. 2. Locate the main code in 'org.example.CustomSecurityProvider'. 3. In the right-hand panel, select 'Maven-lifecycle'. 4. Double-click 'clean' to execute it. 5. Double-click 'install' to execute it. 6. A zip package will be generated upon successful completion. ``` -------------------------------- ### Get Forguncy Table Designer Range Info Source: https://www.grapecity.com.cn/solutions/huozige/help/apis/javascript/classes/Forguncy.Forguncy.ListView Obtains the positional information of a Forguncy table within the designer, including its starting row and column indices, and its dimensions. This is helpful for layout management. ```javascript var page = Forguncy.Page; var listview = page.getListView("表格1"); var range = listview.getDesignerRangeInfo(); alert( "起始行索引:"+range.Row+"\n"+"起始列索引:"+range.Column+"\n"+"表格的行数:"+range.RowCount+"\n"+"表格的列数:"+range.ColumnCount); ``` -------------------------------- ### Get ListView Name Source: https://www.grapecity.com.cn/solutions/huozige/help/apis/javascript/classes/Forguncy.Forguncy.SubPage This example demonstrates how to access a specific list view (table) within a sub-page by its name and retrieve its name. This is useful for identifying and interacting with tables in the UI. ```javascript // 下面的示例代码中,通过getListView方法,获取子页面中指定的表格。 // 获取当前页面 var page = Forguncy.Page; // 获取页面容器 var cell = page.getCell("Container"); // 获取页面容器的子页面 var subPage = cell.getContentPage(); // 获取子页面中的表格 var listview = subPage.getListView("表格1"); // 获取表格的名称 var name = listview.getName(); // 弹出警告框,显示表格的名称 alert(name); ``` -------------------------------- ### AI Model Configuration Examples Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/ai Provides example interface addresses and model names for different AI service providers, including Alibaba Cloud, Zhipu AI, DeepSeek, and Ollama for local deployment. This helps users correctly configure their AI model connections. ```text Alibaba Cloud: https://dashscope.aliyuncs.com/compatible-mode/v1/ Zhipu AI: http://open.bigmodel.cn/api/paas/v4 DeepSeek: https://api.deepseek.com/v1 Ollama Local Deployment: http://localhost:11434/v1 ``` -------------------------------- ### Apply Resource Formula in HuoZiGe Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/multi-language This explains how to apply language resources to application elements like cells or commands using formulas. The formula format is '~key_name'. -------------------------------- ### LLM API Endpoint Examples Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/ai/practice/best-practice Provides example API endpoints for various LLM platforms compatible with the OpenAI API standard. This includes cloud providers like Alibaba Cloud and DeepSeek, as well as local deployments like Ollama. ```text Alibaba Cloud: https://dashscope.aliyuncs.com/compatible-mode/v1/ Zhipu AI: https://open.bigmodel.cn/api/paas/v4 DeepSeek: https://api.deepseek.com/v1 Ollama Local Deployment: http://localhost:11434/v1 ``` -------------------------------- ### 发布活字格工程文件到服务器 Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/publishapp/ci-cd 使用 ForguncyConsole.exe 将指定的活字格工程文件发布到服务器。需要提供工程文件路径、发布配置名称(可选)和服务器密码(必需)。如果文件不存在,将报错。 ```command-line ForguncyConsole.exe Action=PublishToServer File=D:\Download\Teams\DocumentKuCun.fgcc PublishConfigName=PublishSetting1 ServerPassword=123456 ``` -------------------------------- ### Manage Application Resources in HuoZiGe Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/multi-language This covers managing application-specific resources, such as common phrases like 'Confirm' or 'Cancel'. Users can add, delete, or edit these resources. -------------------------------- ### Add New Language in HuoZiGe Source: https://www.grapecity.com.cn/solutions/huozige/help/docs/multi-language This process outlines how to add a new language to the HuoZiGe application. It includes specifying the language name, BCP-47 tag, font, and a description.