private void MainPage_Loaded(object sender, RoutedEventArgs e)
 {
     ServiceLocator.Dispatcher = new DispatchAdapter();
     loginViewModel = new LoginViewModel();
     progressBar = new PerformanceProgressBar();
     progressBar.IsIndeterminate = true;
     ServiceLocator.Messenger.Subscribe<BaseViewMessage>(m =>
     {
         switch (m.Content.message)
         {
             case BaseViewMessage.MessageTypes.CONNECTION_ERROR:
                 ServiceLocator.Dispatcher.invoke(() => 
                 {
                     ToastPrompt toast = new ToastPrompt();
                     toast.Message = "Erro de conexão";
                     toast.Show();
                     if (ContentPanel.Children.Contains(progressBar))
                         this.ContentPanel.Children.Remove(progressBar);
                 });
                 break;
             case BaseViewMessage.MessageTypes.LOGIN_CONNECTION_OK:
                 getCourses();
                 break;
             case BaseViewMessage.MessageTypes.COURSE_CONNECTION_OK:
                 ServiceLocator.Dispatcher.invoke(() =>
                 {
                     NavigationService.Navigate(new Uri("/Views/CoursePage.xaml", UriKind.Relative));
                 });
                 break;
             default:
                 break;
         }
     });
 }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/MySchoolApp;component/MainPage.xaml", System.UriKind.Relative));
     this.StoryboardShowContactSelection = ((System.Windows.Media.Animation.Storyboard)(this.FindName("StoryboardShowContactSelection")));
     this.LayoutRoot       = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.LoadingStates    = ((System.Windows.VisualStateGroup)(this.FindName("LoadingStates")));
     this.LoadingState     = ((System.Windows.VisualState)(this.FindName("LoadingState")));
     this.CompletedState   = ((System.Windows.VisualState)(this.FindName("CompletedState")));
     this.ErrorState       = ((System.Windows.VisualState)(this.FindName("ErrorState")));
     this.panorama         = ((Microsoft.Phone.Controls.Panorama)(this.FindName("panorama")));
     this.loadingTextBlock = ((System.Windows.Controls.TextBlock)(this.FindName("loadingTextBlock")));
     this.newsListBox      = ((System.Windows.Controls.ListBox)(this.FindName("newsListBox")));
     this.clubsListBox     = ((System.Windows.Controls.ListBox)(this.FindName("clubsListBox")));
     this.mapKeyWarning    = ((System.Windows.Controls.TextBlock)(this.FindName("mapKeyWarning")));
     this.BingMapImage     = ((System.Windows.Controls.Image)(this.FindName("BingMapImage")));
     this.linksListBox     = ((System.Windows.Controls.ListBox)(this.FindName("linksListBox")));
     this.ContactSelection = ((System.Windows.Controls.Grid)(this.FindName("ContactSelection")));
     this.stackPanel       = ((System.Windows.Controls.StackPanel)(this.FindName("stackPanel")));
     this.progressBar      = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("progressBar")));
 }
Exemple #3
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/HFR7;component/AnswerTopic.xaml", System.UriKind.Relative));
     this.AnswerTopicPage      = ((Microsoft.Phone.Controls.PhoneApplicationPage)(this.FindName("AnswerTopicPage")));
     this.LayoutRoot           = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.backgroundImageBrush = ((System.Windows.Media.ImageBrush)(this.FindName("backgroundImageBrush")));
     this.progressBar          = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("progressBar")));
     this.globalTextblock      = ((System.Windows.Controls.TextBlock)(this.FindName("globalTextblock")));
     this.TitlePanel           = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.PageTitle            = ((System.Windows.Controls.TextBlock)(this.FindName("PageTitle")));
     this.ContentPanel         = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.answerScrollViewer   = ((System.Windows.Controls.ScrollViewer)(this.FindName("answerScrollViewer")));
     this.showQuoteButton      = ((System.Windows.Controls.Button)(this.FindName("showQuoteButton")));
     this.answerTextBox        = ((System.Windows.Controls.TextBox)(this.FindName("answerTextBox")));
     this.policeCanvas         = ((System.Windows.Controls.Canvas)(this.FindName("policeCanvas")));
     this.boldButton           = ((Jayway.Controls.RoundButton)(this.FindName("boldButton")));
     this.italicsButton        = ((Jayway.Controls.RoundButton)(this.FindName("italicsButton")));
     this.underlineButton      = ((Jayway.Controls.RoundButton)(this.FindName("underlineButton")));
     this.spoilerButton        = ((Jayway.Controls.RoundButton)(this.FindName("spoilerButton")));
     this.urlButton            = ((Jayway.Controls.RoundButton)(this.FindName("urlButton")));
     this.imgButton            = ((Jayway.Controls.RoundButton)(this.FindName("imgButton")));
     this.citButton            = ((Jayway.Controls.RoundButton)(this.FindName("citButton")));
     this.sendButton           = ((Microsoft.Phone.Shell.ApplicationBarIconButton)(this.FindName("sendButton")));
     this.policeButton         = ((Microsoft.Phone.Shell.ApplicationBarIconButton)(this.FindName("policeButton")));
     this.hfrrehostButton      = ((Microsoft.Phone.Shell.ApplicationBarIconButton)(this.FindName("hfrrehostButton")));
     this.smileyButton         = ((Microsoft.Phone.Shell.ApplicationBarIconButton)(this.FindName("smileyButton")));
 }
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            // Set the data context of the listbox control to the sample data
            DataContext = App.ViewModel;
            this.Loaded += new RoutedEventHandler(MainPage_Loaded);

            //Set the progress bar
            progress = new PerformanceProgressBar();
            progress.Foreground = new SolidColorBrush(Colors.Blue);
            progress.VerticalAlignment= System.Windows.VerticalAlignment.Top;
            this.LayoutRoot.Children.Add(progress);
            progress.IsIndeterminate = true;

            TiltEffect.SetIsTiltEnabled((App.Current as App).RootFrame, true);

            //Load favourites
            ObservableCollection<eventsViewModel> fav = new ObservableCollection<eventsViewModel>();
            if (settings.TryGetValue("FavouriteEvents", out fav))
            {
                foreach (var item in fav)
                {
                    App.ViewModel.favouriteEvents.Add(item);
                }
            }

            if (App.ViewModel.favouriteEvents.Count == 0)
                favourite.Visibility = System.Windows.Visibility.Visible;
            else if (App.ViewModel.favouriteEvents.Count != 0)
                favourite.Visibility = System.Windows.Visibility.Collapsed;
        }
Exemple #5
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/HFR7;component/HFRrehostMP.xaml", System.UriKind.Relative));
     this.HFRrehostPage            = ((Microsoft.Phone.Controls.PhoneApplicationPage)(this.FindName("HFRrehostPage")));
     this.LayoutRoot               = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.TitlePanel               = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.ApplicationTitle         = ((System.Windows.Controls.TextBlock)(this.FindName("ApplicationTitle")));
     this.PageTitle                = ((System.Windows.Controls.TextBlock)(this.FindName("PageTitle")));
     this.ContentPanel             = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.choosePhotoStackPanel    = ((System.Windows.Controls.StackPanel)(this.FindName("choosePhotoStackPanel")));
     this.choosePicButton          = ((System.Windows.Controls.Button)(this.FindName("choosePicButton")));
     this.takePicButton            = ((System.Windows.Controls.Button)(this.FindName("takePicButton")));
     this.waitStackPanel           = ((System.Windows.Controls.StackPanel)(this.FindName("waitStackPanel")));
     this.globalProgressBar        = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("globalProgressBar")));
     this.messageWaitTextBlock     = ((System.Windows.Controls.TextBlock)(this.FindName("messageWaitTextBlock")));
     this.copyUrlStackPanel        = ((System.Windows.Controls.StackPanel)(this.FindName("copyUrlStackPanel")));
     this.reelleSansLienTextBox    = ((System.Windows.Controls.TextBox)(this.FindName("reelleSansLienTextBox")));
     this.previewAvecLienTextBox   = ((System.Windows.Controls.TextBox)(this.FindName("previewAvecLienTextBox")));
     this.miniatureAvecLienTextBox = ((System.Windows.Controls.TextBox)(this.FindName("miniatureAvecLienTextBox")));
     this.urlTextBox               = ((System.Windows.Controls.TextBox)(this.FindName("urlTextBox")));
     this.retourButton             = ((Microsoft.Phone.Shell.ApplicationBarIconButton)(this.FindName("retourButton")));
 }
Exemple #6
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/RenrenSDKLibrary;component/Pages/UploadPhotoPage.xaml", System.UriKind.Relative));
     this.LayoutRoot      = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.logoPanel       = ((System.Windows.Controls.StackPanel)(this.FindName("logoPanel")));
     this.ProgressPanel   = ((System.Windows.Controls.StackPanel)(this.FindName("ProgressPanel")));
     this.uploadingBar    = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("uploadingBar")));
     this.tb_uploading    = ((System.Windows.Controls.TextBlock)(this.FindName("tb_uploading")));
     this.userPanel       = ((System.Windows.Controls.StackPanel)(this.FindName("userPanel")));
     this.img_head_border = ((System.Windows.Controls.Image)(this.FindName("img_head_border")));
     this.img_head        = ((System.Windows.Controls.Image)(this.FindName("img_head")));
     this.tb_id           = ((System.Windows.Controls.TextBlock)(this.FindName("tb_id")));
     this.countPanel      = ((System.Windows.Controls.StackPanel)(this.FindName("countPanel")));
     this.tb_count        = ((System.Windows.Controls.TextBlock)(this.FindName("tb_count")));
     this.tbx_caption     = ((System.Windows.Controls.TextBox)(this.FindName("tbx_caption")));
     this.imgPanel        = ((System.Windows.Controls.Grid)(this.FindName("imgPanel")));
     this.outborder       = ((System.Windows.Controls.Border)(this.FindName("outborder")));
     this.middleborder    = ((System.Windows.Controls.Border)(this.FindName("middleborder")));
     this.innerborder     = ((System.Windows.Controls.Border)(this.FindName("innerborder")));
     this.img_pic         = ((System.Windows.Controls.Image)(this.FindName("img_pic")));
     this.btnPanel        = ((System.Windows.Controls.StackPanel)(this.FindName("btnPanel")));
     this.btn_upload      = ((System.Windows.Controls.Button)(this.FindName("btn_upload")));
     this.btn_cancel      = ((System.Windows.Controls.Button)(this.FindName("btn_cancel")));
     this.disableRect     = ((System.Windows.Shapes.Rectangle)(this.FindName("disableRect")));
 }
Exemple #7
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/MetroFanfou;component/MainPage.xaml", System.UriKind.Relative));
     this.rootView       = ((System.Windows.Controls.Grid)(this.FindName("rootView")));
     this.TrayPanel      = ((System.Windows.Controls.StackPanel)(this.FindName("TrayPanel")));
     this.performanceBar = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("performanceBar")));
     this.imgLogo        = ((System.Windows.Controls.Image)(this.FindName("imgLogo")));
     this.tbAccountName  = ((System.Windows.Controls.TextBlock)(this.FindName("tbAccountName")));
     this.PivotMain      = ((Microsoft.Phone.Controls.Pivot)(this.FindName("PivotMain")));
     this.homeItem       = ((MetroFanfou.Controls.StatusList)(this.FindName("homeItem")));
     this.replyItem      = ((MetroFanfou.Controls.StatusList)(this.FindName("replyItem")));
     this.publicItem     = ((MetroFanfou.Controls.StatusList)(this.FindName("publicItem")));
     this.mSetting       = ((Microsoft.Phone.Shell.ApplicationBarMenuItem)(this.FindName("mSetting")));
     this.mLogout        = ((Microsoft.Phone.Shell.ApplicationBarMenuItem)(this.FindName("mLogout")));
     this.mAbout         = ((Microsoft.Phone.Shell.ApplicationBarMenuItem)(this.FindName("mAbout")));
     this.mHelp          = ((Microsoft.Phone.Shell.ApplicationBarMenuItem)(this.FindName("mHelp")));
     this.mExit          = ((Microsoft.Phone.Shell.ApplicationBarMenuItem)(this.FindName("mExit")));
     this.btnReload      = ((Microsoft.Phone.Shell.ApplicationBarIconButton)(this.FindName("btnReload")));
     this.btnAdd         = ((Microsoft.Phone.Shell.ApplicationBarIconButton)(this.FindName("btnAdd")));
     this.btnProfile     = ((Microsoft.Phone.Shell.ApplicationBarIconButton)(this.FindName("btnProfile")));
     this.btnSearch      = ((Microsoft.Phone.Shell.ApplicationBarIconButton)(this.FindName("btnSearch")));
 }
Exemple #8
0
            /**
             * Constructor
             */
            public ActivityIndicator()
            {
                mActivityIndicator = new Microsoft.Phone.Controls.PerformanceProgressBar();
                mActivityIndicator.IsIndeterminate = false;
                mActivityIndicator.Visibility = Visibility.Collapsed;

                mView = mActivityIndicator;
            }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/PersianFacebook;component/Modules/LoadingPanel.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.progressbar = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("progressbar")));
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/PhoneToolkitSample;component/Samples/PerformanceProgressBarSample.xaml", System.UriKind.Relative));
     this._performanceProgressBar = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("_performanceProgressBar")));
     this._standardProgressBar = ((System.Windows.Controls.ProgressBar)(this.FindName("_standardProgressBar")));
 }
        /// <summary>
        /// IsIndeterminateProperty property changed handler.
        /// </summary>
        /// <param name="d">PerformanceProgressBar that changed its IsIndeterminate.</param>
        /// <param name="e">Event arguments.</param>
        private static void OnIsIndeterminatePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            PerformanceProgressBar source = d as PerformanceProgressBar;

            if (source != null)
            {
                source.OnIsIndeterminateChanged((bool)e.NewValue);
            }
        }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/MoCommon;component/Component/ProcessBar/HeaderTextProcessBar.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.ProcessBarStatus_TB = ((System.Windows.Controls.TextBlock)(this.FindName("ProcessBarStatus_TB")));
     this.ProcessBar_PB = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("ProcessBar_PB")));
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Here;component/AnimatedSplashScreen.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.textBlock = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock")));
     this.performanceProgressBar1 = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("performanceProgressBar1")));
 }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/PhoneToolkitSample;component/Samples/PerformanceProgressBarSample.xaml", System.UriKind.Relative));
     this._performanceProgressBar = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("_performanceProgressBar")));
     this._standardProgressBar    = ((System.Windows.Controls.ProgressBar)(this.FindName("_standardProgressBar")));
 }
            /**
             * Constructor
             */
            public ActivityIndicator()
            {
                mActivityIndicator = new Microsoft.Phone.Controls.PerformanceProgressBar();
                mActivityIndicator.IsIndeterminate = false;
                mActivityIndicator.Visibility = Visibility.Collapsed;

                View = mActivityIndicator;

                setHorizontalSizePolicyFlags(true, false);
                setVerticalSizePolicyFlags(false, true);
            }
        /// <summary>
        /// Creates a new overlay progress bar.
        /// </summary>
        /// <param name="statusText">A initial value.</param>
        public ProgressOverlayControl(string statusText = "")
        {
            InitializeComponent();
            this.Visibility = System.Windows.Visibility.Collapsed;

            _statusText = statusText;
            _base = (Grid)this.FindName("LayoutRoot");
            _bar = (PerformanceProgressBar)this.FindName("OverlayProgressBar");
            _textBlock = (TextBlock)this.FindName("OverlayText");
            _textBlock.Text = statusText;            
        }
Exemple #17
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/mockup;component/MenuPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.ModuleInfo = ((System.Windows.Controls.ListBox)(this.FindName("ModuleInfo")));
     this.ClassInfo = ((System.Windows.Controls.ListBox)(this.FindName("ClassInfo")));
     this.TodoInfo = ((System.Windows.Controls.ListBox)(this.FindName("TodoInfo")));
     this.loadModuleProgressBar = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("loadModuleProgressBar")));
 }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/MoCommon;component/Component/ProcessBar/HeaderTextProcessBar.xaml", System.UriKind.Relative));
     this.LayoutRoot          = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.ProcessBarStatus_TB = ((System.Windows.Controls.TextBlock)(this.FindName("ProcessBarStatus_TB")));
     this.ProcessBar_PB       = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("ProcessBar_PB")));
 }
        private void LoadUpXMLEvents(Microsoft.Phone.Controls.PerformanceProgressBar progressBar, String sDate, String eDate)
        {
            App.lastRequest = Util.getCurrentTimestamp();
            String queryURL = StartDate + " - " + EndDate;

            WebClient w = new WebClient();

            Observable
            .FromEvent <DownloadStringCompletedEventArgs>(w, "DownloadStringCompleted")
            .Subscribe(r =>
            {
                try
                {
                    XDocument loadedData = XDocument.Parse(r.EventArgs.Result);

                    // ListTitle.Text = (string)loadedData.Root.Attribute("metric");
                    var data = from query in loadedData.Descendants("event")
                               orderby(int) query.Attribute(EventMetrics[EventsMetricsListPicker.SelectedIndex]) descending
                               select new AppViewModel
                    {
                        LineOne = (string)query.Attribute("eventName"),
                        LineTwo = (string)query.Attribute(EventMetrics[EventsMetricsListPicker.SelectedIndex])
                    };

                    progressBar.Visibility      = System.Windows.Visibility.Collapsed;
                    progressBar.IsIndeterminate = false;
                    List <AppViewModel> check   = data.ToList();
                    if (check.Count > 0)
                    {
                        EventsListBox.ItemsSource         = data;
                        EventsListBox.Visibility          = System.Windows.Visibility.Visible;
                        NoEvents.Visibility               = System.Windows.Visibility.Collapsed;
                        EventsMetricsListPicker.IsEnabled = true;
                    }
                    else // show no events available
                    {
                        EventsListBox.Visibility          = System.Windows.Visibility.Collapsed;
                        NoEvents.Visibility               = System.Windows.Visibility.Visible;
                        EventsMetricsListPicker.IsEnabled = false;
                    }
                }
                catch (NotSupportedException) // it's not XML - probably API overload
                {
                    //MessageBox.Show("Flurry API overload, please try again later.");
                }
            });

            w.Headers[HttpRequestHeader.Accept] = "application/xml"; // get us XMLs version!
            w.DownloadStringAsync(
                // http://api.flurry.com/eventMetrics/Summary?apiAccessCode=DJBUBP9NE5YBQB5CQKH3&apiKey=HXCWZ1L3CWMVGQM68JPI&startDate=2012-09-01&endDate=2012-09-02
                new Uri("http://api.flurry.com/eventMetrics/Summary?apiAccessCode=" + apiKey + "&apiKey=" + appapikey + "&startDate=" + sDate + "&endDate=" + eDate)
                );
        }
        private void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            while (true)
            {
                if (this.NavigationService.RemoveBackEntry() == null)
                {
                    break;
                }
            }

            progressBar = new PerformanceProgressBar();
            progressBar.IsIndeterminate = true;
            ServiceLocator.Dispatcher = new DispatchAdapter();
            courseViewModel = new CoursesViewModel();
            _courses.ItemsSource = courseViewModel.listContent;
            _courses.SelectionChanged -= lstCourses_SelectionChanged;
            _courses.SelectionChanged += new SelectionChangedEventHandler(lstCourses_SelectionChanged);

            ServiceLocator.Messenger.Subscribe<BaseViewMessage>(m =>
            {
                switch (m.Content.message)
                {
                    case BaseViewMessage.MessageTypes.CONNECTION_ERROR:
                        ServiceLocator.Dispatcher.invoke(() =>
                        {
                            ToastPrompt toast = new ToastPrompt();
                            toast.Message = "Erro de conexão";
                            toast.Show();
                            if (ContentPanel.Children.Contains(progressBar))
                                this.ContentPanel.Children.Remove(progressBar);
                            _courses.SelectedIndex = -1;
                        });
                        break;
                    case BaseViewMessage.MessageTypes.CLASS_CONNECTION_OK:
                        ServiceLocator.Dispatcher.invoke(() =>
                        {
                            ServiceLocator.Dispatcher.invoke(() =>
                            {
                                NavigationService.Navigate(new Uri("/Views/ClassPage.xaml", UriKind.Relative));
                            });
                        });
                        break;
                    case BaseViewMessage.MessageTypes.COURSE_CONNECTION_OK:
                        ServiceLocator.Dispatcher.invoke(() =>
                        {
                            //TODO refresh.
                        });
                        break;
                    default:
                        break;
                }
            });
        }
Exemple #21
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/News;component/LoopPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.selectorLeft = ((Microsoft.Phone.Controls.Primitives.LoopingSelector)(this.FindName("selectorLeft")));
     this.LoadingPanel = ((System.Windows.Controls.Grid)(this.FindName("LoadingPanel")));
     this.loadingLabel = ((System.Windows.Controls.TextBlock)(this.FindName("loadingLabel")));
     this.loadingProgressBar = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("loadingProgressBar")));
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/AzureManager;component/AddSubscription.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.performanceProgressBar1 = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("performanceProgressBar1")));
     this.TitlePanel = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.ApplicationTitle = ((System.Windows.Controls.TextBlock)(this.FindName("ApplicationTitle")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
 }
Exemple #23
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Here;component/AnimatedSplashScreen.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.textBlock  = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock")));
     this.performanceProgressBar1 = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("performanceProgressBar1")));
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/MobileFacebookDrive;component/Splash.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.performanceProgressBar = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("performanceProgressBar")));
     this.textBlock1 = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock1")));
     this.textBlock2 = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock2")));
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/News;component/Copy%20of%20DaraDetail.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.textHead = ((System.Windows.Controls.TextBlock)(this.FindName("textHead")));
     this.DaraListBox = ((System.Windows.Controls.ListBox)(this.FindName("DaraListBox")));
     this.LoadingPanel = ((System.Windows.Controls.Grid)(this.FindName("LoadingPanel")));
     this.loadingLabel = ((System.Windows.Controls.TextBlock)(this.FindName("loadingLabel")));
     this.loadingProgressBar = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("loadingProgressBar")));
 }
 public override void OnApplyTemplate()
 {
     base.OnApplyTemplate();
     this.recordGeoButton = this.GetTemplateChild("recordGeoButton") as Button;
     this.performanceProgressBar = this.GetTemplateChild("performanceProgressBar") as PerformanceProgressBar;
     this.geoTextBlock = this.GetTemplateChild("geoTextBlock") as TextBlock;
     this.recordGeoButton.Click += this.OnRecordButtonClick;
     this.wasAplpyTemplate = true;
     if (this.isRecordedLocationChanged)
     {
         //AddRecordedLocation(this);
     }
 }
Exemple #27
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/News;component/LoopPagePage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.PivotMain = ((Microsoft.Phone.Controls.Pivot)(this.FindName("PivotMain")));
     this.descriptionLabel = ((Microsoft.Phone.Controls.WebBrowser)(this.FindName("descriptionLabel")));
     this.LoadingPanel = ((System.Windows.Controls.Grid)(this.FindName("LoadingPanel")));
     this.loadingLabel = ((System.Windows.Controls.TextBlock)(this.FindName("loadingLabel")));
     this.loadingProgressBar = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("loadingProgressBar")));
 }
Exemple #28
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/UVEngine;component/System/FileClear.xaml", System.UriKind.Relative));
     this.LayoutRoot   = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.perfbar      = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("perfbar")));
     this.list         = ((System.Windows.Controls.ListBox)(this.FindName("list")));
 }
Exemple #29
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/MetroFanfou;component/UserControls/MentionUser.xaml", System.UriKind.Relative));
     this.popUserList = ((System.Windows.Controls.Primitives.Popup)(this.FindName("popUserList")));
     this.UserListGrid = ((System.Windows.Controls.Grid)(this.FindName("UserListGrid")));
     this.processbar = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("processbar")));
     this.txtKeyword = ((System.Windows.Controls.TextBox)(this.FindName("txtKeyword")));
     this.btnSearch = ((System.Windows.Controls.Button)(this.FindName("btnSearch")));
     this.UserListBox = ((System.Windows.Controls.ListBox)(this.FindName("UserListBox")));
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/KanjiFlashcards;component/Views/ReviewListPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.TitlePanel = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.ApplicationTitle = ((System.Windows.Controls.TextBlock)(this.FindName("ApplicationTitle")));
     this.progressBar = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("progressBar")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.ContentStackPanel = ((System.Windows.Controls.StackPanel)(this.FindName("ContentStackPanel")));
 }
Exemple #31
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/UVEngine;component/Import.xaml", System.UriKind.Relative));
     this.LayoutRoot   = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.Tb           = ((System.Windows.Controls.TextBlock)(this.FindName("Tb")));
     this.pb1          = ((System.Windows.Controls.ProgressBar)(this.FindName("pb1")));
     this.perf         = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("perf")));
 }
Exemple #32
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/News;component/HClusiveDetail.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.HClusivePanorama = ((Microsoft.Phone.Controls.Panorama)(this.FindName("HClusivePanorama")));
     this.bg_img = ((System.Windows.Media.ImageBrush)(this.FindName("bg_img")));
     this.HClusiveListBox = ((System.Windows.Controls.ListBox)(this.FindName("HClusiveListBox")));
     this.LoadingPanel_HClusiveList = ((System.Windows.Controls.Grid)(this.FindName("LoadingPanel_HClusiveList")));
     this.loadingLabel_HClusiveList = ((System.Windows.Controls.TextBlock)(this.FindName("loadingLabel_HClusiveList")));
     this.loadingProgressBar_HClusiveList = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("loadingProgressBar_HClusiveList")));
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/KanjiFlashcards;component/Views/LookupView.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.ApplicationTitle = ((System.Windows.Controls.TextBlock)(this.FindName("ApplicationTitle")));
     this.progressBar = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("progressBar")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.LookupPanel = ((System.Windows.Controls.Grid)(this.FindName("LookupPanel")));
     this.KanjiInput = ((System.Windows.Controls.TextBox)(this.FindName("KanjiInput")));
     this.Submit = ((System.Windows.Controls.Button)(this.FindName("Submit")));
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/PhoneApp;component/Page/TaskListManager.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.TitlePanel = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.ApplicationTitle = ((System.Windows.Controls.TextBlock)(this.FindName("ApplicationTitle")));
     this.PageTitle = ((System.Windows.Controls.TextBlock)(this.FindName("PageTitle")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.listBox = ((System.Windows.Controls.ListBox)(this.FindName("listBox")));
     this.progressBar = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("progressBar")));
 }
        public Alarm()
        {
            InitializeComponent();
            progress = new PerformanceProgressBar();
            //this.TitlePanel.Children.Add(progress);

            dataSource = new List<TimeData>();

            //call webservice to download data
            //callWebService();

            //fix after API ended. Work with downloaded file
            readXML("world-time.xml");
        }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/KanjiFlashcards;component/ViewModels/EditReviewListView.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.TitlePanel = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.ApplicationTitle = ((System.Windows.Controls.TextBlock)(this.FindName("ApplicationTitle")));
     this.progressBar = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("progressBar")));
     this.Name = ((System.Windows.Controls.TextBox)(this.FindName("Name")));
     this.Completed = ((System.Windows.Controls.CheckBox)(this.FindName("Completed")));
     this.AcceptButton = ((System.Windows.Controls.Button)(this.FindName("AcceptButton")));
     this.CancelButton = ((System.Windows.Controls.Button)(this.FindName("CancelButton")));
 }
Exemple #37
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/MetroFanfou;component/UserControls/MentionUser.xaml", System.UriKind.Relative));
     this.popUserList  = ((System.Windows.Controls.Primitives.Popup)(this.FindName("popUserList")));
     this.UserListGrid = ((System.Windows.Controls.Grid)(this.FindName("UserListGrid")));
     this.processbar   = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("processbar")));
     this.txtKeyword   = ((System.Windows.Controls.TextBox)(this.FindName("txtKeyword")));
     this.btnSearch    = ((System.Windows.Controls.Button)(this.FindName("btnSearch")));
     this.UserListBox  = ((System.Windows.Controls.ListBox)(this.FindName("UserListBox")));
 }
        public DetailsPage()
        {
            InitializeComponent();
            OnLoaded();
            LatBlock = new TextBlock();
            LngBlock = new TextBlock();
            //submissionStatMsg = new Popup();
            submissionStatMsg = new TextBlock();
            submissionStatMsg.Visibility = System.Windows.Visibility.Collapsed;
            progressbar = new PerformanceProgressBar();
            progressbar.Foreground = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0x6C, 0x16));

            //popup message content
            msg = new PopupMessageControl(activatePage);
        }
        public Search()
        {
            InitializeComponent();
            SearchResults = new ObservableCollection<eventsViewModel>();
            FirstListBox.ItemsSource = SearchResults;

            //Set the progress bar
            progress = new PerformanceProgressBar();
            progress.Foreground = new SolidColorBrush(Colors.Blue);
            progress.VerticalAlignment = System.Windows.VerticalAlignment.Top;
            this.LayoutRoot.Children.Add(progress);
            //progress.IsIndeterminate = true;

            TiltEffect.SetIsTiltEnabled((App.Current as App).RootFrame, true);
        }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/MyIP;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.TitlePanel = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.ApplicationTitle = ((System.Windows.Controls.TextBlock)(this.FindName("ApplicationTitle")));
     this.PageTitle = ((System.Windows.Controls.TextBlock)(this.FindName("PageTitle")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.textBlock = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock")));
     this.waitLabel = ((System.Windows.Controls.TextBlock)(this.FindName("waitLabel")));
     this.waitBar = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("waitBar")));
 }
Exemple #41
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/HFR7;component/FromTileToTopic.xaml", System.UriKind.Relative));
     this.LayoutRoot       = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.TitlePanel       = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.globalTextblock  = ((System.Windows.Controls.TextBlock)(this.FindName("globalTextblock")));
     this.ApplicationTitle = ((System.Windows.Controls.TextBlock)(this.FindName("ApplicationTitle")));
     this.PageTitle        = ((System.Windows.Controls.TextBlock)(this.FindName("PageTitle")));
     this.ContentPanel     = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.progressBar      = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("progressBar")));
 }
        public Compare()
        {
            InitializeComponent();
            settings = IsolatedStorageSettings.ApplicationSettings;
            dataSource = new List<TimeData>();
            progress = new PerformanceProgressBar();
            //this.TitlePanel.Children.Add(progress);
            //callWebService();
            //timeZone.Text = TimeZoneInfo.Local.DisplayName;

            readXML("world-time.xml");

            existingZones = new ObservableCollection<SavedTimeZones>();
            MainListBox.ItemsSource = existingZones;
            load();
        }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/TicTacToe;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.turnIndicator = ((System.Windows.Controls.TextBlock)(this.FindName("turnIndicator")));
     this.ButtonsGrid = ((System.Windows.Controls.Grid)(this.FindName("ButtonsGrid")));
     this.progress = ((Coding4Fun.Phone.Controls.ProgressOverlay)(this.FindName("progress")));
     this.progressBar = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("progressBar")));
     this.settingsContent = ((System.Windows.Controls.StackPanel)(this.FindName("settingsContent")));
     this.textbox1 = ((System.Windows.Controls.TextBox)(this.FindName("textbox1")));
     this.checkBox1 = ((System.Windows.Controls.CheckBox)(this.FindName("checkBox1")));
     this.mediaElement1 = ((System.Windows.Controls.MediaElement)(this.FindName("mediaElement1")));
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Timelog;component/OneDrivePage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.TitlePanel = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.ApplicationTitle = ((System.Windows.Controls.TextBlock)(this.FindName("ApplicationTitle")));
     this.PageTitle = ((System.Windows.Controls.TextBlock)(this.FindName("PageTitle")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.OneDriveButton = ((Microsoft.Live.Controls.SignInButton)(this.FindName("OneDriveButton")));
     this.infoTextBlock = ((System.Windows.Controls.TextBlock)(this.FindName("infoTextBlock")));
     this.upsky = ((System.Windows.Controls.Image)(this.FindName("upsky")));
     this.Upload = ((System.Windows.Controls.TextBlock)(this.FindName("Upload")));
     this.performanceProgressBar = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("performanceProgressBar")));
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/MyScience;component/SubmissionPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.TitlePanel = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.ApplicationTitle = ((System.Windows.Controls.TextBlock)(this.FindName("ApplicationTitle")));
     this.PageTitle = ((System.Windows.Controls.TextBlock)(this.FindName("PageTitle")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.SubmissionProgressBar = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("SubmissionProgressBar")));
     this.DynamicPanel = ((System.Windows.Controls.StackPanel)(this.FindName("DynamicPanel")));
     this.Photo = ((System.Windows.Controls.Image)(this.FindName("Photo")));
     this.TimeBlock = ((System.Windows.Controls.TextBlock)(this.FindName("TimeBlock")));
     this.LocationBlock = ((System.Windows.Controls.TextBlock)(this.FindName("LocationBlock")));
 }
        void DiscussionPage_Loaded(object sender, RoutedEventArgs e)
        {
            progressBar = new PerformanceProgressBar();
            progressBar.IsIndeterminate = true;
            ServiceLocator.Dispatcher = new DispatchAdapter();
            discussionViewModel = new DiscussionsViewModel();
            _discussions.ItemsSource = discussionViewModel.discussions;
            _discussions.SelectionChanged -= _discussions_SelectionChanged;
            _discussions.SelectionChanged += new SelectionChangedEventHandler(_discussions_SelectionChanged);

            ServiceLocator.Messenger.Subscribe<BaseViewMessage>(m =>
            {
                switch (m.Content.message)
                {
                    case BaseViewMessage.MessageTypes.CONNECTION_ERROR:
                        ServiceLocator.Dispatcher.invoke(() =>
                        {
                            ToastPrompt toast = new ToastPrompt();
                            toast.Message = "Erro de conexão";
                            toast.Show();
                            if (ContentPanel.Children.Contains(progressBar))
                                this.ContentPanel.Children.Remove(progressBar);
                            _discussions.SelectedIndex = -1;
                        });
                        break;

                    case BaseViewMessage.MessageTypes.FUTURE_POSTS_LOADED:
                        ServiceLocator.Dispatcher.invoke(() =>
                        {
                            NavigationService.Navigate(new Uri("/Views/PostPage.xaml", UriKind.Relative));
                        });
                        break;
                    case BaseViewMessage.MessageTypes.NO_NEW_POSTS:
                        ServiceLocator.Dispatcher.invoke(() =>
                        {
                            ToastPrompt noNewMessages = new ToastPrompt();
                            noNewMessages.Message = "Não há novos posts";
                            noNewMessages.Show();
                        });
                        break;
                    default:
                        break;
                }
            });
        }
Exemple #47
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/HFR7;component/NewMp.xaml", System.UriKind.Relative));
     this.LayoutRoot        = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.progressBar       = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("progressBar")));
     this.TitlePanel        = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.PageTitle         = ((System.Windows.Controls.TextBlock)(this.FindName("PageTitle")));
     this.ContentPanel      = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.pseudoTextBox     = ((Microsoft.Phone.Controls.PhoneTextBox)(this.FindName("pseudoTextBox")));
     this.sujetTextBox      = ((Microsoft.Phone.Controls.PhoneTextBox)(this.FindName("sujetTextBox")));
     this.messageTextBox    = ((Microsoft.Phone.Controls.PhoneTextBox)(this.FindName("messageTextBox")));
     this.postMessageButton = ((Microsoft.Phone.Shell.ApplicationBarIconButton)(this.FindName("postMessageButton")));
     this.hfrrehostButton   = ((Microsoft.Phone.Shell.ApplicationBarIconButton)(this.FindName("hfrrehostButton")));
 }
Exemple #48
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/UVEngine;component/ONSCL/ONSCL_GameInfoPage.xaml", System.UriKind.Relative));
     this.LayoutRoot        = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.GameNameTextblock = ((System.Windows.Controls.TextBlock)(this.FindName("GameNameTextblock")));
     this.ContentPanel      = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.IconImage         = ((System.Windows.Controls.Image)(this.FindName("IconImage")));
     this.CompanyTextblock  = ((System.Windows.Controls.TextBlock)(this.FindName("CompanyTextblock")));
     this.MakerTextblock    = ((System.Windows.Controls.TextBlock)(this.FindName("MakerTextblock")));
     this.SizeTextblock     = ((System.Windows.Controls.TextBlock)(this.FindName("SizeTextblock")));
     this.Deleting          = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("Deleting")));
     this.ratio             = ((System.Windows.Controls.RadioButton)(this.FindName("ratio")));
     this.wide = ((System.Windows.Controls.RadioButton)(this.FindName("wide")));
 }
Exemple #49
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Auto%20finder;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot                       = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.MaintPivot                       = ((Microsoft.Phone.Controls.Pivot)(this.FindName("MaintPivot")));
     this.Mark                             = ((Microsoft.Phone.Controls.PivotItem)(this.FindName("Mark")));
     this.adControl1                       = ((Microsoft.Advertising.Mobile.UI.AdControl)(this.FindName("adControl1")));
     this.sendLocationButton               = ((System.Windows.Controls.Button)(this.FindName("sendLocationButton")));
     this.enterLocationButton              = ((System.Windows.Controls.Button)(this.FindName("enterLocationButton")));
     this.LocationEnterPanel               = ((System.Windows.Controls.StackPanel)(this.FindName("LocationEnterPanel")));
     this.enterLocationTextBox             = ((System.Windows.Controls.TextBox)(this.FindName("enterLocationTextBox")));
     this.submitLocationButton             = ((System.Windows.Controls.Button)(this.FindName("submitLocationButton")));
     this.cancelLocationBox                = ((System.Windows.Controls.Button)(this.FindName("cancelLocationBox")));
     this.Navigation                       = ((Microsoft.Phone.Controls.PivotItem)(this.FindName("Navigation")));
     this.Triangle                         = ((System.Windows.Controls.Canvas)(this.FindName("Triangle")));
     this.map1                             = ((Microsoft.Phone.Controls.Maps.Map)(this.FindName("map1")));
     this.targetEllipse                    = ((System.Windows.Shapes.Ellipse)(this.FindName("targetEllipse")));
     this.pathLine                         = ((System.Windows.Shapes.Line)(this.FindName("pathLine")));
     this.upperMapRect                     = ((System.Windows.Shapes.Rectangle)(this.FindName("upperMapRect")));
     this.hideMapButton                    = ((System.Windows.Controls.Button)(this.FindName("hideMapButton")));
     this.showMapButton                    = ((System.Windows.Controls.Button)(this.FindName("showMapButton")));
     this.resetButton                      = ((System.Windows.Controls.Button)(this.FindName("resetButton")));
     this.distanceTextBox                  = ((System.Windows.Controls.TextBlock)(this.FindName("distanceTextBox")));
     this.bottomMapRect                    = ((System.Windows.Shapes.Rectangle)(this.FindName("bottomMapRect")));
     this.calibrationStackPanel            = ((System.Windows.Controls.StackPanel)(this.FindName("calibrationStackPanel")));
     this.calibrationTextBlock             = ((System.Windows.Controls.TextBlock)(this.FindName("calibrationTextBlock")));
     this.calibrationButton                = ((System.Windows.Controls.Button)(this.FindName("calibrationButton")));
     this.adControl2                       = ((Microsoft.Advertising.Mobile.UI.AdControl)(this.FindName("adControl2")));
     this.History                          = ((Microsoft.Phone.Controls.PivotItem)(this.FindName("History")));
     this.FirstListBox                     = ((System.Windows.Controls.ListBox)(this.FindName("FirstListBox")));
     this.PlacemarkNameEnterPanel          = ((System.Windows.Controls.StackPanel)(this.FindName("PlacemarkNameEnterPanel")));
     this.enterPlacemarkNameTextBox        = ((System.Windows.Controls.TextBox)(this.FindName("enterPlacemarkNameTextBox")));
     this.submitPlacemarkNameButton        = ((System.Windows.Controls.Button)(this.FindName("submitPlacemarkNameButton")));
     this.cancelPlacemarkNameBox           = ((System.Windows.Controls.Button)(this.FindName("cancelPlacemarkNameBox")));
     this.LoadingPanel                     = ((System.Windows.Controls.StackPanel)(this.FindName("LoadingPanel")));
     this.performanceProgressBarCustomized = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("performanceProgressBarCustomized")));
 }
Exemple #50
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/HFR7;component/SmileyPage.xaml", System.UriKind.Relative));
     this.WikiSmileyPage       = ((Microsoft.Phone.Controls.PhoneApplicationPage)(this.FindName("WikiSmileyPage")));
     this.LayoutRoot           = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.backgroundImageBrush = ((System.Windows.Media.ImageBrush)(this.FindName("backgroundImageBrush")));
     this.TitlePanel           = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.PageTitle            = ((System.Windows.Controls.TextBlock)(this.FindName("PageTitle")));
     this.globalProgressBar    = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("globalProgressBar")));
     this.ContentPanel         = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.smileyButton         = ((System.Windows.Controls.Button)(this.FindName("smileyButton")));
     this.keywordTextBox       = ((System.Windows.Controls.TextBox)(this.FindName("keywordTextBox")));
     this.searchButton         = ((Jayway.Controls.RoundButton)(this.FindName("searchButton")));
     this.smileyWB             = ((Microsoft.Phone.Controls.WebBrowser)(this.FindName("smileyWB")));
 }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/MySchoolApp;component/FeedPage.xaml", System.UriKind.Relative));
     this.Page             = ((Microsoft.Phone.Controls.PhoneApplicationPage)(this.FindName("Page")));
     this.LayoutRoot       = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.LoadingStates    = ((System.Windows.VisualStateGroup)(this.FindName("LoadingStates")));
     this.LoadingState     = ((System.Windows.VisualState)(this.FindName("LoadingState")));
     this.CompletedState   = ((System.Windows.VisualState)(this.FindName("CompletedState")));
     this.ErrorState       = ((System.Windows.VisualState)(this.FindName("ErrorState")));
     this.TitlePanel       = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.ApplicationTitle = ((System.Windows.Controls.TextBlock)(this.FindName("ApplicationTitle")));
     this.ContentPanel     = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.loadingTextBlock = ((System.Windows.Controls.TextBlock)(this.FindName("loadingTextBlock")));
     this.feedListBox      = ((System.Windows.Controls.ListBox)(this.FindName("feedListBox")));
     this.progressBar      = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("progressBar")));
 }
Exemple #52
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/HFR7;component/Mp.xaml", System.UriKind.Relative));
     this.MpPA                = ((Microsoft.Phone.Controls.PhoneApplicationPage)(this.FindName("MpPA")));
     this.LayoutRoot          = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.progressBar         = ((Microsoft.Phone.Controls.PerformanceProgressBar)(this.FindName("progressBar")));
     this.TitlePanel          = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.PageTitle           = ((System.Windows.Controls.TextBlock)(this.FindName("PageTitle")));
     this.ContentPanel        = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.mpWebBrowser        = ((Microsoft.Phone.Controls.WebBrowser)(this.FindName("mpWebBrowser")));
     this.messageScrollViewer = ((System.Windows.Controls.ScrollViewer)(this.FindName("messageScrollViewer")));
     this.messageTextBox      = ((System.Windows.Controls.TextBox)(this.FindName("messageTextBox")));
     this.mpMiniRectangle     = ((System.Windows.Shapes.Rectangle)(this.FindName("mpMiniRectangle")));
     this.answerButton        = ((Microsoft.Phone.Shell.ApplicationBarIconButton)(this.FindName("answerButton")));
     this.hfrrehostButton     = ((Microsoft.Phone.Shell.ApplicationBarIconButton)(this.FindName("hfrrehostButton")));
     this.smileyButton        = ((Microsoft.Phone.Shell.ApplicationBarIconButton)(this.FindName("smileyButton")));
 }
        private void LoadUpXMLAppMetrics(string metrics, Telerik.Windows.Controls.RadCartesianChart targetChart, Microsoft.Phone.Controls.PerformanceProgressBar progressBar,
                                         RadCustomHubTile rt1, RadCustomHubTile rt2, RadCustomHubTile rt3,
                                         TextBlock t1, TextBlock t2, TextBlock t3, TextBlock tb,
                                         String sDate, String eDate, TextBlock tr1, TextBlock tr2,
                                         int targetSeries)
        {
            App.lastRequest = Util.getCurrentTimestamp();
            String queryURL = sDate + " - " + eDate;

            if (targetSeries > 0)
            {
                // progressBar.Visibility = System.Windows.Visibility.Visible;
                rt1.IsFrozen   = false;
                rt2.IsFrozen   = false;
                rt3.IsFrozen   = false;
                tr2.Visibility = System.Windows.Visibility.Visible;
                tr2.Text       = "(" + DateTime.Parse(sDate).ToShortDateString() + " - " + DateTime.Parse(eDate).ToShortDateString() + ")";
            }
            else  // reset compare chart
            {
                TextBlock[] totals = { xtotal1, xtotal2, xtotal3, xtotal4, xtotal5, xtotal6, xtotal7, xtotal8 };
                if (MainPivot.SelectedIndex < 8)
                {
                    totals[MainPivot.SelectedIndex].Visibility = System.Windows.Visibility.Collapsed;
                }
                targetChart.Series[1].ItemsSource = null;
                tr1.Visibility = System.Windows.Visibility.Visible;
                tr2.Visibility = System.Windows.Visibility.Collapsed;
                tr1.Text       = "(" + DateTime.Parse(sDate).ToShortDateString() + " - " + DateTime.Parse(eDate).ToShortDateString() + ")";
                VisualStateManager.GoToState(rt1, "NotFlipped", true);
                VisualStateManager.GoToState(rt2, "NotFlipped", true);
                VisualStateManager.GoToState(rt3, "NotFlipped", true);
                rt1.IsFrozen = true;
                rt2.IsFrozen = true;
                rt3.IsFrozen = true;
            }

            Debug.WriteLine("LoadUpXMLAppMetrics:" + queryURL);

            WebClient w = new WebClient();

            Observable
            .FromEvent <DownloadStringCompletedEventArgs>(w, "DownloadStringCompleted")
            .Subscribe(r =>
            {
                try
                {
                    XDocument loadedData = XDocument.Parse(r.EventArgs.Result);
                    //XDocument loadedData = XDocument.Load("getAllApplications.xml");

                    // ListTitle.Text = (string)loadedData.Root.Attribute("metric");
                    var data = from query in loadedData.Descendants("day")
                               select new ChartDataPoint
                    {
                        Value = (double)query.Attribute("value"),
                        Label = Util.stripOffYear(DateTime.Parse((string)query.Attribute("date")))
                    };

                    // for processed data for comparison
                    ObservableCollection <ChartDataPoint> newData = new ObservableCollection <ChartDataPoint>();

                    if (targetSeries > 0) // if it's compare we have to fake time
                    {
                        var previousData = targetChart.Series[0].ItemsSource;
                        IEnumerator <ChartDataPoint> enumerator = previousData.GetEnumerator() as System.Collections.Generic.IEnumerator <ChartDataPoint>;
                        int p = 0;

                        while (enumerator.MoveNext())
                        {
                            ChartDataPoint c = enumerator.Current;
                            ChartDataPoint n = data.ElementAt(p) as ChartDataPoint;
                            n.Label          = c.Label;
                            newData.Add(new ChartDataPoint {
                                Value = n.Value, Label = c.Label
                            });
                            p++;
                        }
                    }

                    progressBar.Visibility      = System.Windows.Visibility.Collapsed;
                    progressBar.IsIndeterminate = false;

                    if (targetSeries > 0)
                    {
                        targetChart.Series[targetSeries].ItemsSource = newData;
                        targetChart.Series[targetSeries].DisplayName = StartDate2 + " - " + EndDate2;
                    }
                    else
                    {
                        targetChart.Series[targetSeries].ItemsSource = data;
                    }

                    List <ChartDataPoint> count = data.ToList();

                    if (count != null)
                    {
                        targetChart.HorizontalAxis.LabelInterval = Util.getLabelIntervalByCount(count.Count);
                    }
                    else
                    {
                        targetChart.HorizontalAxis.LabelInterval = Util.getLabelInterval(DateTime.Parse(StartDate), DateTime.Parse(EndDate));
                    }

                    // count max,min,latest,total for display purposes
                    double latest = 0, minim = 9999999999999, maxim = 0, totalCount = 0;
                    IEnumerator <ChartDataPoint> Myenum = data.GetEnumerator();
                    while (Myenum.MoveNext())
                    {
                        ChartDataPoint oneValue = Myenum.Current;
                        latest     = oneValue.Value;
                        minim      = Math.Min(minim, oneValue.Value);
                        maxim      = Math.Max(maxim, oneValue.Value);
                        totalCount = totalCount + oneValue.Value;
                    }

                    t1.Text = latest.ToString();
                    t2.Text = minim.ToString();
                    t3.Text = maxim.ToString();
                    switch (metrics)
                    {
                    case "MedianSessionLength":
                    case "AvgSessionLength":
                        tb.Text = "N/A";     // makes no sense for these metrics
                        break;

                    default:
                        tb.Text = totalCount.ToString();
                        break;
                    }

                    tb.Visibility = System.Windows.Visibility.Visible;
                }
                catch (NotSupportedException)         // it's not XML - probably API overload
                {
                    MessageBox.Show("Flurry API overload, please try again later.");
                }
            });

            w.Headers[HttpRequestHeader.Accept] = "application/xml"; // get us XMLs version!
            string callURL = "http://api.flurry.com/appMetrics/" + metrics + "?apiAccessCode=" + apiKey + "&apiKey=" + appapikey + "&startDate=" + sDate + "&endDate=" + eDate;

            Debug.WriteLine("Calling URL:" + callURL);
            w.DownloadStringAsync(
                new Uri(callURL)
                );
        }