• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IApp类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Application

 /// <summary>
 /// This is a javascript application.
 /// </summary>
 /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param>
 public Application(IApp page)
 {
     content.AttachControlTo(page.Content);
     //content.AutoSizeControlTo(page.ContentSize);
     @"Hello world".ToDocumentTitle();
  
 }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:11,代码来源:Application.cs


示例2: Application

        /// <summary>
        /// This is a javascript application.
        /// </summary>
        /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param>
        public Application(IApp page)
        {
            // Initialize ApplicationSprite
            sprite.AttachSpriteTo(page.Content);

            sprite.Invoke(
                base64 =>
                {
                    var bytes = Convert.FromBase64String(base64);

                    new IHTMLPre { innerText = bytes.ToHexString() }.AttachToDocument();

                    var r = new BinaryReader(new MemoryStream(bytes));

                    var space = r.ReadByte();

                    new IHTMLPre { innerText = new { space }.ToString() }.AttachToDocument();

                    try
                    {
                        // implemented in Redux build configuration
                        // script: error JSC1000: No implementation found for this native method, please implement [System.IO.BinaryReader.ReadSingle()]
                        var f = r.ReadSingle();

                        new IHTMLPre { innerText = new { f }.ToString() }.AttachToDocument();
                    }
                    catch (Exception ex)
                    {
                        new IHTMLPre { innerText = "error: " + new { ex.Message }.ToString() }.AttachToDocument();
                    }
                }
            );
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:37,代码来源:Application.cs


示例3: Application

        /// <summary>
        /// This is a javascript application.
        /// </summary>
        /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param>
        public Application(IApp page = null)
        {
            if (page == null)
                return;

            Initialize(page);
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:11,代码来源:Application.cs


示例4: Application

        /// <summary>
        /// This is a javascript application.
        /// </summary>
        /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param>
        public Application(IApp page)
        {
            // what about gif, svg, canvas and webgl?
            Native.document.icon = new fullbox();

            new IHTMLButton { "?" }.AttachToDocument().WhenClicked(
                 button =>
                 {
                     var div = new IHTMLDiv { "?" };

                     // 7x20
                     div.style.color = "red";
                     div.style.width = "16px";
                     div.style.height = "16px";

                     IHTMLImage i = div;

                     var c = new CanvasRenderingContext2D(16, 16);

                     c.drawImage(i, 0, 0, 16, 16);


                     Native.css.style.cursorImage = i;

                     // Uncaught SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.
                     // why wont this work?
                     Native.document.icon = c.canvas.toDataURL();


                 }
            );
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:36,代码来源:Application.cs


示例5: ImportDialog

		///-------------------------------------------------------------------------------
		/// <summary>
		/// Constructor for import dialog, requiring a language project.
		/// Use this constructor at run time.
		/// </summary>
		///-------------------------------------------------------------------------------
		public ImportDialog(FwStyleSheet styleSheet, FdoCache cache, IScrImportSet settings,
			IHelpTopicProvider helpTopicProvider, IApp app) : this()
		{
			m_StyleSheet = styleSheet;
			m_helpTopicProvider = helpTopicProvider;
			m_app = app;
			m_scr = cache.LangProject.TranslatedScriptureOA;
			m_importSettings = settings;

			//InitBookNameList();

			// Set the initial values for the controls from the static variables.
			radImportEntire.Checked = ImportEntire;
			radImportRange.Checked = !ImportEntire;
			chkTranslation.Checked = ImportTranslation;
			chkBackTranslation.Checked = ImportBackTranslation;
			chkBookIntros.Checked = ImportBookIntros;
			chkOther.Checked = ImportAnnotations;

			// Restore any saved settings.
			if (s_StartRef != null)
				StartRef = s_StartRef;
			else
				SetStartRefToFirstImportableBook();

			if (s_EndRef != null)
				EndRef = s_EndRef;
			else
				SetEndRefToLastImportableBook();

			// Finish constructing the ScrBookControl objects.
			InitializeStartAndEndRefControls();
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:39,代码来源:ImportDialog.cs


示例6: Application

        /// <summary>
        /// This is a javascript application.
        /// </summary>
        /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param>
        public Application(IApp page)
        {

            new IHTMLButton { innerText = "send" }.AttachToDocument().WhenClicked(
                async delegate
                {

                    await new ApplicationWebService
                    {
                        FromAddress = "[email protected]",
                        FromName = "Example.com Admin",

                        ToAddress = "[email protected]",
                        ToName = "Mr. User",

                        Subject = "foo",

                        MessageString = "hello world"
                    }.SendEMail();


                }
            );

        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:29,代码来源:Application.cs


示例7: Application

 /// <summary>
 /// This is a javascript application.
 /// </summary>
 /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param>
 public Application(IApp page)
 {
     service.WebMethod2(
         @"A string from JavaScript.",
         value => new IHTMLPre { innerText = value }.AttachToDocument()
     );
 }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:11,代码来源:Application.cs


示例8: Application

        /// <summary>
        /// This is a javascript application.
        /// </summary>
        /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param>
        public Application(IApp page)
        {
            // https://sites.google.com/a/jsc-solutions.net/backlog/knowledge-base/2014/201404/20140412

            // also show how does this relate to Workers async and localstorage, historic api
            // what about service worker?

            var state = "binary state?";
            var state64 = Convert.ToBase64String(Encoding.UTF8.GetBytes(state));

            // at default location?
            if (Native.document.location.hash == "")
            {
                new IHTMLAnchor
                {
                    target = "_blank",
                    href = "#" + state64,
                    innerText = "click to continue"
                }.AttachToDocument();
            }
            else
            {
                var newstate = Encoding.UTF8.GetString(
                    Convert.FromBase64String(Native.document.location.hash.SkipUntilOrEmpty("#"))
                );

                new IHTMLPre { new { newstate } }.AttachToDocument();


            }
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:35,代码来源:Application.cs


示例9: Application

        /// <summary>
        /// This is a javascript application.
        /// </summary>
        /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param>
        public Application(IApp page)
        {


            new { }.With(
                async delegate
                {
                    // what about IL mutation, and code patching?
                    while (await Native.body.async.onmutation)
                    {
                        //Native.body.css.style.transition = "\{Native.body.css.style.backgroundColor} 0ms linear";
                        Native.body.css.style.transition = "background-color 0ms linear";
                        Native.body.css.style.backgroundColor = "yellow";
                        await Task.Delay(1);
                        Native.body.css.style.transition = "background-color 800ms linear";
                        Native.body.css.style.backgroundColor = "cyan";
                    }
                }
            );

            Native.document.onclick +=
                e =>
                {
                    Native.body.innerText = new
                    {
                        e.CursorX,
                        e.CursorY
                    }.ToString();
                };
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:34,代码来源:Application.cs


示例10: Application

        /// <summary>
        /// This is a javascript application.
        /// </summary>
        /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param>
        public Application(IApp page)
        {
            // http://alteredqualia.com/css-shaders/crumple.html

            page.shader.MakeCSSShaderCrumple();

        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:11,代码来源:Application.cs


示例11: Application

        /// <summary>
        /// This is a javascript application.
        /// </summary>
        /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param>
        public Application(IApp page)
        {
            // X:\jsc.svn\examples\javascript\Test\Test453ForEach\Test453ForEach\Class1.cs
            // script: error JSC1000: unknown while condition at Void Complete(Byte[], System.Net.WebClient). Maybe you did not turn off c# compiler 'optimize code' feature?
            // https://sites.google.com/a/jsc-solutions.net/backlog/knowledge-base/2015/201501/20150102

            // whats the references/ analyzers/ ?
            // X:\jsc.svn\examples\javascript\async\Test\Test453Async\Test453Async\Program.cs

            new { }.With(
                async scope =>
                {
                    // http://www.slideshare.net/RyanAnklam/rethink-async-with-rxjs

                    // works with 2012 web update4, with 2015
                    // https://sites.google.com/a/jsc-solutions.net/backlog/knowledge-base/2015/20150101/async

                    Native.css.style.backgroundColor = "yellow";

                    //await Native.document.onmouseover;
                    //await Native.document.async.onm;
                    await Native.document.body.async.onmouseover;

                    Native.css.style.backgroundColor = "cyan";

                }
            );

        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:33,代码来源:Application.cs


示例12: Application

        /// <summary>
        /// This is a javascript application.
        /// </summary>
        /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param>
        public Application(IApp page)
        {

            page.DragMe.onmousedown +=
                async e =>
                {
                    e.CaptureMouse();
                    page.DragMe.style.color = "red";

                    //new IHTMLPre { () => await page.DragMe.async.onmousemove }.AttachToDocument();

                    var up = await page.DragMe.async.onmouseup;

                    page.DragMe.style.color = "";

                    var w = new IWindow();

                    await w.async.onload;

                    w.document.title = "new IWindow";

                    w.moveTo(
                        up.CursorX,
                        up.CursorY
                    );


                };


        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:35,代码来源:Application.cs


示例13: Application

        /// <summary>
        /// This is a javascript application.
        /// </summary>
        /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param>
        public Application(IApp page)
        {
            var ImagesThatAreCurrentlyLoading = new List<IHTMLImage>();
            var ImagesThatAreCurrentlyLoadingCounter = 0;



            //          // Test453StartLoadingSingleImage.Tycoon4+<>c__DisplayClass0.<.ctor>b__2
            //          type$a5BarLoBUjK8R1JTOyKDbw.BAAABroBUjK8R1JTOyKDbw = function(b)
            //{
            //              var a = [this], c;

            //              c = a[0].ImagesThatAreCurrentlyLoadingCounter;
            //              a[0].ImagesThatAreCurrentlyLoadingCounter = (((c + 1)));
            //          };

            #region StartLoadingSingleImage
            // X:\jsc.svn\examples\javascript\Test\TestWeb453StartLoadingSingleImage\TestWeb453StartLoadingSingleImage\Application.cs
            // X:\jsc.svn\examples\javascript\IsometricTycoonViewWithToolbar\IsometricTycoonViewWithToolbar\Library\Tycoon4.cs
            // X:\jsc.svn\examples\javascript\Test\Test453StartLoadingSingleImage\Test453StartLoadingSingleImage\Class1.cs
            Action<IHTMLImage> StartLoadingSingleImage = Image =>
            {
                ImagesThatAreCurrentlyLoading.Add(Image);

                Image.InvokeOnComplete(img => { ImagesThatAreCurrentlyLoadingCounter++; }, 30);
                //LoadingSingleImageDone(Image);
            };
            #endregion
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:33,代码来源:Application.cs


示例14: FwApplyStyleDlg

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="T:FwApplyStyleDlg"/> class.
		/// </summary>
		/// <param name="rootSite">The root site.</param>
		/// <param name="cache">The cache.</param>
		/// <param name="hvoStylesOwner">The hvo of the object which owns the style.</param>
		/// <param name="stylesTag">The "flid" in which the styles are owned.</param>
		/// <param name="normalStyleName">Name of the normal style.</param>
		/// <param name="customUserLevel">The custom user level.</param>
		/// <param name="paraStyleName">Name of the currently selected paragraph style.</param>
		/// <param name="charStyleName">Name of the currently selected character style.</param>
		/// <param name="hvoRootObject">The hvo of the root object in the current view.</param>
		/// <param name="app">The application.</param>
		/// <param name="helpTopicProvider">The help topic provider.</param>
		/// ------------------------------------------------------------------------------------
		public FwApplyStyleDlg(IVwRootSite rootSite, FdoCache cache, int hvoStylesOwner,
			int stylesTag, string normalStyleName, int customUserLevel, string paraStyleName,
			string charStyleName, int hvoRootObject, IApp app,
			IHelpTopicProvider helpTopicProvider)
		{
			m_rootSite = rootSite;
			InitializeComponent();
			m_customUserLevel = customUserLevel;
			m_helpTopicProvider = helpTopicProvider;
			m_paraStyleName = paraStyleName;
			m_charStyleName = charStyleName;

			// Cache is null in tests
			if (cache == null)
				return;

			m_cboTypes.SelectedIndex = 1; // All Styles

			// Load the style information
			m_styleTable = new StyleInfoTable(normalStyleName,
				cache.ServiceLocator.WritingSystemManager);
			m_styleSheet = new FwStyleSheet();
			m_styleSheet.Init(cache, hvoStylesOwner, stylesTag);
			m_styleListHelper = new StyleListBoxHelper(m_lstStyles);
			m_styleListHelper.ShowInternalStyles = false;
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:42,代码来源:FwApplyStyleDlg.cs


示例15: Initialize

        public override void Initialize(IApp app)
        {
            //重新设置主窗体。
            App.MainWindowType = typeof(EmptyShell);
            //不需要登录界面。
            ClientApp.LoginWindowType = null;
            //不需要任何权限。
            PermissionMgr.Provider = null;

            app.AllPluginsIntialized += (oo, ee) =>
            {
                RafyResources.AddResource(typeof(MonthPlanPlugin), "Resources/MonthPlanResources.xaml");
            };

            app.ModuleOperations += (o, e) =>
            {
                CommonModel.Modules.AddRoot(new WPFModuleMeta { Label = "月度计划", EntityType = typeof(MonthPlan), BlocksTemplate = typeof(MonthPlanModule) });
            };

            app.RuntimeStarting += (o, e) =>
            {
                AutoUpdateDb();
            };

            app.StartupCompleted += (o, e) =>
            {
                App.Current.OpenModuleOrAlert("月度计划");
            };
        }
开发者ID:569550384,项目名称:Rafy,代码行数:29,代码来源:MonthPlanPlugin.cs


示例16: DoSetup

 public void DoSetup()
 {
     mFactory = new Factory(new DefaultModuleConfiguration(), new ITModuleConfiguration());
       mObserver = (RecordingObserver)mFactory.Build<IMessageObserver>();
       mApp = mFactory.Build<IApp>();
       mFile = new DotNetFile();
 }
开发者ID:asipe,项目名称:Goul,代码行数:7,代码来源:SetCredentialsTest.cs


示例17: Application

        /// <summary>
        /// This is a javascript application.
        /// </summary>
        /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param>
        public Application(IApp page)
        {
            // Upcoming%20Features%20in%20CSharp%20-%20Preview.pdf
            // X:\jsc.svn\examples\javascript\Test\TestStringInterpolation\TestStringInterpolation\Application.cs

            new IHTMLPre { "name: \{this.Name}" }.AttachToDocument();
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:11,代码来源:Application.cs


示例18: ItemClick

        private void ItemClick(IApp app)
        {
            if (app != null)
            {
                KZHelper.KZAsynchronousTask.StartTask<IContentView>(delegate
                {
                    if (!DicViews.ContainsKey(app.Id))
                    {
                        if (KZHelper.Container.IsRegistered<IContentView>(app.Code))
                        {
                            var view = KZHelper.Container.Resolve<IContentView>(app.Code);
                            view.Owner = this;
                            view.LoadAppFunction(app);
                            DicViews.Add(app.Id, view);

                        }
                        else
                        {
                            var view = new BlankView(KZHelper.Container);
                            DicViews.Add(app.Id, view);

                        }
                    }
                    return DicViews[app.Id];
                }, delegate(Task<IContentView> task)
                {
                    
                    LoadView(task.Result as Control);

                    _tileNav.AdjustTitle(app, IsHome);
                });
            }
            
        }
开发者ID:konzuk,项目名称:KZ,代码行数:34,代码来源:AppView.cs


示例19: Create

        public IApp Create(IConfigSource configSource) 
        {
            if (configSource.Config == null ||
                configSource.Config.Application == null)
            {
                throw new ConfigException("Either EApp configuration or EApp application configuration has not been initialized in the ConfigSource instance.");
            }

            string typeName = configSource.Config.Application.Provider;

            if (string.IsNullOrEmpty(typeName))
            {
                throw new ConfigException("The provider type of the Application has not been defined in the ConfigSource yet.");
            }

            Type appType = Type.GetType(typeName);

            if (appType == null)
            {
                throw new InfrastructureException("The application provider defined by type '{0}' doesn't exist.", typeName);
            }

            IApp app = (IApp)Activator.CreateInstance(appType);

            this.currrentApplication = app;

            return this.currrentApplication;
        }
开发者ID:daywrite,项目名称:EApp,代码行数:28,代码来源:EAppRuntime.cs


示例20: Application

        /// <summary>
        /// This is a javascript application.
        /// </summary>
        /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param>
        public Application(IApp page)
        {
            this.ScreenWidth = Native.window.screen.width;
            this.ScreenHeight = Native.window.screen.height;

            this.ScreenChanged();
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:11,代码来源:Application.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IAppBuilder类代码示例发布时间:2022-05-24
下一篇:
C# IApiContext类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap