using BankTV.Helpers;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;

namespace BankTV
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            MainWindow wnd = new MainWindow();
            wnd.StartApp(this.getParam(e.Args));
            wnd.Show();
        }

        private string getParam(string[] args)
        {
            if (args == null)
            {
                return String.Empty;
            }   //if
            if (args.Count() == 0)
            {
                return String.Empty;
            }   //if
            foreach (string arg in args)
            {
                return StringHelper.RemoveSpecialCharacters(arg);                
            }   //for
            return String.Empty;
        }

    }
}
