コード例 #1
0
 public void RemoveGroup(TransferGroup Group)
 {
     if (Setting_UI.ExitAPP_Flag)
     {
         return;
     }
     TLV_ud.RemoveObject(Groups[Groups.IndexOf(Group)]);
     TLV_done.RemoveObject(Groups[Groups.IndexOf(Group)]);
     Groups.Remove(Group);
 }
コード例 #2
0
        void DoRefresh()
        {
            foreach (TransferGroup group in Groups)
            {
                switch (group.change)
                {
                case ChangeTLV.Done:
                    //foreach (var child in group.items)
                    //{
                    //    if (child.status != child.CheckChangeStatus)
                    //    {
                    //        TLV_done.RefreshObject(child);
                    //        child.CheckChangeStatus = child.status;
                    //    }
                    //}
                    TLV_done.RefreshObject(group);
                    break;

                case ChangeTLV.Processing:
                    for (int i = 0; i < group.items.Count; i++)
                    {
                        if (group.items[i].status == StatusTransfer.Running | group.items[i].status != group.items[i].CheckChangeStatus)
                        {
                            TLV_ud.RefreshObject(group.items[i]);
                            group.items[i].CheckChangeStatus = group.items[i].status;
                        }
                    }
                    break;

                case ChangeTLV.DoneToProcessing:
                    TLV_done.RemoveObject(Groups[Groups.IndexOf(group)]);
                    TLV_ud.AddObject(Groups[Groups.IndexOf(group)]);
                    group.change = ChangeTLV.Processing;
                    break;

                case ChangeTLV.ProcessingToDone:
                    TLV_ud.RemoveObject(Groups[Groups.IndexOf(group)]);
                    TLV_done.AddObject(Groups[Groups.IndexOf(group)]);
                    group.change = ChangeTLV.Done;
                    break;
                }
            }
        }