Beispiel #1
0
        public Worker(EngineRegionProfile regionProfile, Configuration configuration, Database provider)
        {
            Profile = regionProfile;
            Provider = provider;

            WorkerProfiler = new Profiler();
            ActiveAccountIds = new HashSet<int>();

            Connection = Provider.GetConnection();
            ConnectionData = new ConnectionProfile(configuration.Authentication, regionProfile.Region, configuration.Proxy, Profile.Username, Profile.Password);
            Connect();
        }
Beispiel #2
0
        public RegionHandler(Configuration configuration, EngineRegionProfile regionProfile, DatabaseConnectionProvider databaseProvider)
        {
            ServiceConfiguration = configuration;
            Profile = regionProfile;
            DatabaseProvider = databaseProvider;

            LookupJobs = new Queue<LookupJob>();
            ManualUpdateJobs = new Queue<AccountIdJob>();
            AutomaticUpdateJobs = new Queue<AccountIdJob>();

            AccountLocks = new Dictionary<int, AccountLock>();

            Run();
        }
Beispiel #3
0
        public Worker(EngineRegionProfile regionProfile, Login login, Configuration configuration, RegionHandler regionHandler, DatabaseConnectionProvider databaseProvider)
        {
            RegionProfile = regionProfile;
            WorkerLogin = login;

            WorkerProfiler = new Profiler();

            JobEvent = new AutoResetEvent(false);

            Master = regionHandler;

            DatabaseProvider = databaseProvider;

            Database = DatabaseProvider.GetConnection();
            ConnectionData = new ConnectionProfile(configuration.Authentication, regionProfile.Region, configuration.Proxy, login.Username, login.Password);
            Connect();
        }
Beispiel #4
0
        public Worker(Program program, StatisticsService statisticsService, EngineRegionProfile regionProfile, Configuration configuration, Database provider)
        {
            Program = program;
            StatisticsService = statisticsService;
            Provider = provider;

            Configuration = configuration;
            Profile = regionProfile;

            Connected = false;

            Profiler = new Profiler();
            ActiveAccountIds = new HashSet<int>();

            Region = (RegionType)Profile.Identifier;

            AutomaticUpdateInterval = configuration.AutomaticUpdateInterval;

            InitialiseAuthenticationProfile();
        }
        public EditDialogue(EngineRegionProfile profile, MainWindow parent)
        {
            Profile = profile;

            InitializeComponent();

            Title = "Edit login for " + profile.Description;
            Login login = profile.Login;
            if (login != null)
            {
                UsernameTextBox.Text = login.Username;
                PasswordTextBox.Password = login.Password;
            }

            //Center it
            Left = parent.Left + (parent.Width  - Width) / 2;
            Top = parent.Top + (parent.Height - Height) / 2;

            //Default to false, this way nothing special needs to be done when the user closes the window without using the Ok/Cancel button
            UserProvidedNewLogin = false;
        }