当前位置: 首页>>代码示例>>C#>>正文


C# Controls.NotifyEventArgs类代码示例

本文整理汇总了C#中System.Windows.Controls.NotifyEventArgs的典型用法代码示例。如果您正苦于以下问题:C# NotifyEventArgs类的具体用法?C# NotifyEventArgs怎么用?C# NotifyEventArgs使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


NotifyEventArgs类属于System.Windows.Controls命名空间,在下文中一共展示了NotifyEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BrowserScriptNotify

        private void BrowserScriptNotify(object sender, NotifyEventArgs e)
        {
            string wooterMarker = "wooterimage";
            var url = e.Value;
            Match match = this.regex.Match(url);

            if (url.StartsWith(wooterMarker))
            {
                url = url.Substring(wooterMarker.Length);
                DisplayAdditionalImage(url);
            }
            else if (match.Success)
            {
                url = match.Groups[1].Value;
                DisplayAdditionalImage(url);
            }
            else
            {
                try
                {
                    task.Uri = new Uri(url);
                    task.Show();
                }
                catch
                {
                }
            }
        }
开发者ID:virmani,项目名称:Wooter,代码行数:28,代码来源:WootControl.xaml.cs

示例2: ScriptNotify

 private void ScriptNotify(object sender, NotifyEventArgs e)
 {
     if (!string.IsNullOrEmpty(e.Value))
     {
         Uri navigateTo = utilities.processBBcodeLink(e.Value);
         if (navigateTo != null)
             NavigationService.Navigate(navigateTo);
     }
 }
开发者ID:passick,项目名称:wp.fm,代码行数:9,代码来源:trackInfoPage.xaml.cs

示例3: Browser_ScriptNotify

 private void Browser_ScriptNotify(object sender, NotifyEventArgs e)
 {
     if (e.Value == "chooseAddress")
      {
     var task = new AddressChooserTask();
     task.Completed += task_Completed;
     task.Show();
      }
 }
开发者ID:timothybinkley,项目名称:Windows-Phone-8-In-Action,代码行数:9,代码来源:MainPage.xaml.cs

示例4: Browser_ScriptNotify

 private void Browser_ScriptNotify(object sender, NotifyEventArgs e)
 {
     // if a page notifies that it should not be scrollable, disable
       // scrolling.
       if (e.Value == "noScroll")
       {
       _browserHelper.ScrollDisabled = true;
       }
 }
开发者ID:niths,项目名称:niths-wp7-fadderukeapp,代码行数:9,代码来源:MainPage.xaml.cs

示例5: browser_ScriptNotify

        private void browser_ScriptNotify(object sender, NotifyEventArgs e)
        {
            var response = new object[]
                {
                    DeviceStatus.ApplicationCurrentMemoryUsage,
                    DeviceStatus.ApplicationMemoryUsageLimit,
                    DeviceStatus.ApplicationPeakMemoryUsage,
                    DeviceStatus.DeviceTotalMemory
                };

            browser.InvokeScript("getMemoryUsageCallback", response.Select(c => c.ToString()).ToArray());
        }
开发者ID:sondreb,项目名称:CERC,代码行数:12,代码来源:MainPage.xaml.cs

示例6: Browser_ScriptNotify

        private void Browser_ScriptNotify(object sender, NotifyEventArgs e)
        {
            if (Debugger.IsAttached)
            {
                ScriptNotify newValue = new ScriptNotify()
                {
                    Value = e.Value,
                    Time = DateTime.Now,
                    FormattedTime = "at " + (DateTime.Now.Subtract(startTime)).TotalMilliseconds.ToString("0,000") + " milliseconds"
                };
                notifications.Add(newValue);

                DebugPanel.ScrollTo(newValue);
            }
        }
开发者ID:matthiasxc,项目名称:WP8-HTML-Tutorials,代码行数:15,代码来源:MainPage.xaml.cs

示例7: FacebookLoginBrowser_ScriptNotify

 private void FacebookLoginBrowser_ScriptNotify(object sender, NotifyEventArgs e)
 {
     FacebookOAuthResult authResult;
     if (FacebookOAuthResult.TryParse(e.Value, out authResult))
     {
         if (authResult.IsSuccess)
         {
             loggedIn = true;
             loginSucceeded(authResult);
         }
         else
         {
             MessageBox.Show(authResult.ErrorDescription);
         }
     }
 }
开发者ID:nitzo,项目名称:MegaStarz,代码行数:16,代码来源:MainPage.xaml.cs

示例8: Browser_ScriptNotify

        private void Browser_ScriptNotify(object sender, NotifyEventArgs e)
        {
            switch (e.Value)
            {
                case "onload":
                    OnLoad();
                    break;
                case "opendialog":
                    IsDialogVisible = true;
                    break;
                case "closedialog":
                    IsDialogVisible = false;
                    break;

            }
        }
开发者ID:sondreb,项目名称:ImageCards,代码行数:16,代码来源:MainPage.xaml.cs

示例9: PART_Browser_ScriptNotify

        void PART_Browser_ScriptNotify(object sender, NotifyEventArgs e)
        {
            switch (e.Value)
            {
                case "domready":
                    isDomReady = true;
                    Task.Delay(100).ContinueWith(
                        task => { this.UpdateText(this.Text); }, 
                        TaskScheduler.FromCurrentSynchronizationContext());
                    break;

                default:
                    // don't do any unnecessary binding if values are equal.
                    string text = GetValue(TextProperty) as string;
                    if (text != e.Value)
                        SetValue(TextProperty, e.Value);
                    break;
            }
        }
开发者ID:jarkkom,项目名称:awfuldotnet,代码行数:19,代码来源:HtmlTextBoxControl.xaml.cs

示例10: Browser_ScriptNotify

        private void Browser_ScriptNotify(object sender, NotifyEventArgs e)
        {
            if (e.Value.StartsWith("scrollDisabled:"))
              {
            var disabled = e.Value.Substring(15);
            _browserHelper.ScrollDisabled = disabled == "true";
              }

              if (e.Value == "hideSplashscreen")
              {
            Storyboard sb = this.Resources["SplashScreenHideAnim"] as Storyboard;
            sb.Completed += (s, e2) => splash.Visibility = Visibility.Collapsed;
            sb.Begin();
              }

              if (e.Value == "getTombstoneState" && App.Current.TombstoneState != null)
              {
            phoneGapView.Browser.InvokeScript("restoreTombstoneState", new string[] { App.Current.TombstoneState });
              }
        }
开发者ID:pauhlet,项目名称:PropertyFinder-HTML5,代码行数:20,代码来源:MainPage.xaml.cs

示例11: Catch_Script_Notification

 // Step 1: Catch Javascript signal
 private void Catch_Script_Notification(object sender, NotifyEventArgs e)
 {
     if (e.Value.StartsWith("LaunchPhotoChooser"))
     {
         // Step 2: Launch the PhotoChooser
         _photoChooser = new PhotoChooserTask();
         _photoChooser.Completed += _photoChooser_Completed;
         // allow the user to either choose a saved image or take a new one
         _photoChooser.ShowCamera = true;
         _photoChooser.PixelHeight = 260;
         _photoChooser.PixelWidth = 200;
         _photoChooser.Show();
     }
     else
     {
         // used for debuggin
         TextBlock alertBox = new TextBlock();
         alertBox.Text = e.Value;
         notifyAlert.Children.Add(alertBox);
     }
 }
开发者ID:matthiasxc,项目名称:WP8-HTML-Tutorials,代码行数:22,代码来源:MainPage.xaml.cs

示例12: FromJS

        private void FromJS(object sender, NotifyEventArgs e)
        {
            var opcode = e.Value.Substring(0, 1);

            if (opcode == "s") {
                Debugger.Log(1, "FromJS", "saving\r\n");
                var data = e.Value.Substring(1);
                settings["data"] = data;
            }
            else if (opcode == "l")
            {
                Debugger.Log(1, "FromJS", "loading\r\n");
                string data = settings["data"].ToString();
                Browser.InvokeScript("preload", new string[] { data });
            }
            else
            {
                // Sent for debugging purposes only
                Debugger.Log(1, "FromJS", e.Value + "\r\n");
            }
        }
开发者ID:wagnergsantos,项目名称:WritingPortableMobileApps,代码行数:21,代码来源:MainPage.xaml.cs

示例13: Browser_ScriptNotify

        private void Browser_ScriptNotify(object sender, NotifyEventArgs e)
        {
            string fileName = "01_Susies_dnc_09-05-12.mp3";
            var resource = Application.GetResourceStream(new Uri(@"media/" + fileName, UriKind.Relative));
            IsolatedStorageFileStream fileStream = IsolatedStorageFile.GetUserStoreForApplication().CreateFile(fileName);
            resource.Stream.CopyTo(fileStream, 4096);
            resource.Stream.Close();
            fileStream.Close();

            Uri fileUri = new Uri(fileName, UriKind.RelativeOrAbsolute);
            var ml = new MediaLibrary();

            try
            {
                MediaLibraryExtensions.SaveSong(ml, fileUri, null, SaveSongOperation.CopyToLibrary);
            }
            catch (Exception ex)
            {
                string errorMessage = ex.Message.ToString();
            }
        }
开发者ID:powerfinger,项目名称:js1.3.1_breaks_hlink_in_phone,代码行数:21,代码来源:MainPage.xaml.cs

示例14: ArticleView_ScriptNotify

        void ArticleView_ScriptNotify(object sender, NotifyEventArgs e)
        {
            // split 
            var parts = e.Value.Split('=');
            if (parts.Length != 2)
            {
                return;
            }

            // parse
            int number = 0;
            if (!int.TryParse(parts[1], out number))
            {
                return;
            }

            // decide what to do
            if (parts[0] == "scrollHeight")
            {
                _scrollHeight = number;
                if (_visibleHeight > 0)
                {
                    DisplayScrollBar.Maximum = _scrollHeight - _visibleHeight;
                }
            }
            else if (parts[0] == "clientHeight")
            {
                _visibleHeight = number;
                if (_scrollHeight > 0)
                {
                    DisplayScrollBar.Maximum = _scrollHeight - _visibleHeight;
                }
            }
            else if (parts[0] == "scrollTop")
            {
                DisplayScrollBar.Value = number;
            }
        }
开发者ID:now-readable,项目名称:now-readable,代码行数:38,代码来源:Article.xaml.cs

示例15: browser_ScriptNotify

 /// <summary>
 /// Handles calls to window.external.Notify from within the web browser control. We'll hijack this for message passing from browser back into C#.
 /// TODO: Processing the instruction could be blocking....... bleh
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void browser_ScriptNotify(object sender, NotifyEventArgs e)
 {
     // Process instruction into a command + parameters (if specified).
     string command = "";
     string[] commandParams;
     int colPos = e.Value.IndexOf(':');
     if (colPos > 0)
     {
         command = e.Value.Substring(0, colPos);
         commandParams = e.Value.Substring(colPos).Split('/');
     }
     else
     {
         command = e.Value;
         commandParams = new string[0];
     }
     // Send command + params to the command manager and get the return value.
     string returnValue = manager.processInstruction(command, commandParams);
     if (returnValue != null && returnValue.Length > 0)
     {
         browser.InvokeScript("gap.evaluate", returnValue);
     }
 }
开发者ID:avenauche,项目名称:phonegap-winphone,代码行数:29,代码来源:MainPage.xaml.cs


注:本文中的System.Windows.Controls.NotifyEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。