Beispiel #1
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/LensBlurApp;component/Pages/SegmenterPage.xaml", System.UriKind.Relative));
     this.LayoutRoot              = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.TitlePanel              = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.ContentPanel            = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.Border                  = ((System.Windows.Controls.Border)(this.FindName("Border")));
     this.GuideTextBlock          = ((System.Windows.Controls.TextBlock)(this.FindName("GuideTextBlock")));
     this.GuideTextBlock2         = ((System.Windows.Controls.TextBlock)(this.FindName("GuideTextBlock2")));
     this.OriginalImage           = ((System.Windows.Controls.Image)(this.FindName("OriginalImage")));
     this.MaskImage               = ((System.Windows.Controls.Image)(this.FindName("MaskImage")));
     this.AnnotationsCanvas       = ((System.Windows.Controls.Canvas)(this.FindName("AnnotationsCanvas")));
     this.CurrentAnnotationCanvas = ((System.Windows.Controls.Canvas)(this.FindName("CurrentAnnotationCanvas")));
     this.ManipulationArea        = ((System.Windows.Controls.Grid)(this.FindName("ManipulationArea")));
     this.ForegroundButton        = ((System.Windows.Controls.Button)(this.FindName("ForegroundButton")));
     this.BackgroundButton        = ((System.Windows.Controls.Button)(this.FindName("BackgroundButton")));
     this.Open            = ((System.Windows.Controls.Button)(this.FindName("Open")));
     this.Back            = ((System.Windows.Controls.Button)(this.FindName("Back")));
     this.Proceed         = ((System.Windows.Controls.Button)(this.FindName("Proceed")));
     this.Undo            = ((System.Windows.Controls.Button)(this.FindName("Undo")));
     this.ProgressBar     = ((System.Windows.Controls.ProgressBar)(this.FindName("ProgressBar")));
     this.FeedbackOverlay = ((RateMyApp.Controls.FeedbackOverlay)(this.FindName("FeedbackOverlay")));
 }
Beispiel #2
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/tiviViet;component/MainPage.xaml", 2));
     this.Template           = (DataTemplate)base.FindName("Template");
     this.LayoutRoot         = (Grid)base.FindName("LayoutRoot");
     this.SettingsPane       = (Grid)base.FindName("SettingsPane");
     this.btnRemove          = (Button)base.FindName("btnRemove");
     this.MenuMain           = (Grid)base.FindName("MenuMain");
     this.LsMenuTv           = (ListBox)base.FindName("LsMenuTv");
     this.GridLoadMenu       = (StackPanel)base.FindName("GridLoadMenu");
     this.ProgressBarLoading = (ProgressBar)base.FindName("ProgressBarLoading");
     this.Menu                 = (Image)base.FindName("Menu");
     this.TxtHeader            = (TextBlock)base.FindName("TxtHeader");
     this.ImgLich              = (Image)base.FindName("ImgLich");
     this.GridThemKenhYeuthich = (StackPanel)base.FindName("GridThemKenhYeuthich");
     this.ImgAdd               = (Image)base.FindName("ImgAdd");
     this.ScvChannel           = (ScrollViewer)base.FindName("ScvChannel");
     this.LsChannel            = (GridView)base.FindName("LsChannel");
     this.FeedbackOverlay      = (RateMyApp.Controls.FeedbackOverlay)base.FindName("FeedbackOverlay");
     this.ControlLoadding      = (ControlProgress)base.FindName("ControlLoadding");
     this.PopupFace            = (Grid)base.FindName("PopupFace");
     this.Qc     = (Grid)base.FindName("Qc");
     this.LsFree = (ListBox)base.FindName("LsFree");
     this.Ads    = (ClevernetView)base.FindName("Ads");
     this.Media  = (MediaVideo)base.FindName("Media");
     this.Addfav = (ApplicationBarMenuItem)base.FindName("Addfav");
     this.ApplicationbarSendfeedback = (ApplicationBarMenuItem)base.FindName("ApplicationbarSendfeedback");
     this.BtnFace = (ApplicationBarMenuItem)base.FindName("BtnFace");
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Ejemplo%20RateMyApp;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.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.FeedbackOverlay = ((RateMyApp.Controls.FeedbackOverlay)(this.FindName("FeedbackOverlay")));
 }
Beispiel #4
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Bible_2;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot      = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.FeedbackOverlay = ((RateMyApp.Controls.FeedbackOverlay)(this.FindName("FeedbackOverlay")));
     this.OldSelector     = ((Microsoft.Phone.Controls.LongListSelector)(this.FindName("OldSelector")));
     this.old             = ((System.Windows.DataTemplate)(this.FindName("old")));
     this.NewSelector     = ((Microsoft.Phone.Controls.LongListSelector)(this.FindName("NewSelector")));
 }
Beispiel #5
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Bands%20in%20Town;component/MainPage.xaml", System.UriKind.Relative));
     this.Page            = ((Microsoft.Phone.Controls.PhoneApplicationPage)(this.FindName("Page")));
     this.LayoutRoot      = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.ContentPanel    = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.Map             = ((Microsoft.Phone.Maps.Controls.Map)(this.FindName("Map")));
     this.MapItems        = ((Microsoft.Phone.Maps.Toolkit.MapItemsControl)(this.FindName("MapItems")));
     this.FeedbackOverlay = ((RateMyApp.Controls.FeedbackOverlay)(this.FindName("FeedbackOverlay")));
 }
        private async void Feedback()
#endif
        {
            string version = string.Empty;

#if SILVERLIGHT
            var appManifestResourceInfo = Application.GetResourceStream(new Uri("WMAppManifest.xml", UriKind.Relative));

            using (var appManifestStream = appManifestResourceInfo.Stream)
            {
                using (var reader = XmlReader.Create(appManifestStream, new XmlReaderSettings {
                    IgnoreWhitespace = true, IgnoreComments = true
                }))
                {
                    var doc = XDocument.Load(reader);
                    var app = doc.Descendants("App").FirstOrDefault();
                    if (app != null)
                    {
                        var versionAttribute = app.Attribute("Version");
                        if (versionAttribute != null)
                        {
                            version = versionAttribute.Value;
                        }
                    }
                }
            }

            if (string.IsNullOrEmpty(version))
            {
                // Application version
                var asm   = System.Reflection.Assembly.GetExecutingAssembly();
                var parts = asm.FullName.Split(',');
                version = parts[1].Split('=')[1];
            }
#else
            var         uri  = new System.Uri("ms-appx:///AppxManifest.xml");
            StorageFile file = await Windows.Storage.StorageFile.GetFileFromApplicationUriAsync(uri);

            using (var rastream = await file.OpenReadAsync())
                using (var appManifestStream = rastream.AsStreamForRead())
                {
                    using (var reader = XmlReader.Create(appManifestStream, new XmlReaderSettings {
                        IgnoreWhitespace = true, IgnoreComments = true
                    }))
                    {
                        var doc = XDocument.Load(reader);
                        var app = doc.Descendants("Identity").FirstOrDefault();
                        if (app != null)
                        {
                            var versionAttribute = app.Attribute("Version");
                            if (versionAttribute != null)
                            {
                                version = versionAttribute.Value;
                            }
                        }
                    }
                }
#endif

            string company = GetCompanyName(this);
            if (company == null || company.Length <= 0)
            {
                company = "<Company>";
            }

#if SILVERLIGHT
            // Body text including hardware, firmware and software info
            string body = string.Format(FeedbackOverlay.GetFeedbackBody(this),
                                        DeviceStatus.DeviceName,
                                        DeviceStatus.DeviceManufacturer,
                                        DeviceStatus.DeviceFirmwareVersion,
                                        DeviceStatus.DeviceHardwareVersion,
                                        version,
                                        company);

            // Email task
            var email = new EmailComposeTask();
            email.To      = FeedbackOverlay.GetFeedbackTo(this);
            email.Subject = string.Format(FeedbackOverlay.GetFeedbackSubject(this), GetApplicationName());
            email.Body    = body;

            email.Show();
#else
            var easClientDeviceInformation = new EasClientDeviceInformation();


            // Body text including hardware, firmware and software info
            string body = string.Format(FeedbackOverlay.GetFeedbackBody(this),
                                        easClientDeviceInformation.SystemProductName,
                                        easClientDeviceInformation.SystemManufacturer,
                                        easClientDeviceInformation.SystemFirmwareVersion,
                                        easClientDeviceInformation.SystemHardwareVersion,
                                        version,
                                        company);

            // Send an Email with attachment
            EmailMessage email = new EmailMessage();
            email.To.Add(new EmailRecipient(FeedbackOverlay.GetFeedbackTo(this)));
            email.Subject = string.Format(FeedbackOverlay.GetFeedbackSubject(this), GetApplicationName());
            email.Body    = body;
            await EmailManager.ShowComposeNewEmailAsync(email);
#endif
        }
 public static bool GetCountDays(FeedbackOverlay element)
 {
     return (bool)element.GetValue(CountDaysProperty);
 }
 public static int GetFirstCount(FeedbackOverlay element)
 {
     return (int)element.GetValue(FirstCountProperty);
 }
 public static string GetCompanyName(FeedbackOverlay element)
 {
     return (string)element.GetValue(CompanyNameProperty);
 }
 public static string GetFeedbackSubject(FeedbackOverlay element)
 {
     return (string)element.GetValue(FeedbackSubjectProperty);
 }
 public static string GetRatingNo(FeedbackOverlay element)
 {
     return (string)element.GetValue(RatingNoProperty);
 }
Beispiel #12
0
 public static string GetFeedbackBody(FeedbackOverlay element)
 {
     return((string)element.GetValue(FeedbackBodyProperty));
 }
Beispiel #13
0
 public static void SetFeedbackBody(FeedbackOverlay element, string value)
 {
     element.SetValue(FeedbackBodyProperty, value);
 }
Beispiel #14
0
 public static string GetFeedbackSubject(FeedbackOverlay element)
 {
     return((string)element.GetValue(FeedbackSubjectProperty));
 }
Beispiel #15
0
 public static void SetFeedbackSubject(FeedbackOverlay element, string value)
 {
     element.SetValue(FeedbackSubjectProperty, value);
 }
Beispiel #16
0
 public static string GetFeedbackMessage1(FeedbackOverlay element)
 {
     return((string)element.GetValue(FeedbackMessage1Property));
 }
Beispiel #17
0
 public static void SetFeedbackMessage1(FeedbackOverlay element, string value)
 {
     element.SetValue(FeedbackMessage1Property, value);
 }
 public static TimeSpan GetAnimationDuration(FeedbackOverlay element)
 {
     return (TimeSpan)element.GetValue(AnimationDurationProperty);
 }
 public static bool GetIsNotVisible(FeedbackOverlay element)
 {
     return (bool)element.GetValue(IsNotVisibleProperty);
 }
Beispiel #20
0
 public static void SetCompanyName(FeedbackOverlay element, string value)
 {
     element.SetValue(CompanyNameProperty, value);
 }
 public static string GetFeedbackMessage1(FeedbackOverlay element)
 {
     return (string)element.GetValue(FeedbackMessage1Property);
 }
Beispiel #22
0
 public static string GetCompanyName(FeedbackOverlay element)
 {
     return((string)element.GetValue(CompanyNameProperty));
 }
 public static string GetFeedbackBody(FeedbackOverlay element)
 {
     return (string)element.GetValue(FeedbackBodyProperty);
 }
Beispiel #24
0
 public static void SetApplicationName(FeedbackOverlay element, string value)
 {
     element.SetValue(ApplicationNameProperty, value);
 }
 public static string GetApplicationName(FeedbackOverlay element)
 {
     return (string)element.GetValue(ApplicationNameProperty);
 }
Beispiel #26
0
 public static string GetApplicationName(FeedbackOverlay element)
 {
     return((string)element.GetValue(ApplicationNameProperty));
 }
 public static int GetSecondCount(FeedbackOverlay element)
 {
     return (int)element.GetValue(SecondCountProperty);
 }
Beispiel #28
0
 public static void SetVisibilityForDesign(FeedbackOverlay element, System.Windows.Visibility value)
 {
     element.SetValue(VisibilityForDesignProperty, value);
 }
Beispiel #29
0
 public static string GetRatingNo(FeedbackOverlay element)
 {
     return((string)element.GetValue(RatingNoProperty));
 }
Beispiel #30
0
 public static void SetSecondCount(FeedbackOverlay element, int value)
 {
     element.SetValue(SecondCountProperty, value);
 }
Beispiel #31
0
 public static int GetSecondCount(FeedbackOverlay element)
 {
     return((int)element.GetValue(SecondCountProperty));
 }
Beispiel #32
0
 public static void SetCountDays(FeedbackOverlay element, bool value)
 {
     element.SetValue(CountDaysProperty, value);
 }
 public static void SetAnimationDuration(FeedbackOverlay element, TimeSpan value)
 {
     element.SetValue(AnimationDurationProperty, value);
 }
Beispiel #34
0
 public static bool GetCountDays(FeedbackOverlay element)
 {
     return((bool)element.GetValue(CountDaysProperty));
 }
 public static void SetIsNotVisible(FeedbackOverlay element, bool value)
 {
     element.SetValue(IsNotVisibleProperty, value);
 }
Beispiel #36
0
 public static void SetLanguageOverride(FeedbackOverlay element, string value)
 {
     element.SetValue(LanguageOverrideProperty, value);
 }
 public static void SetRatingNo(FeedbackOverlay element, string value)
 {
     element.SetValue(RatingNoProperty, value);
 }
Beispiel #38
0
 public static System.Windows.Visibility GetVisibilityForDesign(FeedbackOverlay element)
 {
     return((System.Windows.Visibility)element.GetValue(VisibilityForDesignProperty));
 }
 public static void SetFeedbackMessage1(FeedbackOverlay element, string value)
 {
     element.SetValue(FeedbackMessage1Property, value);
 }
Beispiel #40
0
 public static string GetLanguageOverride(FeedbackOverlay element)
 {
     return((string)element.GetValue(LanguageOverrideProperty));
 }
 public static void SetFeedbackSubject(FeedbackOverlay element, string value)
 {
     element.SetValue(FeedbackSubjectProperty, value);
 }
Beispiel #42
0
        /// <summary>
        /// Reset review and feedback funtionality. Makes notifications active
        /// again, for example, after a major application update.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FeedbackOverlay_Loaded(object sender, RoutedEventArgs e)
        {
            // FeedbackTo property is mandatory and must be defined in xaml.
            if (GetFeedbackTo(this) == null || GetFeedbackTo(this).Length <= 0)
            {
                throw new ArgumentNullException("FeedbackTo", "Mandatory property not defined in FeedbackOverlay.");
            }

            // ApplicationName property is mandatory and must be defined in xaml.
            if (GetApplicationName(this) == null || GetApplicationName(this).Length <= 0)
            {
                throw new ArgumentNullException("ApplicationName", "Mandatory property not defined in FeedbackOverlay.");
            }

            // CompanyName property is mandatory and must be defined in xaml.
            if (GetCompanyName(this) == null || GetCompanyName(this).Length <= 0)
            {
                throw new ArgumentNullException("CompanyName", "Mandatory property not defined in FeedbackOverlay.");
            }

            // Application language override.
            if (GetLanguageOverride(this) != null)
            {
                OverrideLanguage();
            }

            // Set up FeedbackHelper with properties.
            RateMyApp.Helpers.FeedbackHelper.Default.FirstCount  = FeedbackOverlay.GetFirstCount(this);
            RateMyApp.Helpers.FeedbackHelper.Default.SecondCount = FeedbackOverlay.GetSecondCount(this);
            RateMyApp.Helpers.FeedbackHelper.Default.CountDays   = FeedbackOverlay.GetCountDays(this);

            // Inform FeedbackHelper of the creation of this control.
            RateMyApp.Helpers.FeedbackHelper.Default.Launching();

            // This class needs to be aware of Back key presses.
            AttachBackKeyPressed();

            if (FeedbackOverlay.GetEnableAnimation(this))
            {
                LayoutRoot.Opacity    = 0;
                xProjection.RotationX = 90;
            }

            // Check if review/feedback notification should be shown.
            if (FeedbackHelper.Default.State == FeedbackState.FirstReview)
            {
                SetVisibility(true);
                SetupFirstMessage();

                if (FeedbackOverlay.GetEnableAnimation(this))
                {
                    showContent.Begin();
                }
            }
            else if (FeedbackHelper.Default.State == FeedbackState.SecondReview)
            {
                SetVisibility(true);
                SetupSecondMessage();

                if (FeedbackOverlay.GetEnableAnimation(this))
                {
                    showContent.Begin();
                }
            }
            else
            {
                SetVisibility(false);
                FeedbackHelper.Default.State = FeedbackState.Inactive;
            }
        }
 public static void SetFeedbackBody(FeedbackOverlay element, string value)
 {
     element.SetValue(FeedbackBodyProperty, value);
 }
Beispiel #44
0
 public static void SetEnableAnimation(FeedbackOverlay element, bool value)
 {
     element.SetValue(EnableAnimationProperty, value);
 }
 public static void SetCompanyName(FeedbackOverlay element, string value)
 {
     element.SetValue(CompanyNameProperty, value);
 }
Beispiel #46
0
 public static bool GetEnableAnimation(FeedbackOverlay element)
 {
     return((bool)element.GetValue(EnableAnimationProperty));
 }
 public static void SetApplicationName(FeedbackOverlay element, string value)
 {
     element.SetValue(ApplicationNameProperty, value);
 }
Beispiel #48
0
 public static void SetIsNotVisible(FeedbackOverlay element, bool value)
 {
     element.SetValue(IsNotVisibleProperty, value);
 }
 public static void SetVisibilityForDesign(FeedbackOverlay element, Visibility value)
 {
     element.SetValue(VisibilityForDesignProperty, value);
 }
Beispiel #50
0
 public static bool GetIsNotVisible(FeedbackOverlay element)
 {
     return((bool)element.GetValue(IsNotVisibleProperty));
 }
 public static void SetSecondCount(FeedbackOverlay element, int value)
 {
     element.SetValue(SecondCountProperty, value);
 }
 public static void SetLanguageOverride(FeedbackOverlay element, string value)
 {
     element.SetValue(LanguageOverrideProperty, value);
 }
 public static void SetCountDays(FeedbackOverlay element, bool value)
 {
     element.SetValue(CountDaysProperty, value);
 }
 public static void SetEnableAnimation(FeedbackOverlay element, bool value)
 {
     element.SetValue(EnableAnimationProperty, value);
 }
 public static Visibility GetVisibilityForDesign(FeedbackOverlay element)
 {
     return (Visibility)element.GetValue(VisibilityForDesignProperty);
 }
Beispiel #56
0
 public static void SetRatingNo(FeedbackOverlay element, string value)
 {
     element.SetValue(RatingNoProperty, value);
 }
 public static string GetLanguageOverride(FeedbackOverlay element)
 {
     return (string)element.GetValue(LanguageOverrideProperty);
 }
Beispiel #58
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/ValutaOmregner;component/MainPage.xaml", System.UriKind.Relative));
     this.CurrencyFromChanged = ((System.Windows.Media.Animation.Storyboard)(this.FindName("CurrencyFromChanged")));
     this.CurrencyToChanged = ((System.Windows.Media.Animation.Storyboard)(this.FindName("CurrencyToChanged")));
     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.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.dropdownListFra = ((System.Windows.Controls.Grid)(this.FindName("dropdownListFra")));
     this.imgDropDownFra = ((System.Windows.Controls.Image)(this.FindName("imgDropDownFra")));
     this.txtDropdownFra = ((System.Windows.Controls.TextBlock)(this.FindName("txtDropdownFra")));
     this.dropdownListTil = ((System.Windows.Controls.Grid)(this.FindName("dropdownListTil")));
     this.imgDropDownTil = ((System.Windows.Controls.Image)(this.FindName("imgDropDownTil")));
     this.txtDropdownTil = ((System.Windows.Controls.TextBlock)(this.FindName("txtDropdownTil")));
     this.image4 = ((System.Windows.Controls.Image)(this.FindName("image4")));
     this.txtInputText1 = ((System.Windows.Controls.TextBox)(this.FindName("txtInputText1")));
     this.image5 = ((System.Windows.Controls.Image)(this.FindName("image5")));
     this.btnChangeUpDown = ((System.Windows.Controls.Button)(this.FindName("btnChangeUpDown")));
     this.txtInputText2 = ((System.Windows.Controls.TextBlock)(this.FindName("txtInputText2")));
     this.image2 = ((System.Windows.Controls.Image)(this.FindName("image2")));
     this.textBlock2 = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock2")));
     this.FeedbackOverlay = ((RateMyApp.Controls.FeedbackOverlay)(this.FindName("FeedbackOverlay")));
 }
 public static bool GetEnableAnimation(FeedbackOverlay element)
 {
     return (bool)element.GetValue(EnableAnimationProperty);
 }
 public static System.Windows.Visibility GetVisibilityForDesign(FeedbackOverlay element)
 {
     return (System.Windows.Visibility)element.GetValue(VisibilityForDesignProperty);
 }