Example #1
0
            Microsoft.Office.Tools.Outlook.IFormRegion Microsoft.Office.Tools.Outlook.IFormRegionFactory.CreateFormRegion(Microsoft.Office.Interop.Outlook.FormRegion formRegion)
            {
                MainRegion form = new MainRegion(formRegion);

                form.Factory = this;
                return(form);
            }
Example #2
0
        /// <summary>
        ///     Gets the Latest LeagueOfLegends lol_game_client_sln version
        /// </summary>
        public string[] GetLolClientSlnVersion(MainRegion Region)
        {
            //Get the GameClientSln version
            using (new WebClient())
            {
                ReleaseListing = new WebClient().DownloadString(Region.GameReleaseListingUri);
            }

            return(ReleaseListing.Split(new[] { Environment.NewLine }, StringSplitOptions.None).Skip(1).ToArray());
        }
Example #3
0
        private void ProcessShowManageUserMessage(ShowManageUserViewMessage message)
        {
            if (_manageUserViewModel == null)
            {
                _manageUserViewModel = Container.Resolve <IManageUserViewModel>();
                MainRegion.Add(_manageUserViewModel.View);
            }

            _manageUserViewModel.User = message.User;
            MainRegion.Activate(_manageUserViewModel.View);
        }
Example #4
0
        /// <summary>
        ///     Gets the SolutionManifest
        /// </summary>
        /// <returns>
        ///     The SolutionManifest file from riot
        /// </returns>
        public string CreateConfigurationManifest(MainRegion Region)
        {
            string latestSlnVersion = Convert.ToString(GetLolClientSlnVersion(Region));

            //Get GameClient Language files
            using (new WebClient())
            {
                SolutionManifest =
                    new WebClient().DownloadString(
                        "http://l3cdn.riotgames.com/releases/live/solutions/lol_game_client_sln/releases/" +
                        latestSlnVersion + "/solutionmanifest");
            }
            return(SolutionManifest);
        }
Example #5
0
        private void ProcessShowUserListViewMessage(ShowUserListViewMessage message)
        {
            if (_usersListViewModel == null)
            {
                _usersListViewModel = Container.Resolve <IUsersListViewModel>();
                MainRegion.Add(_usersListViewModel.View);
            }

            if (message.Reload)
            {
                _usersListViewModel.LoadAsync();
            }
            MainRegion.Activate(_usersListViewModel.View);
        }
        private void LayoutRoot_Loaded(object sender, RoutedEventArgs e)
        {
            NavigationCommands.BrowseBack.InputGestures.Clear();
            NavigationCommands.BrowseForward.InputGestures.Clear();
            if (pxy == null)
            {
                pxy = new DataServiceClient();
            }
            txtUserName.Text = "Welcome, " + Global.UserName + "  ";

            if (Global.UserType == Const.User)
            {
                Global.DashBoard = false;
                MainRegion.Navigate(new Product(Global.GlobalPageMode));
                return;
            }
            MainRegion.Navigate(new Dashboard(MainRegion));
        }
Example #7
0
        private void OnStartNewGameCommand()
        {
            PlayerTypeBinder binderPlOne = PlayerOnePlayerType.FirstOrDefault(i => i.IsChecked);
            IPlayer          playerOne   = CreatePlayer(binderPlOne.PlayerType);

            playerOne.PlayerName = PlayerOneName;
            playerOne.PlayerType = binderPlOne.PlayerType;

            PlayerTypeBinder binderPlTwo = PlayerTwoPlayerType.FirstOrDefault(i => i.IsChecked);
            IPlayer          playerTwo   = CreatePlayer(binderPlTwo.PlayerType);

            playerTwo.PlayerName = PlayerTwoName;
            playerTwo.PlayerType = binderPlTwo.PlayerType;

            //TODO: Bind this to a property of the options to make the number of turns selectable.
            //PS: changing this value manualy already works

            _game.NumerberOfTurns = 3;
            _game.PlayerOne       = playerOne;
            _game.PlayerTwo       = playerTwo;
            _game.Rules           = new RockPaperScissorsRules();
            MainRegion.NavigateTo(typeof(GameView));
        }
Example #8
0
        public SettingsForm(MainRegion region)
        {
            InitializeComponent();

            m_region = region;

            foreach (KeyValuePair <string, string> pair in region.Settings)
            {
                Control[] ctls = this.Controls.Find(pair.Key, true);

                if (ctls != null && ctls.Length > 0)
                {
                    if (ctls[0].GetType() == typeof(TextBox) || ctls[0].GetType() == typeof(MaskedTextBox))
                    {
                        ctls[0].Text = pair.Value;
                    }
                    else if (ctls[0].GetType() == typeof(NumericUpDown))
                    {
                        ((NumericUpDown)ctls[0]).Value = Convert.ToDecimal(pair.Value);
                    }
                }
            }
        }
 public MailTemplatesForm(MainRegion region)
 {
     InitializeComponent();
     m_mainRegion = region;
 }
Example #10
0
        public PatcherSettingsPage(bool newsettings = false)
        {
            InitializeComponent();
            if (newsettings)
            {
                SettingsLabel.Content = "Please configure your settings before using LegendaryClient.Patcher!";
            }

            if (Properties.Settings.Default.UseGithub)
            {
                Version.SelectedItem = Github;
            }
            else
            {
                Version.SelectedItem = Appveyor;
            }

            if (Properties.Settings.Default.OnlyLOL)
            {
                UpdateSettings.SelectedItem = OnlyLoL;
            }
            else
            {
                UpdateSettings.SelectedItem = LegendaryClient;
            }

            LOLP2P.IsChecked       = Properties.Settings.Default.LOLP2P;
            LCP2P.IsChecked        = Properties.Settings.Default.LCP2P;
            LCPP2P.IsChecked       = Properties.Settings.Default.LCPP2P;
            AlwaysUpdate.IsChecked = Properties.Settings.Default.AlwaysUpdate;
            PatcherVolume.Value    = Properties.Settings.Default.Volume;

            var regions = Client.GetInstances <MainRegion>();

            foreach (MainRegion region in regions)
            {
                if (region.RegionType == RegionType.Riot)
                {
                    riot.Add(region);
                }
                else if (region.RegionType == RegionType.PBE)
                {
                    pbe = region;
                }
                else if (region.RegionType == RegionType.KR)
                {
                    kr = region;
                }
                else if (region.RegionType == RegionType.Garena)
                {
                    garena.Add(region);
                }
            }

            Region.Items.Add("Riot");
            Region.Items.Add("PBE");
            Region.Items.Add("Korea");
            Region.Items.Add("Garena");
            Region.SelectedIndex = -1;
            if (!string.IsNullOrEmpty(Properties.Settings.Default.RegionType))
            {
                Region.SelectedItem   = Properties.Settings.Default.RegionType;
                RegionName.Visibility = System.Windows.Visibility.Visible;
                if (Region.SelectedItem.ToString() == "Riot")
                {
                    foreach (MainRegion region in riot)
                    {
                        RegionName.Items.Add(region.RegionName);
                    }
                    if (!string.IsNullOrEmpty(Properties.Settings.Default.RegionName))
                    {
                        RegionName.SelectedItem = Properties.Settings.Default.RegionName;
                    }
                }
                else if (Region.SelectedItem.ToString() == "PBE")
                {
                    RegionName.Items.Add("PBE");
                    RegionName.SelectedItem = "PBE";
                    RegionName.IsEnabled    = false;
                }
                else if (Region.SelectedItem.ToString() == "Korea")
                {
                    RegionName.Items.Add("KR");
                    RegionName.SelectedItem = "KR";
                    RegionName.IsEnabled    = false;
                }
                else if (Region.SelectedItem.ToString() == "Garena")
                {
                    foreach (MainRegion region in garena)
                    {
                        RegionName.Items.Add(region.RegionName);
                    }
                    if (!string.IsNullOrEmpty(Properties.Settings.Default.RegionName))
                    {
                        RegionName.SelectedItem = Properties.Settings.Default.RegionName;
                    }
                }
                else
                {
                    RegionName.SelectedIndex = -1;
                    RegionName.Visibility    = System.Windows.Visibility.Hidden;
                }
            }
        }
Example #11
0
 public MainRegionFactory()
 {
     this._Manifest = Globals.Factory.CreateFormRegionManifest();
     MainRegion.InitializeManifest(this._Manifest, Globals.Factory);
     this.FormRegionInitializing += new Microsoft.Office.Tools.Outlook.FormRegionInitializingEventHandler(this.MainRegionFactory_FormRegionInitializing);
 }