// use task to open app http://www.windowsphonegeek.com/articles/6-how-to-use-marketplace-tasks-in-a-wp7-app

        public AppInfoPage()
        {
            InitializeComponent();
            MainPivot.Title = PhoneHelper.GetAppAttribute("Title").ToUpper();
            // txtHelp.Text = "We will continue to roll out new features and your suggestions.";
            txtAppName.Text = PhoneHelper.GetAppAttribute("Title") + " v" + PhoneHelper.GetAppAttribute("Version");
            //" by " + PhoneHelper.GetAppAttribute("Author");
            //   txtVersion.Text = "version " + PhoneHelper.GetAppAttribute("Version");
            txtDescription.Text = PhoneHelper.GetAppAttribute("Description");

            if (App.isPaidVersion == true)
            {
                adControl.Visibility = System.Windows.Visibility.Collapsed;
                //HelpScrollViewer.Height = 535;
                AppsListBox.Height       = 535;
                AboutScrollViewer.Height = 535;
            }
            else
            {
                AdvertiseInfo adInfo = new AdvertiseInfo();
                adControl = new Microsoft.Advertising.Mobile.UI.AdControl(adInfo.ApplicationID, adInfo.AdUnitID, true);
                //HelpScrollViewer.Height = 454;
                AppsListBox.Height       = 454;
                AboutScrollViewer.Height = 454;
            }
        }
        private void appbar_button_MarketplaceSearch_Click(object sender, EventArgs e)
        {
            MarketplaceSearchTask _marketplaceSearch = new MarketplaceSearchTask();

            _marketplaceSearch.SearchTerms = PhoneHelper.GetAppAttribute("Author");
            _marketplaceSearch.Show();
        }
 public HelpPage()
 {
     InitializeComponent();
     #region Paid version Check
     if (App.isPaidVersion == true)
     {
         // disables ads
         adControl.Visibility = System.Windows.Visibility.Collapsed;
         //adControl.IsAutoRefreshEnabled = false;
         adControl.IsEnabled             = false;
         adControl.IsAutoCollapseEnabled = false;
         svHelp.Height = 605;
         svHelp.Margin = new Thickness(0, 0, 0, 549);
     }
     else
     {
         // enable ads
         adControl.Visibility = System.Windows.Visibility.Visible;
         //adControl.IsAutoRefreshEnabled = true;
         adControl.IsEnabled             = true;
         adControl.IsAutoCollapseEnabled = false;
     }
     #endregion
     txtAppName.Text     = PhoneHelper.GetAppAttribute("Title") + " by " + PhoneHelper.GetAppAttribute("Author");
     txtVersion.Text     = "version " + PhoneHelper.GetAppAttribute("Version");
     txtDescription.Text = PhoneHelper.GetAppAttribute("Description");
 }
Esempio n. 4
0
        public Settings()
        {
            InitializeComponent();
            lstAutoSyncSettings.Items.Add(Strings.Settings_AutoUpdateInactive);
            lstAutoSyncSettings.Items.Add(Strings.Settings_AutoUpdateActive);
            lstAutoSyncSettings.Items.Add(Strings.Settings_AutoUpdateSWLAN);

            viewMode.Items.Add(Strings.Settings_ModeClassic);
            viewMode.Items.Add(Strings.Settings_ModeModern);
            viewMode.SelectedItem = Cache.InClassicStyle()
                ? Strings.Settings_ModeClassic
                : Strings.Settings_ModeModern;

            var version = PhoneHelper
                          .GetAppAttribute("Version");

            lblVersion.Text = string.Format(lblVersion.Text, version);

            Array.ForEach(cultures, item =>
            {
                var lang = new LanguageProxy(item);
                listpickerLanguage.Items.Add(lang);
                if (lang.Name == Thread.CurrentThread.CurrentCulture.Name)
                {
                    listpickerLanguage.SelectedItem = lang;
                }
            });
        }
Esempio n. 5
0
        private static void AddAppInfo(StringBuilder sb)
        {
            sb.AppendLine("WinPass info:");

            sb.Append("Version: ");
            sb.AppendLine(PhoneHelper.GetAppAttribute("Version"));
        }
Esempio n. 6
0
        public AboutViewModel()
        {
            Version   = PhoneHelper.GetAppAttribute("Version");
            Title     = PhoneHelper.GetAppAttribute("Title");
            Author    = PhoneHelper.GetAppAttribute("Author");
            Publisher = PhoneHelper.GetAppAttribute("Publisher");

            AboutMenuItem[] aboutMenuItems = new AboutMenuItem[] {
                new AboutMenuItem("rate", AppResources.AboutAboutRateHeader, "post a 5-star rating in the windows phone store", "/Assets/Images/heart.png"),
                new AboutMenuItem("feedback", AppResources.AboutAboutFeedbackHeader, "tech support, feature requests, and suggestions", "/Assets/Images/feedback.png"),
                new AboutMenuItem("apps", AppResources.AboutAboutAppsHeader, "more apps by this developer", "/Assets/Images/windows.png"),
            };
            AboutMenuItems = new ObservableCollection <AboutMenuItem>(aboutMenuItems);

            HistoryMenuItem[] historyMenuItem = new HistoryMenuItem[] {
                new HistoryMenuItem("1.0.0.0", "Initial public release."),
            };
            HistoryMenuItems = new ObservableCollection <HistoryMenuItem>(historyMenuItem.Reverse());

            CreditsMenuItem[] creditsMenuItems = new CreditsMenuItem[] {
                new CreditsMenuItem("http://silverlight.codeplex.com", "Microsoft Silverlight Toolkit"),
                new CreditsMenuItem("http://boardgamegeek.com", "Board Game Geek"),
                new CreditsMenuItem("http://htmlagilitypack.codeplex.com/releases/view/90925", "HtmlAgilityPack"),
                new CreditsMenuItem("http://www.telerik.com/products/windows-phone.aspx", "Telerik"),
                new CreditsMenuItem("http://coding4fun.codeplex.com/", "Coding4Fun Toolkit"),
                new CreditsMenuItem("http://www.windowsphone.com/en-US/store/publishers?publisherId=taropuff", "taropuff", "Thanks for the images."),
            };

            CreditsMenuItems = new ObservableCollection <CreditsMenuItem>(creditsMenuItems);
        }
Esempio n. 7
0
        public HelpPage()
        {
            InitializeComponent();

            txtAppName.Text     = PhoneHelper.GetAppAttribute("Title") + " by " + PhoneHelper.GetAppAttribute("Author");
            txtVersion.Text     = "version " + PhoneHelper.GetAppAttribute("Version");
            txtDescription.Text = PhoneHelper.GetAppAttribute("Description");
        }
Esempio n. 8
0
 public InfoPage()
 {
     InitializeComponent();
     txtHelp.Text        = "We will continue to roll out new features and your suggestions.";
     txtAppName.Text     = PhoneHelper.GetAppAttribute("Title") + " by " + PhoneHelper.GetAppAttribute("Author");
     txtVersion.Text     = "version " + PhoneHelper.GetAppAttribute("Version");
     txtDescription.Text = PhoneHelper.GetAppAttribute("Description");
 }
        private void appbar_button_ContactUs_Click(object sender, EventArgs e)
        {
            EmailComposeTask _emailComposeTask = new EmailComposeTask();

            _emailComposeTask.To      = "*****@*****.**";
            _emailComposeTask.Subject = PhoneHelper.GetAppAttribute("Title") + "v" + PhoneHelper.GetAppAttribute("Version") + " Feedback";
            _emailComposeTask.Show();
        }
        private void appbar_button_Share_Click(object sender, EventArgs e)
        {
            ShareLinkTask shareLinkTask = new ShareLinkTask();
            ShareInfo     appInfo       = new ShareInfo();

            shareLinkTask.Title   = PhoneHelper.GetAppAttribute("Title");
            shareLinkTask.LinkUri = new Uri(appInfo.LinkUri, UriKind.Absolute);
            shareLinkTask.Message = appInfo.LinkMessage;
            shareLinkTask.Show();
        }
Esempio n. 11
0
        protected internal void email_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
        {
            var email = new EmailComposeTask
            {
                To      = EmailAddress,
                Subject = PhoneHelper.GetAppAttribute("Title") + " Feedback"
            };

            email.Show();
        }
Esempio n. 12
0
        public About()
        {
            InitializeComponent();

            var version = PhoneHelper
                          .GetAppAttribute("Version");

            lblVersion.Text = string.Format(
                lblVersion.Text, version);
        }
Esempio n. 13
0
 private void OnAboutButtonClicked(object sender, EventArgs e)
 {
     if (!_aboutMsgBoxLock)
     {
         _aboutMsgBoxLock = true;
         Version version = new Version(PhoneHelper.GetAppAttribute("Version"));
         MessageBox.Show(String.Format(FileLanguage.VERSION, version.Major, version.Minor, version.Revision));
         _aboutMsgBoxLock = false;
     }
 }
Esempio n. 14
0
        public static ClientInformation GetClientInformation()
        {
            ClientInformation info = new ClientInformation();

            info.ApplicationLanguage = CultureInfo.CurrentUICulture.TwoLetterISOLanguageName;
            info.ApplicationVersion  = PhoneHelper.GetAppAttribute("Version");
            info.Version             = Constants.ServiceVersion;
            info.ClientInstanceId    = ClientInstanceId;
            info.Platform            = PlatformType.WindowsPhone;
            info.PlatformVersion     = Environment.OSVersion.ToString();
            return(info);
        }
Esempio n. 15
0
        public AboutPage()
        {
            InitializeComponent();


            #region trial Check
            if (App.IsTrial == true)
            {
                // enable ads
                adControl.Visibility = System.Windows.Visibility.Visible;
                //adControl.IsAutoRefreshEnabled = true;
                adControl.IsEnabled             = true;
                adControl.IsAutoCollapseEnabled = false;
            }
            else
            {
                // disables ads
                adControl.Visibility = System.Windows.Visibility.Collapsed;
                //adControl.IsAutoRefreshEnabled = false;
                adControl.IsEnabled             = false;
                adControl.IsAutoCollapseEnabled = false;
            }
            #endregion


            isolatedStorageSettings = IsolatedStorageSettings.ApplicationSettings;

            //  txtHelp.Text = "We will continue to roll out new features and your suggestions.";
            #region Paid version Check
            //if (App.isPaidVersion == true)
            //{
            //    // disables ads
            //    adControl.Visibility = System.Windows.Visibility.Collapsed;
            //    //adControl.IsAutoRefreshEnabled = false;
            //    adControl.IsEnabled = false;
            //    adControl.IsAutoCollapseEnabled = false;
            //    //direction.Margin = new Thickness(0, 0, 0, 0);
            //}
            //else
            //{
            //    // enable ads
            //    adControl.Visibility = System.Windows.Visibility.Visible;
            //    //adControl.IsAutoRefreshEnabled = true;
            //    adControl.IsEnabled = true;
            //    adControl.IsAutoCollapseEnabled = false;
            //}
            #endregion
            // http://www.windowsphonegeek.com/articles/Getting-data-out-of-WP7-WMAppManifest-is-easy-with-Coding4Fun-PhoneHelper

            txtAppName.Text     = PhoneHelper.GetAppAttribute("Title") + " by " + PhoneHelper.GetAppAttribute("Author");
            txtVersion.Text     = "version " + PhoneHelper.GetAppAttribute("Version");
            txtDescription.Text = PhoneHelper.GetAppAttribute("Description");
        }
Esempio n. 16
0
        public Settings()
        {
            InitializeComponent();
            lstAutoSyncSettings.Items.Add(Strings.Settings_AutoUpdateInactive);
            lstAutoSyncSettings.Items.Add(Strings.Settings_AutoUpdateActive);
            lstAutoSyncSettings.Items.Add(Strings.Settings_AutoUpdateSWLAN);

            var version = PhoneHelper
                          .GetAppAttribute("Version");

            lblVersion.Text = string.Format(lblVersion.Text, version);
        }
 public static void ShowUpdateInfo()
 {
     if (!ApplicationState.Current.IsOffline)
     {
         string version = PhoneHelper.GetAppAttribute("Version");
         if (version == Version && !ApplicationState.Current.UpdateVersions.Contains(version))
         {
             var ctrl = new UpdateInfoControl();
             ctrl.ShowPopup();
             ApplicationState.Current.UpdateVersions.Add(version);
         }
     }
 }
        public AboutPage()
        {
            InitializeComponent();
            txtHelp.Text        = "Your suggestions and feedback is greatly appreciated.";
            txtAppName.Text     = PhoneHelper.GetAppAttribute("Title") + " by " + PhoneHelper.GetAppAttribute("Author");
            txtVersion.Text     = "version " + PhoneHelper.GetAppAttribute("Version");
            txtDescription.Text = PhoneHelper.GetAppAttribute("Description");

            //if (App.IsTrial == false)
            //{
            //    adControl1.Visibility = System.Windows.Visibility.Collapsed;
            //}
        }
Esempio n. 19
0
        public HelpPage()
        {
            InitializeComponent();
            //txtHelp.Text = "We will continue to roll out new features and suggestions.\n\nControls:\nZoom in and out of map with multi-touch.\n\nPrivacy Policy:\nThe location data is retreived from the Bing Map servers to find your current location, geographic coordinates and routes to your destination.";
            txtAppName.Text     = PhoneHelper.GetAppAttribute("Title") + " by " + PhoneHelper.GetAppAttribute("Author");
            txtVersion.Text     = "Version " + PhoneHelper.GetAppAttribute("Version");
            txtDescription.Text = PhoneHelper.GetAppAttribute("Description");

            if (App.IsTrial == false)
            {
                adcontrol.Visibility = Visibility.Collapsed;
                HelpPagePivot.Height = 780;
            }
        }
Esempio n. 20
0
        public InfoPage()
        {
            InitializeComponent();
            #region Paid version Check
            if (App.isPaidVersion == true)
            {
                // disables ads
                adControl.Visibility = System.Windows.Visibility.Collapsed;
                //adControl.IsAutoRefreshEnabled = false;
                adControl.IsEnabled             = false;
                adControl.IsAutoCollapseEnabled = false;
                //direction.Margin = new Thickness(0, 0, 0, 0);
            }
            else
            {
                // enable ads
                adControl.Visibility = System.Windows.Visibility.Visible;
                //adControl.IsAutoRefreshEnabled = true;
                adControl.IsEnabled             = true;
                adControl.IsAutoCollapseEnabled = false;
            }
            #endregion

            #region Trial check
            //if (App.IsTrial == false)
            //{
            //    AdControlPanel.Visibility = System.Windows.Visibility.Collapsed;
            //}
            #endregion

            // http://www.windowsphonegeek.com/articles/Getting-data-out-of-WP7-WMAppManifest-is-easy-with-Coding4Fun-PhoneHelper

            txtAppName.Text     = PhoneHelper.GetAppAttribute("Title") + " by " + PhoneHelper.GetAppAttribute("Author");
            txtVersion.Text     = "version " + PhoneHelper.GetAppAttribute("Version");
            txtDescription.Text = PhoneHelper.GetAppAttribute("Description");



            if (IsDarkTheme())
            {
                NuanceLogo.Source = new BitmapImage(new Uri("/Images/Nuance/Nuancelogo_dark_144x72.png", UriKind.Relative));
            }
            else
            {
                NuanceLogo.Source = new BitmapImage(new Uri("/Images/Nuance/Nuancelogo_light_144x72.png", UriKind.Relative));
            }
        }
Esempio n. 21
0
        /// <summary>
        /// Constructor for the Application object.
        /// </summary>
        public App()
        {
            // Global handler for uncaught exceptions.
            UnhandledException += Application_UnhandledException;

            // Standard Silverlight initialization
            InitializeComponent();

            // Phone-specific initialization
            InitializePhoneApplication();

            // Show graphics profiling information while debugging.
            if (System.Diagnostics.Debugger.IsAttached)
            {
                // Display the current frame rate counters.
                Application.Current.Host.Settings.EnableFrameRateCounter = true;

                // Show the areas of the app that are being redrawn in each frame.
                //Application.Current.Host.Settings.EnableRedrawRegions = true;

                // Enable non-production analysis visualization mode,
                // which shows areas of a page that are handed off to GPU with a colored overlay.
                //Application.Current.Host.Settings.EnableCacheVisualization = true;

                // Disable the application idle detection by setting the UserIdleDetectionMode property of the
                // application's PhoneApplicationService object to Disabled.
                // Caution:- Use this under debug mode only. Application that disables user idle detection will continue to run
                // and consume battery power when the user is not using the phone.
                PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
            }



            // Check version of app
            bool IsVersionChanged = false;

            if (_IsolatedStorageSettings.Contains("AppCurrentVersion"))
            {
                if (_IsolatedStorageSettings["AppCurrentVersion"].Equals(PhoneHelper.GetAppAttribute("Version")))
                {
                    Debug.WriteLine("Version hasn't changed"); // do nothing
                }
                else
                {
                    // App Version has changed
                    _IsolatedStorageSettings.Remove("AppCurrentVersion");
                    _IsolatedStorageSettings.Add("AppCurrentVersion", PhoneHelper.GetAppAttribute("Version"));
                    Debug.WriteLine("New Version");
                    IsVersionChanged = true;
                    Debug.WriteLine("App Current Version = " + _IsolatedStorageSettings["AppCurrentVersion"]);
                }
            }
            else
            {
                // add the Version setting
                _IsolatedStorageSettings.Add("AppCurrentVersion", PhoneHelper.GetAppAttribute("Version"));
                Debug.WriteLine("App Current Version = " + _IsolatedStorageSettings["AppCurrentVersion"]);
            }
            _IsolatedStorageSettings.Save();



            // Specify the local database connection string.
            string DBConnectionString = "Data Source=isostore:/Translator.sdf";

            // Create the database if it does not exist.
            using (TranslatorDataContext db = new TranslatorDataContext(DBConnectionString))
            {
#if (DEBUG)
                //         Debug.WriteLine("Deleting database db");
                //       db.DeleteDatabase();
#endif
                if (db.DatabaseExists() == false)
                {
                    // Create the local database.
                    Debug.WriteLine("Creating database");
                    db.CreateDatabase();
                    // Save categories to the database.
                    db.SubmitChanges();
                }
                else if (db.DatabaseExists() == true && IsVersionChanged == true)
                {
                    // rebuild the database for new version of app
                    Debug.WriteLine("Rebuilding database ");

                    // dont need to rebuild for version 1.4
                    //  db.DeleteDatabase();
                    //  db.CreateDatabase();
                }
            }

            // Create the ViewModel object.
            viewModel = new TranslatorViewModel(DBConnectionString);

            // Query the local database and load observable collections.
            viewModel.LoadCollectionsFromDatabase();

            #region Nuance setup
            this.ApplicationLifetimeObjects.Add(new XNAAsyncDispatcher(TimeSpan.FromMilliseconds(50)));
            #endregion
        }
Esempio n. 22
0
 public AboutPage()
 {
     InitializeComponent();
     tbVersion.Text = string.Format(ApplicationStrings.AboutPage_Version, PhoneHelper.GetAppAttribute("Version"));
 }
        /// <summary>
        /// Constructor for the Application object.
        /// </summary>
        public App()
        {
            // Global handler for uncaught exceptions.
            UnhandledException += Application_UnhandledException;

            // Standard Silverlight initialization
            InitializeComponent();

            // Phone-specific initialization
            InitializePhoneApplication();

            // Show graphics profiling information while debugging.
            if (System.Diagnostics.Debugger.IsAttached)
            {
                // Display the current frame rate counters.
                Application.Current.Host.Settings.EnableFrameRateCounter = true;

                // Show the areas of the app that are being redrawn in each frame.
                //Application.Current.Host.Settings.EnableRedrawRegions = true;

                // Enable non-production analysis visualization mode,
                // which shows areas of a page that are handed off to GPU with a colored overlay.
                //Application.Current.Host.Settings.EnableCacheVisualization = true;

                // Disable the application idle detection by setting the UserIdleDetectionMode property of the
                // application's PhoneApplicationService object to Disabled.
                // Caution:- Use this under debug mode only. Application that disables user idle detection will continue to run
                // and consume battery power when the user is not using the phone.
                PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
            }



            // Check version of app
            bool IsVersionChanged = false;

            if (_IsolatedStorageSettings.Contains("AppCurrentVersion"))
            {
                if (_IsolatedStorageSettings["AppCurrentVersion"].Equals(PhoneHelper.GetAppAttribute("Version")))
                {
                    Debug.WriteLine("Version hasn't changed"); // do nothing
                }
                else
                {
                    // App Version has changed
                    _IsolatedStorageSettings.Remove("AppCurrentVersion");
                    _IsolatedStorageSettings.Add("AppCurrentVersion", PhoneHelper.GetAppAttribute("Version"));
                    Debug.WriteLine("New Version");
                    IsVersionChanged = true;
                    Debug.WriteLine("App Current Version = " + _IsolatedStorageSettings["AppCurrentVersion"]);
                }
            }
            else
            {
                // add the Version setting
                _IsolatedStorageSettings.Add("AppCurrentVersion", PhoneHelper.GetAppAttribute("Version"));
                Debug.WriteLine("App Current Version = " + _IsolatedStorageSettings["AppCurrentVersion"]);
            }
            _IsolatedStorageSettings.Save();


            // Create the database if it does not exist.
            using (Index.DataContext_Index DB_Index = new Index.DataContext_Index(Index.DataContext_Index.DBConnectionString))
            {
#if (DEBUG)
                Debug.WriteLine("Deleting database DB_Index");
                DB_Index.DeleteDatabase();
#endif

                if (DB_Index.DatabaseExists() == false)
                {
                    //Create the database
                    DB_Index.CreateDatabase();
                }
                else if (DB_Index.DatabaseExists() == true && IsVersionChanged == true)
                {
                    // rebuild the database for new version of app
                    DB_Index.DeleteDatabase();
                    DB_Index.CreateDatabase();
                }
            }

            using (Build_Order.DataContext_Build_Order DB_Build_Order = new Build_Order.DataContext_Build_Order(Build_Order.DataContext_Build_Order.DBConnectionString))
            {
#if (DEBUG)
                Debug.WriteLine("Deleting database DB_Build_Order");
                DB_Build_Order.DeleteDatabase();
#endif

                if (DB_Build_Order.DatabaseExists() == false)
                {
                    //Create the database
                    DB_Build_Order.CreateDatabase();
                }
                else if (DB_Build_Order.DatabaseExists() == true && IsVersionChanged == true)
                {
                    // rebuild the database for new version of app
                    DB_Build_Order.DeleteDatabase();
                    DB_Build_Order.CreateDatabase();
                }
            }

            using (Object_SC.DataContext_Object_SC DB_Object_SC = new Object_SC.DataContext_Object_SC(Object_SC.DataContext_Object_SC.DBConnectionString))
            {
#if (DEBUG)
                Debug.WriteLine("Deleting database DB_Object_SC");
                DB_Object_SC.DeleteDatabase();
#endif
                if (DB_Object_SC.DatabaseExists() == false)
                {
                    //Create the database
                    DB_Object_SC.CreateDatabase();
                    DB_Helper.enterObjectSC_Information();
                    DB_Helper.enterBuilt_In_BuildOrder();
                }
                else if (DB_Object_SC.DatabaseExists() == true && IsVersionChanged == true)
                {
                    // rebuild the database for new version of app
                    DB_Object_SC.DeleteDatabase();
                    DB_Object_SC.CreateDatabase();
                    DB_Helper.enterObjectSC_Information();
                    DB_Helper.enterBuilt_In_BuildOrder();
                }
            }
        }
 private void btnContact_Click(object sender, RoutedEventArgs e)
 {
     _emailComposeTask.To      = "*****@*****.**";
     _emailComposeTask.Subject = "CIDR Calculator Feedback v" + PhoneHelper.GetAppAttribute("Version");
     _emailComposeTask.Show();
 }
Esempio n. 25
0
 private void btnContact_Click(object sender, RoutedEventArgs e)
 {
     _emailComposeTask.To      = "*****@*****.**";
     _emailComposeTask.Subject = "Where am I? v." + PhoneHelper.GetAppAttribute("Version") + " Feedback";
     _emailComposeTask.Show();
 }