예제 #1
0
 private void InitializeAppBar()
 {
     if (this._shouldPick)
     {
         ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton();
         Uri uri1 = new Uri("/Resources/check.png", UriKind.Relative);
         applicationBarIconButton1.IconUri = uri1;
         string barAttachLocation = CommonResources.Conversation_AppBar_AttachLocation;
         applicationBarIconButton1.Text = barAttachLocation;
         ApplicationBarIconButton applicationBarIconButton2 = applicationBarIconButton1;
         applicationBarIconButton2.Click += (new EventHandler(this.AppBarButtonSave_OnClick));
         ApplicationBarIconButton applicationBarIconButton3 = new ApplicationBarIconButton();
         Uri uri2 = new Uri("/Resources/appbar.cancel.rest.png", UriKind.Relative);
         applicationBarIconButton3.IconUri = uri2;
         string editAppBarCancel = CommonResources.ChatEdit_AppBar_Cancel;
         applicationBarIconButton3.Text = editAppBarCancel;
         ApplicationBarIconButton applicationBarIconButton4 = applicationBarIconButton3;
         applicationBarIconButton4.Click += (new EventHandler(this.AppBarButtonCancel_OnClick));
         ApplicationBar applicationBar = ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9);
         applicationBar.Buttons.Add(applicationBarIconButton2);
         applicationBar.Buttons.Add(applicationBarIconButton4);
         this.ApplicationBar = ((IApplicationBar)applicationBar);
     }
     else
     {
         this.ApplicationBar = (null);
     }
 }
예제 #2
0
        private ApplicationBar GetSearchParamsUCAppBar(SearchParamsUCBase paramsUC)
        {
            ApplicationBar           applicationBar            = ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9);
            ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton(new Uri("/Resources/check.png", UriKind.Relative));
            string appBarMenuSave = CommonResources.AppBarMenu_Save;

            applicationBarIconButton1.Text = appBarMenuSave;
            ApplicationBarIconButton applicationBarIconButton2 = applicationBarIconButton1;

            applicationBarIconButton2.Click += ((EventHandler)((sender, args) =>
            {
                if (this._searchParamsDialogService != null && this._searchParamsDialogService.IsOpen)
                {
                    this._searchParamsDialogService.Hide();
                }
                Dictionary <string, string> parameters = paramsUC.GetParameters();
                if (parameters != null && parameters.ContainsKey("offset"))
                {
                    parameters["offset"] = "0";
                }
                this.ViewModel.Parameters = parameters;
                this.ViewModel.LoadData(true, false, true, false, true);
            }));
            applicationBar.Buttons.Add(applicationBarIconButton2);
            return(applicationBar);
        }
예제 #3
0
        protected override void HandleOnNavigatedTo(NavigationEventArgs e)
        {
            base.HandleOnNavigatedTo(e);
            if (this._isInitialized)
            {
                return;
            }
            LinksViewModel linksViewModel = new LinksViewModel(long.Parse(((Page)this).NavigationContext.QueryString["CommunityId"]));

            ((FrameworkElement)this).DataContext = ((object)linksViewModel);
            ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton();
            Uri uri = new Uri("/Resources/appbar.add.rest.png", UriKind.Relative);

            applicationBarIconButton1.IconUri = (uri);
            string appBarAdd = CommonResources.AppBar_Add;

            applicationBarIconButton1.Text = (appBarAdd);
            ApplicationBarIconButton applicationBarIconButton2 = applicationBarIconButton1;

            applicationBarIconButton2.Click += ((EventHandler)((p, f) => Navigator.Current.NavigateToCommunityManagementLinkCreation(this.ViewModel.CommunityId, (GroupLink)null)));
            this.ApplicationBar              = ((IApplicationBar)ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9));
            this.ApplicationBar.Buttons.Add((object)applicationBarIconButton2);
            linksViewModel.Links.LoadData(true, false, (Action <BackendResult <System.Collections.Generic.List <Group>, ResultCode> >)null, false);
            this._isInitialized = true;
        }
예제 #4
0
        protected override void HandleOnNavigatedTo(NavigationEventArgs e)
        {
            base.HandleOnNavigatedTo(e);
            DocumentEditingViewModel viewModel = new DocumentEditingViewModel(long.Parse(((Page)this).NavigationContext.QueryString["OwnerId"]), long.Parse(((Page)this).NavigationContext.QueryString["Id"]), ((Page)this).NavigationContext.QueryString["Title"].ForUI());

            base.DataContext = viewModel;
            ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton();
            Uri uri1 = new Uri("/Resources/check.png", UriKind.Relative);

            applicationBarIconButton1.IconUri = uri1;
            string appBarMenuSave = CommonResources.AppBarMenu_Save;

            applicationBarIconButton1.Text = appBarMenuSave;
            ApplicationBarIconButton appBarButtonSave          = applicationBarIconButton1;
            ApplicationBarIconButton applicationBarIconButton2 = new ApplicationBarIconButton();
            Uri uri2 = new Uri("/Resources/appbar.cancel.rest.png", UriKind.Relative);

            applicationBarIconButton2.IconUri = uri2;
            string appBarCancel = CommonResources.AppBar_Cancel;

            applicationBarIconButton2.Text = appBarCancel;
            ApplicationBarIconButton applicationBarIconButton3 = applicationBarIconButton2;

            appBarButtonSave.Click += ((EventHandler)((p, f) =>
            {
                ((Control)this).Focus();
                viewModel.SaveChanges();
            }));
            applicationBarIconButton3.Click += ((EventHandler)((p, f) => Navigator.Current.GoBack()));
            this.ApplicationBar              = ((IApplicationBar)ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9));
            viewModel.PropertyChanged       += (PropertyChangedEventHandler)((p, f) => appBarButtonSave.IsEnabled = viewModel.IsFormCompleted);
            this.ApplicationBar.Buttons.Add(appBarButtonSave);
            this.ApplicationBar.Buttons.Add(applicationBarIconButton3);
        }
예제 #5
0
 public TransfersListPage()
 {
     this.InitializeComponent();
     if (AppGlobalStateManager.Current.GlobalState.CanSendMoneyTransfers)
     {
         this.ApplicationBar = ((IApplicationBar)ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9));
         ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton();
         Uri uri = new Uri("/Resources/appbar.add.rest.png", UriKind.Relative);
         applicationBarIconButton1.IconUri = uri;
         string conversationAppBarSend = CommonResources.Conversation_AppBar_Send;
         applicationBarIconButton1.Text = conversationAppBarSend;
         ApplicationBarIconButton applicationBarIconButton2 = applicationBarIconButton1;
         applicationBarIconButton2.Click += (new EventHandler(TransfersListPage.AppBarAddButton_OnClicked));
         this.ApplicationBar.Buttons.Add(applicationBarIconButton2);
     }
     this.header.OnHeaderTap += (Action)(() =>
     {
         if (this.pivot.SelectedIndex == 0)
         {
             this.inboxList.ScrollToTop();
         }
         else
         {
             this.outboxList.ScrollToTop();
         }
     });
     this.inboxList.OnRefresh  = (Action)(() => this._viewModel.Inbox.LoadData(true, false, null, false));
     this.outboxList.OnRefresh = (Action)(() => this._viewModel.Outbox.LoadData(true, false, null, false));
     this.pullToRefresh.TrackListBox((ISupportPullToRefresh)this.inboxList);
     this.pullToRefresh.TrackListBox((ISupportPullToRefresh)this.outboxList);
 }
예제 #6
0
        protected override void HandleOnNavigatedTo(NavigationEventArgs e)
        {
            base.HandleOnNavigatedTo(e);
            if (this._isInitialized)
            {
                return;
            }
            long               communityId        = long.Parse(((Page)this).NavigationContext.QueryString["CommunityId"]);
            GroupType          communityType      = (GroupType)int.Parse(((Page)this).NavigationContext.QueryString["CommunityType"]);
            BlacklistViewModel blacklistViewModel = new BlacklistViewModel(communityId);

            ((FrameworkElement)this).DataContext = ((object)blacklistViewModel);
            ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton();
            Uri uri = new Uri("/Resources/appbar.add.rest.png", UriKind.Relative);

            applicationBarIconButton1.IconUri = (uri);
            string appBarAdd = CommonResources.AppBar_Add;

            applicationBarIconButton1.Text = (appBarAdd);
            ApplicationBarIconButton applicationBarIconButton2 = applicationBarIconButton1;

            applicationBarIconButton2.Click += ((EventHandler)((p, f) => Navigator.Current.NavigateToCommunitySubscribers(this.ViewModel.CommunityId, communityType, false, true, true)));
            this.ApplicationBar              = ((IApplicationBar)ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9));
            this.ApplicationBar.Buttons.Add((object)applicationBarIconButton2);
            blacklistViewModel.Users.LoadData(true, false, (Action <BackendResult <BlockedUsers, ResultCode> >)null, false);
            this._isInitialized = true;
        }
예제 #7
0
        protected override void HandleOnNavigatedTo(NavigationEventArgs e)
        {
            base.HandleOnNavigatedTo(e);
            if (this._isInitialized)
            {
                return;
            }
            long              communityId       = long.Parse(((Page)this).NavigationContext.QueryString["CommunityId"]);
            GroupType         communityType     = (GroupType)int.Parse(((Page)this).NavigationContext.QueryString["CommunityType"]);
            int               num               = (int)communityType;
            ManagersViewModel managersViewModel = new ManagersViewModel(communityId, (GroupType)num);

            base.DataContext = managersViewModel;
            ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton();
            Uri uri = new Uri("/Resources/appbar.add.rest.png", UriKind.Relative);

            applicationBarIconButton1.IconUri = uri;
            string appBarAdd = CommonResources.AppBar_Add;

            applicationBarIconButton1.Text = appBarAdd;
            ApplicationBarIconButton applicationBarIconButton2 = applicationBarIconButton1;

            applicationBarIconButton2.Click += ((EventHandler)((p, f) => Navigator.Current.NavigateToCommunitySubscribers(this.ViewModel.CommunityId, communityType, false, true, false)));
            base.ApplicationBar              = ((IApplicationBar)ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9));
            base.ApplicationBar.Buttons.Add(applicationBarIconButton2);
            managersViewModel.Managers.LoadData(true, false, null, false);
            this._isInitialized = true;
        }
예제 #8
0
        public DocumentsPage()
        {
            this.InitializeComponent();
            this.ApplicationBar = ((IApplicationBar)ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9));
            ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton();
            Uri uri1 = new Uri("/Resources/appbar.add.rest.png", UriKind.Relative);

            applicationBarIconButton1.IconUri = uri1;
            string friendsPageAppBarAdd = CommonResources.FriendsPage_AppBar_Add;

            applicationBarIconButton1.Text = friendsPageAppBarAdd;
            this._appBarAddButton          = applicationBarIconButton1;
            this._appBarAddButton.Click   += (new EventHandler(DocumentsPage.AppBarAddButton_OnClicked));
            this.ApplicationBar.Buttons.Add(this._appBarAddButton);
            ApplicationBarIconButton applicationBarIconButton2 = new ApplicationBarIconButton();
            Uri uri2 = new Uri("/Resources/appbar.feature.search.rest.png", UriKind.Relative);

            applicationBarIconButton2.IconUri = uri2;
            string pageAppBarSearch = CommonResources.FriendsPage_AppBar_Search;

            applicationBarIconButton2.Text = pageAppBarSearch;
            ApplicationBarIconButton applicationBarIconButton3 = applicationBarIconButton2;

            applicationBarIconButton3.Click += (new EventHandler(this.AppBarSearchButton_OnClicked));
            this.ApplicationBar.Buttons.Add(applicationBarIconButton3);
        }
예제 #9
0
        protected override void HandleOnNavigatedTo(NavigationEventArgs e)
        {
            base.HandleOnNavigatedTo(e);
            if (this._isInitialized)
            {
                return;
            }
            long      communityId            = long.Parse(((Page)this).NavigationContext.QueryString["CommunityId"]);
            GroupType communityType          = (GroupType)int.Parse(((Page)this).NavigationContext.QueryString["CommunityType"]);
            User      parameterForIdAndReset = (User)ParametersRepository.GetParameterForIdAndReset("CommunityManager");
            bool      isEditing  = ((Page)this).NavigationContext.QueryString.ContainsKey("IsContact");
            bool      fromPicker = ((Page)this).NavigationContext.QueryString.ContainsKey("FromPicker") && bool.Parse(((Page)this).NavigationContext.QueryString["FromPicker"]);
            bool      isContact  = false;
            string    position   = "";
            string    email      = "";
            string    phone      = "";

            if (isEditing)
            {
                isContact = ((Page)this).NavigationContext.QueryString["IsContact"].ToLower() == "true";
                position  = Extensions.ForUI(((Page)this).NavigationContext.QueryString["Position"]);
                email     = Extensions.ForUI(((Page)this).NavigationContext.QueryString["Email"]);
                phone     = Extensions.ForUI(((Page)this).NavigationContext.QueryString["Phone"]);
            }
            ManagerEditingViewModel viewModel = new ManagerEditingViewModel(communityId, communityType, ((Page)this).NavigationService, parameterForIdAndReset, isContact, position, email, phone, isEditing, fromPicker);

            base.DataContext = viewModel;
            ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton();
            Uri uri1 = new Uri("/Resources/check.png", UriKind.Relative);

            applicationBarIconButton1.IconUri = uri1;
            string appBarMenuSave = CommonResources.AppBarMenu_Save;

            applicationBarIconButton1.Text = appBarMenuSave;
            int num = viewModel.IsFormCompleted ? 1 : 0;

            applicationBarIconButton1.IsEnabled = (num != 0);
            ApplicationBarIconButton appBarButtonSave          = applicationBarIconButton1;
            ApplicationBarIconButton applicationBarIconButton2 = new ApplicationBarIconButton();
            Uri uri2 = new Uri("/Resources/appbar.cancel.rest.png", UriKind.Relative);

            applicationBarIconButton2.IconUri = uri2;
            string appBarCancel = CommonResources.AppBar_Cancel;

            applicationBarIconButton2.Text = appBarCancel;
            ApplicationBarIconButton applicationBarIconButton3 = applicationBarIconButton2;

            appBarButtonSave.Click += ((EventHandler)((p, f) =>
            {
                ((Control)this).Focus();
                viewModel.SaveChanges(false, ((Page)this).NavigationService);
            }));
            applicationBarIconButton3.Click += ((EventHandler)((p, f) => Navigator.Current.GoBack()));
            this.ApplicationBar              = ((IApplicationBar)ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9));
            viewModel.PropertyChanged       += (PropertyChangedEventHandler)((p, f) => appBarButtonSave.IsEnabled = (viewModel.IsFormEnabled && viewModel.IsFormCompleted));
            this.ApplicationBar.Buttons.Add(appBarButtonSave);
            this.ApplicationBar.Buttons.Add(applicationBarIconButton3);
            this._isInitialized = true;
        }
예제 #10
0
        private void BuildAppBar()
        {
            ApplicationBar applicationBar = ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9);

            this._sendButton.Click += (new EventHandler(this.SendButton_OnClick));
            applicationBar.Buttons.Add(this._sendButton);
            this.ApplicationBar = ((IApplicationBar)applicationBar);
        }
예제 #11
0
 private void BuildAppBar()
 {
     this._appBarButtonCheck.Click  += (new EventHandler(this._appBarButtonCheck_Click));
     this._appBarButtonCancel.Click += (new EventHandler(this._appBarButtonCancel_Click));
     this._mainAppBar = ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9);
     this._mainAppBar.Buttons.Add(this._appBarButtonCheck);
     this._mainAppBar.Buttons.Add(this._appBarButtonCancel);
     this.ApplicationBar = ((IApplicationBar)this._mainAppBar);
 }
예제 #12
0
        private void BuildAppBar()
        {
            ApplicationBar applicationBar = ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9);

            this._searchButton.Click       += new EventHandler(this.Search_OnTap);
            this._searchParamsButton.Click += new EventHandler(this.SetFilters_OnTap);
            applicationBar.Buttons.Add((object)this._searchButton);
            applicationBar.Buttons.Add((object)this._searchParamsButton);
            this.ApplicationBar = (IApplicationBar)applicationBar;
        }
        private void BuildAppBar()
        {
            ApplicationBar applicationBar = ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9);

            applicationBar.Buttons.Add((object)this._appBarButtonSave);
            this._appBarButtonSave.Click += new EventHandler(this.AppBarButtonSave_OnClick);
            applicationBar.Buttons.Add((object)this._appBarButtonReset);
            this._appBarButtonReset.Click += new EventHandler(this.AppBarButtonReset_OnClick);
            this.ApplicationBar            = (IApplicationBar)applicationBar;
        }
예제 #14
0
 private void BuildAppBar()
 {
     this._defaultAppBar                             = ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9);
     this._appBarButtonRefresh.Click                += (new EventHandler(this.AppBarButtonRefresh_OnClick));
     this._appBarMenuItemLeaveGroup.Click           += (new EventHandler(this.AppBarMenuItemLeaveGroup_OnClick));
     this._appBarMenuItemPinToStart.Click           += (new EventHandler(this.AppBarMenuItemPinToStart_OnClick));
     this._appBarButtonAddNews.Click                += (new EventHandler(this.AppBarButtonAddNews_OnClick));
     this._appBarButtonPin.Click                    += (new EventHandler(this.AppBarButtonPin_OnClick));
     this._appBarMenuItemFaveUnfave.Click           += (new EventHandler(this.AppBarMenuItemFaveUnfave_OnClick));
     this._appBarMenuItemSubscribeUnsubscribe.Click += (new EventHandler(this._appBarMenuItemSubscribeUnsubscribe_Click));
 }
예제 #15
0
        private void BuildAppBar()
        {
            ApplicationBar           applicationBar           = ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9);
            ApplicationBarIconButton applicationBarIconButton = new ApplicationBarIconButton(new Uri("/Resources/appbar.feature.settings.rest.png", UriKind.Relative))
            {
                Text = CommonResources.MyStickers.ToLowerInvariant()
            };

            applicationBarIconButton.Click += (EventHandler)((sender, args) => Navigator.Current.NavigateToStickersManage());
            applicationBar.Buttons.Add((object)applicationBarIconButton);
            this.ApplicationBar = (IApplicationBar)applicationBar;
        }
예제 #16
0
        private void BuildAppBar()
        {
            ApplicationBar           applicationBar            = ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9);
            ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton(new Uri("/Resources/AppBarGift.png", UriKind.Relative));
            string lowerInvariant = CommonResources.SendGift.ToLowerInvariant();

            applicationBarIconButton1.Text = lowerInvariant;
            ApplicationBarIconButton applicationBarIconButton2 = applicationBarIconButton1;

            applicationBarIconButton2.Click += ((EventHandler)((sender, args) => this._viewModel.NavigateToGiftsCatalog()));
            applicationBar.Buttons.Add(applicationBarIconButton2);
            this.ApplicationBar = ((IApplicationBar)applicationBar);
        }
예제 #17
0
        private ApplicationBar GetSearchParamsAppBar()
        {
            ApplicationBar           applicationBar            = ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9);
            ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton(new Uri("/Resources/search_refine.png", UriKind.Relative));
            string appBarSearchFilter = CommonResources.AppBar_SearchFilter;

            applicationBarIconButton1.Text = appBarSearchFilter;
            ApplicationBarIconButton applicationBarIconButton2 = applicationBarIconButton1;

            applicationBarIconButton2.Click += (new EventHandler(this.SetFiltersButton_OnClick));
            applicationBar.Buttons.Add(applicationBarIconButton2);
            return(applicationBar);
        }
예제 #18
0
        protected override void HandleOnNavigatedTo(NavigationEventArgs e)
        {
            base.HandleOnNavigatedTo(e);
            if (this._isInitialized)
                return;
            InformationViewModel viewModel = new InformationViewModel(long.Parse(((Page)this).NavigationContext.QueryString["CommunityId"]));
            ((FrameworkElement)this).DataContext = viewModel;
            ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton();
            Uri uri1 = new Uri("/Resources/check.png", UriKind.Relative);
            applicationBarIconButton1.IconUri = uri1;
            string appBarMenuSave = CommonResources.AppBarMenu_Save;
            applicationBarIconButton1.Text = appBarMenuSave;
            int num = 0;
            applicationBarIconButton1.IsEnabled = (num != 0);
            ApplicationBarIconButton appBarButtonSave = applicationBarIconButton1;
            ApplicationBarIconButton applicationBarIconButton2 = new ApplicationBarIconButton();
            Uri uri2 = new Uri("/Resources/appbar.cancel.rest.png", UriKind.Relative);
            applicationBarIconButton2.IconUri = uri2;
            string appBarCancel = CommonResources.AppBar_Cancel;
            applicationBarIconButton2.Text = appBarCancel;
            ApplicationBarIconButton applicationBarIconButton3 = applicationBarIconButton2;
            appBarButtonSave.Click += ((EventHandler)((p, f) =>
            {
                ((Control)this).Focus();
                viewModel.SaveChanges();
            }));
            applicationBarIconButton3.Click += ((EventHandler)((p, f) => Navigator.Current.GoBack()));
            this.ApplicationBar = ((IApplicationBar)ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9));
            viewModel.PropertyChanged += (PropertyChangedEventHandler)((p, f) => appBarButtonSave.IsEnabled = (viewModel.IsFormEnabled && viewModel.IsFormCompleted));
            this.ApplicationBar.Buttons.Add(appBarButtonSave);
            this.ApplicationBar.Buttons.Add(applicationBarIconButton3);
            InformationViewModel informationViewModel1 = viewModel;




            InformationViewModel expr_148 = viewModel;
            expr_148.OnTextBoxGotFocus = (RoutedEventHandler)Delegate.Combine(expr_148.OnTextBoxGotFocus, new RoutedEventHandler((object o, RoutedEventArgs args) =>
            {
                this.TextBoxPanel.IsOpen = true;
                Point relativePosition = ((FrameworkElement)o).GetRelativePosition(this.ViewerContent);
                this.Viewer.ScrollToOffsetWithAnimation(relativePosition.Y - 38.0, 0.2, false);
            }));
            InformationViewModel expr_16F = viewModel;
            expr_16F.OnTextBoxLostFocus = (RoutedEventHandler)Delegate.Combine(expr_16F.OnTextBoxLostFocus, new RoutedEventHandler((object o, RoutedEventArgs args) =>
            {
                this.TextBoxPanel.IsOpen = false;
            }));
            viewModel.Reload(true);
            this._isInitialized = true;
        }
예제 #19
0
        private void BuilAppBar()
        {
            this.ApplicationBar = ((IApplicationBar)ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9));
            ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton();
            Uri uri = new Uri("/Resources/appbar.feature.search.rest.png", UriKind.Relative);

            applicationBarIconButton1.IconUri = uri;
            string pageAppBarSearch = CommonResources.FriendsPage_AppBar_Search;

            applicationBarIconButton1.Text = pageAppBarSearch;
            ApplicationBarIconButton applicationBarIconButton2 = applicationBarIconButton1;

            applicationBarIconButton2.Click += (new EventHandler(this.AppBarSearchButton_OnClicked));
            this.ApplicationBar.Buttons.Add(applicationBarIconButton2);
        }
예제 #20
0
 private void BuildAppBar(bool isCurrentUser)
 {
     this._friendsListAppBar             = ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9);
     this._mainAppBar                    = ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9);
     this._appBarButtonCreateList.Click += (new EventHandler(this._appBarButtonCreateList_Click));
     this._appBarButtonAddToList.Click  += (new EventHandler(this._appBarButtonAddToList_Click));
     this._appBarButtonSearch.Click     += (new EventHandler(this._appBarButtonSearch_Click));
     this._mainAppBar.Buttons.Add(this._appBarButtonSearch);
     if (isCurrentUser)
     {
         this._appBarButtonAdd.Click += (new EventHandler(this._appBarButtonAdd_Click));
         this._mainAppBar.Buttons.Add(this._appBarButtonAdd);
     }
     this._friendsListAppBar.Buttons.Add(this._appBarButtonCreateList);
 }
예제 #21
0
        protected override void HandleOnNavigatedTo(NavigationEventArgs e)
        {
            base.HandleOnNavigatedTo(e);
            if (this._isInitialized)
            {
                return;
            }
            this._isInitialized = true;
            AddEditAudioViewModel viewModel = new AddEditAudioViewModel((StorageFile)ParametersRepository.GetParameterForIdAndReset("AudioForUpload"), (AudioObj)ParametersRepository.GetParameterForIdAndReset("AudioForEdit"));

            base.DataContext = viewModel;
            ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton();
            Uri uri1 = new Uri("/Resources/check.png", UriKind.Relative);

            applicationBarIconButton1.IconUri = uri1;
            string appBarMenuSave = CommonResources.AppBarMenu_Save;

            applicationBarIconButton1.Text = appBarMenuSave;
            int num = !viewModel.IsFormCompleted ? 0 : (viewModel.IsFormEnabled ? 1 : 0);

            applicationBarIconButton1.IsEnabled = (num != 0);
            ApplicationBarIconButton appBarButtonSave          = applicationBarIconButton1;
            ApplicationBarIconButton applicationBarIconButton2 = new ApplicationBarIconButton();
            Uri uri2 = new Uri("/Resources/appbar.cancel.rest.png", UriKind.Relative);

            applicationBarIconButton2.IconUri = uri2;
            string appBarCancel = CommonResources.AppBar_Cancel;

            applicationBarIconButton2.Text = appBarCancel;
            ApplicationBarIconButton applicationBarIconButton3 = applicationBarIconButton2;

            appBarButtonSave.Click += ((EventHandler)((p, f) =>
            {
                ((Control)this).Focus();
                viewModel.SaveChanges();
            }));
            applicationBarIconButton3.Click += ((EventHandler)((p, f) => Navigator.Current.GoBack()));
            this.ApplicationBar              = ((IApplicationBar)ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9));
            viewModel.PropertyChanged       += (PropertyChangedEventHandler)((p, f) => appBarButtonSave.IsEnabled = (viewModel.IsFormCompleted && viewModel.IsFormEnabled));
            this.ApplicationBar.Buttons.Add(appBarButtonSave);
            this.ApplicationBar.Buttons.Add(applicationBarIconButton3);
        }
예제 #22
0
        protected override void HandleOnNavigatedTo(NavigationEventArgs e)
        {
            base.HandleOnNavigatedTo(e);
            if (this._isInitialized)
            {
                return;
            }
            CommunityCreationViewModel viewModel = new CommunityCreationViewModel(((Page)this).NavigationService);

            base.DataContext = viewModel;
            ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton();
            Uri uri1 = new Uri("/Resources/check.png", UriKind.Relative);

            applicationBarIconButton1.IconUri = uri1;
            string appBarMenuSave = CommonResources.AppBarMenu_Save;

            applicationBarIconButton1.Text = appBarMenuSave;
            int num = 0;

            applicationBarIconButton1.IsEnabled = (num != 0);
            ApplicationBarIconButton appBarButtonSave          = applicationBarIconButton1;
            ApplicationBarIconButton applicationBarIconButton2 = new ApplicationBarIconButton();
            Uri uri2 = new Uri("/Resources/appbar.cancel.rest.png", UriKind.Relative);

            applicationBarIconButton2.IconUri = uri2;
            string appBarCancel = CommonResources.AppBar_Cancel;

            applicationBarIconButton2.Text = appBarCancel;
            ApplicationBarIconButton applicationBarIconButton3 = applicationBarIconButton2;

            appBarButtonSave.Click += ((EventHandler)((p, f) =>
            {
                ((Control)this).Focus();
                viewModel.CreateCommunity();
            }));
            applicationBarIconButton3.Click += ((EventHandler)((p, f) => Navigator.Current.GoBack()));
            this.ApplicationBar              = ((IApplicationBar)ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9));
            viewModel.PropertyChanged       += (PropertyChangedEventHandler)((p, f) => appBarButtonSave.IsEnabled = (viewModel.IsFormCompleted && viewModel.IsFormEnabled));
            this.ApplicationBar.Buttons.Add(appBarButtonSave);
            this.ApplicationBar.Buttons.Add(applicationBarIconButton3);
            this._isInitialized = true;
        }
예제 #23
0
 protected override void HandleOnNavigatedTo(NavigationEventArgs e)
 {
     base.HandleOnNavigatedTo(e);
     if (!this._isInitialized)
     {
         BlockEditingViewModel viewModel = new BlockEditingViewModel(long.Parse(((Page)this).NavigationContext.QueryString["CommunityId"]), (User)ParametersRepository.GetParameterForIdAndReset("CommunityManagementBlockEditingUser"), (User)ParametersRepository.GetParameterForIdAndReset("CommunityManagementBlockEditingManager"), bool.Parse(((Page)this).NavigationContext.QueryString["IsEditing"]), bool.Parse(((Page)this).NavigationContext.QueryString["IsOpenedWithoutPicker"]));
         base.DataContext = viewModel;
         ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton();
         Uri uri1 = new Uri("/Resources/check.png", UriKind.Relative);
         applicationBarIconButton1.IconUri = uri1;
         string appBarMenuSave = CommonResources.AppBarMenu_Save;
         applicationBarIconButton1.Text = appBarMenuSave;
         ApplicationBarIconButton appBarButtonSave          = applicationBarIconButton1;
         ApplicationBarIconButton applicationBarIconButton2 = new ApplicationBarIconButton();
         Uri uri2 = new Uri("/Resources/appbar.cancel.rest.png", UriKind.Relative);
         applicationBarIconButton2.IconUri = uri2;
         string appBarCancel = CommonResources.AppBar_Cancel;
         applicationBarIconButton2.Text = appBarCancel;
         ApplicationBarIconButton applicationBarIconButton3 = applicationBarIconButton2;
         appBarButtonSave.Click += ((EventHandler)((p, f) =>
         {
             ((Control)this).Focus();
             viewModel.SaveChanges(((Page)this).NavigationService);
         }));
         applicationBarIconButton3.Click += ((EventHandler)((p, f) => Navigator.Current.GoBack()));
         this.ApplicationBar              = ((IApplicationBar)ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9));
         viewModel.PropertyChanged       += (PropertyChangedEventHandler)((p, f) => appBarButtonSave.IsEnabled = viewModel.IsFormEnabled);
         this.ApplicationBar.Buttons.Add(appBarButtonSave);
         this.ApplicationBar.Buttons.Add(applicationBarIconButton3);
         this._isInitialized = true;
     }
     else
     {
         if (!ParametersRepository.Contains("BlockDurationUnixTime"))
         {
             return;
         }
         this.ViewModel.UpdateDuration((int)ParametersRepository.GetParameterForIdAndReset("BlockDurationUnixTime"));
     }
 }
        protected override void HandleOnNavigatedTo(NavigationEventArgs e)
        {
            base.HandleOnNavigatedTo(e);
            if (this._isInitialized)
            {
                return;
            }
            GroupType toEnum = ((Page)this).NavigationContext.QueryString["CommunityType"].ParseToEnum <GroupType>();

            this._communityId      = long.Parse(((Page)this).NavigationContext.QueryString["CommunityId"]);
            this._isManagement     = ((Page)this).NavigationContext.QueryString["IsManagement"].ToLower() == "true";
            this._isPicker         = ((Page)this).NavigationContext.QueryString["IsPicker"].ToLower() == "true";
            this._isBlockingPicker = ((Page)this).NavigationContext.QueryString["IsBlockingPicker"].ToLower() == "true";
            if (toEnum != GroupType.Event)
            {
                ((PresentationFrameworkCollection <object>)((ItemsControl)this.Pivot).Items).Remove((object)this.PivotItemUnsure);
            }
            CommunitySubscribersViewModel subscribersViewModel = new CommunitySubscribersViewModel(this._communityId, toEnum, this._isManagement);

            base.DataContext = ((object)subscribersViewModel);
            ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton();
            Uri uri = new Uri("/Resources/appbar.feature.search.rest.png", UriKind.Relative);

            applicationBarIconButton1.IconUri = (uri);
            string pageAppBarSearch = CommonResources.FriendsPage_AppBar_Search;

            applicationBarIconButton1.Text = (pageAppBarSearch);
            ApplicationBarIconButton applicationBarIconButton2 = applicationBarIconButton1;

            applicationBarIconButton2.Click += (new EventHandler(this.SearchButton_OnClicked));
            this.ApplicationBar              = ((IApplicationBar)ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9));
            this.ApplicationBar.Buttons.Add((object)applicationBarIconButton2);
            if (this._isPicker)
            {
                this.Header.HideSandwitchButton = true;
                this.SuppressMenu = true;
            }
            subscribersViewModel.All.LoadData(false, false, (Action <BackendResult <CommunitySubscribers, ResultCode> >)null, false);
            this._isInitialized = true;
        }
예제 #25
0
        protected override void HandleOnNavigatedTo(NavigationEventArgs e)
        {
            base.HandleOnNavigatedTo(e);
            long                  communityId = long.Parse(((Page)this).NavigationContext.QueryString["CommunityId"]);
            GroupLink             link        = ParametersRepository.Contains("CommunityLink") ? (GroupLink)ParametersRepository.GetParameterForIdAndReset("CommunityLink") :  null;
            LinkCreationViewModel viewModel   = new LinkCreationViewModel(communityId, link);

            base.DataContext = viewModel;
            ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton();
            Uri uri1 = new Uri("/Resources/check.png", UriKind.Relative);

            applicationBarIconButton1.IconUri = uri1;
            string appBarMenuSave = CommonResources.AppBarMenu_Save;

            applicationBarIconButton1.Text = appBarMenuSave;
            int num = link != null ? 1 : 0;

            applicationBarIconButton1.IsEnabled = (num != 0);
            ApplicationBarIconButton appBarButtonSave          = applicationBarIconButton1;
            ApplicationBarIconButton applicationBarIconButton2 = new ApplicationBarIconButton();
            Uri uri2 = new Uri("/Resources/appbar.cancel.rest.png", UriKind.Relative);

            applicationBarIconButton2.IconUri = uri2;
            string appBarCancel = CommonResources.AppBar_Cancel;

            applicationBarIconButton2.Text = appBarCancel;
            ApplicationBarIconButton applicationBarIconButton3 = applicationBarIconButton2;

            appBarButtonSave.Click += ((EventHandler)((p, f) =>
            {
                ((Control)this).Focus();
                viewModel.AddEditLink();
            }));
            applicationBarIconButton3.Click += ((EventHandler)((p, f) => Navigator.Current.GoBack()));
            this.ApplicationBar              = ((IApplicationBar)ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9));
            viewModel.PropertyChanged       += (PropertyChangedEventHandler)((p, f) => appBarButtonSave.IsEnabled = (viewModel.IsFormCompleted && viewModel.IsFormEnabled));
            this.ApplicationBar.Buttons.Add(appBarButtonSave);
            this.ApplicationBar.Buttons.Add(applicationBarIconButton3);
        }
예제 #26
0
        protected override void HandleOnNavigatedTo(NavigationEventArgs e)
        {
            base.HandleOnNavigatedTo(e);
            if (!this._isInitialized)
            {
                ServicesViewModel viewModel = new ServicesViewModel(long.Parse(((Page)this).NavigationContext.QueryString["CommunityId"]));
                base.DataContext = viewModel;
                ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton();
                Uri uri1 = new Uri("/Resources/check.png", UriKind.Relative);
                applicationBarIconButton1.IconUri = uri1;
                string appBarMenuSave = CommonResources.AppBarMenu_Save;
                applicationBarIconButton1.Text = appBarMenuSave;
                ApplicationBarIconButton applicationBarIconButton2 = applicationBarIconButton1;
                ApplicationBarIconButton applicationBarIconButton3 = new ApplicationBarIconButton();
                Uri uri2 = new Uri("/Resources/appbar.cancel.rest.png", UriKind.Relative);
                applicationBarIconButton3.IconUri = uri2;
                string appBarCancel = CommonResources.AppBar_Cancel;
                applicationBarIconButton3.Text = appBarCancel;
                ApplicationBarIconButton applicationBarIconButton4 = applicationBarIconButton3;
                applicationBarIconButton2.Click += ((EventHandler)((p, f) =>
                {
                    ((Control)this).Focus();
                    viewModel.SaveChanges();
                }));
                applicationBarIconButton4.Click += ((EventHandler)((p, f) => Navigator.Current.GoBack()));
                this.ApplicationBar              = ((IApplicationBar)ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9));
                this.ApplicationBar.Buttons.Add(applicationBarIconButton2);
                this.ApplicationBar.Buttons.Add(applicationBarIconButton4);
                viewModel.Reload(true);
                this._isInitialized = true;
            }
            else
            {
                if (!ParametersRepository.Contains("CommunityManagementService"))
                {
                    return;
                }
                CommunityService      parameterForIdAndReset1 = (CommunityService)ParametersRepository.GetParameterForIdAndReset("CommunityManagementService");
                CommunityServiceState parameterForIdAndReset2 = (CommunityServiceState)ParametersRepository.GetParameterForIdAndReset("CommunityManagementServiceNewState");
                switch (parameterForIdAndReset1)
                {
                case CommunityService.Wall:
                    this.ViewModel.WallOrComments = parameterForIdAndReset2;
                    break;

                case CommunityService.Photos:
                    this.ViewModel.Photos = parameterForIdAndReset2;
                    break;

                case CommunityService.Videos:
                    this.ViewModel.Videos = parameterForIdAndReset2;
                    break;

                case CommunityService.Audios:
                    this.ViewModel.Audios = parameterForIdAndReset2;
                    break;

                case CommunityService.Documents:
                    this.ViewModel.Documents = parameterForIdAndReset2;
                    break;

                case CommunityService.Discussions:
                    this.ViewModel.Discussions = parameterForIdAndReset2;
                    break;
                }
            }
        }
예제 #27
0
        protected override void HandleOnNavigatedTo(NavigationEventArgs e)
        {
            base.HandleOnNavigatedTo(e);
            if (this._isInitialized)
            {
                return;
            }
            PlacementSelectionViewModel viewModel = new PlacementSelectionViewModel(long.Parse(((Page)this).NavigationContext.QueryString["CommunityId"]), (Place)ParametersRepository.GetParameterForIdAndReset("PlacementSelectionPlace"));

            base.DataContext = viewModel;
            ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton();
            Uri uri1 = new Uri("/Resources/check.png", UriKind.Relative);

            applicationBarIconButton1.IconUri = uri1;
            string appBarMenuSave = CommonResources.AppBarMenu_Save;

            applicationBarIconButton1.Text = appBarMenuSave;
            int num = this.ViewModel.GeoCoordinate != null ? 1 : 0;

            applicationBarIconButton1.IsEnabled = (num != 0);
            ApplicationBarIconButton appBarButtonSave          = applicationBarIconButton1;
            ApplicationBarIconButton applicationBarIconButton2 = new ApplicationBarIconButton();
            Uri uri2 = new Uri("/Resources/appbar.cancel.rest.png", UriKind.Relative);

            applicationBarIconButton2.IconUri = uri2;
            string appBarCancel = CommonResources.AppBar_Cancel;

            applicationBarIconButton2.Text = appBarCancel;
            ApplicationBarIconButton applicationBarIconButton3 = applicationBarIconButton2;

            appBarButtonSave.Click += ((EventHandler)((p, f) =>
            {
                ((Control)this).Focus();
                viewModel.SaveChanges();
            }));
            applicationBarIconButton3.Click += ((EventHandler)((p, f) => Navigator.Current.GoBack()));
            this.ApplicationBar              = ((IApplicationBar)ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9));
            viewModel.PropertyChanged       += (PropertyChangedEventHandler)((p, f) => appBarButtonSave.IsEnabled = (viewModel.IsFormEnabled && viewModel.GeoCoordinate != null));
            this.ApplicationBar.Buttons.Add(appBarButtonSave);
            this.ApplicationBar.Buttons.Add(applicationBarIconButton3);
            try
            {
                if (!AppGlobalStateManager.Current.GlobalState.AllowUseLocationQuestionAsked || !AppGlobalStateManager.Current.GlobalState.AllowUseLocation)
                {
                    bool flag = MessageBox.Show(CommonResources.MapAttachment_AllowUseLocation, CommonResources.AccessToLocation, (MessageBoxButton)1) == MessageBoxResult.OK;
                    AppGlobalStateManager.Current.GlobalState.AllowUseLocationQuestionAsked = true;
                    AppGlobalStateManager.Current.GlobalState.AllowUseLocation = flag;
                }
                if (!AppGlobalStateManager.Current.GlobalState.AllowUseLocation)
                {
                    this._canGetPlacement = false;
                }
            }
            catch (Exception ex)
            {
                if (ex.HResult == -2147467260)
                {
                    GeolocationHelper.HandleDisabledLocationSettings();
                    this._canGetPlacement = false;
                }
            }
            this._isInitialized = true;
        }