本文整理汇总了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);
}
示例2: startRunningText
private void startRunningText()
{
try
{
Helpers helpers = new Helpers();
helpers.buildRunningText(this);
}
catch (Exception e)
{
systemLog.Error("error in startRunningText: "+e);
}
}