Example #1
0
        public TunerReserveView()
        {
            InitializeComponent();

            base.scroll = scrollViewer;
            base.cnvs   = canvas;

            reserveViewPanel.Height = ViewUtil.GetScreenHeightMax();
            reserveViewPanel.Width  = ViewUtil.GetScreenWidthMax();
        }
Example #2
0
        public ProgramView()
        {
            InitializeComponent();

            base.scroll = scrollViewer;
            base.cnvs   = canvas;

            epgViewPanel.ReplaceDictionaryNormal = CommonManager.ReplaceDictionaryNormal;
            epgViewPanel.ReplaceDictionaryTitle  = CommonManager.ReplaceDictionaryTitle;
            epgViewPanel.Background  = CommonManager.Instance.EpgBackColor;
            epgViewPanel.ExtInfoMode = Settings.Instance.EpgExtInfoTable;
            epgViewPanel.Height      = ViewUtil.GetScreenHeightMax();
            epgViewPanel.Width       = ViewUtil.GetScreenWidthMax();
            epgViewPanel.SetBorderStyleFromSettings();

            popupItemPanel.ReplaceDictionaryNormal = epgViewPanel.ReplaceDictionaryNormal;
            popupItemPanel.ReplaceDictionaryTitle  = epgViewPanel.ReplaceDictionaryTitle;
            Canvas.SetLeft(popupItemPanel, 0);
        }
Example #3
0
        public Rect SetProgramList(List <PanelItem <List <ProgramViewItem> > > programGroupList, double height)
        {
            try
            {
                ClearEpgViewPanel();

                //枠線の調整用
                double totalWidth = 0;
                height = ViewUtil.SnapsToDevicePixelsY(height + epgViewPanel.HeightMarginBottom, 2);
                foreach (var programList in programGroupList)
                {
                    var item = new EpgViewPanel();
                    item.ReplaceDictionaryNormal = epgViewPanel.ReplaceDictionaryNormal;
                    item.ReplaceDictionaryTitle  = epgViewPanel.ReplaceDictionaryTitle;
                    item.Background = epgViewPanel.Background;
                    item.SetBorderStyleFromSettings();
                    item.Height = height;
                    item.Width  = programList.Width;
                    Canvas.SetLeft(item, totalWidth);
                    item.ExtInfoMode = epgViewPanel.ExtInfoMode;
                    item.Items       = programList.Data;
                    item.InvalidateVisual();
                    canvas.Children.Add(item);
                    totalWidth += programList.Width;
                }

                canvas.Width        = ViewUtil.SnapsToDevicePixelsX(totalWidth + epgViewPanel.WidthMarginRight, 2);
                canvas.Height       = height;
                epgViewPanel.Width  = Math.Max(canvas.Width, ViewUtil.SnapsToDevicePixelsX(ViewUtil.GetScreenWidthMax()));
                epgViewPanel.Height = Math.Max(canvas.Height, ViewUtil.SnapsToDevicePixelsY(ViewUtil.GetScreenHeightMax()));
            }
            catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); }
            return(new Rect(0, 0, canvas.Width, canvas.Height));
        }
Example #4
0
        public void SetReserveList(List <TunerReserveViewItem> reserveList, double width, double height)
        {
            try
            {
                reserveViewPanel.ReplaceDictionaryTitle = Settings.Instance.ApplyReplacePatternTuner ? CommonManager.ReplaceDictionaryTitle : null;
                PopPanel.ReplaceDictionaryTitle         = reserveViewPanel.ReplaceDictionaryTitle;
                reserveViewPanel.SetBorderStyleFromSettings();
                canvas.Width            = ViewUtil.SnapsToDevicePixelsX(width + reserveViewPanel.WidthMarginRight, 2);//右端のチューナ列の線を描画するため+1。他の+1も同じ。;
                canvas.Height           = ViewUtil.SnapsToDevicePixelsY(height + reserveViewPanel.HeightMarginBottom, 2);
                reserveViewPanel.Width  = Math.Max(canvas.Width, ViewUtil.SnapsToDevicePixelsX(ViewUtil.GetScreenWidthMax()));
                reserveViewPanel.Height = Math.Max(canvas.Height, ViewUtil.SnapsToDevicePixelsY(ViewUtil.GetScreenHeightMax()));
                reserveViewPanel.Items  = reserveList;
                reserveViewPanel.InvalidateVisual();

                PopUpWork();
                TooltipWork();
            }
            catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); }
        }