Exemplo n.º 1
0
        public PluginExecutionResult Execute(PluginExecutionData executionData)
        {
            CtcSettings.Initialize(executionData);

            EwsActivityData data = executionData.GetMetadata <EwsActivityData>(CtcMetadataConverter.Converters);

            if (null == _tests)
            {
                _tests = new EwsTests(data);
            }

            foreach (int testNumber in data.TestNumbers)
            {
                try
                {
                    ExecutionServices.SessionRuntime.AsInternal().WaitIfPaused();
                    _tests.RunTest(executionData, testNumber, IPAddress.Parse(data.PrinterIP), (ProductFamilies)Enum.Parse(typeof(ProductFamilies), data.ProductCategory));
                }
                catch (Exception pluginException)
                {
                    TraceFactory.Logger.Error("Error while pausing: " + pluginException.Message);
                }
            }

            return(new PluginExecutionResult(PluginResult.Passed));
        }
Exemplo n.º 2
0
 public EwsTests(EwsActivityData data)
     : base(data.ProductName)
 {
     _activityData = data;
     ProductFamily = data.ProductCategory;
     Sliver        = "EWS";
 }
        public EwsConfigurationControl()
        {
            InitializeComponent();

            _activityData              = new EwsActivityData();
            base.OnProductNameChanged += new ProductNameChangedEventHandler(EWSEditControl_OnProductNameChanged);
            // EWS_sitemapVersionSelector.PrinterFamily = base.ProductCategory.ToString();
            //  EWS_sitemapVersionSelector.PrinterName = base.ProductName;

            base.PropertyChanged += (s, e) => ConfigurationChanged(s, e);
            EWS_sitemapVersionSelector.PropertyChanged += (s, e) => ConfigurationChanged(s, e);
            textBoxIP.TextChanged += (s, e) => ConfigurationChanged(s, e);
        }
 public void Initialize(PluginConfigurationData configuration, PluginEnvironment environment)
 {
     _activityData = configuration.GetMetadata <EwsActivityData>(CtcMetadataConverter.Converters);
     CtcSettings.Initialize(environment);
     LoadUI();
 }
 public void Initialize(PluginEnvironment environment)
 {
     _activityData = new EwsActivityData();
     CtcSettings.Initialize(environment);
     LoadUI();
 }