Beispiel #1
0
        void da_Completed(object sender, EventArgs e)
        {
            AnimationTimeline timeline = (sender as AnimationClock).Timeline;
            /* !!! 通过附加属性把UI对象取回 !!! */
            object uiElement = Storyboard.GetTarget(timeline);

            TextBlock  t  = uiElement as TextBlock;
            StackPanel sp = t.Parent as StackPanel;

            sp.Children.Remove(t);


            if (sp.Children.Count <= 0)
            {
                if (win != null)
                {
                    win.Close();
                }
                win = null;
                return;
            }

            win.Left = SystemParameters.WorkArea.Width - win.Width;
            win.Top  = SystemParameters.WorkArea.Height - win.Height - 20;
        }
Beispiel #2
0
 public static WinMsg GetMsg()
 {
     if (win == null)
     {
         win = new WinMsg();
     }
     return(win);
 }
Beispiel #3
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     win = null;
 }
Beispiel #4
0
        public static void ShowMsg(string msg, Color c)
        {
            WinMsg w = WinMsg.GetMsg();

            w.ShowMsg(msg, c);
        }