Ejemplo n.º 1
0
        //private void DataViewArea_DataItemsSearchedByUser(object sender, EventArgs e)
        //{
        //    var hostDataViewArea = sender as DataViewArea;
        //    hostDataViewArea.DefaultDataViewItem = null;
        //    CurrentDataViewArea = hostDataViewArea;
        //    SetLinks();
        //}


        private void SetLinks()
        {
            var lastindex = DataViewAreas.IndexOf(CurrentDataViewArea);

            if (lastindex != -1)
            {
                List <I_DataArea> listRemove = new List <I_DataArea>();
                var index = 0;
                foreach (var item in DataViewAreas)
                {
                    if (index > lastindex)
                    {
                        listRemove.Add(item);
                    }
                    index++;
                }
                foreach (var item in listRemove)
                {
                    DataViewAreas.Remove(item);
                }
            }
            List <DataViewLink> links = new List <DataViewLink>();

            foreach (var item in DataViewAreas)
            {
                DataViewLink link = new DataViewLink();
                link.Title = item.AreaInitializer.Title.ToString();
                //link.Tooltip item.AreaInitializer
                link.DataViewLinkClicked += (sender, e) => Link_DataViewLinkClicked(sender, e, item);
                links.Add(link);
            }
            View.ShowLinks(links);
        }
 private void Button_MouseLeftButtonUp(object sender, MouseButtonEventArgs e, DataViewLink link)
 {
     link.OnClicked();
 }
Ejemplo n.º 3
0
 public void SetView(DataViewLink link)
 {
     DB = ConfigMemory.SelectedCollection.Databases.FirstOrDefault(xdb => xdb.Name == link.Database);
     T  = (TableElement)DB.Items.FirstOrDefault(t => T.Name == link.Table);
 }