Esempio n. 1
0
        public override void RemoveChild(TreeViewItemViewModel child)
        {// 09-19-2010 Scott
            base.RemoveChild(child);

            PlayViewModel pvm = child as PlayViewModel;

            if (pvm != null)
            {
                if (File.Exists(pvm.PlayPath))
                {
                    InteropHelper.DeleteToRecycleBin(pvm.PlayPath, false);

                    if (File.Exists(pvm.PlayPath + ".FD"))
                    {
                        InteropHelper.DeleteToRecycleBin(pvm.PlayPath + ".FD", false);
                    }

                    if (File.Exists(pvm.PlayPath + ".BMP"))
                    {
                        InteropHelper.DeleteToRecycleBin(pvm.PlayPath + ".BMP", false);
                    }

                    if (File.Exists(pvm.PlayPath + ".PlayInfo"))
                    {
                        InteropHelper.DeleteToRecycleBin(pvm.PlayPath + ".PlayInfo", false);
                    }
                }
            }
        }
        public override void RemoveChild(TreeViewItemViewModel child)
        {
            if (child is FolderViewModel)
            {
                if (Directory.Exists((child as FolderViewModel).FolderPath))
                {
                    InteropHelper.DeleteToRecycleBin((child as FolderViewModel).FolderPath, false);
                    //Directory.Delete((child as FolderViewModel).FolderPath, true);
                }
            }
            else
            {
                FormationViewModel fvm = child as FormationViewModel;

                if (fvm != null)
                {
                    InteropHelper.DeleteToRecycleBin(fvm.FormationPath, false);
                    //System.IO.File.Delete(fvm.FormationPath);

                    // 09-19-2010 Scott
                    if (Directory.Exists(fvm.PlayFolderPath))
                    {
                        InteropHelper.DeleteToRecycleBin(fvm.PlayFolderPath, false);
                    }
                }
            }

            base.RemoveChild(child);
        }
Esempio n. 3
0
        public override void RemoveChild(TreeViewItemViewModel child)
        {
            PlayViewModel pvm = child as PlayViewModel;

            if (pvm != null)
            {
                System.IO.File.Delete(pvm.PlayPath);
            }

            PlayFolderViewModel folderVM = child as PlayFolderViewModel;

            if (folderVM != null && Directory.Exists(folderVM.FolderPath))
            {
                InteropHelper.DeleteToRecycleBin(folderVM.FolderPath, false);
                //Directory.Delete(folderVM.FolderPath, true);
            }

            base.RemoveChild(child);
        }
        public override void RemoveChild(TreeViewItemViewModel child)
        {
            if (child is PlayFolderViewModel)
            {
                if (Directory.Exists((child as PlayFolderViewModel).FolderPath))
                {
                    InteropHelper.DeleteToRecycleBin((child as PlayFolderViewModel).FolderPath, false);
                    //Directory.Delete((child as FolderViewModel).FolderPath, true);
                }
            }
            else
            {
                PlayViewModel pvm = child as PlayViewModel;

                if (pvm != null)
                {
                    InteropHelper.DeleteToRecycleBin(pvm.PlayPath, false);

                    if (File.Exists(pvm.PlayPath + ".FD"))
                    {
                        InteropHelper.DeleteToRecycleBin(pvm.PlayPath + ".FD", false);
                    }

                    if (File.Exists(pvm.PlayPath + ".BMP"))
                    {
                        InteropHelper.DeleteToRecycleBin(pvm.PlayPath + ".BMP", false);
                    }

                    if (File.Exists(pvm.PlayPath + ".PlayInfo"))
                    {
                        InteropHelper.DeleteToRecycleBin(pvm.PlayPath + ".PlayInfo", false);
                    }
                }
            }

            base.RemoveChild(child);
        }
Esempio n. 5
0
        public override void RemoveChild(TreeViewItemViewModel child)
        {
            if (ScoutType.Mode == (int)Mode.Formation)
            {
                FormationViewModel formationVM = child as FormationViewModel;

                if (formationVM != null)
                {
                    InteropHelper.DeleteToRecycleBin(formationVM.FormationPath, false);
                    //File.Delete(formationVM.FormationPath);

                    if (File.Exists(formationVM.FormationPath + ".FD"))
                    {
                        InteropHelper.DeleteToRecycleBin(formationVM.FormationPath + ".FD", false);
                    }

                    if (File.Exists(formationVM.FormationPath + ".BMP"))
                    {
                        InteropHelper.DeleteToRecycleBin(formationVM.FormationPath + ".BMP", false);
                    }

                    // 09-19-2010 Scott
                    if (Directory.Exists(formationVM.PlayFolderPath))
                    {
                        InteropHelper.DeleteToRecycleBin(formationVM.PlayFolderPath, false);
                    }
                }

                FolderViewModel folderVM = child as FolderViewModel;

                if (folderVM != null && Directory.Exists(folderVM.FolderPath))
                {
                    InteropHelper.DeleteToRecycleBin(folderVM.FolderPath, false);
                    //Directory.Delete(folderVM.FolderPath, true);
                }

                TitleViewModel tvm = child as TitleViewModel;

                if (tvm != null && File.Exists(tvm.TitlePath))
                {
                    InteropHelper.DeleteToRecycleBin(tvm.TitlePath, false);

                    if (File.Exists(tvm.TitlePath + ".FD"))
                    {
                        InteropHelper.DeleteToRecycleBin(tvm.TitlePath + ".FD", false);
                    }
                }

                //PersonnelViewModel pvm = child as PersonnelViewModel;

                //if (pvm != null)
                //{
                //    Directory.Delete(pvm.PersonnelPath,true);
                //}
            }

            // 08-30-2010 Scott
            if (ScoutType.Mode == (int)Mode.Adjustment)
            {
            }

            base.RemoveChild(child);
        }