Exemple #1
0
        /// <summary>Constructor</summary>
        public ReportView(ViewBase owner) : base(owner)
        {
            Builder builder = BuilderFromResource("ApsimNG.Resources.Glade.ReportView.glade");

            notebook1  = (Notebook)builder.GetObject("notebook1");
            vbox1      = (VBox)builder.GetObject("vbox1");
            vbox2      = (VBox)builder.GetObject("vbox2");
            alignment1 = (Alignment)builder.GetObject("alignment1");

            panel         = (VPaned)builder.GetObject("vpaned1");
            panel.Events |= Gdk.EventMask.PropertyChangeMask;
            panel.AddNotification(OnPropertyNotified);

            groupByEdit = new EditView(owner,
                                       (Entry)builder.GetObject("groupByEdit"));

            mainWidget = notebook1;

            variableEditor = new EditorView(this);
            variableEditor.StyleChanged += OnStyleChanged;
            vbox1.PackStart(variableEditor.MainWidget, true, true, 0);

            frequencyEditor = new EditorView(this);
            frequencyEditor.StyleChanged += OnStyleChanged;
            vbox2.PackStart(frequencyEditor.MainWidget, true, true, 0);

            dataStoreView1 = new ViewBase(this, "ApsimNG.Resources.Glade.DataStoreView.glade");
            alignment1.Add(dataStoreView1.MainWidget);
            mainWidget.Destroyed += _mainWidget_Destroyed;
        }
        public NowPlayingPanelController(AudioPlayer audioPlayer, ITrackSelector trackSelector)
        {
            if (_settings.VPanedPosition == 0)
                _settings.VPanedPosition = 500;

            _nowPlayingTrackListViewController = new NowPlayingTrackListViewController(audioPlayer);
            _coverArtPanel = new CoverArtPanel(audioPlayer, trackSelector, _nowPlayingTrackListViewController);

            View = new VPaned();
            View.Pack1(_nowPlayingTrackListViewController.View, true, true);
            View.Pack2(_coverArtPanel, true, true);

            View.Position = _settings.VPanedPosition;
            View.PositionSet = true;

            View.AddNotification("position", (o, args) =>
                {
                    _settings.VPanedPosition = View.Position;
                });
        }