protected virtual void GetFilterSelection(CommonFilterCollection filterCollection) { if (_reportedWorkPackage != null) { _filterSelection = $"Work Package: {_reportedWorkPackage.Title}"; if (filterCollection == null || filterCollection.IsEmpty) { return; } _filterSelection = $"{_filterSelection} {filterCollection}"; } else if (_reportedAircraft != null) { _filterSelection = "All"; if (filterCollection == null || filterCollection.IsEmpty) { return; } _filterSelection = filterCollection.ToStrings(); } else { _filterSelection = "All"; } }
protected virtual void GetFilterSelection(CommonFilterCollection filterCollection) { if (_reportedAircraft != null) { _filterSelection = "All"; if (filterCollection == null || filterCollection.IsEmpty) { return; } _filterSelection = filterCollection.ToStrings(); } else if (_reportedBaseComponent != null) { _filterSelection = "All"; if (filterCollection == null) { return; } if (_reportedBaseComponent.BaseComponentType == BaseComponentType.LandingGear) { _filterSelection = _reportedBaseComponent.TransferRecords.GetLast().Position; } if (_reportedBaseComponent.BaseComponentType == BaseComponentType.Engine) { _filterSelection = BaseComponentType.Engine + " " + _reportedBaseComponent.TransferRecords.GetLast().Position; } if (_reportedBaseComponent.BaseComponentType == BaseComponentType.Apu) { _filterSelection = BaseComponentType.Apu.ToString(); } } else { IEnumerable <IGrouping <Aircraft, BaseEntityObject> > groupByAircraft = _reportedDirectives.GroupBy(GlobalObjects.AircraftsCore.GetParentAircraft) .OrderBy(g => g.Key.ToString() + " " + g.Key.Model.ToString()); _filterSelection = "All"; if (GlobalObjects.AircraftsCore.GetAircraftsCount() == groupByAircraft.Count()) { if (filterCollection == null || filterCollection.IsEmpty) { return; } _filterSelection = filterCollection.ToStrings(); } else { foreach (IGrouping <Aircraft, BaseEntityObject> byAircraft in groupByAircraft) { _filterSelection += (byAircraft.Key + "; "); } if (filterCollection == null || filterCollection.IsEmpty) { return; } _filterSelection = $"{_filterSelection} {filterCollection}"; } } }
/// <summary> /// Создаёт экземпляр элемента управления, отображающего список директив /// </summary> /// <param name="adType"></param> public DefferedListScreen(Operator @operator, ADType adType = ADType.None) : this() { if (@operator == null) { throw new ArgumentNullException("@operator"); } var primaryDirectiveType = DirectiveType.DeferredItems; CurrentOperator = @operator; StatusTitle = @operator.Name + " " + primaryDirectiveType.CommonName; _currentPrimaryDirectiveType = primaryDirectiveType; _adType = adType; var directiveList = new DefferedListView(); _filter = new CommonFilterCollection(typeof(DeferredItem)); _builder = new DeferredListReportBuilder(); InitToolStripMenuItems(); InitPrintToolStripMenuItems(); InitListView(directiveList); }
protected override void AnimatedThreadWorkerRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (_type == CheckListType.Routine) { buttonAddNew.Visible = true; } if (_manual.CheckUIType == CheckUIType.Iosa) { _filter = new CommonFilterCollection(typeof(ICheckListFilterParams)); } else if (_manual.CheckUIType == CheckUIType.Safa) { _filter = new CommonFilterCollection(typeof(ICheckListSafaFilterParams)); } else if (_manual.CheckUIType == CheckUIType.Icao) { _filter = new CommonFilterCollection(typeof(ICheckListIcaoFilterParams)); } if (_directivesViewer == null) { InitToolStripMenuItems(); InitListView(); } _directivesViewer.SetItemsArray(_resultDocumentArray.ToArray()); headerControl.PrintButtonEnabled = _directivesViewer.ItemsCount != 0; _directivesViewer.Focus(); }
protected override void AnimatedThreadWorkerRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { pictureBox3.Visible = false; buttonRevisions.Visible = false; this.headerControl.ShowEditButton = true; this.headerControl.EditButtonClick += HeaderControl_EditButtonClick; pictureBox6.Visible = true; buttonPel.Visible = true; labelTitle.Text = $"Audit Status : {_audit.StatusName}"; labelTitle.Visible = true; if (_manual.CheckUIType == CheckUIType.Iosa) { _filter = new CommonFilterCollection(typeof(ICheckListFilterParams)); } else if (_manual.CheckUIType == CheckUIType.Safa) { _filter = new CommonFilterCollection(typeof(ICheckListSafaFilterParams)); } else if (_manual.CheckUIType == CheckUIType.Icao) { _filter = new CommonFilterCollection(typeof(ICheckListIcaoFilterParams)); } if (_directivesViewer == null) { InitToolStripMenuItems(); InitListView(); } if (_directivesViewer is CheckListAuditView lite) { lite.AuditId = _parentId; lite.IsAuditCheck = (_routineAudit?.Type == ProgramType.CAAKG || _routineAudit?.Type == ProgramType.IOSA); } else if (_directivesViewer is CheckListSAFAAuditView view) { view.AuditId = _parentId; view.IsAuditCheck = (_routineAudit?.Type == ProgramType.CAAKG || _routineAudit?.Type == ProgramType.IOSA); } else if (_directivesViewer is CheckListICAOAuditView icao) { icao.AuditId = _parentId; icao.IsAuditCheck = (_routineAudit?.Type == ProgramType.CAAKG || _routineAudit?.Type == ProgramType.IOSA); } _directivesViewer.SetItemsArray(_resultDocumentArray.ToArray()); headerControl.PrintButtonEnabled = _directivesViewer.ItemsCount != 0; _directivesViewer.Focus(); }
///<summary> /// Создаёт экземпляр элемента управления, отображающего список директив ///</summary> ///<param name="currentOperator">ВС, которому принадлежат директивы</param>> public CourseListScreen(Operator currentOperator, int operatorId) : this() { if (currentOperator == null) { throw new ArgumentNullException("currentOperator"); } _operatorId = operatorId; aircraftHeaderControl1.Operator = currentOperator; statusControl.ShowStatus = false; labelTitle.Visible = false; _filter = new CommonFilterCollection(typeof(SmartCore.CAA.CAAWP.CoursePackage)); InitToolStripMenuItems(); InitListView(); UpdateInformation(); if (GlobalObjects.CaaEnvironment.IdentityUser.CAAUserType == CAAUserType.CAA || GlobalObjects.CaaEnvironment.IdentityUser.CAAUserType == CAAUserType.Operator) { _toolStripMenuItemEdit.Enabled = false; pictureBox1.Visible = buttonAddNew.Visible = buttonDeleteSelected.Visible = false; } }
///<summary> /// Создает объект для отображения информации о директиве ///</summary> public EmployeeDocumentsControl() { InitializeComponent(); _filter = new CommonFilterCollection(typeof(Document)); InitToolStripMenuItems(); documentationListView.ContextMenuStrip = _contextMenuStrip; }
public EditionRevisionListScreen(Operator currentOperator, int operatorId, SmartCore.CAA.StandartManual.StandartManual manual) : this() { if (currentOperator == null) { throw new ArgumentNullException("currentOperator"); } _operatorId = operatorId; _manual = manual; aircraftHeaderControl1.Operator = currentOperator; statusControl.ShowStatus = false; labelTitle.Visible = false; _filter = new CommonFilterCollection(typeof(ICheckListRevisionFilterParams)); InitToolStripMenuItems(); InitListView(); UpdateInformation(); if (GlobalObjects.CaaEnvironment.IdentityUser.CAAUserType == CAAUserType.CAA || GlobalObjects.CaaEnvironment.IdentityUser.CAAUserType == CAAUserType.Operator) { _toolStripMenuItemEdit.Enabled = false; pictureBox2.Visible = buttonAdd.Visible = buttonDeleteSelected.Visible = false; } }
private void RadioButtonOnClick(object sender, EventArgs e) { _filter = new CommonFilterCollection(typeof(IFlightFilterParams)); _animatedThreadWorker.DoWork -= AnimatedThreadWorkerDoLoad; _animatedThreadWorker.DoWork -= AnimatedThreadWorkerDoFilteringWork; _animatedThreadWorker.DoWork += AnimatedThreadWorkerDoLoad; _animatedThreadWorker.RunWorkerAsync(); }
private void GetFilterSelection(CommonFilterCollection filterCollection) { _filterSelection = "All"; if (filterCollection == null || filterCollection.IsEmpty) { return; } _filterSelection = filterCollection.ToStrings(); }
public TrackForm(FlightTrack selectedTrack) : this() { _flightTrack = selectedTrack; UpdateInformation(); _filter = new CommonFilterCollection(typeof(IFlightFilterParams)); _animatedThreadWorker.DoWork += AnimatedThreadWorkerDoLoad; _animatedThreadWorker.RunWorkerCompleted += BackgroundWorkerRunWorkerLoadCompleted; }
public ProductListScreen(Operator currentOperator) : this() { if (currentOperator == null) { throw new ArgumentNullException("currentOperator"); } aircraftHeaderControl1.Operator = currentOperator; StatusTitle = "Operator Documentation"; _filter = new CommonFilterCollection(typeof(Product)); InitToolStripMenuItems(); InitListView(); UpdateInformation(); }
public MailChatListScreen(Operator currentOperator) : this() { if (currentOperator == null) { throw new ArgumentNullException("currentOperator", "Cannot display null-currentOperator"); } aircraftHeaderControl1.Operator = currentOperator; _filter = new CommonFilterCollection(typeof(MailChats)); InitToolStripMenuItems(); InitListView(); AnimatedThreadWorker.RunWorkerAsync(); }
/// <summary> /// Создает форму для фильтрации элементов переданного типа /// </summary> public CommonFilterForm(CommonFilterCollection filterCollection, ICommonCollection items = null) : this() { if (filterCollection == null) { throw new ArgumentNullException("filterCollection", "can not be null"); } _filters = filterCollection; _items = items; _animatedThreadWorker.DoWork += AnimatedThreadWorkerDoLoad; _animatedThreadWorker.RunWorkerCompleted += BackgroundWorkerRunWorkerLoadCompleted; _animatedThreadWorker.RunWorkerAsync(); }
public UserListScreen(Operator currentOperator) : this() { if (currentOperator == null) { throw new ArgumentNullException("currentOperator"); } _filter = new CommonFilterCollection(typeof(User)); aircraftHeaderControl1.Operator = currentOperator; StatusTitle = "Users"; InitListView(); AnimatedThreadWorker.RunWorkerAsync(); }
///<summary> /// Создает объект для отображения информации о директиве ///</summary> public EmployeeDocumentsControl() { InitializeComponent(); _filter = new CommonFilterCollection(typeof(Document)); InitToolStripMenuItems(); documentationListView.ContextMenuStrip = _contextMenuStrip; documentationListView.ConfigurePaste = list => { foreach (Document document in list) { document.Parent = _currentItem; document.ParentId = _currentItem.ItemId; document.ParentTypeId = _currentItem.SmartCoreObjectType.ItemId; } }; }
///<summary> /// Создаёт экземпляр элемента управления, отображающего список директив ///</summary> ///<param name="currentOperator">ВС, которому принадлежат директивы</param>> public CAAAircraftListScreen(Operator currentOperator) : this() { if (currentOperator == null) { throw new ArgumentNullException("currentOperator"); } aircraftHeaderControl1.Operator = currentOperator; _currentOperator = currentOperator; labelTitle.Visible = false; _filter = new CommonFilterCollection(typeof(IAircraftFilter)); InitToolStripMenuItems(); InitListView(); UpdateInformation(); }
///<summary> /// Создаёт экземпляр элемента управления, отображающего список директив ///</summary> ///<param name="currentAircraft">ВС, которому принадлежат директивы</param> public DocumentationListScreen(Aircraft currentAircraft) : this() { if (currentAircraft == null) { throw new ArgumentNullException("currentAircraft"); } _parent = currentAircraft; CurrentAircraft = currentAircraft; StatusTitle = "Aircraft Documentation"; _filter = new CommonFilterCollection(typeof(Document)); InitToolStripPrintMenuItems(); InitToolStripMenuItems(); InitListView(); UpdateInformation(); }
///<summary> /// Создаёт экземпляр элемента управления, отображающего список директив ///</summary> ///<param name="currentOperator">ВС, которому принадлежат директивы</param>> public CourseRecordListScreen(Operator currentOperator, SmartCore.CAA.CAAWP.CoursePackage wp) : this() { if (currentOperator == null) { throw new ArgumentNullException("currentOperator"); } _wp = wp; aircraftHeaderControl1.Operator = currentOperator; statusControl.ShowStatus = false; labelTitle.Visible = false; _filter = new CommonFilterCollection(typeof(CourseRecord)); InitListView(); UpdateInformation(); }
public FlightTrackListScreen(Operator currentOperator, FlightNumberScreenType screenType) : this() { _screenType = screenType; if (currentOperator == null) { throw new ArgumentNullException("currentOperator"); } aircraftHeaderControl1.Operator = currentOperator; StatusTitle = "Flights"; _filter = new CommonFilterCollection(typeof(ITripFilterParams)); UpdateInformation(); InitToolStripMenuItems(); InitListView(); }
protected virtual void GetFilterSelection(CommonFilterCollection filterCollection) { if (_reportedWorkPackage != null) { _filterSelection = $"Work Package: {_reportedWorkPackage.Title}"; if (filterCollection == null || filterCollection.IsEmpty) { return; } _filterSelection = $"{_filterSelection} {filterCollection}"; } else if (_reportedBaseComponent != null) { _filterSelection = "All"; if (filterCollection == null || filterCollection.IsEmpty) { return; } if (_reportedBaseComponent.BaseComponentType == BaseComponentType.LandingGear) { _filterSelection = _reportedBaseComponent.TransferRecords.GetLast().Position; } if (_reportedBaseComponent.BaseComponentType == BaseComponentType.Engine) { _filterSelection = BaseComponentType.Engine + " " + _reportedBaseComponent.TransferRecords.GetLast().Position; } if (_reportedBaseComponent.BaseComponentType == BaseComponentType.Apu) { _filterSelection = BaseComponentType.Apu.ToString(); } } else if (_reportedAircraft != null) { _filterSelection = "All"; if (filterCollection == null || filterCollection.IsEmpty) { return; } _filterSelection = filterCollection.ToStrings(); } else { _filterSelection = "All"; } }
public FlightPlanOpsRecordListScreen(Operator currentOperator, FlightPlanOps currentPlanOps, bool calculated = false) : this() { if (currentOperator == null) { throw new ArgumentNullException("currentOperator"); } _currentPlanOps = currentPlanOps; _calculated = calculated; aircraftHeaderControl1.Operator = currentOperator; statusControl.ShowStatus = false; _filter = new CommonFilterCollection(typeof(IFlightPlanOpsRecordsFilterParams)); InitToolStripMenuItems(); InitListView(); UpdateInformation(); }
public WorkPackageEmployeeForm(WorkPackage currentWorkPackage) : this() { if (currentWorkPackage == null) { throw new ArgumentNullException("currentWorkPackage", "must be not null"); } _currentWorkPackage = currentWorkPackage; _filter = new CommonFilterCollection(typeof(IEmployeeWorkPackageFilterParams)); labelWpNumber.Text = currentWorkPackage.Number; labelWpTitle.Text = currentWorkPackage.Title; textboxRemark.Text = _currentWorkPackage.EmployeesRemark; _animatedThreadWorker.DoWork += AnimatedThreadWorkerDoLoad; _animatedThreadWorker.RunWorkerCompleted += BackgroundWorkerRunWorkerLoadCompleted; }
///<summary> /// Создаёт экземпляр элемента управления, отображающего список директив ///</summary> ///<param name="currentOperator">ВС, которому принадлежат директивы</param>> public EducationListScreen(Operator currentOperator, int operatorId) : this() { if (currentOperator == null) { throw new ArgumentNullException("currentOperator"); } _operatorId = operatorId; aircraftHeaderControl1.Operator = currentOperator; statusControl.ShowStatus = false; labelTitle.Visible = false; _filter = new CommonFilterCollection(typeof(SmartCore.CAA.CAAEducation.CAAEducation)); InitToolStripMenuItems(); InitListView(); UpdateInformation(); }
///<summary> /// Создаёт экземпляр элемента управления, отображающего список директив ///</summary> ///<param name="currentOperator">ВС, которому принадлежат директивы</param>> public PersonnelListScreen(Operator currentOperator) : this() { if (currentOperator == null) { throw new ArgumentNullException("currentOperator"); } aircraftHeaderControl1.Operator = currentOperator; _currentOperator = currentOperator; statusControl.ShowStatus = false; labelTitle.Visible = false; _filter = new CommonFilterCollection(typeof(IEmployeeFilterParams)); InitToolStripMenuItems(); InitListView(); UpdateInformation(); }
public CAAActivityListScreen(Operator currentOperator, int operatorId) : this() { if (currentOperator == null) { throw new ArgumentNullException("currentOperator"); } _operatorId = operatorId; _filter = new CommonFilterCollection(typeof(ActivityDTO)); aircraftHeaderControl1.Operator = currentOperator; StatusTitle = "Activity"; UpdateInformation(); InitListView(); AnimatedThreadWorker.RunWorkerAsync(); }
public override void DisposeScreen() { if (AnimatedThreadWorker.IsBusy) { AnimatedThreadWorker.CancelAsync(); } AnimatedThreadWorker.Dispose(); _resultDirectiveArray.Clear(); _preResultDirectiveArray.Clear(); _openPubWorkPackages.Clear(); _openPubQuotations.Clear(); //_deferredCategories.Clear(); _resultDirectiveArray = null; _preResultDirectiveArray = null; _openPubWorkPackages = null; _openPubQuotations = null; //_deferredCategories = null; if (_currentForecast != null) { _currentForecast.Dispose(); _currentForecast = null; } if (_initialFilter != null) { _initialFilter.Filters.Clear(); _initialFilter = null; } if (_currentForecast != null) { _currentForecast.Clear(); } _currentForecast = null; if (_directivesViewer != null) { _directivesViewer.Dispose(); } Dispose(true); }
///<summary> /// Создаёт экземпляр элемента управления, отображающего список неснижаемого запаса на складе ///</summary> ///<param name="currentOperator">Склад, которому принадлежат записи о неснижаемом запасе</param> ///<param name="screenType"></param> public FlightNumberListScreen(Operator currentOperator, FlightNumberScreenType screenType) : this() { if (currentOperator == null) { throw new ArgumentNullException("currentOperator"); } aircraftHeaderControl1.Operator = currentOperator; StatusTitle = "Flights"; statusControl.ShowStatus = false; labelTitle.Visible = false; _screenType = screenType; _filter = new CommonFilterCollection(typeof(IFlightFilterParams)); firstLoad = true; InitToolStripMenuItems(); InitListView(); UpdateInformation(); }
public override void DisposeScreen() { if (AnimatedThreadWorker.IsBusy) { AnimatedThreadWorker.CancelAsync(); } AnimatedThreadWorker.Dispose(); _resultDirectiveArray.Clear(); _preResultDirectiveArray.Clear(); _openPubWorkPackages.Clear(); _openPubQuotations.Clear(); //_deferredCategories.Clear(); _resultDirectiveArray = null; _preResultDirectiveArray = null; _openPubWorkPackages = null; _openPubQuotations = null; //_deferredCategories = null; if (_initialFilter != null) { _initialFilter.Filters.Clear(); _initialFilter = null; } if (_toolStripMenuItemOpen != null) { _toolStripMenuItemOpen.Dispose(); } if (_toolStripSeparator1 != null) { _toolStripSeparator1.Dispose(); } if (_directivesViewer != null) { _directivesViewer.Dispose(); } Dispose(true); }
///<summary> /// Создаёт экземпляр элемента управления, отображающего список директив ///</summary> ///<param name="currentOperator">ВС, которому принадлежат директивы</param> public DocumentationListScreen(Operator currentOperator) : this() { if (currentOperator == null) { throw new ArgumentNullException("currentOperator"); } _parent = currentOperator; aircraftHeaderControl1.Operator = currentOperator; StatusTitle = "Operator Documentation"; labelTitle.Visible = false; _filter = new CommonFilterCollection(typeof(Document)); InitToolStripPrintMenuItems(); InitToolStripMenuItems(); InitListView(); UpdateInformation(); }