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


C# Helpers.buildRunningText方法代码示例

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


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

示例1: UpdateUi

		public void UpdateUi(object source, EventArgs e)
		{

			double screenWidth = System.Windows.SystemParameters.PrimaryScreenWidth;
			double imageMaxWidth = (screenWidth * WhatsappProperties.Instance.MsgSectionWidth) / 100;
			if (!string.IsNullOrEmpty(WhatsappProperties.Instance.MsgSectionWidthType) && "pix".Equals(WhatsappProperties.Instance.MsgSectionWidthType))
			{
				imageMaxWidth = WhatsappProperties.Instance.MsgSectionWidth;
			}

			this.firstColumn.Width = new GridLength(imageMaxWidth);
			int paddingLeft = WhatsappProperties.Instance.PaddingLeft;
			UIElementCollection uIElementCollection = this.stackPanel1.Children;
			Helpers helper = new Helpers();
			int elementsToUpdate = 5;
			if (!string.IsNullOrEmpty(Settings.Instance.elementsToUpdate.Text))
			{
				int n;
				bool isNumeric = int.TryParse(Settings.Instance.elementsToUpdate.Text, out n);
				if (isNumeric) {
					if (n == -1)
					{
						elementsToUpdate = uIElementCollection.Count;
					}
					else {
						if (elementsToUpdate > uIElementCollection.Count)
						{
							elementsToUpdate = uIElementCollection.Count;
						}
						else
						{
							elementsToUpdate = n;
						}
						
					}
				}
			}

			for (int i = uIElementCollection.Count - 1; i > uIElementCollection.Count - 1 - elementsToUpdate; i--)
			{
				if(uIElementCollection[i].GetType() == typeof(TextView)){
					TextView textView = (TextView)uIElementCollection[i];
					TextView.buildTextView(textView);
				}
				if (uIElementCollection[i].GetType() == typeof(ImgView))
				{
					ImgView imgView = (ImgView)uIElementCollection[i];
					ImgView.buildImgView(imgView);
				}
			}
			
			helper.buildRunningText(this);
			if (!string.IsNullOrEmpty(WhatsappProperties.Instance.Backgroundimage))
			{
				try
				{
					BitmapImage bi = new BitmapImage();
					bi.BeginInit();
					Uri uri = new Uri(WhatsappProperties.Instance.Backgroundimage.Trim(), UriKind.RelativeOrAbsolute);
					if (File.Exists(uri.ToString()))
					{
						bi.UriSource = uri;
						bi.EndInit();
						this.mainGrid.Background.SetValue(ImageBrush.ImageSourceProperty, bi);
					}

				}
				catch (Exception e2)
				{
					systemLog.Error("no background img " + WhatsappProperties.Instance.Backgroundimage + " " + e2);

				}

			}
			if (WhatsappProperties.Instance.FullScreen)
			{
				this.WindowStyle = WindowStyle.None;
			}
			else
			{
				this.WindowStyle = WindowStyle.ThreeDBorderWindow;
			}

			Settings.Instance.updateStatusBar("Finish Updating...", Brushes.DarkGreen);
			

		}
开发者ID:Karthikeyan-kkk,项目名称:whatsapp-shower,代码行数:87,代码来源:MainWindow.xaml.cs

示例2: startRunningText

		private void startRunningText()
		{
			try
			{
				Helpers helpers = new Helpers();
				helpers.buildRunningText(this);

				
			}
			catch (Exception e)
			{
				systemLog.Error("error in startRunningText: "+e);
			}
		  }
开发者ID:Karthikeyan-kkk,项目名称:whatsapp-shower,代码行数:14,代码来源:MainWindow.xaml.cs


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