コード例 #1
0
        public void Changed(string nsName)
        {
            ViewUpdate vu = FindUpdateByNsName(nsName);

            if (vu != null)
            {
                if (vu.IsUp)
                {
                    upFinish.Add(vu.Id);
                }
                else
                {
                    upFinish.Remove(vu.Id);
                }
            }
        }
コード例 #2
0
        private void ImportUpdates()
        {
            List <Update> updates = core.GetUpdates(softName);

            foreach (Update upd in updates)
            {
                ViewUpdate iUpd = new ViewUpdate();
                iUpd.Id             = upd.Id;
                iUpd.NsName         = upd.NsName;
                iUpd.Ip             = upd.Ip;
                iUpd.UserFio        = upd.UserFio;
                iUpd.OldVersion     = upd.OldVersion;
                iUpd.CurrentVersion = upd.CurrentVersion;
                //???
                //Dispatcher ds = Dispatcher.CurrentDispatcher;
                //ds.BeginInvoke(DispatcherPriority.Normal, (ThreadStart)delegate ()
                //{
                this.updates.Add(iUpd);
                //});
            }
            onRefresh?.Invoke();
        }