private void ConstructionReportsXtraForm_Load(object sender, EventArgs e) { viewModel = (ConstructionReportViewModel)Program.Kernel.GetService(typeof(ConstructionReportViewModel)); EnumWrapper <PartType> .LoadItems(type.Properties.Items, CheckState.Checked, enabled : true, skip0 : true); EnumWrapper <ReportType> .LoadItems(reportType.Properties.Items); EnumWrapper <PartType> .LoadItems(localizedAllPartType, skip0 : true); viewModel.LoadData(); start.Properties.DataSource = viewModel.JointsProjections; end.Properties.DataSource = viewModel.JointsProjections; startKPLookUp.Properties.DataSource = viewModel.AllKP; endKPLookUp.Properties.DataSource = viewModel.AllKP; BindToViewModel(); BindCommands(); RefreshTypes(); viewModel.ReportTypeIndex = reportType.SelectedIndex = 0; tracingModeRadioGroup_SelectedIndexChanged(tracingModeRadioGroup, e); viewModel.StartPK = int.MinValue; viewModel.EndPK = int.MinValue; }
private void ComponentNewEditXtraForm_Load(object sender, EventArgs e) { EnumWrapper <PartInspectionStatus> .LoadItems(localizedAllInspectionStatus, skip0 : true); EnumWrapper <DuplicateNumberEntityType> .LoadItems(localizedAllTypes, skip0 : true); BindToViewModel(); viewModel.PropertyChanged += (s, eve) => IsModified = true; viewModel.PropertyChanged += (s, eve) => { if (eve.PropertyName == "ComponentIsActive" && viewModel.ComponentIsActive) { deactivated.Reset(); } }; IsEditMode &= viewModel.ComponentIsActive; IsModified = false; repositoryInspectionDate.SetLimits(); componentLength.SetMask(Constants.PositiveDigitMask); inspectorColumn.SortMode = DevExpress.XtraGrid.ColumnSortMode.DisplayText; inspectorsPopupContainerEdit.SetSize(); type.ReadOnly = !IsEditMode || viewModel.HasConnectedConnectors; inspectionHistoryGridView.OptionsBehavior.Editable = !type.ReadOnly; BindCommands(); }
private void MillInspectionXtraForm_Load(object sender, EventArgs e) { resultType.Properties.Items.Clear(); controlType.Properties.Items.Clear(); frequencyMeasure.Properties.Items.Clear(); frequencyType.Properties.Items.Clear(); resultType.SelectedIndex = -1; controlType.SelectedIndex = -1; EnumWrapper <PipeTestResultType> .LoadItems(resultType.Properties.Items, skip0 : true); EnumWrapper <PipeTestControlType> .LoadItems(controlType.Properties.Items, skip0 : true); EnumWrapper <FrequencyMeasure> .LoadItems(frequencyMeasure.Properties.Items, skip0 : true); EnumWrapper <InspectionFrequencyType> .LoadItems(frequencyType.Properties.Items); BindToViewModel(); boolExpected_CheckedChanged(null, null); code.SetAsIdentifier(); code.SetRequiredText(); operationName.SetRequiredText(); controlType.SetRequiredCombo(); frequency.SetMask(Constants.PositiveDigitMask); frequencyMeasure.SetRequiredCombo(); resultType.SetRequiredCombo(); percentOfSelect.SetRequiredText(); minExpected.SetFloatMask(Constants.DigitsBeforeDecimalPoint); maxExpected.SetFloatMask(Constants.DigitsBeforeDecimalPoint); CheckFixedResultType(viewModel.Category); }
private void SpoolsXtraForm_Load(object sender, System.EventArgs e) { EnumWrapper <PartInspectionStatus> .LoadItems(localizedAllInspectionStatus, skip0 : true); EnumWrapper <DuplicateNumberEntityType> .LoadItems(localizedAllPartTypes, skip0 : true); BindToViewModel(); attachmentsButton.Enabled = (!viewModel.IsNew || viewModel.SpoolNumber != String.Empty); viewModel.PropertyChanged += (s, eve) => IsModified = true; viewModel.PropertyChanged += (s, eve) => { if (eve.PropertyName == "SpoolIsActive" && viewModel.SpoolIsActive) { deactivated.Reset(); } }; IsEditMode = ((this.Id != Guid.Empty || viewModel.SpoolNumber != String.Empty) && viewModel.SpoolIsActive); BindCommands(); inspectionDateEdit.SetLimits(); spoolNumber.SetAsIdentifier(); inspectorsGridColumn.SortMode = DevExpress.XtraGrid.ColumnSortMode.DisplayText; inspectorsPopupContainerEdit.SetSize(); }
private void InspectionAddEditXtraForm_Load(object sender, EventArgs e) { status.Properties.Items.Clear(); EnumWrapper <PipeTestResultStatus> .LoadItems(status.Properties.Items, skip0 : true); BindToViewModel(); if (listOfInspectors != null) { var insp = (List <Inspector>)listOfInspectors.Where(_ => _.Key == viewModel.Code).FirstOrDefault().Value; if (insp != null) { viewModel.TestResult.Inspectors = insp; } else { viewModel.TestResult.Inspectors = new List <Inspector>(); } inspectors.SelectInspectors(viewModel.SelectInspectors()); } inspectors.InspectionDate = viewModel.Date; factBool_CheckedChanged(null, null); date.SetLimits(); }
private void HistoryExportImport_Load(object sender, EventArgs e) { EnumWrapper <WorkstationType> .LoadItems(localizedAllWorkstations); EnumWrapper <SynchType> .LoadItems(localizedSynchType); gridControlHistory.DataSource = exporter.GetAllPortions(); }
private void RailcarNewEditXtraForm_Load(object sender, EventArgs e) { EnumWrapper <PipeMillStatus> .LoadItems(localizedAllPipeMillStatus); BindCommands(); BindToViewModel(); IsModified = false; IsEditMode &= !viewModel.Shipped && ctx.HasAccess(global::Domain.Entity.Security.Privileges.EditReleaseNote); releaseNoteDate.SetLimits(); }
private void AuditXtraForm_Load(object sender, EventArgs e) { EnumWrapper <TracingModeEnum> .LoadItems(radioPeriodUser.Properties.Items); EnumWrapper <AuditRecordType> .LoadItems(includeCheckedList.Items); includeCheckedList.SetItemChecked(0, true); BindCommands(); BindToViewModel(); startDate.SetLimits(); endDate.SetLimits(); }
private void InspectionReportsXtraForm_Load(object sender, EventArgs e) { viewModel = (InspectionReportsViewModel)Program.Kernel.GetService(typeof(InspectionReportsViewModel)); BindToViewModel(); BindCommands(); viewModel.StartDate = DateTime.Now.Date; viewModel.EndDate = DateTime.Now.Date; EnumWrapper <PartInspectionStatus> .LoadItems(localizedAllInspectionStatus, skip0 : true); startDate.SetLimits(); endDate.SetLimits(); }
private void MillPipeSearchXtraForm_Load(object sender, System.EventArgs e) { viewModel = (MillPipeSearchViewModel)Program.Kernel.GetService(typeof(MillPipeSearchViewModel)); EnumWrapper <PipeMillStatus> .LoadItems(localizedAllPipeMillStatus); BindCommands(); BindToViewModel(); weldingDate.SetLimits(); externalCoatingDate.SetLimits(); internalCoatingDate.SetLimits(); localizedSearchResultGroup.Add(searchResultLayoutGroup.Text); }
private void FirstSetupXtraForm_Load(object sender, EventArgs e) { EnumWrapper <WorkstationType> .LoadItems(localizedAllWorkstations); BindToViewModel(); pipeNumberMaskRulesLabel.Text = Program.LanguageManager.GetString(StringResources.Mask_Label); localizedHeader.Clear(); localizedHeader.Add(Resources.FirstSetup_FormHeader); // usage of Resources is OK - setting default values here localizedHeader.Add(WorkstationType.Mill.ToString()); localizedHeader.Add(WorkstationType.Master.ToString()); localizedHeader.Add(WorkstationType.Construction.ToString()); fileSize.SetMask(Constants.PositiveDigitMask); }
private void PartsSearchXtraForm_Load(object sender, EventArgs e) { viewModel = (PartSearchViewModel)Program.Kernel.GetService(typeof(PartSearchViewModel)); BindCommands(); BindToViewModel(); EnumWrapper <PartType> .LoadItems(type.Properties.Items, CheckState.Checked, enabled : true, skip0 : true); EnumWrapper <PartType> .LoadItems(localizedPartTypes, skip0 : true); RefreshTypes(); if (localizedSearchResultGroup.Count == 0) { localizedSearchResultGroup.Add(searchResultLayoutGroup.Text); } }
private void MillReportsXtraForm_Load(object sender, EventArgs e) { EnumWrapper <MillReportType> .LoadItems(reportTypes.Properties.Items); EnumWrapper <PipeTestResultStatus> .LoadItems(statuses.Items, skip0 : true); EnumWrapper <PipeMillStatus> .LoadItems(localizedAllPipeStatus, skip0 : true); viewModel = (MillReportsViewModel)Program.Kernel.GetService(typeof(MillReportsViewModel)); BindToViewModel(); BindCommands(); viewModel.StartDate = DateTime.Now.Date; viewModel.EndDate = DateTime.Now.Date; reportTypes.SelectedIndex = 3; startDate.SetLimits(); endDate.SetLimits(); }
private void JointNewEditXtraForm_Load(object sender, EventArgs e) { EnumWrapper <JointStatus> .LoadItems(localizedAllJointStatus); EnumWrapper <JointTestResultStatus> .LoadItems(localizedResults, skip0 : true); EnumWrapper <DuplicateNumberEntityType> .LoadItems(localizedAllTypes, skip0 : true); BindToViewModel(); viewModel.PropertyChanged += (s, eve) => { if (eve.PropertyName == "JointIsActive" && viewModel.JointIsActive) { deactivated.Reset(); } }; viewModel.PropertyChanged += (s, eve) => { if (eve.PropertyName != "Pieces") { IsModified = true; } if (eve.PropertyName == "Joint") { jointNewEditBindingSoure.ResetBindings(false); } }; IsEditMode &= viewModel.JointIsActive; IsModified = false; loweringDate.SetLimits(); repairDateEdit.SetLimits(); operationDateEdit.SetLimits(); weldersGridColumn.SortMode = DevExpress.XtraGrid.ColumnSortMode.DisplayText; inspectorsGridColumn.SortMode = DevExpress.XtraGrid.ColumnSortMode.DisplayText; inspectorsPopupContainerEdit.SetSize(); weldersPopupContainerEdit.SetSize(); BindCommands(); }
private void PartInspectionXtraForm_Load(object sender, EventArgs e) { EnumWrapper <PartType> .LoadItems(localizedAllPartTypes); EnumWrapper <PartInspectionStatus> .LoadItems(localizedAllInspectionStatus, skip0 : true); viewModel = (PartInspectionViewModel)Program.Kernel.GetService(typeof(PartInspectionViewModel)); viewModel.CurrentForm = this; viewModel.ModifiableView = this; BindCommands(); BindToViewModel(); IsEditMode = false; repositoryInspectionDateEdit.SetLimits(); inspectorsPopupContainerEdit.SetSize(); viewModel.PropertyChanged += (s, eve) => { if (eve.PropertyName != "ElementIsWelded") { inspectionsView.OptionsBehavior.Editable = viewModel.ElementIsWelded; } }; }
private void JointSearchXtraForm_Load(object sender, System.EventArgs e) { BindCommands(); BindToViewModel(); EnumWrapper <ActivityCriteria> .LoadItems(activity.Properties.Items); EnumWrapper <JointStatus> .LoadItems(controlState.Properties.Items, CheckState.Checked, enabled : true, skip0 : true); EnumWrapper <JointStatus> .LoadItems(localizedJointStatuses, skip0 : true); activity.SelectedIndex = 0; viewModel.Activity = ActivityCriteria.StatusActive; controlState_CloseUp(controlState, new DevExpress.XtraEditors.Controls.CloseUpEventArgs(true)); weldingDateFrom.SetLimits(); weldingDateTo.SetLimits(); if (localizedSearchResultGroup.Count == 0) { localizedSearchResultGroup.Add(searchResultLayoutGroup.Text); } }
private void NumbersDialog_Load(object sender, EventArgs e) { EnumWrapper <PartType> .LoadItems(localizedPartTypes, skip0 : true); searchResults.DataSource = parts; }