/// <inheritdoc /> public override void AwakeFromNib() { base.AwakeFromNib(); DropFilesHereText.AlphaValue = 0.25f; View.Controller = this; View.PropertyChanged += HandleDataContextChanged; this.SetValue(MenuLayoutCommandGroup.NewDirectoryCommand.UniqueId, NewFolderButton); this.SetValue(MenuLayoutCommandGroup.DeleteItemsCommand.UniqueId, RemoveItemButton); this.SetValue(MenuLayoutCommandGroup.SetColorCommand.UniqueId, ItemColorWell); this.InitializeCommandsInAwakeFromNib(); var outlineView = View.FindChild <MenuOutlineView>(); TheDelegate = new OutlineViewDelegate(MenuLayoutController, LtoFlashViewModel); TheDataSource = new OutlineViewDataSource(MenuLayoutController); outlineView.Controller = this; outlineView.Delegate = TheDelegate; outlineView.DataSource = TheDataSource; outlineView.RegisterForDraggedTypes(new string[] { MenuLayoutViewModel.DragDataFormat, ProgramDescriptionViewModel.DragDataFormat }); outlineView.SetDraggingSourceOperationMask(NSDragOperation.Move, true); DeviceCommandGroup.Group.InitializeConnectionMenu(LtoFlashViewModel); PowerStateIcon.Image = typeof(CommandGroup).LoadImageResource("ViewModel/Resources/Images/console_16xLG.png"); PowerStateIcon.ToolTip = LtoFlashViewModel.ActiveLtoFlashDevice.PowerState; PowerStateIcon.Enabled = LtoFlashViewModel.ActiveLtoFlashDevice.IsValid && LtoFlashViewModel.ActiveLtoFlashDevice.Device.HardwareStatus.HasFlag(HardwareStatusFlags.ConsolePowerOn); ConnectionIcon.Image = this.LoadImageResource("Resources/Images/connected_16x16.png"); ConnectionIcon.ToolTip = LtoFlashViewModel.ActiveLtoFlashDevice.DisplayName; ConnectionIcon.Enabled = LtoFlashViewModel.ActiveLtoFlashDevice.IsValid; MenuDifferencesIcon.Hidden = !LtoFlashViewModel.ShowFileSystemsDifferIcon; MenuDifferencesIcon.Image = this.LoadImageResource("Resources/Images/lto_flash_contents_not_in_sync_16xLG.png"); }
ViewHierarchyViewController(IntPtr handle) : base(handle) { dataSource = new InspectViewDataSource(); outlineViewDelegate = new OutlineViewDelegate(this); }