/// <summary>
        /// Handles the ConnectionFailed event of the Tester control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        /// <exception cref="NotImplementedException"></exception>
        private async static void Tester_ConnectionFailed(object sender, System.Windows.RoutedEventArgs e)
        {
            Oracle_Tester      tester      = sender as Oracle_Tester;
            IOracleUIConnector uiConnector = tester.Sender as IOracleUIConnector;
            ConnectionArgs     args        = e as ConnectionArgs;
            String             msg         = args.Error;

            App.Riviera.Log.AppendEntry(msg, Protocol.Error, "Tester_ConnectionTest", "IOracleUIConnector");
            await CloseProgressDialog();

            await uiConnector.Sender.ShowDialog(TIT_ORACLE_CONN, msg);
        }
        /// <summary>
        /// Connects the specified connector.
        /// </summary>
        /// <param name="connector">The connector.</param>
        public static async void Connect(this IOracleUIConnector connector)
        {
            Oracle_Tester tester = new Oracle_Tester();

            tester.Sender = connector;
            ActiveWindow  = connector.GetWindow();
            await ShowProgressDialog(MSG_CONNECTING, String.Empty);

            tester.ConnectionFailed += Tester_ConnectionFailed;
            tester.ConnectionSucced += Tester_ConnectionSucced;
            tester.Connect(connector.GetConnection());
        }
        /// <summary>
        /// Handles the ConnectionSucced event of the Tester control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private async static void Tester_ConnectionSucced(object sender, System.Windows.RoutedEventArgs e)
        {
            Oracle_Tester      tester      = sender as Oracle_Tester;
            IOracleUIConnector uiConnector = tester.Sender as IOracleUIConnector;

            App.Riviera.OracleConnection = uiConnector.GetConnection();
            App.Riviera.OracleConnection.Save(App.Riviera.OracleConnectionFile.FullName);
            await CloseProgressDialog();

            await uiConnector.Sender.ShowDialog(TIT_ORACLE_CONN, MSG_CONN);

            var win = uiConnector.Sender.GetWindow() as WinAppSettings;

            win.loginSection.IsEnabled = true;
            win.loginSection.LoadDBData();
        }
 /// <summary>
 /// Gets the window.
 /// </summary>
 /// <param name="connector">The Oracle connector.</param>
 /// <returns>The Active Window</returns>
 public static MetroWindow GetWindow(this IOracleUIConnector connector)
 {
     return(connector.Sender.GetWindow());
 }