private void btnOk_Click(object sender, EventArgs e)
        {
            var x           = new TextDataParser(txtInput.Text);
            var cleanOutput = x.CleanDataOutput();

            Sprite.SetBytes(cleanOutput);
            DialogResult = DialogResult.OK;
        }
Beispiel #2
0
        public static void ReadApplicationConfigs(string pathOfCurrentContext = null)
        {
            string automationDirectory = AppDomain.CurrentDomain.RelativeSearchPath ?? AppDomain.CurrentDomain.BaseDirectory;

            ObjectRepository  = automationDirectory + TextDataParser.GetValue("ObjectRepository");
            WaitingShortTime  = Int32.Parse(ConfigurationManager.AppSettings["WaitingShortTime"]);
            WaitingMediumTime = Int32.Parse(ConfigurationManager.AppSettings["WaitingMediumTime"]);
            WaitingLongTime   = Int32.Parse(ConfigurationManager.AppSettings["WaitingLongTime"]);
        }//end method ReadConfigs
Beispiel #3
0
        }//end method ReadApplicationConfigs

        /// <summary>
        /// Read the provided test configurations
        /// </summary>
        public static void ReadConfigs(string pathOfAutomationConfigs)
        {
            //Application Settings: load the Automation Directory Configs
            TextDataParser.LoadConfigurationValues(pathOfAutomationConfigs);

            AutomationDirectory = TextDataParser.LoadAndGetValue("AutomationDirectory", pathOfAutomationConfigs + ".dir");
            AutomationDirectory = TextDataParser.GetValue("AutomationDirectory");
            Url     = TextDataParser.GetValue("Url");
            Browser = TextDataParser.GetValue("Browser");
            //Files: Test Data, Messages, ...
            TestDataFile       = AutomationDirectory + TextDataParser.GetValue("TestDataFile");
            LogFile            = AutomationDirectory + TextDataParser.GetValue("LogFile");
            ReportingDirectory = AutomationDirectory + TextDataParser.GetValue("ReportingDirectory");
        }//end method ReadConfigs
Beispiel #4
0
        }//end method ReadApplicationConfigs

        /// <summary>
        /// Read the provided test configurations
        /// </summary>
        public static void ReadConfigs(string pathOfAutomationConfigs)
        {
            //Reporting Directory
            //Load the Automation Configs
            // TextDataParser.LoadAndSetValue("DownloadChromeDirectory", SetDownloadDirectoryPath(),pathOfAutomationConfigs);
            TextDataParser.LoadConfigurationValues(pathOfAutomationConfigs);

            Url     = TextDataParser.GetValue("Url");
            Browser = TextDataParser.GetValue("Browser");
            //Files: Test Data, Messages
            TestDataFile       = AutomationDirectory + TextDataParser.GetValue("TestDataFile");
            LogDirectory       = AutomationDirectory + TextDataParser.GetValue("LoggingDirectory");
            ReportingDirectory = AutomationDirectory + TextDataParser.GetValue("ReportingDirectory");
        }//end method ReadConfigs
        }     //end method

        /// <summary>
        /// Read the provided test configurations
        /// </summary>
        public static void ReadConfigs(string pathOfAutomationConfigs)
        {
            //Application Settings: load the Automation Directory Configs
            TextDataParser.LoadConfigurationValues(pathOfAutomationConfigs);

            //TODO: the below line is used to when the batch file is running.
            AutomationDirectory = TextDataParser.LoadAndGetValue("AutomationDirectory", pathOfAutomationConfigs + ".dir");
            AutomationDirectory = TextDataParser.GetValue("AutomationDirectory");
            Url     = TextDataParser.GetValue("Url");
            Browser = TextDataParser.GetValue("Browser");
            //Files: Test Data, Messages, ...
            TestDataFile       = AutomationDirectory + TextDataParser.GetValue("TestDataFile");
            LogFile            = AutomationDirectory + TextDataParser.GetValue("LogFile");
            ReportingDirectory = AutomationDirectory + TextDataParser.GetValue("ReportingDirectory");

            //TODO: Add the report path here ya Asmaa
        }//end method ReadConfigs
Beispiel #6
0
        internal WebsocketParserHandler(
            IObserver <ConnectionStatus> observerConnectionStatus,
            bool subprotocolAccepted,
            bool excludeZeroApplicationDataInPong)
        {
            _handshakeParser = new HandshakeParser();
            var dataReceiveSubject = new BehaviorSubject <DataReceiveState>(DataReceiveState.Start);

            _textDataParser = new TextDataParser();

            _observerConnectionStatus = observerConnectionStatus;
            _observerDataReceiveMode  = dataReceiveSubject.AsObserver();

            SubprotocolAccepted = subprotocolAccepted;
            ExcludeZeroApplicationDataInPong = excludeZeroApplicationDataInPong;

            DataReceiveStateObservable = dataReceiveSubject.AsObservable();
        }
        private void btnPreview_Click(object sender, EventArgs e)
        {
            var x           = new TextDataParser(txtInput.Text);
            var cleanOutput = x.CleanDataOutput();
            var s           = new StringBuilder();

            foreach (var b in cleanOutput)
            {
                s.Append(b.Value.ToString());
                if (b != cleanOutput.Last())
                {
                    s.Append(", ");
                }
            }
            txtCleanDataOutput.Text = s.ToString();
            Sprite.SetBytes(cleanOutput);
            picPreview.Invalidate();
        }
Beispiel #8
0
        public static void ReadConfigs(string pathOfCurrentContext = null)
        {
            if (pathOfCurrentContext != null)
            {
                //Application Settings
                AutomationDirectory = pathOfCurrentContext;

                //commented by asmaa on August 30th
                //ObjectRepository = pathOfCurrentContext + TextDataParser.GetValue("ObjectRepository");
            }
            else
            {
                //Application Settings
                AutomationDirectory = TextDataParser.GetValue("AutomationDirectory");
            }

            ObjectRepository = AutomationDirectory + TextDataParser.GetValue("ObjectRepository");
        } //end method ReadConfigs
Beispiel #9
0
 internal WebsocketListener(WebSocketConnectService webSocketConnectService, ISubject <ConnectionStatus> subjectConnectionStatus)
 {
     _webSocketConnectService = webSocketConnectService;
     _subjectConnectionStatus = subjectConnectionStatus;
     TextDataParser           = new TextDataParser();
 }