public CommonFilterDlg(IBaseWindow baseWin, IListManager listMan) { if (baseWin == null) { throw new ArgumentNullException("baseWin"); } if (listMan == null) { throw new ArgumentNullException("listMan"); } InitializeComponent(); fBase = baseWin; fListMan = listMan; ListColumns listColumns = (ListColumns)fListMan.ListColumns; fFields = new string[listColumns.Count + 1]; // +empty item fFields[0] = ""; for (int idx = 0; idx < listColumns.Count; idx++) { var cs = listColumns[idx]; fFields[idx + 1] = fListMan.GetColumnName(cs.Id); } SetLang(); InitGrid(); UpdateGrid(); }
//public BaseController(IAuthManager authManager, ISessionManager sessionManager, ITaskManager taskManager, IListManager listManager) //{ // AuthManager = authManager; // SessionManager = sessionManager; // TaskManager = taskManager; // ListManager = listManager; //} public void ResolveManagers() { //AuthManager = _authFactory.InstatiateService(); SessionManager = _sessFactory.InstatiateService(); TaskManager = _taskFactory.InstatiateService(); ListManager = _listFactory.InstatiateService(); }
public ImageIndexer(IListManager listManager, IEventSystem eventSystem) : base(listManager, eventSystem) { _cache = DisposeThis(new ChangeSetToCache <ImageComponent, int>(ic => ic.Index, listManager.GetList <ImageComponent>().Connect())); ReactOn <PrepareLoadEvent>(_ => _removed.Clear()); }
private static void PostProcessPerson(IBaseWindow baseWin, GDMIndividualRecord indivRec) { baseWin.Context.ImportNames(indivRec); IListManager listMan = baseWin.GetRecordsListManByType(GDMRecordType.rtIndividual); if (listMan == null) { return; } IndividualListFilter iFilter = (IndividualListFilter)listMan.Filter; if (iFilter.SourceMode == FilterGroupMode.Selected) { GDMSourceRecord src = baseWin.Context.Tree.XRefIndex_Find(iFilter.SourceRef) as GDMSourceRecord; if (src != null && AppHost.StdDialogs.ShowQuestionYN(LangMan.LS(LSID.LSID_IncludedSourceFilter))) { indivRec.AddSource(src, "", 0); } } if (iFilter.FilterGroupMode == FilterGroupMode.Selected) { GDMGroupRecord grp = baseWin.Context.Tree.XRefIndex_Find(iFilter.GroupRef) as GDMGroupRecord; if (grp != null && AppHost.StdDialogs.ShowQuestionYN(LangMan.LS(LSID.LSID_IncludedGroupFilter))) { grp.AddMember(indivRec); } } }
public CommonFilterDlg(IBaseWindow baseWin, IListManager listMan) : this() { if (baseWin == null) { throw new ArgumentNullException("baseWin"); } if (listMan == null) { throw new ArgumentNullException("listMan"); } fBase = baseWin; fListMan = listMan; fController = new CommonFilterDlgController(this, listMan); fController.Init(baseWin); filterView = new FilterGridView(fListMan); filterView.Height = 260; tsFieldsFilter.Content = filterView; SetLang(); fController.UpdateView(); this.KeyDown += Form_KeyDown; }
/// <summary> /// /// </summary> /// <param name="listManager"></param> /// <param name="commonService"></param> /// <param name="mapper"></param> /// <param name="roleService"></param> public RoleFactory(IListManager listManager, ICommonService commonService, IMapper mapper, IRoleService roleService) { _listManager = listManager; _commonService = commonService; _mapper = mapper; _roleService = roleService; }
public Staff(string name, ListManager <string> lista) { m_staff_list = new ListManager <string>(); m_name = String.Empty; m_name = name; m_staff_list = lista; }
protected virtual void SerializeInlineReferenceList(XmlNode xmlObject, object obj, IClassMap classMap, IPropertyMap propertyMap, bool creating) { IObjectManager om = this.Context.ObjectManager; IListManager lm = this.Context.ListManager; IList list = (IList)om.GetPropertyValue(obj, propertyMap.Name); //Optimistic concurrency if (!(creating)) { //Check value in xmlDoc against property original value, make sure they match } XmlNode xmlList = GetNode(xmlObject, propertyMap.GetDocElement()); RemoveAllChildNodes(xmlList); foreach (object value in list) { XmlNode xmlElement = AddNode(xmlList, "item"); SerializeInlineReferenceElement(obj, xmlElement, value); } IList orgList = lm.CloneList(obj, propertyMap, ((IList)(om.GetPropertyValue(obj, propertyMap.Name)))); om.SetOriginalPropertyValue(obj, propertyMap.Name, orgList); }
public CommonFilterDlg(IBaseWindow baseWin, IListManager listMan) : this() { if (baseWin == null) { throw new ArgumentNullException("baseWin"); } if (listMan == null) { throw new ArgumentNullException("listMan"); } fBase = baseWin; fListMan = listMan; fController = new CommonFilterDlgController(this, listMan); fController.Init(baseWin); filterView = new FilterGridView(fListMan); filterView.Dock = DockStyle.Fill; filterView.Name = "dataGridView1"; tsFieldsFilter.Controls.Add(filterView); SetLang(); fController.UpdateView(); }
public static void CommonFilterDlg_btnAccept_Handler(string name, IntPtr ptr, Form form) { CommonFilterDlg cfDlg = ((CommonFilterDlg)form); Assert.IsNotNull(cfDlg.Base); IListManager listMan = cfDlg.ListMan; SelectTab("tabsFilters", form, 0); var dataGridView1 = new DataGridViewTester("dataGridView1", form); dataGridView1.SelectCell(0, 0); dataGridView1.Properties.BeginEdit(false); dataGridView1.Properties.EndEdit(); dataGridView1.SelectCell(0, 1); dataGridView1.Properties.BeginEdit(false); dataGridView1.Properties.EndEdit(); dataGridView1.SelectCell(0, 2); dataGridView1.Properties.BeginEdit(false); dataGridView1.Properties.EndEdit(); // Fail: AmbiguousMatch?! //dataGridView1.FireEvent("Scroll", new ScrollEventArgs(ScrollEventType.SmallIncrement, 1)); if (form is PersonsFilterDlg) { PersonsFilterDlgTests.PersonsFilterDlg_Handler(form); } ClickButton("btnAccept", form); }
public void SetFilter() { if (!fView.AllowFilter()) { return; } GDMRecordType rt = GetSelectedRecordType(); IListManager listMan = GetRecordsListManByType(rt); if (listMan == null) { return; } switch (rt) { case GDMRecordType.rtIndividual: ShowPersonsFilter(rt, listMan); break; case GDMRecordType.rtFamily: case GDMRecordType.rtNote: case GDMRecordType.rtMultimedia: case GDMRecordType.rtSource: case GDMRecordType.rtRepository: case GDMRecordType.rtGroup: case GDMRecordType.rtResearch: case GDMRecordType.rtTask: case GDMRecordType.rtCommunication: case GDMRecordType.rtLocation: ShowCommonFilter(rt, listMan); break; } }
//TODO Search Query Help //TODO Tags Parsing //TODO Search and Favorites Selection //TODO Search and Favorites Paging //TODO Search and Paging Saving (Separate and auromate) public MainWindowConnector(IListManager listManager, IEventSystem eventSystem, IAppStates appStatem, OperationManager manager, FilesManager filesManager, ImageManager imageManager) : base(listManager, eventSystem) { _appStatem = appStatem; ReactOn <PrepareLoadEvent>(_ => FileListIndex = 0); ReactOn <PostLoadingEvent>(e => _appStatem.Set <GlobalAppState>(s => s.LastLocation = e.Path)); DisposeThis(filesManager.FilterObservable.Subscribe(_ => FileListIndex = 1)); OperationManager = manager; FilesManager = filesManager; ImageManager = imageManager; WindowState = new UIWindowState(_appStatem); _fullScreenManager = new FullScreenManager(WindowState); OpenLocationCommand = BindToEvent(OpenLocation); NextImage = BindToEvent(_ => new NextPageEvnt(false)); BackImage = BindToEvent(_ => new NextPageEvnt(true)); DeleteCommand = BindToEvent( _ => MessageBox.Show("Wírklich Löschen?", "Löschen", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes ? new DeleteEvent(ImageManager.CurrentIndex) : null); ToogleFavoriteCommand = BindToEvent(_ => new ToogleFavoritesEvent(ImageManager.CurrentIndex)); FullScreen = new DelegateCommand(_ => _fullScreenManager.EnableFullScreen(), _ => true); }
public OperationManager(IListManager listManager, IEventSystem eventSystem) : base(listManager, eventSystem) { var operationCache = listManager.GetList <OperationComponent>(); ReactOn <OperationFinishtEvent>(o => Update()); ReactOn <OperationStartedEvent>(o => Update()); _isRunning = Track(new ReactiveProperty <bool>(), nameof(IsRunning)); DisposeThis(operationCache .Connect() .Transform(c => { var entry = new OperationEntry(c.Message, c.OpsId); entry.CompositeDisposable.Add(entry.Finish.Subscribe(u => Update())); return(entry); }) .ObserveOnDispatcher() .Bind(OperationCollection) .OnItemAdded(i => Update()) .OnItemRemoved(i => Update()) .DisposeMany() .Subscribe()); }
/// <summary> /// Update ListBox with ingredients /// </summary> /// <param name="ingredients">the ingredients to add</param> private void UpdateQualificationsListBox(IListManager <string> qualifications) { ClearQualificationsAddedListBox(); for (int i = 0; i < qualifications.Count; i++) { AddedQualificationsListBox.Items.Add(qualifications.GetAt(i)); } }
public IList <ISearchResult> FindAll(string searchPattern) { GDMRecordType rt = GetSelectedRecordType(); IListManager listMan = GetRecordsListManByType(rt); IList <ISearchResult> result = (listMan == null) ? new List <ISearchResult>() : listMan.FindAll(searchPattern); return(result); }
public override void Setup() { fBase = new BaseWindowStub(); fListMan = new IndividualListMan(fBase.Context); fDialog = new PersonsFilterDlg(fBase, fListMan); fDialog.Show(); }
private void ShowPersonsFilter(GDMRecordType rt, IListManager listMan) { using (var dlg = AppHost.Container.Resolve <IPersonsFilterDlg>(fView, listMan)) { if (AppHost.Instance.ShowModalX(dlg, false)) { ApplyFilter(rt); } } }
public IList <ISearchResult> FindAll(string searchPattern) { GDMRecordType rt = GetSelectedRecordType(); IListManager listMan = GetRecordsListManByType(rt); IList <ISearchResult> result = listMan.FindAll(searchPattern); //IList<ISearchResult> result = fContext.FindAll(rt, searchPattern); return(result); }
public FilterGridView(IListManager listMan) { fCollection = new ObservableCollection <FilterConditionRow>(); DataStore = fCollection; fListMan = listMan; fFields = fListMan.CreateFields(); InitGrid(); }
public override void Setup() { base.Setup(); fBase = new BaseWindowStub(); fContext = fBase.Context; fListMan = new IndividualListMan(fContext); fDialog = new CommonFilterDlg(fBase, fListMan); fDialog.Show(); }
public PersonsFilterDlg(IBaseWindow baseWin, IListManager listMan) : base(baseWin, listMan) { InitializeComponent(); SetSpecificLang(); fListMan = (IndividualListMan)listMan; UpdateSpecific(); tabsFilters.SelectedIndex = 1; }
private BeginLoadingEvent?OpenLocation(IListManager manager) { var dialog = new VistaFolderBrowserDialog { ShowNewFolderButton = false, Description = "Ordner mit Bildern" }; return(Application.Current.Dispatcher != null && Application.Current.Dispatcher.Invoke(() => dialog.ShowDialog(Application.Current.MainWindow)) == true ? new BeginLoadingEvent(dialog.SelectedPath) : null); }
public PersonsFilterDlg(IBaseWindow baseWin, IListManager listMan) : base(baseWin, listMan) { InitializeComponent(); tabsFilters.SelectedIndex = 1; fController = new PersonsFilterDlgController(this, listMan); fController.Init(baseWin); SetSpecificLang(); fController.UpdateView(); }
public FilterGridView(IListManager listMan) { AllowUserToResizeRows = false; ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; Margin = new Padding(2); MultiSelect = false; fListMan = listMan; fFields = fListMan.CreateFields(); InitGrid(); }
protected override void Dispose(bool disposing) { if (disposing) { if (fListMan != null) { fListMan.Dispose(); fListMan = null; } } base.Dispose(disposing); }
public override void Setup() { base.Setup(); fBase = new BaseWindowStub(); fContext = fBase.Context; fListMan = new IndividualListMan(fContext); //ExpectModal("CommonFilterDlg", "DlgHandler"); fDialog = new CommonFilterDlg(fBase, fListMan); //fDialog.ShowDialog(); fDialog.Show(); }
protected virtual void CommitPersisted(object obj) { IObjectManager om = this.Context.ObjectManager; IListManager lm = this.Context.ListManager; IClassMap classMap = this.Context.DomainMap.MustGetClassMap(obj.GetType()); foreach (IPropertyMap propertyMap in classMap.GetAllPropertyMaps()) { CopyValuesToOriginals(propertyMap, lm, obj, om); } m_objectStatusLookup.Remove(obj); this.Context.ObjectManager.ClearUpdatedStatuses(obj); this.Context.ObjectManager.SetObjectStatus(obj, ObjectStatus.Clean); }
public PersonsFilterDlg(IBaseWindow baseWin, IListManager listMan) : base(baseWin, listMan) { InitializeComponent(); // platform: in Mono tsSpecificFilter has 0 index, somehow #if __MonoCS__ tabsFilters.Controls.SetChildIndex(pageSpecificFilter, 1); #endif tabsFilters.SelectedIndex = 1; fController = new PersonsFilterDlgController(this, listMan); fController.Init(baseWin); SetSpecificLang(); fController.UpdateView(); }
public PersonsFilterDlg(IBaseWindow baseWin, IListManager listMan) : base(baseWin, listMan) { InitializeComponent(); SetSpecificLang(); fListMan = (IndividualListMan)listMan; UpdateSpecific(); // platform: in Mono tsSpecificFilter has 0 index, somehow #if __MonoCS__ tabsFilters.Controls.SetChildIndex(pageSpecificFilter, 1); #endif tabsFilters.SelectedIndex = 1; }
protected virtual void DeserializeInlineReferenceList(object obj, IClassMap classMap, IPropertyMap propertyMap, XmlNode xmlObject) { IObjectManager om = this.Context.ObjectManager; IListManager lm = this.Context.ListManager; XmlNode xmlList = xmlObject.SelectSingleNode(propertyMap.GetDocElement()); IList list = (IList)om.GetPropertyValue(obj, propertyMap.Name); if (list == null) { list = lm.CreateList(obj, propertyMap); om.SetPropertyValue(obj, propertyMap.Name, list); IList cloneList = lm.CloneList(obj, propertyMap, list); om.SetOriginalPropertyValue(obj, propertyMap.Name, cloneList); } IInterceptableList mList; bool stackMute = false; mList = list as IInterceptableList; if (mList != null) { stackMute = mList.MuteNotify; mList.MuteNotify = true; } foreach (XmlNode xmlItem in xmlList.SelectNodes("item")) { object value = ManageInlineReference(xmlObject, obj, xmlItem);; if (value != null) { list.Add(value); } } if (mList != null) { mList.MuteNotify = stackMute; } om.SetNullValueStatus(obj, propertyMap.Name, false); IList clone = lm.CloneList(obj, propertyMap, list); om.SetOriginalPropertyValue(obj, propertyMap.Name, clone); }
/// <summary> /// Konstruktorn som instansierar ListManager. /// </summary> public Staff() { m_qualifications = new ListManager<String>(); }
public BlocklistUpdaterService(IListManager listManager) { Blocklists = new BlocklistCollection(); TargetApplications = new TargetApplicationCollection(); ListManager = listManager; }
protected void CopyValuesToOriginals(IPropertyMap propertyMap, IListManager lm, object obj, IObjectManager om) { if (propertyMap.IsCollection) { //IList list = lm.CloneList(obj, propertyMap, ((IList) (om.GetPropertyValue(obj, propertyMap.Name)))); IInterceptableList list = om.GetPropertyValue(obj, propertyMap.Name) as IInterceptableList; IList orgList = null; if (list != null) { bool stackMute = list.MuteNotify; list.MuteNotify = true; orgList = new ArrayList( list ); list.MuteNotify = stackMute; } om.SetOriginalPropertyValue(obj, propertyMap.Name, orgList); } else { if (om.GetNullValueStatus(obj, propertyMap.Name)) { om.SetOriginalPropertyValue(obj, propertyMap.Name, System.DBNull.Value); } else { om.SetOriginalPropertyValue(obj, propertyMap.Name, om.GetPropertyValue(obj, propertyMap.Name)); } } }
protected void CopyValuesToOriginals(IPropertyMap propertyMap, IListManager lm, object obj, IObjectManager om) { if (propertyMap.IsCollection) { IList list = lm.CloneList(obj, propertyMap, ((IList) (om.GetPropertyValue(obj, propertyMap.Name)))); om.SetOriginalPropertyValue(obj, propertyMap.Name, list); } else { if (om.GetNullValueStatus(obj, propertyMap.Name)) { om.SetOriginalPropertyValue(obj, propertyMap.Name, System.DBNull.Value); } else { om.SetOriginalPropertyValue(obj, propertyMap.Name, om.GetPropertyValue(obj, propertyMap.Name)); } } }