private void HistoryManagerFrm_Load(object sender, EventArgs e) { // эта форма должна показывать все операции по этому объекту и давать делать Undo последней операции // TODO ведь удаление отмена этих изменений влияет на остальные объекты и как именно if (startMsg == null) { return; } //берем объект, который отвечает за хранение истории по типу объектов HistorySaver hs = HistorySaver.getInstance(RIFDC_App.mainDataRoom); IKeeper HistoryManagerDataSource = hs.getMyHistoryIKeeperObject(startMsg.targetObject); HistoryManagerDFC = new DataFormComponent(HistoryManagerDataSource, this, Lib.FrmCrudModeEnum.GridAndFieldsOnTheFly); //грид //инициализация грида RIFDC_DataGridView grd0 = new RIFDC_DataGridView(dgObjectHistory, HistoryManagerDataSource, HistorySaver.HistorySaverUnit.MyControlFormats.HistorySaverUnitControlFormat.getMyInstance(HistoryManagerDataSource.sampleObject)); //маппинг грида HistoryManagerDFC.crudOperator.addGridBasedControlMapping(grd0); HistoryManagerDFC.fillTheForm(); }
public RIFDC_DataGridView( Control c, IKeeper _dataSource, Lib.IControlFormat myFormat = null, DataGridEditabilityMode _editabilityMode = DataGridEditabilityMode.NotEditableAtAll) : base(c, _dataSource) { dgr = (DataGridView)targetControl; if (myFormat != null) { foreach (Lib.IControlFormatLine line in myFormat.lines) { addDataColumn(line.fieldClassName, line.colWidth, line.caption); } } editabilityMode = _editabilityMode; //форматирование грида dgr.SelectionMode = DataGridViewSelectionMode.FullRowSelect; // dgr.MultiSelect = false; // dgr.AllowUserToAddRows = false; // dgr.AllowUserToResizeRows = false; // dgr.AllowUserToDeleteRows = false; // dgr.RowHeadersVisible = false; }
public PerformanceCore(INewKeeper newKeeper, IKeeper keeper, ICalculator calculator, IBindedItemsCore bindedItemsCore) { _newKeeper = newKeeper; _keeper = keeper; _calculator = calculator; _bindedItemsCore = bindedItemsCore; }
public DirectiveCore(INewKeeper newKeeper, INewLoader newLoader, IKeeper keeper, ILoader loader, IItemsRelationsDataAccess itemsRelationsDataAccess) { _newKeeper = newKeeper; _newLoader = newLoader; _keeper = keeper; _loader = loader; _itemsRelationsDataAccess = itemsRelationsDataAccess; }
static void FilterAndKeep(List <Pawn> listPawn, IKeeper <Pawn> bag) { foreach (var pawn in listPawn) { if (pawn.GetNewField() > 5) { bag.Keep(pawn); } } }
public IKeeper getMyHistoryIKeeperObject(IKeepable t) { IKeeper myHistoryIKeeperObject = ItemKeeper <HistorySaver.HistorySaverUnit> .getInstance(dataRoom); Lib.Filter myFilter = new Lib.Filter(); myFilter.addNewFilteringRule( myHistoryIKeeperObject.sampleObject.getFieldInfoByFieldClassName("objectId"), Lib.RIFDC_DataCompareOperatorEnum.equal, t.id, Lib.Filter.FilteringRuleTypeEnum.ParentFormFilteringRule); myHistoryIKeeperObject.filtration.applyGlobalFilter(myFilter); myHistoryIKeeperObject.readItems(); return(myHistoryIKeeperObject); }
public Engine(IKeeper keeper, IHarvester harvester, ASafeLog log) { Log = log.Safe(); Now = DateTime.UtcNow; Keeper = keeper; Harvester = harvester; if (Keeper == null) { throw new NoConnectionEngineAlert(Log); } if (Harvester == null) { throw new NoHarvesterEngineAlert(Log); } } // constructor
private void doSelectWorkingField() { //tbValue.Text = ""; //Delegate[] delegAry = tbValue.TextChanged.GetInvocationList(); keeper = RIFDC_App.iKeeperSampleHolder.getIKeeperByEntityType(startMsg.targetKeeper.sampleObject.entityName); dfc = new DataFormComponent(keeper, this, Lib.FrmCrudModeEnum.GridAndFieldsOnTheFly); dfc.tag = "сардина-1"; RemoveEventHandlerOfType("TextChanged", tbValue); RemoveEventHandlerOfType("Leave", tbValue); dfc.addRecordBasedControlMapping(new RIFDC_TextBox(tbValue), fn.toStringNullConvertion(cbxSetValueParameter.SelectedValue)); keeper.clear(); keeper.createNewObject_inserted(); dfc.fillTheForm(); //keeper.currentRecord.index = 0; }
public DownloadAndSaveAction( IHarvester harvester, IKeeper keeper, int customerID, decimal explicitMonthlyPayment, bool isTryOut, DateTime now, ASafeLog log ) : base(3, 5000, log) { this.now = now; this.harvester = harvester; this.keeper = keeper; this.customerID = customerID; this.explicitMonthlyPayment = explicitMonthlyPayment; this.isTryOut = isTryOut; Result = null; } // constructor
public static void Main() { var largeAnimals = new ILargeAnimal[] { new Lion(new DateTime(2010, 4, 28)), new Lion(new DateTime(2012, 5, 11)), new Zebra(new DateTime(2008, 12, 1)) }; var smallAnimals = new ISmallAnimal[] { new Rabbit(new DateTime(2014, 1, 1)), new GuineaFowl(new DateTime(2015, 1, 2)) }; var animals = largeAnimals.Union <IAnimal>(smallAnimals).ToList(); var largeAnimalKeeper = new Keeper <ILargeAnimal>(largeAnimals); var smallAnimalKeeper = new Keeper <ISmallAnimal>(smallAnimals); var keepers = new IKeeper[] { largeAnimalKeeper, smallAnimalKeeper }; var babyRabbit = new Rabbit(DateTime.Today); smallAnimalKeeper.StartLookingAfter(babyRabbit); var feedingScheduler = FeedingScheduler.Instance; var groomingScheduler = GroomingScheduler.Instance; var timer = new ZooTimer(); new Thread(timer.Run).Start(); timer.Tick += () => feedingScheduler.AssignFeedingJobs(keepers, animals); timer.Tick += () => groomingScheduler.AssignGroomingJobs(keepers, animals); timer.Tick += () => animals.ForEach(Console.WriteLine); }
public Lib.ObjectOperationResult doDeleteHistory(IKeepable t) { // полностью удалить историю по объекту if (t == null) { return(Lib.ObjectOperationResult.sayNo("Object is null")); } if (t.id == "") { return(Lib.ObjectOperationResult.sayNo("Object has no id")); } IKeeper HistoryManagerDataSource = ItemKeeper <HistorySaver.HistorySaverUnit> .getInstance(RIFDC_App.mainDataRoom); Lib.Filter myFilter = new Lib.Filter(); myFilter.addNewFilteringRule( HistoryManagerDataSource.sampleObject.getFieldInfoByFieldClassName("objectId"), Lib.RIFDC_DataCompareOperatorEnum.equal, t.id, Lib.Filter.FilteringRuleTypeEnum.NotSpecified); return(HistoryManagerDataSource.deleteFiteredPackege(myFilter)); }
List <long> timeArr = new List <long>(); //время обработки каждого файла public ExcelStaticFilesBatchProcessor(IKeeper _myKeeper, System.Windows.Forms.ProgressBar _myProgressBar, System.Windows.Forms.Label _myStatusLabel) { myKeeper = _myKeeper; myProgressBar = _myProgressBar; myStatusLabel = _myStatusLabel; }
public void registerIKeeper(IKeeper keeper) { iKeepers.Add(keeper); }
public RIFDC_ComboBox(Control c, IKeeper _dataSource, bool _allowNull = false) : base(c) { data = new RowContainingDataObject(_dataSource); allowNull = _allowNull; }
public static void ActualizeBlobKeeper(IKeeper <Blob, double, double, AForge.Point> blobKeeper, IEnumerable <Blob> blobs) => blobKeeper.ActualizeData(blobs);
public RowContainingDataObject(IKeeper _dataSource) { dataSource = _dataSource; }
public MappedGridBasedControl(Control c, IKeeper _dataSource) : base(c) { data = new RowContainingDataObject(_dataSource); }
public NonRoutineJobDataAccess(ILoader loader, IKeeper keeper) { _loader = loader; _keeper = keeper; }
public List <IUniversalRowDataContainer> makeGroupQuery(IKeeper keeper, Lib.GroupQueryTypeEnum groupQueryType, Relations.Relation targetRelation, string targetField) { return(null); }
public static void RefreshBlobKeeper(IKeeper <Blob, double, double, AForge.Point> blobKeeper, IEnumerable <Blob> blobs) => blobKeeper.Refresh(blobs);
public List <IUniversalRowDataContainer> makeGroupQuery(IKeeper keeper, Lib.GroupQueryTypeEnum groupQueryType, Relations.Relation targetRelation, string targetField) { return(actualCluster.makeGroupQuery(keeper, groupQueryType, targetRelation, targetField)); }