Exemple #1
0
        private void CommandBinding_AvdumpFile(object sender, ExecutedRoutedEventArgs e)
        {
            try
            {
                Window parentWindow = Window.GetWindow(this);

                object obj = e.Parameter;
                if (obj == null) return;

                if (obj.GetType() == typeof(VideoLocalVM))
                {
                    VideoLocalVM vid = obj as VideoLocalVM;

                    foreach (AVDumpVM dumpTemp in MainListHelperVM.Instance.AVDumpFiles)
                    {
                        if (dumpTemp.FullPath == vid.LocalFileSystemFullPath) return;
                    }

                    AVDumpVM dump = new AVDumpVM(vid);
                    MainListHelperVM.Instance.AVDumpFiles.Add(dump);

                }

                if (obj.GetType() == typeof(MultipleVideos))
                {
                    MultipleVideos mv = obj as MultipleVideos;
                    foreach (VideoLocalVM vid in mv.VideoLocals)
                    {
                        bool alreadyExists = false;
                        foreach (AVDumpVM dumpTemp in MainListHelperVM.Instance.AVDumpFiles)
                        {
                            if (dumpTemp.FullPath == vid.LocalFileSystemFullPath)
                            {
                                alreadyExists = true;
                                break;
                            }

                        }

                        if (alreadyExists) continue;

                        AVDumpVM dump = new AVDumpVM(vid);
                        MainListHelperVM.Instance.AVDumpFiles.Add(dump);
                    }
                }

                tabControl1.SelectedIndex = TAB_MAIN_FileManger;
                tabFileManager.SelectedIndex = TAB_FileManger_Avdump;

            }
            catch (Exception ex)
            {
                Utils.ShowErrorMessage(ex);
            }
        }
Exemple #2
0
        public void ShowPinnedFileAvDump(VideoLocalVM vid)
        {
            try
            {
                foreach (AVDumpVM dumpTemp in MainListHelperVM.Instance.AVDumpFiles)
                {
                    if (dumpTemp.FullPath == vid.LocalFileSystemFullPath) return;
                }

                AVDumpVM dump = new AVDumpVM(vid);
                MainListHelperVM.Instance.AVDumpFiles.Add(dump);

                tabControl1.SelectedIndex = TAB_MAIN_FileManger;
                tabFileManager.SelectedIndex = TAB_FileManger_Avdump;

            }
            catch (Exception ex)
            {
                Utils.ShowErrorMessage(ex);
            }
        }