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


C# Window.ToString方法代码示例

本文整理汇总了C#中Window.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Window.ToString方法的具体用法?C# Window.ToString怎么用?C# Window.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Window的用法示例。


在下文中一共展示了Window.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetGallery

 public static async Task<Response<List<Image>>> GetGallery(Section? section = null, Sort? sort = null, Window? window = null, bool? showViral = null, int? page = null)
 {
     string uri = "gallery";
     if (section != null)
     {
         uri += "/" + section.ToString().ToLower();
         if(sort != null)
         {
             uri += "/" + sort.ToString().ToLower();
             if(window != null)
             {
                 uri += "/" + window.ToString().ToLower();
                 if (showViral != null)
                 {
                     uri += "/" + showViral.ToString();
                     if (page != null)
                     {
                         uri += "/" + page;
                     }
                 }
             }
         }
     }
     return await NetworkHelper.GetRequest<List<Image>>(uri);
 }
开发者ID:akshay2000,项目名称:SharpImgur,代码行数:25,代码来源:Gallery.cs

示例2: TestBasics

		public void TestBasics()
		{
			var window1 = new Window(123.1, 456.2);
			Assert.AreEqual(123.1, window1.Width);
			Assert.AreEqual(456.2, window1.Center);
			Assert.AreEqual("123.10/456.20", window1.ToString());

			Assert.IsFalse(window1.Equals(new object()));

			var window2 = new Window(1.231, 456.2);
			Assert.AreNotEqual(window1, window2);

			var window3 = new Window(123.1, 4.562);
			Assert.AreNotEqual(window1, window3);

			var window4 = new Window(123.1, 456.2);
			Assert.AreEqual(window1, window4);
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:18,代码来源:WindowTests.cs

示例3: GetSubreddditGallery

        public static async Task<Response<List<Image>>> GetSubreddditGallery(string subreddit, Sort? sort = null, Window? window = null, int? page = null)
        {
            //{ subreddit}/{ sort}/{ window}/{ page}
            string uri = "gallery/r/" + subreddit;
            if (sort != null)
            {
                uri += "/" + sort.ToString().ToLower();
                if (window != null)
                {
                    uri += "/" + window.ToString().ToLower();

                    if (page != null)
                    {
                        uri += "/" + page;
                    }
                }
            }
            return await NetworkHelper.GetRequest<List<Image>>(uri);
        }
开发者ID:akshay2000,项目名称:SharpImgur,代码行数:19,代码来源:Gallery.cs

示例4: GetTopicGallery

        public static async Task<Response<List<Image>>> GetTopicGallery(int topicId, Sort? sort = null, Window? window = null, int? page = null)
        {
            //{topicId}/{sort}/{window}/{page}
            string uri = "topics/" + topicId;
            if (sort != null)
            {
                uri += "/" + sort.ToString().ToLower();
                if (window != null)
                {
                    uri += "/" + window.ToString().ToLower();

                    if (page != null)
                    {
                        uri += "/" + page;
                    }
                }
            }
            return await NetworkHelper.GetRequest<List<Image>>(uri);
        }
开发者ID:akshay2000,项目名称:SharpImgur,代码行数:19,代码来源:Topics.cs


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