LicenseAcceptanceView CreateLicenseAcceptanceView(LicenseAcceptanceViewModel viewModel) { var view = new LicenseAcceptanceView(); view.DataContext = viewModel; view.Owner = Owner; return view; }
public LicenseAcceptanceDialog2 (LicenseAcceptanceViewModel viewModel) { this.Build (); this.viewModel = viewModel; this.subTitleHBoxForSinglePackage.Visible = viewModel.HasOnePackage; this.subTitleHBoxForMultiplePackages.Visible = viewModel.HasMultiplePackages; AddPackages (); }
public LicenseAcceptanceDialog (LicenseAcceptanceViewModel viewModel) { Height = 350; Resizable = false; Padding = 0; Title = GettextCatalog.GetString ("License Acceptance"); this.viewModel = viewModel; this.imageLoader = new ImageLoader (); this.imageLoader.Loaded += HandleImageLoaded; var titleLabel = new Label (); titleLabel.Text = GettextCatalog.GetPluralString ( "The following package requires that you accept its license terms before installing:", "The following packages require that you accept their license terms before installing:", viewModel.HasMultiplePackages ? 2 : 1); var descriptionLabel = new Label (); descriptionLabel.Wrap = WrapMode.Word; descriptionLabel.Markup = GettextCatalog.GetString ("By clicking <b>Accept</b> you agree to the license terms for the packages listed above.\n" + "If you do not agree to the license terms click <b>Decline</b>."); packagesList = new VBox (); packagesList.Spacing = 0; scroll = new ScrollView (packagesList); scroll.HorizontalScrollPolicy = ScrollPolicy.Never; scroll.VerticalScrollPolicy = ScrollPolicy.Automatic; scroll.BorderVisible = false; scroll.BackgroundColor = Ide.Gui.Styles.BackgroundColor; var container = new VBox (); container.MarginTop = container.MarginLeft = container.MarginRight = 15; container.PackStart (titleLabel); container.PackStart (scroll, true, true); container.PackEnd (descriptionLabel); Content = container; var declineButton = new DialogButton (GettextCatalog.GetString ("Decline"), Command.Cancel); var acceptButton = new DialogButton (GettextCatalog.GetString ("Accept"), Command.Ok); Buttons.Add (declineButton); Buttons.Add (acceptButton); AddPackages (); }
void CreateViewModel(IEnumerable<IPackage> packages) { viewModel = new LicenseAcceptanceViewModel(packages); }
void CreateViewModel(IEnumerable <IPackage> packages) { viewModel = new LicenseAcceptanceViewModel(packages); }
LicenseAcceptanceDialog CreateLicenseAcceptanceDialog (IEnumerable<NuGetPackageLicense> licenses) { var viewModel = new LicenseAcceptanceViewModel (licenses); return new LicenseAcceptanceDialog(viewModel); }
LicenseAcceptanceDialog CreateLicenseAcceptanceDialog(IEnumerable<IPackage> packages) { var viewModel = new LicenseAcceptanceViewModel(packages); return new LicenseAcceptanceDialog(viewModel); }