예제 #1
0
 private void setPanelShow(FormNewsList result)
 {
     for (int i = 2; i <= 12; i++)
     {
         ((TextBlock)(result.FindName("time" + i))).Dispatcher.Invoke(new setTextBlockVisibilityDelegate(setTextBlockVisibility), ((TextBlock)(this.FindName("time" + i))), false);
         ((TextBlock)(result.FindName("address" + i))).Dispatcher.Invoke(new setTextBlockVisibilityDelegate(setTextBlockVisibility), ((TextBlock)(this.FindName("address" + i))), false);
         ((TextBlock)(result.FindName("time" + i))).Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), ((TextBlock)(this.FindName("time" + i))), "");
         ((TextBlock)(result.FindName("address" + i))).Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), ((TextBlock)(this.FindName("address" + i))), "");
     }
 }
예제 #2
0
        private void getTextBlock(FormNewsList obj, string name)
        {
            object o = obj.FindName(name);

            if (name.Contains("time"))
            {
                timeTextBlock = (TextBlock)(o);
            }
            if (name.Contains("address"))
            {
                addressTextBlock = (TextBlock)(o);
            }
        }