예제 #1
0
        void LoadIcons()
        {
            LMProject project = ViewModel.Model;

            notebookHelper = new Helpers.IconNotebookHelper(playsnotebook);
            notebookHelper.SetTabIcon(eventsScrolledWindow, "vas-category", "vas-category",
                                      Catalog.GetString("Both Teams"));
            if (project.LocalTeamTemplate.Shield != null)
            {
                var localIcon = project.LocalTeamTemplate.Shield;
                notebookHelper.SetTabIcon(homescrolledwindow, localIcon, localIcon, project.LocalTeamTemplate.Name);
            }
            else
            {
                notebookHelper.SetTabIcon(homescrolledwindow, "vas-default-shield", "vas-default-shield",
                                          project.LocalTeamTemplate.Name);
            }

            if (project.VisitorTeamTemplate.Shield != null)
            {
                var visitorIcon = project.VisitorTeamTemplate.Shield;
                notebookHelper.SetTabIcon(awayscrolledwindow, visitorIcon, visitorIcon, project.VisitorTeamTemplate.Name);
            }
            else
            {
                notebookHelper.SetTabIcon(awayscrolledwindow, "vas-default-shield", "vas-default-shield",
                                          project.VisitorTeamTemplate.Name);
            }

            notebookHelper.UpdateTabs();
        }
예제 #2
0
        Notebook CreateNewWindow(Notebook source, Widget page, int x, int y)
        {
            Helpers.ExternalWindow window;
            EventBox box;
            Notebook notebook;

            window = new Helpers.ExternalWindow();
            if (page == timeline)
            {
                window.Title = Catalog.GetString("Timeline");
            }
            else if (page == dashboardhpaned)
            {
                window.Title = Catalog.GetString("Analysis dashboard");
            }
            else if (page == playspositionviewer1)
            {
                window.Title = Catalog.GetString("Zonal tags viewer");
            }

            notebook          = new Notebook();
            notebook.ShowTabs = false;
            notebook.CanFocus = false;
            //notebook.Group = source.Group;

            window.Add(notebook);
            window.SetDefaultSize(page.Allocation.Width, page.Allocation.Height);
            window.Move(x, y);
            window.ShowAll();
            activeWindows.Add(window);
            window.DeleteEvent += (o, args) => {
                Widget pa = notebook.CurrentPageWidget;
                activeWindows.Remove(window);
                notebook.Remove(pa);
                Visible = true;
                source.AppendPage(pa, null);
                notebookHelper.UpdateTabs();
                notebook.Destroy();
            };

            /* If we are remove the last visible page, hide the widget to
             * free the empty space for the rest of widgets */
            int visiblePages = 0;

            for (int i = 0; i < source.NPages; i++)
            {
                if (source.GetNthPage(i).Visible)
                {
                    visiblePages++;
                }
            }
            if (visiblePages == 1)
            {
                Visible = false;
            }
            return(notebook);
        }
예제 #3
0
        public void LoadIcons()
        {
            notebookHelper = new Helpers.IconNotebookHelper(notebook);
            notebookHelper.SetTabIcon(timeline, "lm-tab-timeline", "lm-tab-active-timeline",
                                      Catalog.GetString("Timeline view"));
            notebookHelper.SetTabIcon(dashboardhpaned, "lm-tab-dashboard", "lm-tab-active-dashboard",
                                      Catalog.GetString("Coding View"));
            notebookHelper.SetTabIcon(playspositionviewer1, "lm-tab-position", "lm-tab-active-position",
                                      Catalog.GetString("Zonal tags"));
            notebookHelper.SetTabIcon(eventslistwidget, "lm-tab-dashboard", "lm-tab-active-dashboard",
                                      Catalog.GetString("Events list"));

            notebookHelper.UpdateTabs();
        }
예제 #4
0
        public void LoadIcons()
        {
            notebookHelper = new Helpers.IconNotebookHelper (notebook);
            notebookHelper.SetTabIcon (timeline, "longomatch-tab-timeline", "longomatch-tab-active-timeline",
                Catalog.GetString ("Timeline view"));
            notebookHelper.SetTabIcon (dashboardhpaned, "longomatch-tab-dashboard", "longomatch-tab-active-dashboard",
                Catalog.GetString ("Coding View"));
            notebookHelper.SetTabIcon (playspositionviewer1, "longomatch-tab-position", "longomatch-tab-active-position",
                Catalog.GetString ("Zonal tags"));
            notebookHelper.SetTabIcon (eventslistwidget, "longomatch-tab-dashboard", "longomatch-tab-active-dashboard",
                Catalog.GetString ("Events list"));

            notebookHelper.UpdateTabs ();
        }
예제 #5
0
        void LoadIcons()
        {
            notebookHelper = new Helpers.IconNotebookHelper (playsnotebook);
            notebookHelper.SetTabIcon (playsList, "longomatch-category", "longomatch-category",
                Catalog.GetString ("Both Teams"));
            if (project.LocalTeamTemplate.Shield != null) {
                var localIcon = project.LocalTeamTemplate.Shield.Scale (StyleConf.NotebookTabIconSize,
                                    StyleConf.NotebookTabIconSize).Value;
                notebookHelper.SetTabIcon (localPlayersList, localIcon, localIcon, project.LocalTeamTemplate.Name);
            } else {
                notebookHelper.SetTabIcon (localPlayersList, "longomatch-default-shield", "longomatch-default-shield",
                    project.LocalTeamTemplate.Name);
            }

            if (project.VisitorTeamTemplate.Shield != null) {
                var visitorIcon = project.VisitorTeamTemplate.Shield.Scale (StyleConf.NotebookTabIconSize,
                                      StyleConf.NotebookTabIconSize).Value;
                notebookHelper.SetTabIcon (visitorPlayersList, visitorIcon, visitorIcon, project.VisitorTeamTemplate.Name);
            } else {
                notebookHelper.SetTabIcon (visitorPlayersList, "longomatch-default-shield", "longomatch-default-shield",
                    project.VisitorTeamTemplate.Name);
            }

            notebookHelper.UpdateTabs ();
        }
예제 #6
0
        void LoadIcons()
        {
            notebookHelperFilter = new IconNotebookHelper (notebookFilter);
            notebookHelperFilter.SetTabIcon (filtersvbox, "longomatch-tab-filter", "longomatch-tab-active-filter",
                Catalog.GetString ("Filters"));
            notebookHelperPlaylist = new IconNotebookHelper (notebookPlaylist);
            notebookHelperPlaylist.SetTabIcon (playlistwidget, "longomatch-tab-playlist", "longomatch-tab-active-playlist",
                Catalog.GetString ("Playlists"));
            notebookHelper = new IconNotebookHelper (notebook);
            notebookHelper.SetTabIcon (eventslistwidget, "longomatch-tab-dashboard", "longomatch-tab-active-dashboard",
                Catalog.GetString ("Events List"));
            notebookHelper.SetTabIcon (filtersvbox, "longomatch-tab-filter", "longomatch-tab-active-filter",
                Catalog.GetString ("Filters"));
            notebookHelper.SetTabIcon (playlistwidget, "longomatch-tab-playlist", "longomatch-tab-active-playlist",
                Catalog.GetString ("Playlists"));

            notebookHelper.UpdateTabs ();
        }