Esempio n. 1
0
            public ProblemListView(ProblemModel model)
            {
                this.model = model;
                SetModel(model);
                ColumnController = new ColumnController();

                var selected = new ColumnCellCheckBox("SavedSelected", true);

                selected.Toggled += (o, a) => model.Reload();
                ColumnController.Add(new Column(Catalog.GetString("Fix?"), selected, 0));

                var summary     = new ColumnCellSolutionOptions();
                var summary_col = new Column("", summary, 1.0);

                ColumnController.Add(summary_col);

                var track_details_col = new Column(Catalog.GetString("Track details"),
                                                   new ColumnCellText("TrackDetails", true), 0);

                ColumnController.Add(track_details_col);

                model.Reloaded += (o, a) => {
                    track_details_col.Visible = model.Solver.HasTrackDetails;
                    summary_col.Title         = model.Solver.Name;
                };

                RowOpaquePropertyName = "Selected";
                RulesHint             = true;
                RowActivated         += (o, e) => model.ToggleSelection();
            }
Esempio n. 2
0
        public ProblemModel()
        {
            instance  = this;
            Selection = new Hyena.Collections.Selection();

            Problem.Initialize();

            AddSolvers();
        }
        public View(ProblemModel model)
        {
            var view = new ProblemListView(model);
            var sw   = new Gtk.ScrolledWindow()
            {
                ShadowType  = ShadowType.None,
                BorderWidth = 0
            };

            sw.Add(view);

            Add(sw);
            ShowAll();
        }