public override LookupRequestItem GetValue(IUSDAutomationObject automationObject)
        {
            /*
             * <Controls>
             *  <JAccControl name="clickme">
             *      <Path>
             *      <NextName offset = "1">Click Me</NextName>
             *      </Path>
             *  </JAccControl>
             *  <JAccControl name="textbox">
             *      <Path>
             *      <NextRole offset = "0">text</NextRole>
             *      </Path>
             *  </JAccControl>
             * </Controls>
             */

            if (!JavaAccNativeMethods._IsWindowsAccessBridgeAvailable)
            {
                throw new Exception("Java Bridge not available");
            }
            if (!(automationObject is JavaAutomationObject))
            {
                throw new Exception("Invalid automation object");
            }
            string controlValue = String.Empty;

            controlValue = JavaAccHelperMethods.GetValue(((JavaAutomationObject)automationObject).zero, ((JavaAutomationObject)automationObject).vmId);
            return(new LookupRequestItem(((JavaAutomationObject)automationObject).name, controlValue));
        }
        void Execute(Uii.Csr.RequestActionEventArgs args)
        {
            /*
             * <Controls>
             *  <JAccControl name="clickme" action="click">
             *      <Path>
             *      <NextName offset = "1">Click Me</NextName>
             *      </Path>
             *  </JAccControl>
             * </Controls>
             */


            string      parameterdata = Utility.GetContextReplacedString(args.Data, CurrentContext, localSession);
            XmlDocument doc           = new XmlDocument();

            doc.LoadXml(parameterdata);

            foreach (XmlNode nodeControl in doc.SelectSingleNode("//Controls").ChildNodes) ///JAccControl or AccControl
            {
                using (IUSDAutomationObject automationObject = automationEngine.GetAutomationObject(nodeControl))
                {
                    try
                    {
                        string controlAction = AutomationControl.GetAttributeValue(nodeControl, "action", "");
                        automationEngine.Execute(automationObject, controlAction);
                    }
                    catch (Exception ex)
                    {
                        LogWriter.Log(ex);
                    }
                }
            }
        }
示例#3
0
 public override void SetValue(IUSDAutomationObject automationObject, string value)
 {
     if (!JavaAccNativeMethods._IsWindowsAccessBridgeAvailable)
     {
         throw new Exception("Java Bridge not available");
     }
     if (!(automationObject is JavaAutomationObject))
     {
         throw new Exception("Invalid automation object");
     }
 }
        public override void SetValue(IUSDAutomationObject automationObject, string value)
        {
            if (!JavaAccNativeMethods._IsWindowsAccessBridgeAvailable)
            {
                throw new Exception("Java Bridge not available");
            }
            if (!(automationObject is JavaAutomationObject))
            {
                throw new Exception("Invalid automation object");
            }

            JavaAccHelperMethods.SetValue(((JavaAutomationObject)automationObject).zero, ((JavaAutomationObject)automationObject).vmId, value);
            System.Windows.Forms.Application.DoEvents();
        }
        public override void Execute(IUSDAutomationObject automationObject, string action)
        {
            if (!JavaAccNativeMethods._IsWindowsAccessBridgeAvailable)
            {
                throw new Exception("Java Bridge not available");
            }
            if (!(automationObject is JavaAutomationObject))
            {
                throw new Exception("Invalid automation object");
            }

            int failure;

            JavaAccHelperMethods.DoAction(((JavaAutomationObject)automationObject).zero, out failure, ((JavaAutomationObject)automationObject).vmId, false, action);
            System.Windows.Forms.Application.DoEvents();
        }
示例#6
0
        public override LookupRequestItem GetValue(IUSDAutomationObject automationObject)
        {
            if (!(automationObject is UIAutomationObject))
            {
                throw new Exception("Invalid automation object");
            }
            string            controlValue = String.Empty;
            LookupRequestItem result       = null;

            foreach (string propertyKey in AutomationProperties.Keys)
            {
                AutomationProperty property             = AutomationProperties[propertyKey];
                object             currentPropertyValue = ((UIAutomationObject)automationObject).zero.GetCurrentPropertyValue(property);
                if (currentPropertyValue != null)
                {
                    result = new LookupRequestItem(((UIAutomationObject)automationObject).name, ConvertObjecttoString(currentPropertyValue, AutomationPropReturnTypes[propertyKey]));
                } // which result do we return?
            }
            return(result);
        }
        void SetValue(Uii.Csr.RequestActionEventArgs args)
        {
            string      parameterdata = Utility.GetContextReplacedString(args.Data, CurrentContext, localSession);
            XmlDocument doc           = new XmlDocument();

            doc.LoadXml(parameterdata);
            foreach (XmlNode nodeControl in doc.SelectSingleNode("//Controls").ChildNodes) ///JAccControl or AccControl
            {
                using (IUSDAutomationObject automationObject = automationEngine.GetAutomationObject(nodeControl))
                {
                    try
                    {
                        string controlValue = AutomationControl.GetAttributeValue(nodeControl, "value", "");
                        automationEngine.SetValue(automationObject, controlValue);
                    }
                    catch (Exception ex)
                    {
                        LogWriter.Log(ex);
                    }
                }
            }
        }
        void GetValue(Uii.Csr.RequestActionEventArgs args)
        {
            string      parameterdata = Utility.GetContextReplacedString(args.Data, CurrentContext, localSession);
            XmlDocument doc           = new XmlDocument();

            doc.LoadXml(parameterdata);
            List <LookupRequestItem> lritems = new List <LookupRequestItem>();

            foreach (XmlNode nodeControl in doc.SelectSingleNode("//Controls").ChildNodes) ///JAccControl or AccControl
            {
                using (IUSDAutomationObject automationObject = automationEngine.GetAutomationObject(nodeControl))
                {
                    try
                    {
                        lritems.Add(automationEngine.GetValue(automationObject));
                    }
                    catch (Exception ex)
                    {
                        LogWriter.Log(ex);
                    }
                }
            }
            ((DynamicsCustomerRecord)localSession.Customer.DesktopCustomer).MergeReplacementParameter(this.ApplicationName, lritems, false);
        }
示例#9
0
 public virtual void SetValue(IUSDAutomationObject automationObject, string value)
 {
     throw new NotImplementedException();
 }
示例#10
0
 public virtual LookupRequestItem GetValue(IUSDAutomationObject automationObject)
 {
     throw new NotImplementedException();
 }
示例#11
0
 public virtual void Execute(IUSDAutomationObject automationObject, string action)
 {
     throw new NotImplementedException();
 }