コード例 #1
0
        public Form1(IKernel kernel)
        {
            #region Splash screen Start
            //this.Hide();
            //Thread splashthread = new Thread(new ThreadStart(SplashScreen.ShowSplashScreen));

            //splashthread.IsBackground = true;
            //splashthread.Start();

            #endregion

            Kernel                = kernel;
            UserRepository        = Kernel.Get <UserRepository>();
            SystemRepository      = Kernel.Get <SystemRepository>();
            UserDesktopRepository = Kernel.Get <UserDesktopRepository>();

            InitializeComponent();
            var details = UserRepository.GetSessionDetails(AppSettings.Instance.LiveUserAccount.Username);
            if (details.GoDaddyAccount == null && !string.IsNullOrEmpty(Settings.Default.GDUsername))
            {
                details.GoDaddyAccount = new GoDaddyAccount()
                {
                    AccountId = Guid.NewGuid(), AccountUsername = details.Username, Password = Settings.Default.GDPassword,
                    Username  = Settings.Default.GDUsername, UserID = AppSettings.Instance.LiveUserAccount.AccountID
                };
                SystemRepository.SaveGodaddyAccount(details.GoDaddyAccount);
            }

            AppSettings.Instance.SessionDetails = details;
            AppSettings.Instance.GoDaddy        = new GoDaddyAuctionSniper(AppSettings.Instance.SessionDetails.Username, Kernel.Get <IUserRepository>());

            LoadAuctions();
            Instance = this;
            //Login();
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: Alchemy86/DAS-Desktop
        public Form1(IKernel kernel)
        {
            #region Splash screen Start
            //this.Hide();
            //Thread splashthread = new Thread(new ThreadStart(SplashScreen.ShowSplashScreen));

            //splashthread.IsBackground = true;
            //splashthread.Start();

            #endregion

            Kernel = kernel;
            UserRepository = Kernel.Get<UserRepository>();
            SystemRepository = Kernel.Get<SystemRepository>();
            UserDesktopRepository = Kernel.Get<UserDesktopRepository>();

            InitializeComponent();
            var details = UserRepository.GetSessionDetails(AppSettings.Instance.LiveUserAccount.Username);
            if (details.GoDaddyAccount == null && !string.IsNullOrEmpty(Settings.Default.GDUsername))
            {
                details.GoDaddyAccount = new GoDaddyAccount()
                {
                    AccountId =  Guid.NewGuid(), AccountUsername = details.Username, Password = Settings.Default.GDPassword,
                    Username = Settings.Default.GDUsername, UserID = AppSettings.Instance.LiveUserAccount.AccountID
                };
                SystemRepository.SaveGodaddyAccount(details.GoDaddyAccount);
            }
           
            AppSettings.Instance.SessionDetails = details;
            AppSettings.Instance.GoDaddy = new GoDaddyAuctionSniper(AppSettings.Instance.SessionDetails.Username, Kernel.Get<IUserRepository>());

            LoadAuctions();
            Instance = this;
            //Login();
        }
コード例 #3
0
 public ActuallController(IExploreRepository repository, IUserDesktopRepository desktopRepository, IUpdatingRepository updateRepository)
 {
     this._actuallRepository = repository;
     this._desktopRepository = desktopRepository;
     this._updateRepository  = updateRepository;
 }
コード例 #4
0
 public UserDesktopController(IUserDesktopRepository desktopRepository, IUserRepository userRepository, IExploreRepository exploreRepository)
 {
     this._desktopRepository = desktopRepository;
     this._userRepository    = userRepository;
     this._exploreRepository = exploreRepository;
 }