public FileTransferDetailInfo(FrameworkElement Owner, UInt64 taskid, List <TaskFileDetailInfo> List)
        {
            InitializeComponent();
            This   = this;
            Taskid = taskid;

            Window pwin = Tool.MainWindow.This;

            this.Owner = pwin;
            Left       = 0;
            Top        = 0;
            Width      = Tool.MainWindow.This.Width;
            Height     = Tool.MainWindow.This.Height;
            this.WindowStartupLocation = WindowStartupLocation.CenterOwner;

            dcContent = TaskFileDetailInfoCollect.GetInstance();
            ObservableCollection <TaskFileDetailInfo> infocollection = new ObservableCollection <TaskFileDetailInfo>(List);

            dcContent.Collection       = infocollection;
            FileDetailList.DataContext = dcContent;
            FileDetailList.ItemsSource = dcContent.Collection.ToList();

            DispatcherTimer.Tick    += new EventHandler(DispatcherTimerTick);
            DispatcherTimer.Interval = new TimeSpan(0, 0, 1);
            DispatcherTimer.Start();
        }
Ejemplo n.º 2
0
        public static TaskFileDetailInfoCollect GetInstance()
        {
            if (dataCollect == null)
            {
                dataCollect = new TaskFileDetailInfoCollect();
            }

            return(dataCollect);
        }