示例#1
0
        private void fillAutocomplete()
        {
            do
            {
                needRequery = false;
                var response = FNSMain.CachedQueryParty(entryQuery.Text);

                var completionListStore = new ListStore(typeof(PartyData));

                foreach (var sugg in response.suggestions)
                {
                    completionListStore.AppendValues(
                        sugg.data
                        );
                }

                Application.Invoke(delegate
                {
                    entryQuery.Completion.Model = completionListStore;
                    if (this.HasFocus)
                    {
                        entryQuery.Completion.Complete();
                    }
                });
            }while(needRequery);
            queryIsRunning = false;
        }
示例#2
0
        public GetOrgInfo()
        {
            this.Build();

            FNSMain.SetUp();
            entryQuery.Completion = new EntryCompletion();
            entryQuery.Completion.MinimumKeyLength = 0;
            entryQuery.Completion.MatchSelected   += Completion_MatchSelected;
            entryQuery.Completion.MatchFunc        = Completion_MatchFunc;
            var cell = new CellRendererText();

            entryQuery.Completion.PackStart(cell, true);
            entryQuery.Completion.SetCellDataFunc(cell, OnCellLayoutDataFunc);
        }