コード例 #1
0
ファイル: MgTree.cs プロジェクト: rinavin/RCJS
 internal NodeFinder(MgTreeBase enclosingInstance, String mgValue, bool isNull, StorageAttribute type)
 {
     _enclosingInstance = enclosingInstance;
     _mgValue           = mgValue;
     _isNull            = isNull;
     _type  = type;
     NodeId = NODE_NOT_FOUND;
     _field = (Field)(_enclosingInstance.Task.getForm().getTreeCtrl().getNodeIdField());
 }
コード例 #2
0
ファイル: CommandFactory.cs プロジェクト: rinavin/RCJS
        /// <summary>
        ///
        /// </summary>
        /// <param name="newTaskXML"></param>
        /// <param name="isModal"></param>
        /// <returns></returns>
        internal static IClientCommand CreateOpenTaskCommand(string newTaskXML, ArgumentsList argList, Field retrnValueField,
                                                             bool forceModal, string callingTaskTag, string pathParentTaskTag,
                                                             int ditIdx, string subformCtrlName)
        {
            var cmd = new OpenURLCommand(
                "", // key not used
                newTaskXML,
                argList,
                retrnValueField,
                forceModal,
                callingTaskTag,
                pathParentTaskTag,
                ditIdx,
                subformCtrlName,
                "0"); // new id

            return(cmd);
        }
コード例 #3
0
ファイル: Command.cs プロジェクト: rinavin/RCJS
        /// <summary>
        ///
        /// </summary>
        /// <param name="mgDataTab"></param>
        private void ExecuteVerifyCommand()
        {
            MGDataTable mgDataTab = MGDataTable.Instance;

            Task task = (Task)(mgDataTab.GetTaskByID(TaskTag) ?? mgDataTab.GetTaskByID(_callingTaskTag));

            if (task == null)
            {
                task = ClientManager.Instance.getLastFocusedTask();
            }

            // In order to keep the behavior same as in Online, verify operation warning messages
            // will be written as error messages in Client log (QCR #915122)
            if (_errLogAppend)
            {
                Logger.Instance.WriteErrorToLog(_text + ", program : " + ClientManager.Instance.getPrgName());
            }

            //Blank Message will not be shown, same as in Online
            if (!String.IsNullOrEmpty(_text))
            {
                if (_display == ConstInterface.DISPLAY_BOX)
                {
                    MgForm currForm;
                    int    style;

                    // on verify box, show translated value. (status is handled in property).
                    String mlsTransText = ClientManager.Instance.getLanguageData().translate(_text);
                    String mlsTransTitle;

                    if (task != null && task.isStarted())
                    {
                        currForm = (MgForm)task.getTopMostForm();
                    }
                    else
                    {
                        currForm = null;
                    }

                    if (Type == ClientCommandType.EnhancedVerify)
                    {
                        mlsTransTitle = ClientManager.Instance.getLanguageData().translate(_title);
                        style         = Operation.getButtons(_buttonsID);
                        style        |= Operation.getImage(_image);
                        style        |= Operation.getDefaultButton(_defaultButton);
                        if (task != null)
                        {
                            // Verify command return value can only be used with main program fields
                            if (Task.isMainProgramField(_returnValStr))
                            {
                                _returnVal = Operation.InitField(_returnValStr, task);
                            }
                        }
                    }
                    else
                    {
                        String options = ClientManager.Instance.getMessageString(MsgInterface.BRKTAB_STOP_MODE_TITLE);
                        _title        = ConstUtils.getStringOfOption(options, "EW", _mode);
                        mlsTransTitle = ClientManager.Instance.getLanguageData().translate(_title);
                        //add the icon according to the mode :is Error \ Warning
                        style = Styles.MSGBOX_BUTTON_OK |
                                ((_mode == 'E')
                              ? Styles.MSGBOX_ICON_ERROR
                              : Styles.MSGBOX_ICON_WARNING);
                    }

                    int returnValue = Commands.messageBox(currForm, mlsTransTitle, mlsTransText, style);

                    if (Type == ClientCommandType.EnhancedVerify && task != null)
                    {
                        Operation.setoperVerifyReturnValue(returnValue, _returnVal);
                    }
                }
                // display message on status only if we have a task
                //Blank Message will not be shown, same as in Online
                else if (_display == ConstInterface.DISPLAY_STATUS && task != null)
                {
                    task.DisplayMessageToStatusBar(_text);
                }
            }

            if (_sendAck)
            {
                task.CommandsProcessor.Execute(CommandsProcessorBase.SendingInstruction.NO_TASKS_OR_COMMANDS);
            }
        }