Exemple #1
0
 /// <summary>
 /// Loggedin user Profile window
 /// </summary>
 /// <param name="userProfileWindowOpen">opens the window</param>
 /// <param name="userProfile">user</param>
 public ProfileViewModel(UserProfileWindow userProfileWindowOpen, tblUser userProfile)
 {
     user = LoggedInUser.CurrentUser;
     user = userProfile;
     userProfileWindow  = userProfileWindowOpen;
     ViewChangePassword = Visibility.Collapsed;
 }
Exemple #2
0
        private void ProfileMouseUp(object sender, MouseButtonEventArgs e)
        {
            var fe   = sender as FrameworkElement;
            var play = fe.DataContext as Octgn.Play.Player;

            if (play == null)
            {
                return;
            }
            UserProfileWindow.Show(new User(play.Name + "@" + AppConfig.ChatServerPath));
        }
Exemple #3
0
        private async void ProfileMouseUp(object sender, MouseButtonEventArgs e)
        {
            var fe   = sender as FrameworkElement;
            var play = fe.DataContext as Octgn.Play.Player;

            if (play == null)
            {
                return;
            }
            await UserProfileWindow.Show(new User(play.UserId));
        }
Exemple #4
0
        private void ExecuteOnProfileSettings()
        {
            try
            {
                view.Hide(false);

                var profEditWnd = new UserProfileWindow();
                profEditWnd.Owner = (Window)view;
                profEditWnd.ShowDialog();
                UpdateUI();
                GlobalBase.UpdateContactList.Invoke();

                view.Hide(true);
            }
            catch (System.Exception)
            {
            }
        }
Exemple #5
0
        protected virtual void ShowUserMenu()
        {
            var page = NavigationService.CurrentPage as IHasDisplayPreferences;
            DisplayPreferences displayPreferences = null;
            ListPageConfig     options            = null;

            if (page != null)
            {
                displayPreferences = page.GetDisplayPreferences();
                options            = page.GetListPageConfig();
            }

            var userProfileWindow = new UserProfileWindow(this, SessionManager, PresentationManager, ImageManager,
                                                          ApiClient, ConfigurationManager, displayPreferences, options);

            userProfileWindow.Closed += userProfileWindow_Closed;

            userProfileWindow.ShowModal(PresentationManager.Window);
        }
Exemple #6
0
        private void ProfileOnClick(object sender, RoutedEventArgs e)
        {
            var mi = sender as MenuItem;

            if (mi == null)
            {
                return;
            }
            var cm = mi.Parent as ContextMenu;

            if (cm == null)
            {
                return;
            }
            var ui = cm.PlacementTarget as UserListItem;

            if (ui == null)
            {
                return;
            }
            UserProfileWindow.Show(ui.User);
        }
        public void ShowUserProfileWindow()
        {
            UserProfileWindow window = new UserProfileWindow();

            window.ShowDialog();
        }
Exemple #8
0
        public UserProfileViewModel(UserProfileWindow owner) : this()
        {
            _owner = owner;

            LoadProfiles();
        }