/// <summary> /// Populates the view ViewModel. /// </summary> /// <returns> /// </returns> public override void HandleViewDataLoadEvent() { BaseCL.RoutineEntry("AttributeDetailViewModel"); HLinkAttributeObject = CommonRoutines.GetHLinkParameter <HLinkAttributeModel>(BaseParamsHLink); if (HLinkAttributeObject.Valid) { AttributeObject = HLinkAttributeObject.DeRef; BaseModelBase = AttributeObject; // Get the Attribute Details BaseDetail.Add(new CardListLineCollection("Attribute Detail") { new CardListLine("Type:", AttributeObject.GType), new CardListLine("Value:", AttributeObject.GValue), }); // Add Standard details BaseDetail.Add(CommonRoutines.GetModelInfoFormatted(AttributeObject)); } return; }
private void filterSelection_ReloadForDate(object sender, EventArgs e) { ProxyType directiveSource = parentBaseDetail; if (!filterSelection.ReloadAsDateOf) { if (directiveSource.ProvideCurrentData) { return; } directiveSource = directiveSource.CloneForCurrentData(); } else { if (directiveSource.DateAsOf != filterSelection.DateSelected || !directiveSource.ProvideCurrentData) { directiveSource = directiveSource.CloneAsDateOf(filterSelection.DateSelected); } else { return; } } parentBaseDetail = (BaseDetail)directiveSource; UpdateDirectives(); }
/// <summary> /// Handles navigation in wards and sets up the event model parameter. /// </summary> /// <param name="e"> /// The <see cref="NavigatedToEventArgs"/> instance containing the event data. /// </param> /// <param name="viewModelState"> /// The parameter is not used. /// </param> public override void PopulateViewModel() { // Handle HLinkKeys CitationObject = DV.CitationDV.GetModelFromHLinkString(BaseNavParamsHLink.HLinkKey); if (CitationObject != null) { BaseTitle = CitationObject.GetDefaultText; BaseTitleIcon = CommonConstants.IconCitation; // Get media image HLinkHomeImageModel mediaImage = CitationObject.HomeImageHLink; mediaImage.CardType = DisplayFormat.MediaCardLarge; BaseDetail.Add(mediaImage); //// Get Note //CardGroup noteCardGroup = new CardGroup(); //NoteCardFull noteCard = new NoteCardFull(); //noteCard.BindingContext = CitationObject.GetFirstModel; //noteCardGroup.Add(noteCard); //BaseDetail.Add(noteCardGroup); // Get basic details CardGroup t = new CardGroup { Title = "Header Details" }; t.Add(new CardListLineCollection { new CardListLine("Card Type:", "Citation Detail"), new CardListLine("Date:", CitationObject.GDateContent.GetLongDateAsString), new CardListLine("Page:", CitationObject.GPage), new CardListLine("Confidence:", CitationObject.GConfidence.ToString(CultureInfo.CurrentCulture)), }); t.Add(DV.CitationDV.GetModelInfoFormatted(CitationObject)); BaseDetail.Add(t); // Add Source details HLinkSourceModel sourceCard = CitationObject.GSourceRef; sourceCard.CardType = DisplayFormat.SourceCardSmall; BaseDetail.Add(sourceCard); // If only one note (the most common case) just display it in a large format, // otherwise setup a list of them. if (CitationObject.GNoteRefCollection.Count > 0) { // TODO Fix this NoteObject = CitationObject.GNoteRefCollection[0].DeRef; } // Add remaining details BaseDetail.Add(CitationObject.GMediaRefCollection.GetCardGroup()); BaseDetail.Add(CitationObject.GNoteRefCollection.GetCardGroup()); BaseDetail.Add(CitationObject.GTagRef.GetCardGroup()); BaseDetail.Add(CitationObject.GSourceAttributeCollection); BaseDetail.Add(CitationObject.BackHLinkReferenceCollection.GetCardGroup()); } }
/// <summary> /// Populates the view ViewModel. /// </summary> /// <returns> /// </returns> public override void HandleViewDataLoadEvent() { BaseCL.RoutineEntry("DateDetailViewModel"); HLinkDateModelSpan HLinkObject = CommonRoutines.GetHLinkParameter <HLinkDateModelSpan>(BaseParamsHLink); BaseTitle = HLinkObject.Title; DateObject = HLinkObject.DeRef; if (DateObject.Valid) { BaseModelBase = DateObject; /* * General Details */ // Get the Base Date Details BaseDetail.Add(DateObject.AsCardListLineBaseDate()); BaseDetail.Add(DateObject.AsCardListLineBaseDateDetail()); BaseDetail.Add(DateObject.AsCardListLineBaseDateInternal()); BaseDetail.Add((DateObject as IDateObjectModelSpan).AsCardListLine()); } return; }
/// <summary> /// Populates the view ViewModel. /// </summary> /// <returns> /// </returns> public override void HandleViewDataLoadEvent() { HLinkSourceModel HLinkObject = CommonRoutines.GetHLinkParameter <HLinkSourceModel>((BaseParamsHLink)); // Cache the Source model SourceObject = HLinkObject.DeRef; if (!(SourceObject is null)) { // Get basic details BaseModelBase = SourceObject; // MediaCard = SourceObject.ModelItemGlyph; // Header Card BaseDetail.Add(new CardListLineCollection("Source Detail") { new CardListLine("Title:", SourceObject.GSTitle), new CardListLine("Author:", SourceObject.GSAuthor), new CardListLine("Pub Info:", SourceObject.GSPubInfo), new CardListLine("Abbrev:", SourceObject.GSAbbrev), }); // Add Model details BaseDetail.Add(DV.SourceDV.GetModelInfoFormatted(SourceObject)); } }
/// <summary> /// Handles navigation inwards and sets up the repository model parameter. /// </summary> public override void PopulateViewModel() { RepositoryObject = DV.RepositoryDV.GetModelFromHLink(BaseNavParamsHLink); if (!(RepositoryObject == null)) { BaseTitle = RepositoryObject.GetDefaultText; BaseTitleIcon = CommonConstants.IconRepository; // Get basic details CardGroup t = new CardGroup { Title = "Header Details" }; t.Add(new CardListLineCollection { new CardListLine("Card Type:", "Repository Detail"), new CardListLine("Name:", RepositoryObject.GRName), new CardListLine("Type:", RepositoryObject.GType), }); t.Add(DV.RepositoryDV.GetModelInfoFormatted(RepositoryObject)); BaseDetail.Add(t); // Add details BaseDetail.Add(RepositoryObject.GNoteRefCollection.GetCardGroup()); BaseDetail.Add(RepositoryObject.GTagRefCollection.GetCardGroup()); BaseDetail.Add(RepositoryObject.GAddress.GetCardGroup()); BaseDetail.Add(RepositoryObject.GURL); BaseDetail.Add(RepositoryObject.BackHLinkReferenceCollection.GetCardGroup()); } }
/// <summary> /// Создается отображение Component Ststus - списка агрегатов для ВС /// </summary> /// <param name="currentBaseDetail"></param> /// <param name="initialFilter"></param> /// <param name="reportBuilder"></param> public DispatcheredComponentStatusControl(BaseDetail currentBaseDetail, DetailCollectionFilter initialFilter, DetailListReportBuilder reportBuilder) : base(currentBaseDetail, initialFilter) { detailContainer = currentBaseDetail; this.initialFilter = initialFilter; ReportBuilder = reportBuilder; Dock = DockStyle.Fill; }
/// <summary> /// Handles navigation inwards and sets up the repository model parameter. /// </summary> public override void HandleViewDataLoadEvent() { RepositoryHLink = CommonRoutines.GetHLinkParameter <HLinkRepositoryRefModel>(BaseParamsHLink); RepositoryObject = RepositoryHLink.DeRef; if (!(RepositoryObject == null)) { BaseTitle = RepositoryObject.ToString(); BaseTitleIcon = Constants.IconRepository; BaseDetail.Add(new CardListLineCollection("Repostiory Ref Detail") { new CardListLine("Type:", "Repostiory Ref"), }); BaseDetail.Add(new CardListLineCollection("Call Details") { new CardListLine("Call No:", RepositoryHLink.GCallNo), new CardListLine("Medium:", RepositoryHLink.GMedium), }); BaseDetail.Add(RepositoryHLink.DeRef.HLink); BaseDetail.Add(DV.RepositoryDV.GetModelInfoFormatted(RepositoryObject)); } }
/// <summary> /// Populates the view ViewModel. /// </summary> public override void HandleViewDataLoadEvent() { HLinkNoteModel HLinkObject = CommonRoutines.GetHLinkParameter <HLinkNoteModel>((BaseParamsHLink)); if (!(HLinkObject is null) && HLinkObject.Valid) { NoteObject = HLinkObject.DeRef; BaseModelBase = NoteObject; // Get basic details BaseDetail.Add(new CardListLineCollection("Note Detail") { new CardListLine("Type:", NoteObject.GType), new CardListLine("Formatted:", NoteObject.GIsFormated), }); // Add Model details BaseDetail.Add(DV.NoteDV.GetModelInfoFormatted((NoteModel)NoteObject)); // Handle Link Note types if (NoteObject.GType == Constants.NoteTypeLink) { URLModel newLinkURL = new URLModel { GDescription = NoteObject.ToString(), GHRef = new Uri(NoteObject.TextShort) }; BaseDetail.Add(newLinkURL); } } }
/// <summary> /// Populates the view ViewModel. /// </summary> /// <returns> /// Task. /// </returns> public override void HandleViewDataLoadEvent() { HLinkFamilyModel HLinkFamily = CommonRoutines.GetHLinkParameter <HLinkFamilyModel>(BaseParamsHLink); FamilyObject = HLinkFamily.DeRef; if (!(FamilyObject is null)) { BaseModelBase = FamilyObject; BaseTitleIcon = Constants.IconFamilies; // Get basic details BaseDetail.Add(new CardListLineCollection("Family Detail") { new CardListLine("Family Display Name:", FamilyObject.ToString()), new CardListLine("Family Relationship:", FamilyObject.GFamilyRelationship), new CardListLine("Father Name:", FamilyObject.GFather.DeRef.GPersonNamesCollection.GetPrimaryName.DeRef.FullName), new CardListLine("Mother Name:", FamilyObject.GMother.DeRef.GPersonNamesCollection.GetPrimaryName.DeRef.FullName), new CardListLine("Date:", FamilyObject.GDate.LongDate), }); // Add Model details BaseDetail.Add(DV.FamilyDV.GetModelInfoFormatted(FamilyObject)); // Add parent link BaseDetail.Add(new HLinkParentLinkModel { DeRef = localFamilyModel, }); } }
/// <summary> /// Handles navigation inwards and sets up the repository model parameter. /// </summary> public override void PopulateViewModel() { RepositoryObject = DV.RepositoryDV.GetModelFromHLink(BaseNavParamsHLink); if (!(RepositoryObject == null)) { BaseTitle = RepositoryObject.GetDefaultText; BaseTitleIcon = CommonConstants.IconRepository; // Trigger refresh of View fields via INotifyPropertyChanged RaisePropertyChanged(string.Empty); // Get basic details //CardGroup t = new CardGroup { Title = "Header Details" }; BaseDetail.Add(new CardListLineCollection { new CardListLine("Card Type:", "Repository Detail"), new CardListLine("Name:", RepositoryObject.GRName), new CardListLine("Type:", RepositoryObject.GType), }); BaseDetail.Add(DV.RepositoryDV.GetModelInfoFormatted(RepositoryObject)); //BaseDetail.Add(t); // Add details BaseDetail.Add(RepositoryObject.GNoteRefCollection.GetCardGroup()); BaseDetail.Add(RepositoryObject.GTagRefCollection.GetCardGroup()); BaseDetail.Add(RepositoryObject.GAddress.GetCardGroup()); BaseDetail.Add(RepositoryObject.GURL); } }
/// <summary> /// Populates the view ViewModel. /// </summary> public override void PopulateViewModel() { HLinkNoteModel HLinkObject = BaseNavParamsHLink as HLinkNoteModel; if (!(HLinkObject is null) && (HLinkObject.Valid)) { NoteObject = HLinkObject.DeRef; // Trigger refresh of View fields via INotifyPropertyChanged RaisePropertyChanged(string.Empty); BaseTitle = NoteObject.GetDefaultText; // Get basic details // CardGroup basicHeaderDetails = new CardGroup { Title = "Header Details" }; BaseDetail.Add(new CardListLineCollection { new CardListLine("Card Type:", "Note Detail"), new CardListLine("Type:", NoteObject.GType), new CardListLine("Formatted:", NoteObject.GIsFormated), }); // Add Model details BaseDetail.Add(DV.NoteDV.GetModelInfoFormatted((NoteModel)NoteObject)); //BaseDetail.Add(basicHeaderDetails); } }
/// <summary> /// Handles navigation in wards and sets up the event model parameter. /// </summary> /// <param name="e"> /// The <see cref="NavigatedToEventArgs"/> instance containing the event data. /// </param> /// <param name="viewModelState"> /// The parameter is not used. /// </param> public override void PopulateViewModel() { TagObject = DV.TagDV.GetModelFromHLinkString(BaseNavParamsHLink.HLinkKey); if (!(TagObject is null)) { BaseTitle = "Tag Detail"; BaseTitleIcon = CommonConstants.IconTag; // Get Headers CardGroup t = new CardGroup { Title = "Header Details" }; t.Add(new CardListLineCollection { new CardListLine("Card Type:", "Tag Detail"), new CardListLine("Name:", TagObject.GName), new CardListLine("Priority:", TagObject.GPriority.ToString(System.Globalization.CultureInfo.CurrentCulture)), new CardListLine("Private:", TagObject.PrivAsString), }); t.Add(DV.TagDV.GetModelInfoFormatted(TagObject)); BaseDetail.Add(t); // Add Details BaseDetail.Add(TagObject.BackHLinkReferenceCollection.GetCardGroup()); // TODO , "BackLinks"); } return; }
/// <summary> /// Gets or sets the citation object. /// </summary> /// <value> /// The citation object. /// </value> public override void HandleViewDataLoadEvent() { // Handle HLinkKeys HLinkCitationModel HLinkCitation = CommonRoutines.GetHLinkParameter <HLinkCitationModel>(BaseParamsHLink); CitationObject = HLinkCitation.DeRef; if (CitationObject != null) { BaseModelBase = CitationObject; BaseTitleIcon = Constants.IconCitation; BaseDetail.Add(new CardListLineCollection("Citation Detail") { new CardListLine("Page:", CitationObject.GPage), new CardListLine("Confidence:", CitationObject.GConfidence.ToString()) }); // Get date card BaseDetail.Add(CitationObject.GDateContent.AsHLink("Event Date")); BaseDetail.Add(DV.CitationDV.GetModelInfoFormatted(CitationObject)); // If event note, display it while showing the full list further below. HighlightedNote = CitationObject.GNoteRefCollection.GetFirstOfType(Constants.NoteTypeCitation); NotesWithoutHighlight = CitationObject.GNoteRefCollection.GetCollectionWithoutOne(HighlightedNote); CitationObject.GSourceRef.DisplayAs = CommonEnums.DisplayFormat.LargeCard; BaseDetail.Add(CitationObject.GSourceRef); } }
/// <summary> /// Handles navigation in wards and sets up the event model parameter. /// </summary> /// <param name="e"> /// The <see cref="NavigatedToEventArgs"/> instance containing the event data. /// </param> /// <param name="viewModelState"> /// The parameter is not used. /// </param> public override void PopulateViewModel() { TagObject = DV.TagDV.GetModelFromHLinkString(BaseNavParamsHLink.HLinkKey); // Trigger refresh of View fields via INotifyPropertyChanged RaisePropertyChanged(string.Empty); if (!(TagObject is null)) { BaseTitle = "Tag Detail"; BaseTitleIcon = CommonConstants.IconTag; // Get Headers //CardGroup t = new CardGroup { Title = "Header Details" }; BaseDetail.Add(new CardListLineCollection { new CardListLine("Card Type:", "Tag Detail"), new CardListLine("Name:", TagObject.GName), new CardListLine("Priority:", TagObject.GPriority.ToString(System.Globalization.CultureInfo.CurrentCulture)), new CardListLine("Private:", TagObject.PrivAsString), }); BaseDetail.Add(DV.TagDV.GetModelInfoFormatted(TagObject)); //BaseDetail.Add(t); } return; }
private static void toolStripMenuItemMoveToStore_Click(object sender, EventArgs e) { ToolStripMenuItem toolStripMenuItem = (ToolStripMenuItem)sender; ContextMenuStrip contextMenuStrip = (ContextMenuStrip)toolStripMenuItem.Owner; BaseDetail baseDetail = (BaseDetail)contextMenuStrip.Tag; MoveDetailForm form = new MoveDetailForm(baseDetail, MoveDetailFormMode.MoveToStore, null); form.ShowDialog(); }
/// <summary> /// Создается элемент управления для отбражения нароботок базовой детали /// </summary> /// <param name="baseDetail"></param> public AircraftBaseDetailItem(BaseDetail baseDetail) { this.baseDetail = baseDetail; name = baseDetail.GetType().Name; serialNumber = baseDetail.SerialNumber; condition = baseDetail.Condition; InitializeComponent(); InitializeItem(); }
/// <summary> /// Populates the view ViewModel. /// </summary> /// <returns> /// </returns> public override void PopulateViewModel() { BaseCL.LogRoutineEntry("AddressDetailViewModel"); AddressObject = DV.AddressDV.GetModelFromHLink(BaseNavParamsHLink); if (AddressObject.Valid) { // Trigger refresh of View fields via INotifyPropertyChanged RaisePropertyChanged(string.Empty); BaseTitle = AddressObject.GetDefaultText; // Get media image MediaCard = AddressObject.HomeImageHLink.ConvertToHLinkMediaModel; // Get Header Details //CardGroup headerCardGroup = new CardGroup { }; // Get the Name Details CardListLineCollection nameDetails = new CardListLineCollection { new CardListLine("Card Type:", "Address Detail"), new CardListLine("Street:", AddressObject.GStreet), new CardListLine("City:", AddressObject.GCity), new CardListLine("Locality:", AddressObject.GLocality), new CardListLine("County:", AddressObject.GCounty), new CardListLine("State:", AddressObject.GState), new CardListLine("Country:", AddressObject.GCountry), new CardListLine("Date:", AddressObject.GDate.ShortDate), new CardListLine("Postal:", AddressObject.GPostal), new CardListLine("Phone:", AddressObject.GPhone), }; // Get date card BaseDetail.Add(AddressObject.GDate.AsCardListLine()); BaseDetail.Add(nameDetails); // Add Standard details BaseDetail.Add(DV.PersonDV.GetModelInfoFormatted(AddressObject)); // Add map card BaseDetail.Add(TurnAddressToURLModel()); // Add header //BaseDetail.Add(headerCardGroup); BaseDetail.Add(AddressObject.GCitationRefCollection.GetCardGroup()); BaseDetail.Add(AddressObject.GNoteRefCollection.GetCardGroup()); } return; }
/// <summary> /// Populates the view ViewModel. /// </summary> /// <returns> /// </returns> public override void PopulateViewModel() { BaseCL.LogRoutineEntry("AddressDetailViewModel"); AddressObject = DV.AddressDV.GetModelFromHLink(BaseNavParamsHLink); if (AddressObject.Valid) { BaseTitle = AddressObject.GetDefaultText; // Get media image HLinkHomeImageModel AddressImage = AddressObject.HomeImageHLink; AddressImage.CardType = DisplayFormat.MediaCardLarge; BaseDetail.Add(AddressImage); // Get Header Details CardGroup headerCardGroup = new CardGroup { Title = "Address Details" }; // Get the Name Details CardListLineCollection nameDetails = new CardListLineCollection { new CardListLine("Card Type:", "Address Detail"), new CardListLine("Street:", AddressObject.GStreet), new CardListLine("City:", AddressObject.GCity), new CardListLine("Locality:", AddressObject.GLocality), new CardListLine("County:", AddressObject.GCounty), new CardListLine("State:", AddressObject.GState), new CardListLine("Country:", AddressObject.GCountry), new CardListLine("Date:", AddressObject.GDate.ShortDate), new CardListLine("Postal:", AddressObject.GPostal), new CardListLine("Phone:", AddressObject.GPhone), }; headerCardGroup.Add(nameDetails); // Add Standard details headerCardGroup.Add(DV.PersonDV.GetModelInfoFormatted(AddressObject)); // Add map card headerCardGroup.Add(TurnAddressToURLModel()); // Add header BaseDetail.Add(headerCardGroup); BaseDetail.Add(AddressObject.GCitationRefCollection.GetCardGroup()); BaseDetail.Add(AddressObject.GNoteRefCollection.GetCardGroup()); BaseDetail.Add(AddressObject.BackHLinkReferenceCollection.GetCardGroup()); } return; }
/// <summary> /// Создается объект для отображения базового агрегата /// </summary> /// <param name="detail">Отображаемый объект</param> public BaseDetailControl(BaseDetail detail) { if (null == detail) { throw new ArgumentNullException("detail", "Cannot be null"); } currentBaseDetail = detail; InitializeComponent(); UpdateInformation(); }
/// <summary> /// Populates the view ViewModel. /// </summary> public override void PopulateViewModel() { HLinkEventModel HLinkObject = BaseNavParamsHLink as HLinkEventModel; if (!(HLinkObject is null) && (HLinkObject.Valid)) { EventObject = HLinkObject.DeRef; // Trigger refresh of View fields via INotifyPropertyChanged RaisePropertyChanged(string.Empty); if (!(EventObject is null) && (EventObject.Valid)) { BaseTitle = EventObject.GDescription; BaseTitleIcon = CommonConstants.IconEvents; // Get basic details //CardGroup t = new CardGroup { Title = "Header Details" }; BaseDetail.Add(new CardListLineCollection { new CardListLine("Card Type:", "Event Detail"), new CardListLine("Type:", EventObject.GType), new CardListLine("Role", HLinkObject.GRole), new CardListLine("Event Age:", EventObject.GDate.GetAge), }); // Get date card BaseDetail.Add(EventObject.GDate.AsCardListLine()); // Add Model details BaseDetail.Add(DV.EventDV.GetModelInfoFormatted(localEventObject)); // Add the description and event place card CardListLineCollection t1 = new CardListLineCollection { new CardListLine("Description", EventObject.GDescription) }; BaseDetail.Add(t1); BaseDetail.Add(EventObject.GPlace); //BaseDetail.Add(t); BaseDetail.Add(HLinkObject.GAttributeRefCollection); BaseDetail.Add(HLinkObject.GNoteRefCollection.GetCardGroup()); //BaseDetail.Add(EventObject.GAttribute); //BaseDetail.Add(EventObject.GCitationRefCollection.GetCardGroup()); //BaseDetail.Add(EventObject.GMediaRefCollection.GetCardGroup()); //BaseDetail.Add(EventObject.GNoteRefCollection.GetCardGroup()); //BaseDetail.Add(EventObject.GTagRefCollection.GetCardGroup()); } } }
/// <summary> /// Populate the Hub View. /// </summary> public override async Task <bool> PopulateViewModelAsync() { // Get Header CardLarge HLinkHeaderModel HeaderCard = DV.HeaderDV.HeaderDataModel.HLink; HeaderCard.CardType = DisplayFormat.HeaderCardLarge; BaseDetail.Add(HeaderCard); HLinkMediaModel HeroImage = DV.MediaDV.GetRandomFromCollection(null); HeroImage.CardType = DisplayFormat.MediaCardLarge; BaseDetail.Add(HeroImage); if (HeroImage == null) { DataStore.CN.NotifyAlert("No images found in this data. Consider adding some."); } // Setup ToDo list ObservableCollection <NoteModel> t = DV.NoteDV.GetAllOfType(NoteModel.GTypeToDo); CardGroup temp = new CardGroup(); foreach (NoteModel item in t) { temp.Add(item.HLink); } temp.Title = "ToDo list"; BaseDetail.Add(temp); // Setup Latest Changes list // TODO fix this LatestChanges.Add(DV.BookMarkDV.GetLatestChanges()); BaseDetail.Add(DV.CitationDV.GetLatestChanges()); BaseDetail.Add(DV.EventDV.GetLatestChanges()); BaseDetail.Add(DV.FamilyDV.GetLatestChanges()); BaseDetail.Add(DV.MediaDV.GetLatestChanges()); BaseDetail.Add(DV.NoteDV.GetLatestChanges()); BaseDetail.Add(DV.PersonDV.GetLatestChanges()); BaseDetail.Add(DV.PlaceDV.GetLatestChanges()); BaseDetail.Add(DV.SourceDV.GetLatestChanges()); BaseDetail.Add(DV.TagDV.GetLatestChanges()); return(true); }
///<summary> /// Создается объект, описывающий отображение добавления директивы ///</summary> /// <param name="parentBaseDetail">Родительский объект, в который добавляется директива</param> public OutOffPhaseReferencAdding(BaseDetail parentBaseDetail) : this() { if (parentBaseDetail == null) { throw new ArgumentNullException("parentBaseDetail"); } this.parentBaseDetail = parentBaseDetail; aircraftHeader.Aircraft = parentBaseDetail.ParentAircraft; ClearFields(); }
///<summary> /// Создается объект, описывающий отображение добавления директивы ///</summary> /// <param name="parentBaseDetail">Родительский объект, в который добавляется директива</param> public DamageDirectiveAddingScreen(BaseDetail parentBaseDetail) : this() { if (parentBaseDetail == null) { throw new ArgumentNullException("parentBaseDetail"); } this.parentBaseDetail = parentBaseDetail; aircraftHeader.Aircraft = parentBaseDetail.ParentAircraft; ClearFields(); }
/// <summary> /// Gets or sets the public Place ViewModel. /// </summary> /// <summary> /// Handles navigation inwards and sets up the place model parameter. /// </summary> public override void HandleViewDataLoadEvent() { HLinkPlaceModel HLinkObject = CommonRoutines.GetHLinkParameter <HLinkPlaceModel>(BaseParamsHLink); PlaceObject = HLinkObject.DeRef; if (PlaceObject != null) { BaseModelBase = PlaceObject; BaseTitleIcon = Constants.IconPlace; // TODO Display all details BaseDetail.Add(new CardListLineCollection("Place Detail") { new CardListLine("Title:", PlaceObject.GPTitle), new CardListLine("Type:", PlaceObject.GType), new CardListLine("Code:", PlaceObject.GCode), }); foreach (HLinkPlaceLocationModel thePlaceLocation in PlaceObject.GLocation) { BaseDetail.Add(new CardListLineCollection("Location") { new CardListLine("Street:", thePlaceLocation.DeRef.GStreet), new CardListLine("City:", thePlaceLocation.DeRef.GCity), new CardListLine("County:", thePlaceLocation.DeRef.GCounty), new CardListLine("Locality:", thePlaceLocation.DeRef.GLocality), new CardListLine("Parish:", thePlaceLocation.DeRef.GParish), new CardListLine("State:", thePlaceLocation.DeRef.GState), new CardListLine("Country:", thePlaceLocation.DeRef.GCountry), new CardListLine("Phone:", thePlaceLocation.DeRef.GPhone), new CardListLine("City:", thePlaceLocation.DeRef.GPostal), }); } BaseDetail.Add(new CardListLineCollection("Coordinates") { new CardListLine("Lat:", PlaceObject.GCoordLat), new CardListLine("Long:", PlaceObject.GCoordLong), }); BaseDetail.Add(new CardListLineCollection("Place Date Ref") { new CardListLine("Date:", HLinkObject.Date.ShortDate), }); // Add Map card IMapModel t = PlaceObject.ToMapModel(); BaseDetail.Add(t.HLink); BaseDetail.Add(DV.PlaceDV.GetModelInfoFormatted(PlaceObject)); } }
/// <summary> /// Populates the view ViewModel. /// </summary> public override void PopulateViewModel() { HLinkEventModel HLinkObject = BaseNavParamsHLink as HLinkEventModel; if (!(HLinkObject is null) && (HLinkObject.Valid)) { EventObject = HLinkObject.DeRef; if (!(EventObject is null) && (EventObject.Valid)) { BaseTitle = EventObject.GDescription; BaseTitleIcon = CommonConstants.IconEvents; // Get basic details CardGroup t = new CardGroup { Title = "Header Details" }; t.Add(new CardListLineCollection { new CardListLine("Card Type:", "Event Detail"), new CardListLine("Type:", EventObject.GType), new CardListLine("Role", HLinkObject.GRole), new CardListLine("Date:", EventObject.GDate.LongDate), new CardListLine("Event Age:", EventObject.GDate.GetAge), }); // Add Model details t.Add(DV.EventDV.GetModelInfoFormatted(localEventObject)); // Add the description and event place card CardListLineCollection t1 = new CardListLineCollection { new CardListLine("Description", EventObject.GDescription) }; t.Add(t1); t.Add(EventObject.GPlace); BaseDetail.Add(t); BaseDetail.Add(HLinkObject.GAttributeRefCollection); BaseDetail.Add(HLinkObject.GNoteRefCollection.GetCardGroup()); BaseDetail.Add(EventObject.GAttribute); BaseDetail.Add(EventObject.GCitationRefCollection.GetCardGroup()); BaseDetail.Add(EventObject.GMediaRefCollection.GetCardGroup()); BaseDetail.Add(EventObject.GNoteRefCollection.GetCardGroup()); BaseDetail.Add(EventObject.GTagRefCollection.GetCardGroup()); BaseDetail.Add(EventObject.BackHLinkReferenceCollection.GetCardGroup()); } } }
/// <summary> /// Заполняет краткую информацию о директиве /// </summary> public void UpdateInformation() { if ((currentDirective == null) || !(currentDirective.Parent is BaseDetail)) { return; } BaseDetail inspectedDetail = (BaseDetail)currentDirective.Parent; labelDateAsOfValue.Text = DateTime.Today.ToString(new TermsProvider()["DateFormat"].ToString()); labelDirectiveValue.Text = currentDirective.Title + " for"; labelDescriptionValue.Text = currentDirective.Description; labelRepeatIntervalValue.Text = currentDirective.Closed ? "" : (currentDirective.RepeatPerform != null ? (currentDirective.RepeatedlyPerform ? currentDirective.RepeatPerform.ToRepeatIntervalsFormat() : "") : ""); linkDetailInfoFirst.Text = inspectedDetail.ToString(); linkDetailInfoSecond.Text = inspectedDetail.ToString(); labelDateLast.Text = ""; labelTsnCsnLast.Text = ""; labelWorktypeLast.Text = ""; labelRemarksLast.Text = ""; labelDateNext.Text = ""; labelTsnCsnNext.Text = ""; labelWorktypeNext.Text = ""; labelRemarksNext.Text = ""; if (currentDirective.LastPerformance != null) { labelDateLast.Text = UsefulMethods.NormalizeDate(currentDirective.LastPerformance.RecordDate); labelWorktypeLast.Text = currentDirective.LastPerformance.RecordType.FullName; labelRemarksLast.Text = currentDirective.LastPerformance.Description; if (currentDirective.LastPerformance.Lifelength != Lifelength.NullLifelength && (currentDirective.LastPerformance.Lifelength.Hours.TotalHours != 0 && currentDirective.LastPerformance.Lifelength.Cycles != 0)) { labelTsnCsnLast.Text = currentDirective.LastPerformance.Lifelength.ToComplianceItemString(); } } if (!currentDirective.Closed) { labelDateNext.Text = UsefulMethods.NormalizeDate(currentDirective.GetApproximateDate()); if (currentDirective.NextWorkType != null) { labelWorktypeNext.Text = currentDirective.NextWorkType.FullName; } if (currentDirective.NextPerformance != null) { labelTsnCsnNext.Text = currentDirective.NextPerformance.ToComplianceItemString(); } } labelDetailTsnCsnValue.Text = inspectedDetail.Lifelength.ToComplianceItemString(); labelDetailTsoCsoValue.Text = "";// inspectedDetail.Limitation.ResourceSinceOverhaul.ToComplianceItemString();todo if (CurrentBaseDetail == null) { return; } linkDirectiveStatus.Text = BackLinkText; }
///<summary> /// Создается объект, описывающий отображение добавления директивы ///</summary> /// <param name="parentBaseDetail">Родительский объект, в который добавляется директива</param> /// <param name="directiveType">Тип директивы</param> public DispatcheredDirectiveAdding(BaseDetail parentBaseDetail, DirectiveType directiveType) { if (parentBaseDetail == null) { throw new ArgumentNullException("parentBaseDetail"); } this.parentBaseDetail = parentBaseDetail; this.directiveType = directiveType; InitializeComponent(directiveType); aircraftHeader.Aircraft = parentBaseDetail.ParentAircraft; ClearFields(); }
public override void PopulateViewModel() { CardGroup tt = new CardGroup(); InstructionCardLarge instructionCard = new InstructionCardLarge { BindingContext = AppResources.SearchPage_Instructions, }; tt.Add(instructionCard); BaseDetail.Add(tt); }
private void addComponentToolStripMenuItem1_Click(object sender, EventArgs e) { ToolStripMenuItem toolStripMenuItem = (ToolStripMenuItem)sender; ContextMenuStrip contextMenuStrip = (ContextMenuStrip)toolStripMenuItem.Owner; BaseDetail baseDetail = (BaseDetail)contextMenuStrip.Tag; ReferenceEventArgs arguments = new ReferenceEventArgs(); arguments.DisplayerText = currentAircraft.RegistrationNumber + ". " + baseDetail + ". Add component"; arguments.TypeOfReflection = ReflectionTypes.DisplayInNew; arguments.RequestedEntity = new DispatcheredDetailAddingScreen(baseDetail); OnDisplayerRequested(arguments); }