Exemple #1
0
        public Configuration()
        {
            //20 minutes
            AutomaticUpdateInterval = 20 * 60;

            //5 seconds
            ReconnectDelay = 5 * 1000;

            //Default to SQLite instead of Mono
            DatabaseProvider = "System.Data.SQLite";

            Database = "RiotControl.sqlite";

            Index = "Index.html.template";

            RankedSeason = 2;

            MinimiseToTray = true;

            Web            = new WebConfiguration();
            Authentication = new AuthenticationProfile();

            Proxy = new ProxyProfile();

            //Not really necessary
            Privileges = new List <PrivilegeClass>();

            //Not really necessary
            RegionProfiles = new List <EngineRegionProfile>();
        }
Exemple #2
0
 public Configuration()
 {
     Authentication = new AuthenticationProfile();
     Proxy          = new ProxyProfile();
     ServerProfiles = new List <ServerProfile>();
     ChampionNames  = new SerialisableDictionary <int, string>();
 }
 internal void CopyTo(ProxyProfile proxyProfile)
 {
     proxyProfile.Adapter = _adapter;
     proxyProfile.Client  = _client;
     proxyProfile.Machine = _machine;
     proxyProfile.Name    = _name;
 }
        public EditProfileDialog(ProfilesView profilesView, ProxyProfile proxyProfile)
        {
            InitializeComponent();
            _proxyProfile = proxyProfile;
            _settingsView = profilesView;

            UpdateControls();
        }
        private void ProfileMenuItem_Click(object sender, RoutedEventArgs e)
        {
            AppViewModel vm         = (AppViewModel)NotifyIcon.DataContext;
            MenuItem     obMenuItem = e.OriginalSource as MenuItem;
            ProxyProfile p          = (ProxyProfile)(obMenuItem.DataContext);

            vm.ChangeProxy(p);
        }
        public ConnectionProfile(AuthenticationProfile authentication, RegionProfile region, ProxyProfile proxy, string user, string password)
        {
            Authentication = authentication;
            Region         = region;
            Proxy          = proxy;

            User     = user;
            Password = password;
        }
Exemple #7
0
 public void DeleteProxyProfile(ProxyProfile profile)
 {
     try
     {
         _stateManager.RemoveProfile(profile);
         _stateManager.SaveDatabase();
     }
     catch { }
 }
        public ConnectionProfile(AuthenticationProfile authentication, RegionProfile region, ProxyProfile proxy, string user, string password)
        {
            Authentication = authentication;
            Region = region;
            Proxy = proxy;

            User = user;
            Password = password;
        }
Exemple #9
0
        public void SaveProxyProfile(ProxyProfile profile)
        {
            try
            {
                _stateManager.AddProfile(profile);
                _stateManager.SaveDatabase();
            }


            catch { }
        }
Exemple #10
0
        private void EditProfile_Click(object sender, RoutedEventArgs e)
        {
            ProxyProfile profile = (ProxyProfile)((Button)e.Source).DataContext;

            EditProfileDialog edit = new EditProfileDialog(this, profile);

            try
            {
                edit.ShowDialog();
            }
            catch
            {
            }
        }
Exemple #11
0
        public void ChangeProxy(ProxyProfile profile)
        {
            using (ProxyHandler handler = new ProxyHandler())
            {
                if (profile.AutomaticScript == "" || profile.AutomaticScript == null)
                {
                    handler.ChangeProxy(profile.ProxyAddress + ":" + profile.Port);
                }
                else
                {
                    handler.ChangeProxy(profile.ProxyAddress + ":" + profile.Port, profile.AutomaticScript);
                }
            }

            UpdatePropertyCheckMarks();
        }
Exemple #12
0
 public void SetCurrentProfile(ProxyProfile Profile)
 {
 }
Exemple #13
0
 public void RecieveChangedProfile(ProxyProfile profile)
 {
     _appViewModel.EditProxyProfile(profile);
     _appViewModel.UpdatePropertyCheckMarks();
 }
Exemple #14
0
 public void RecieveProfile(ProxyProfile profile)
 {
     _appViewModel.SaveProxyProfile(profile);
 }
Exemple #15
0
        private void DeleteProfile_Click(object sender, RoutedEventArgs e)
        {
            ProxyProfile profile = (ProxyProfile)((Button)e.Source).DataContext;

            _appViewModel.DeleteProxyProfile(profile);
        }
Exemple #16
0
        private void SwitchToProfile_Click(object sender, RoutedEventArgs e)
        {
            ProxyProfile profile = (ProxyProfile)((Button)e.Source).DataContext;

            _appViewModel.ChangeProxy(profile);
        }