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

C# Root类代码示例

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

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



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

示例1: ToggleButton

 public ToggleButton(Root root, string id, BooleanControlProperties properties)
     : base(root, id, properties)
 {
     _id = id;
     AddDisplayModes();
     StateProperties[ToggleButtonCommandProperties.On] = false.ToString();
 }
开发者ID:modulexcite,项目名称:IL2JS,代码行数:7,代码来源:togglebutton.cs


示例2: Test_List1ContainsList2

        public void Test_List1ContainsList2()
        {
            var list1 = new List<object>();
            var list2 = new List<object>();
            var root = new Root(list1, list2);
            list1.Add(list2);

            var factory = new PropertyFactory(new PropertyProvider());
            Property p = factory.CreateProperty("Root", root);

            // Always 2 properties in Root
            var complexProperty = p as ComplexProperty;
            Assert.IsNotNull(complexProperty);
            Assert.AreEqual(2, complexProperty.Properties.Count);
            Assert.AreEqual(1, complexProperty.Reference.Count);
            Assert.IsFalse(complexProperty.Reference.IsProcessed);

            // Both lists are of CollectionProperty
            var lp1 = complexProperty.Properties[0] as CollectionProperty;
            Assert.IsNotNull(lp1);
            var lp2 = complexProperty.Properties[1] as CollectionProperty;
            Assert.IsNotNull(lp2);

            Assert.AreEqual(1, lp1.Items.Count);
            var lp1i1 = lp1.Items[0] as CollectionProperty;
            Assert.IsNotNull(lp1i1);
            Assert.AreNotEqual(lp1i1, lp2);

            Assert.AreEqual(lp1i1.Reference, lp2.Reference);
            Assert.AreEqual(2, lp1i1.Reference.Count);
        }
开发者ID:holisticware-admin,项目名称:MonoVersalSharpSerializer,代码行数:31,代码来源:PropertyFactoryTests.cs


示例3: CreateRoot

 private Root CreateRoot()
 {
     var root = new Root();
     root.RenderSystem = root.GetRenderSystemByName("Direct3D9 Rendering Subsystem");
     root.Initialise(false);
     return root;
 }
开发者ID:crescent,项目名称:SubmarineSim3D,代码行数:7,代码来源:Sim.cs


示例4: GetReplacedHtml

        /// <summary>
        /// Gets the replaced HTML.
        /// </summary>
        /// <param name="stringBuilder">The string builder.</param>
        /// <param name="model">The model.</param>
        /// <returns>HTML with replaced model values</returns>
        public override System.Text.StringBuilder GetReplacedHtml(System.Text.StringBuilder stringBuilder, Root.ViewModels.Cms.RenderPageViewModel model)
        {
            var image = model.GetPageSecondaryImageModel();
            stringBuilder = GetReplacedHtml(stringBuilder, image != null ? image.PublicUrl : null);

            return stringBuilder;
        }
开发者ID:Steinerd,项目名称:BetterCMS,代码行数:13,代码来源:RenderingPageSecondaryImageUrlProperty.cs


示例5: DropDown

 public DropDown(Root root, string id, DropDownProperties properties, Menu menu)
     : base(root, id, properties, menu)
 {
     AddDisplayModes();
     StateProperties[DropDownCommandProperties.Value] = "";
     StateProperties[DropDownCommandProperties.SelectedItemId] = "";
 }
开发者ID:modulexcite,项目名称:IL2JS,代码行数:7,代码来源:dropdown.cs


示例6: Update3

 public object Update3(Root obj)
 {
   obj.TransactionalType = _transactionalType;
   obj.Data = "Update";
   obj.MarkAsOld();
   return obj;
 }
开发者ID:nschonni,项目名称:csla-svn,代码行数:7,代码来源:RootFactory.cs


示例7: GetReplacedHtml

        /// <summary>
        /// Gets the replaced HTML.
        /// </summary>
        /// <param name="stringBuilder">The string builder.</param>
        /// <param name="model">The model.</param>
        /// <returns>HTML with replaced model values</returns>
        public override System.Text.StringBuilder GetReplacedHtml(System.Text.StringBuilder stringBuilder, Root.ViewModels.Cms.RenderPageViewModel model)
        {
            var blog = model.GetBlogPostModel();
            stringBuilder = GetReplacedHtml(stringBuilder, blog != null ? blog.ActivationDate : (System.DateTime?)null);

            return stringBuilder;
        }
开发者ID:jeroenlorrentop,项目名称:BetterCMS,代码行数:13,代码来源:RenderingPageBlogActivationDateProperty.cs


示例8: CreateXmlDocument

 public Root CreateXmlDocument(SearchInputService input)
 {
     try
     {
         CrawlerHelper helper = new CrawlerHelper();
         Root root = new Root();
         root.Departure = input.DepartureCode;
         root.Arrival = input.ArrivalCode;
         CookieCollection cookieCollection = helper.getCookieCollection("https://ameliaweb5.intelisys.ca/VietJet/ameliapost.aspx?lang=vi", "POST", getPostdata(input));
         HtmlDocument htmld = helper.getDocument("https://ameliaweb5.intelisys.ca/VietJet/ameliapost.aspx?lang=vi", "POST", getPostdata2(input), cookieCollection);
         root.outBound = new OutInBound();
         root.inBound = new OutInBound();
         root.AirLine = AirLineName.vietJetAir;
         HtmlNodeCollection collection;
         try
         {
             collection = htmld.DocumentNode.SelectNodes("//div[@id='toDepDiv']/div[@id='travOpsMain']/table[1]/tr[7]/td/table[1]/tr");
             root.outBound.Items = getitems(input.DepartTime,input, collection);
         }
         catch { }
         //chieu ve
         if (input.IsRoundTrip)
         {
             collection = htmld.DocumentNode.SelectNodes("//div[@id='toRetDiv']/div[@id='travOpsMain']/table[1]/tr[7]/td/table[1]/tr");
             root.inBound.Items = getitems(input.ReturnTime,input, collection);
         }
         return root;
     }
     catch
     {
         return null;
     }
 }
开发者ID:nvphuong92,项目名称:do-an-tot-nghiep1,代码行数:33,代码来源:VietJetAir.cs


示例9: DeSerialisoiIdSeach

        public static void DeSerialisoiIdSeach(string imdbID, ref Root leffat)
        {
            string url = "http://www.omdbapi.com/?i=" + imdbID + "&r=xml&plot=full";
            XmlSerializer deserializer = new XmlSerializer(typeof(Root));
            try
            {
                HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(url);
                myRequest.AllowAutoRedirect = true;
                myRequest.Method = "GET";
                myRequest.Timeout = 6000;
                WebResponse myResponse = myRequest.GetResponse();

                XmlTextReader reader = new XmlTextReader(myResponse.GetResponseStream());

                leffat = (Root)deserializer.Deserialize(reader);
                reader.Close();
                myResponse.Close();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {

            }
        }
开发者ID:Jeeqqq,项目名称:IIO13200-HTYO-Shareyourmovies,代码行数:27,代码来源:SearchResult.cs


示例10: InitRenderSystem

        /// <summary>
        /// Initialises the render system, tells it to use directx, windowed, etc
        /// </summary>
        private static RenderSystem InitRenderSystem(Root root)
        {
            Launch.Log("[Loading] Creating RenderSystem...");

            if (root.RenderSystem == null) {
                var renderSystem = root.GetRenderSystemByName("Direct3D9 Rendering Subsystem");
                renderSystem.SetConfigOption("Full Screen", Options.Get("Full Screen"));
                renderSystem.SetConfigOption("Floating-point mode", Options.Get("Floating-point mode"));
                renderSystem.SetConfigOption("VSync", Options.Get("VSync"));
                renderSystem.SetConfigOption("VSync Interval", Options.Get("VSync Interval"));
                renderSystem.SetConfigOption("FSAA", Options.Get("FSAA"));
                renderSystem.SetConfigOption("Video Mode", Options.Get("Video Mode"));
                renderSystem.SetConfigOption("sRGB Gamma Conversion", Options.Get("sRGB Gamma Conversion"));

                root.RenderSystem = renderSystem;
            }

            #if DEBUG
            // print out the things we can support
            var renderList = root.GetAvailableRenderers();
            foreach (var renderSystem in renderList) {
                Launch.Log("\n**** Available options for Render System: " + renderSystem.Name + " ****");
                foreach (var option in renderSystem.GetConfigOptions()) {
                    Launch.Log("\t" + option.Key);
                    foreach (var p in option.Value.possibleValues) {
                        Launch.Log("\t\t" + p);
                    }
                }
                Launch.Log("***********************************");
            }
            #endif

            return root.RenderSystem;
        }
开发者ID:CisciarpMaster,项目名称:PonyKart,代码行数:37,代码来源:LKernel+(ogre+initialisers).cs


示例11: GetReplacedHtml

        /// <summary>
        /// Gets the replaced HTML.
        /// </summary>
        /// <param name="stringBuilder">The string builder.</param>
        /// <param name="model">The model.</param>
        /// <returns>HTML with replaced model values</returns>
        public override System.Text.StringBuilder GetReplacedHtml(System.Text.StringBuilder stringBuilder, Root.ViewModels.Cms.RenderPageViewModel model)
        {
            var category = model.GetPageCategoryModel();
            stringBuilder = GetReplacedHtml(stringBuilder, category != null ? category.Name : null);

            return stringBuilder;
        }
开发者ID:Steinerd,项目名称:BetterCMS,代码行数:13,代码来源:RenderingPageCategoryProperty.cs


示例12: GalleryButton

 /// <summary>
 /// Creates a GalleryButton control.
 /// </summary>
 /// <param name="root">The Root that this control is in</param>
 /// <param name="id">The ID of this control</param>
 /// <param name="properties">The properties of this control</param>
 /// <param name="dims">The dimensions of this control</param>
 public GalleryButton(Root root, string id, GalleryButtonProperties properties, GalleryElementDimensions dims)
     : base(root, id, properties)
 {
     AddDisplayMode("Large");
     AddDisplayMode("Menu");
     ElementDimensions = dims;
 }
开发者ID:modulexcite,项目名称:IL2JS,代码行数:14,代码来源:gallerybutton.cs


示例13: Create

 public static DTOBase Create(FileInfo info, Root root)
 {
     if (info == null)
         throw new ArgumentNullException("info");
     if (root == null)
         throw new ArgumentNullException("root");
     string parentPath = info.Directory.FullName.Substring(root.Directory.FullName.Length);
     string relativePath = info.FullName.Substring(root.Directory.FullName.Length);
     FileDTO response;
     if (root.CanCreateThumbnail(info))
     {
         ImageDTO imageResponse = new ImageDTO();
         imageResponse.Thumbnail = root.GetExistingThumbHash(info) ?? (object)1;
         var dim = root.GetImageDimension(info);
         imageResponse.Dimension = string.Format("{0}x{1}", dim.Width, dim.Height);
         response = imageResponse;
     }
     else
     {
         response = new FileDTO();
     }
     response.Read = 1;
     response.Write = root.IsReadOnly ? (byte)0 : (byte)1;
     response.Locked = (root.LockedFolders.Any(f => f == info.Directory.Name) || root.IsLocked) ? (byte)1 : (byte)0;
     response.Name = info.Name;
     response.Size = info.Length;
     response.UnixTimeStamp = (long)(info.LastWriteTimeUtc - _unixOrigin).TotalSeconds;
     response.Mime = Helper.GetMimeType(info);
     response.Hash = root.VolumeId + Helper.EncodePath(relativePath);
     response.ParentHash = root.VolumeId + Helper.EncodePath(parentPath.Length > 0 ? parentPath : info.Directory.Name);
     return response;
 }
开发者ID:rengasamy,项目名称:elFinder.Net,代码行数:32,代码来源:DTOBase.cs


示例14: CreateConnection

        static public IDbConnection CreateConnection(Root dbRoot, string database)
		{
            IDbConnection cn = PostgreSQLDatabases.CreateConnection(dbRoot.ConnectionString);
			cn.Open();
			cn.ChangeDatabase(database);
			return cn;
		}
开发者ID:stacyjeptha,项目名称:EntitySpaces-CompleteSource,代码行数:7,代码来源:ConnectionHelper.cs


示例15: Fetch

 public object Fetch()
 {
   var obj = new Root();
   obj.Data = "Fetch";
   obj.MarkAsOld();
   return obj;
 }
开发者ID:nschonni,项目名称:csla-svn,代码行数:7,代码来源:RootFactory.cs


示例16: GetReplacedHtml

        /// <summary>
        /// Gets the replaced HTML.
        /// </summary>
        /// <param name="stringBuilder">The string builder.</param>
        /// <param name="model">The model.</param>
        /// <returns>HTML with replaced model values</returns>
        public override System.Text.StringBuilder GetReplacedHtml(System.Text.StringBuilder stringBuilder, Root.ViewModels.Cms.RenderPageViewModel model)
        {
            var author = model.GetBlogPostAuthorModel();
            stringBuilder = GetReplacedHtml(stringBuilder, author != null ? author.Name : null);

            return stringBuilder;
        }
开发者ID:Steinerd,项目名称:BetterCMS,代码行数:13,代码来源:RenderingPageAuthorProperty.cs


示例17: Setup

		/// <summary>
		/// Setups this instance.
		/// </summary>
		/// <returns></returns>
		protected virtual bool Setup()
		{
			if (!string.IsNullOrEmpty(ConfigDirectory))
				PluginsCfg = Path.Combine(ConfigDirectory, PluginsCfg);

			Root = new Root(PluginsCfg);

			if (!Configure())
				return false;

			ChooseSceneManager();
			CreateCamera();
			CreateViewports();

			TextureManager.Instance.DefaultNumMipmaps = 5;

			CreateResourceListener();
			LoadResources();

			CreateScene();

			CreateFrameListeners();
			InitializeInput();

			DebugOverlay = new DebugOverlay(Window);
			DebugOverlay.AdditionalInfo = "Bilinear";

			return true;
		}
开发者ID:HaKDMoDz,项目名称:InVision,代码行数:33,代码来源:BaseApplication.cs


示例18: InsertTable

 public InsertTable(Root root,
                      string id,
                      InsertTableProperties properties)
     : base(root, id, properties)
 {
     AddDisplayMode("Menu");
 }
开发者ID:modulexcite,项目名称:IL2JS,代码行数:7,代码来源:inserttable.cs


示例19: OnLaunched

        protected override void OnLaunched(LaunchActivatedEventArgs e)
        {
            
            if (rootFrame == null)
            {
                rootFrame = new Frame();

                rootFrame.NavigationFailed += OnNavigationFailed;
                rootFrame.Navigated += OnNavigated;

                if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
                {
                    //TODO: Load state from previously suspended application
                }
            }

            if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
            {
                var i = Windows.UI.ViewManagement.StatusBar.GetForCurrentView().HideAsync();
            }

            rootPage = new Root(rootFrame);
            Window.Current.Content = rootPage;

            SystemNavigationManager.GetForCurrentView().BackRequested += OnBackRequested;
            SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility =
                rootFrame.CanGoBack ?
                AppViewBackButtonVisibility.Visible :
                AppViewBackButtonVisibility.Collapsed;

            Window.Current.Activate();
        }
开发者ID:mhlbocian,项目名称:asystent-osobisty,代码行数:32,代码来源:App.xaml.cs


示例20: Create

 public static DTOBase Create(FileInfo info, Root root)
 {
     if (info == null)
         throw new ArgumentNullException("info");
     if (root == null)
         throw new ArgumentNullException("root");
     string ext = info.Extension.ToLower();
     string parentPath = info.Directory.FullName.Substring(root.Directory.FullName.Length);
     FileDTO response;
     string hash = root.VolumeId + Helper.EncodePath(info.FullName.Substring(root.Directory.FullName.Length));
     if (ext == ".png" || ext == ".jpg" || ext == ".jpeg" || info.Extension == ".gif")
     {
         response = new ImageDTO();
         //((ImageDTO)response).Thumbnail = 
     }
     else
     {
         response = new FileDTO();
     }
     response.Read = 1;
     response.Write = root.IsReadOnly ? (byte)0 : (byte)1;
     response.Locked = root.IsReadOnly ? (byte)1 : (byte)0;
     response.Name = info.Name;
     response.Size = info.Length;
     response.UnixTimeStamp = (long)(info.LastWriteTimeUtc - _unixOrigin).TotalSeconds;
     response.Mime = Helper.GetMimeType(info);
     response.Hash = hash;
     response.ParentHash = root.VolumeId + Helper.EncodePath(parentPath.Length > 0 ? parentPath : info.Directory.Name);
     return response;
 }
开发者ID:hungud,项目名称:elFinder.Net,代码行数:30,代码来源:DTOBase.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# RootElement类代码示例发布时间:2022-05-24
下一篇:
C# RoomUser类代码示例发布时间: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