コード例 #1
0
        private void LaunchSelectedVideo(ListView lv)
        {
            string path = GetSelectedVideoPath(lv);

            if (path != null)
            {
                VideoTypeManager.LoadVideo(path, -1);
            }
        }
コード例 #2
0
        private void LaunchWatcherSelectedVideo(ListView lv)
        {
            string path = GetSelectedVideoPath(lv);

            if (path != null)
            {
                path = Path.Combine(Path.GetDirectoryName(path), "*");
                VideoTypeManager.LoadVideo(path, -1);
            }
        }
コード例 #3
0
ファイル: CapturedFilesView.cs プロジェクト: jfpk/kinoveaIDS
        private void View_LaunchAsked(object sender, EventArgs e)
        {
            CapturedFileView view = sender as CapturedFileView;

            if (view == null || view.CapturedFile == null || string.IsNullOrEmpty(view.CapturedFile.Filepath))
            {
                return;
            }

            VideoTypeManager.LoadVideo(view.CapturedFile.Filepath, -1);
        }
コード例 #4
0
        private void mnuOpenAsReplayWatcher_Click(object sender, EventArgs e)
        {
            CShItem item = activeTab == ActiveFileBrowserTab.Explorer ? currentExptreeItem : currentShortcutItem;

            if (item == null || item.Path.StartsWith("::"))
            {
                return;
            }

            string path = Path.Combine(item.Path, "*");

            VideoTypeManager.LoadVideo(path, -1);
        }
コード例 #5
0
        private void View_LaunchWatcherAsked(object sender, EventArgs e)
        {
            CapturedFileView view = sender as CapturedFileView;

            if (view == null || view.CapturedFile == null || string.IsNullOrEmpty(view.CapturedFile.Filepath))
            {
                return;
            }

            // Replace the filename with a wildcard to turn into a replay watcher over that folder.
            string path = Path.Combine(Path.GetDirectoryName(view.CapturedFile.Filepath), "*");

            VideoTypeManager.LoadVideo(path, -1);
        }
コード例 #6
0
        private void LaunchItemAt(ListView listView, MouseEventArgs e)
        {
            ListViewItem lvi = listView.GetItemAt(e.X, e.Y);

            if (lvi == null || listView.SelectedItems == null || listView.SelectedItems.Count != 1)
            {
                return;
            }

            string path = lvi.Tag as string;

            if (path == null)
            {
                return;
            }

            VideoTypeManager.LoadVideo(path, -1);
        }
コード例 #7
0
        private void NotificationCenter_LaunchOpenDialog(object sender, EventArgs e)
        {
            if (isOpening || rootKernel.ScreenManager.ScreenCount != 0)
            {
                return;
            }

            isOpening = true;

            string filename = FilePicker.OpenVideo();

            if (!string.IsNullOrEmpty(filename))
            {
                VideoTypeManager.LoadVideo(filename, -1);
            }

            isOpening = false;
        }
コード例 #8
0
        private void NotificationCenter_LaunchOpenDialog(object sender, EventArgs e)
        {
            if (isOpening || rootKernel.ScreenManager.ScreenCount != 0)
            {
                return;
            }

            isOpening = true;

            string filepath = rootKernel.LaunchOpenFileDialog();

            if (filepath.Length > 0)
            {
                VideoTypeManager.LoadVideo(filepath, -1);
            }

            isOpening = false;
        }
コード例 #9
0
        private void tvCaptureHistory_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            // Launch video at node.
            CaptureHistoryEntry entry = e.Node.Tag as CaptureHistoryEntry;

            if (entry == null)
            {
                return;
            }

            string path = entry.CaptureFile;

            if (path == null)
            {
                return;
            }

            VideoTypeManager.LoadVideo(path, -1);
        }
コード例 #10
0
        private void LaunchSelectedCamera(ListView lv, TreeView tv)
        {
            if (lv == null || tv == null)
            {
                return;
            }

            if (lv.Focused)
            {
                if (lv.SelectedItems == null || lv.SelectedItems.Count != 1)
                {
                    return;
                }

                int index = IndexOfCamera(cameraSummaries, lv.SelectedItems[0].Name);
                if (index >= 0)
                {
                    CameraTypeManager.LoadCamera(cameraSummaries[index], -1);
                }
            }
            else if (tv.Focused)
            {
                if (tv.SelectedNode == null)
                {
                    return;
                }

                CaptureHistoryEntry entry = tv.SelectedNode.Tag as CaptureHistoryEntry;
                if (entry == null)
                {
                    return;
                }

                string path = entry.CaptureFile;
                if (path == null)
                {
                    return;
                }

                VideoTypeManager.LoadVideo(path, -1);
            }
        }