Example #1
0
        private bool DeviceJobStatusFinishedByControlPanel(JediWindjammerDevice device)
        {
            bool finished = false;

            try
            {
                device.ControlPanel.PressKeyWait(JediHardKey.Reset, "HomeScreenForm");
                device.ControlPanel.ScrollPressNavigate("mAccessPointDisplay", "Title", "Job Status", "JobStatusMainForm", true);
                var cp = device.ControlPanel;
                var activeJobButtonText = cp.GetProperty("mActiveJobListBox_Item0", "Column1Text");
                if (activeJobButtonText == string.Empty)
                {
                    finished = true;
                }
                else
                {
                    finished = false;
                    if (activeJobButtonText == null)
                    {
                        // inconclusive, could not find expected button which means unexpected screen may be up
                    }
                }
                TraceFactory.Logger.Debug("Device active job via control panel = {0}".FormatWith(activeJobButtonText));
            }
            catch (Exception ex)
            {
                TraceFactory.Logger.Error("Error checking job status via control panel", ex);
            }
            return(finished);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="JediWindjammerHpacApp"/> class.
 /// </summary>
 /// <param name="device">The device.</param>
 public JediWindjammerHpacApp(JediWindjammerDevice device)
     : base(device.Snmp, device.ControlPanel)
 {
     _device       = device;
     _controlPanel = device.ControlPanel;
     IsWindJammer  = true;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="JediWindJammerHpecApp"/> class.
        /// </summary>
        /// <param name="device">The device.</param>
        public JediWindJammerHpecApp(JediWindjammerDevice device)
        {
            _device       = device;
            _controlPanel = _device.ControlPanel;

            _engine = new OxpdBrowserEngine(_controlPanel, HpecResource.HpecJavaScript);
        }
Example #4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="device"></param>
 /// <param name="credential"></param>
 public SafecomJedi(IDevice device, NetworkCredential credential)
 {
     //Getting the Sirius Device
     _device       = device as JediWindjammerDevice;
     _controlPanel = _device.ControlPanel;
     _credential   = credential;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="JediWindjammerJobExecutionManager" /> class.
        /// </summary>
        /// <param name="device">The device.</param>
        public JediWindjammerJobExecutionManager(JediWindjammerDevice device)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            _device       = device;
            _controlPanel = _device.ControlPanel;
        }
        /// <summary>
        /// HP JetAdvantage constructor
        /// </summary>
        public JetAdvantageScanAutoController(PluginExecutionData executionData, ScanOptions scanOptions)
            : base(executionData)
        {
            var device = (IDeviceInfo)executionData.Assets.First();

            _device     = new JediWindjammerDevice(device.Address, device.AdminPassword);
            _data       = executionData.GetMetadata <JetAdvantageScanActivityData>();
            _engine     = new OxpdBrowserEngine(_device.ControlPanel);
            ScanOptions = scanOptions;
        }
        /// <summary>
        /// Constructor for Jediwindjammer device
        /// </summary>
        /// <param name="device">Jediwindjammer Device</param>
        public JediWindjammerJobStorageScanApp(JediWindjammerDevice device)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            _optionsManager = new JediWindjammerJobStorageJobOptions(device);

            Pacekeeper = new Pacekeeper(TimeSpan.Zero);
        }
Example #8
0
        /// <summary>
        /// Initializes a new instance of the <see cref="JediWindjammerJobOptionsManager" /> class.
        /// </summary>
        /// <param name="device">The device.</param>
        /// <param name="appMainForm">The name of the main form of the associated device application.</param>
        public JediWindjammerJobOptionsManager(JediWindjammerDevice device, string appMainForm)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            _device       = device;
            _controlPanel = _device.ControlPanel;
            _appMainForm  = appMainForm;
        }
Example #9
0
        private const int _footerOffset = 50;     // This is based on a 800 x 600 screen. If the screen is smaller, this value will likely need changing.

        /// <summary>
        /// Initializes a new instance of the <see cref="JediWindJammerHpcrApp"/> class.
        /// </summary>
        /// <param name="device">The device.</param>
        /// <param name="buttonTitle">The button title.</param>
        /// <param name="scanDestination">The scan destination.</param>
        /// <param name="scanDistribution">The scan distribution.</param>
        /// <param name="documentName">Name of the document.</param>
        /// <param name="imagePreview">Whether Image preview is on/off</param>
        public JediWindJammerHpcrApp(JediWindjammerDevice device, string buttonTitle, string scanDestination, string scanDistribution, string documentName, bool imagePreview)
            : base()
        {
            _buttonTitle      = buttonTitle;
            _device           = device;
            _controlPanel     = device.ControlPanel;
            _documentName     = documentName;
            _engine           = new OxpdBrowserEngine(device.ControlPanel);
            _scanDestination  = scanDestination;
            _scanDistribution = scanDistribution;
            _imagePreview     = imagePreview;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="JediWindjammerEmailApp" /> class.
        /// </summary>
        /// <param name="device">The device.</param>
        public JediWindjammerEmailApp(JediWindjammerDevice device)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            _device           = device;
            _controlPanel     = _device.ControlPanel;
            _optionsManager   = new JediWindjammerEmailJobOptions(device);
            _executionManager = new JediWindjammerJobExecutionManager(device);
            Pacekeeper        = new Pacekeeper(TimeSpan.Zero);
        }
Example #11
0
        public WindjammerAuthenticatorDriver(JediWindjammerDevice device, string solutionButton, DeviceWorkflowLogger workflowLogger)
        {
            _device             = device;
            _preparationManager = new JediWindjammerPreparationManager(_device);
            _workflowLogger     = workflowLogger;

            _controlPanel = _device.ControlPanel;


            _solutionButton = solutionButton;
            _initMethod     = AuthInitMethod.GetInitiationMethod(_solutionButton);

            PrepareDevice();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="JediWindjammerAuthenticator"/> class.
        /// </summary>
        /// <param name="device">The device.</param>
        /// <param name="credential">The credential.</param>
        /// <param name="provider">The provider.</param>
        public JediWindjammerAuthenticator(JediWindjammerDevice device, AuthenticationCredential credential, AuthenticationProvider provider) : base(credential, provider)
        {
            ControlPanel = device.ControlPanel;
            _provider    = provider;

            ProviderMap.Add(AuthenticationProvider.Windows, new ProviderMapItem("Windows", "Windows"));
            ProviderMap.Add(AuthenticationProvider.DSS, new ProviderMapItem("DSS", "DSS"));
            ProviderMap.Add(AuthenticationProvider.LDAP, new ProviderMapItem("LDAP", "LDAP"));
            ProviderMap.Add(AuthenticationProvider.LocalDevice, new ProviderMapItem("Local Device", "Local Device"));
            ProviderMap.Add(AuthenticationProvider.SafeCom, new ProviderMapItem("SafeCom", "SafeCom"));
            ProviderMap.Add(AuthenticationProvider.HpacDra, new ProviderMapItem("HPAC - DRA Server", "HPAC - DRA Server"));
            ProviderMap.Add(AuthenticationProvider.HpacIrm, new ProviderMapItem("HPAC - IRM Server", "HPAC - IRM Server"));
            ProviderMap.Add(AuthenticationProvider.HpacWindows, new ProviderMapItem("HPAC-Windows", "HPAC-Windows"));
            ProviderMap.Add(AuthenticationProvider.HpacAgentLess, new ProviderMapItem("Code Expected", "Code Expected"));  // HPAC AgentLess first screen
            ProviderMap.Add(AuthenticationProvider.Equitrac, new ProviderMapItem("Equitrac Embedded", "Equitrac Authentication Agent"));
            ProviderMap.Add(AuthenticationProvider.EquitracWindows, new ProviderMapItem("Equitrac-Windows", "Equitrac-Windows"));
            ProviderMap.Add(AuthenticationProvider.Blueprint, new ProviderMapItem("Pharos Authentication Service", "Pharos Authentication Service"));
            ProviderMap.Add(AuthenticationProvider.AutoStore, new ProviderMapItem("AutoStore", "AutoStore"));
            ProviderMap.Add(AuthenticationProvider.HpRoamPin, new ProviderMapItem("Embedded Badge Authentication", "Embedded Badge Authentication"));
            ProviderMap.Add(AuthenticationProvider.PaperCut, new ProviderMapItem("PaperCut", "PaperCut"));
        }
Example #13
0
        /// <summary>
        /// Initializes a new instance of the <see cref="JediWindjammerAutoStoreApp"/> class.
        /// </summary>
        /// <param name="device">The device.</param>
        /// <param name="appButtonTitle">The application button title.</param>
        /// <param name="documentName">Name of the document.</param>
        public JediWindjammerAutoStoreApp(JediWindjammerDevice device, string appButtonTitle, string documentName) : base()
        {
            ButtonTitle  = appButtonTitle;
            DocumentName = documentName;

            _device       = device;
            _controlPanel = device.ControlPanel;

            _engine = new OxpdBrowserEngine(_device.ControlPanel, AutoStoreResource.AutoStoreJavaScript);

            MoreOptionsBtnId          = "HPOXPDMOREOPTIONS";
            MoreOptionsDownArrowBtnId = "HPOXPDMOREOPTIONSPAGEDOWN";
            MoreOptionsUpArrowBtnId   = "HPOXPDMOREOPTIONSPAGEUP";

            MoreOptionsImagePreview = "PreviewModeOption-button";
            PreviewModeOffId        = "HPOXPDDROPDOWNID#1OXPDID0";
            PreviewModeOnId         = "HPOXPDDROPDOWNID#1OXPDID1";

            MoreOptionsJobBuild = "JobAssemblyModeOption-button";
            JobBuildModeOffId   = "HPOXPDDROPDOWNID#1OXPDID1";
            JobBuildModeOnId    = "HPOXPDDROPDOWNID#1OXPDID0";
        }
Example #14
0
        /// <summary>
        /// Gets stats for the latest completed job
        /// </summary>
        /// <param name="ip">The ip.</param>
        /// <exception cref="System.NotImplementedException"></exception>
        static private void GetLatestJobStats(string ip)
        {
            var device = new JediWindjammerDevice(ip, "admin");
            var engine = new JavaScriptEngine(device.ControlPanel);

            //WaitForDeviceToFinish(device);
            device.ControlPanel.PressKeyWait(JediHardKey.Reset, "HomeScreenForm");
            device.ControlPanel.ScrollPressNavigate("mAccessPointDisplay", "Title", "Job Status", "JobStatusMainForm", true);
            var cp = device.ControlPanel;
            var firstJobButtonText = cp.GetProperty("mLoggedJobsListBox_Item0", "Column1Text");

            if (firstJobButtonText == string.Empty)
            {
                TraceFactory.Logger.Error("No job history found");
            }
            else
            {
                //cp.Press("mLogTab");
                cp.PressToNavigate(firstJobButtonText, "JobStatusMainForm", true);
                cp.PressToNavigate("mDetailsButton", "JobDetailsForm", true);
                var doc = device.ControlPanel.GetProperty("m_WebBrowser", "DocumentHTML");
            }
        }
Example #15
0
        private void WaitForDeviceToFinish(JediWindjammerDevice device)
        {
            bool     finished = false;
            DateTime end      = DateTime.Now + TimeSpan.FromMinutes(1);

            while (!finished && DateTime.Now < end)
            {
                finished = DeviceJobStatusFinishedByControlPanel(device);
                if (finished)
                {
                    break;
                }
                else
                {
                    // go to sleep and try again
                    Thread.Sleep(TimeSpan.FromSeconds(5));
                }
            }

            if (!finished)
            {
                throw new Exception("Did not finish in time");
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="JediWindjammerTriage"/> class.
 /// </summary>
 /// <param name="jediWindjammerDevice">The jedi windjammer device.</param>
 /// <param name="pluginExecutionData">The plugin execution data.</param>
 public JediWindjammerTriage(JediWindjammerDevice jediWindjammerDevice, PluginExecutionData pluginExecutionData) : base(pluginExecutionData)
 {
     _jediWindjammerDevice = jediWindjammerDevice;
     _controlPanel         = _jediWindjammerDevice.ControlPanel;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="JediWindjammerJetAdvantageApp"/> class.
 /// </summary>
 /// <param name="device">The device.</param>
 public JediWindjammerJetAdvantageApp(JediWindjammerDevice device)
     : base(device.ControlPanel)
 {
     _device = device;
 }
 public JediWindjammerEmailJobOptions(JediWindjammerDevice device)
     : base(device, "EmailForm")
 {
 }
Example #19
0
 public JediWindjammerCopyJobOptionsManager(JediWindjammerDevice device)
     : base(device, "CopyAppMainForm")
 {
     _controlPanel = device.ControlPanel;
 }
Example #20
0
 public JediWindjammerNetworkFolderJobOptions(JediWindjammerDevice device)
     : base(device, "FolderAppMainForm")
 {
 }
 public JediWindjammerDssWorkflowJobOptions(JediWindjammerDevice device)
     : base(device, "OxpBaseForm")
 {
 }
 public JediWindjammerJobStorageJobOptions(JediWindjammerDevice device)
     : base(device, "")
 {
 }
Example #23
0
 public JediWorkflow(JediWindjammerDevice device, NetworkCredential credential)
 {
     _credential = credential;
     _device     = device;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="JediWindjammerEquitracApp"/> class.
 /// </summary>
 /// <param name="device">The device.</param>
 public JediWindjammerEquitracApp(JediWindjammerDevice device)
     : base(device.ControlPanel)
 {
     _device       = device;
     _controlPanel = _device.ControlPanel;
 }
Example #25
0
 public JediWindjammerUsbJobOptions(JediWindjammerDevice device)
     : base(device, "SaveToUsbMainForm")
 {
 }
Example #26
0
 /// <summary>
 /// Initializes a new instance of the <see cref="JavaScriptEngine"/> class.
 /// </summary>
 /// <param name="device">The device.</param>
 /// <param name="adminPassword">The admin password.</param>
 public JavaScriptEngine(JediWindjammerDevice device)
 {
     _device = device;
 }
Example #27
0
 /// <summary>
 /// Initializes a new instance of the <see cref="JediWindjammerBlueprintApp"/> class.
 /// </summary>
 /// <param name="device">The device.</param>
 public JediWindjammerBlueprintApp(JediWindjammerDevice device)
     : base(device.Snmp, device.ControlPanel)
 {
     _device       = device;
     _controlPanel = device.ControlPanel;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="JediWindjammerSafeComApp"/> class.
 /// </summary>
 /// <param name="device">The device.</param>
 public JediWindjammerSafeComApp(JediWindjammerDevice device)
     : base(device.Snmp, device.ControlPanel)
 {
     _controlPanel = device.ControlPanel;
     _isOmni       = false;
 }
Example #29
0
 public JediWindjammerFaxJobOptions(JediWindjammerDevice device)
     : base(device, "SendFaxAppMainForm")
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="JediWindjammerPaperCutApp"/> class.
 /// </summary>
 /// <param name="device">The device.</param>
 public JediWindjammerPaperCutApp(JediWindjammerDevice device)
     : base(device.ControlPanel)
 {
     _device       = device;
     _controlPanel = device.ControlPanel;
 }