Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     RepeaterAnasayfa.DataSource = db.anasayfas.ToList();
     RepeaterAnasayfa.DataBind();
     Repeater1.DataSource = db.hakkimizdas.ToList();
     Repeater1.DataBind();
     ListViewNeden.DataSource = db.nedenbizs.ToList();
     ListViewNeden.DataBind();
     DataListkategori.DataSource = db.kategoris.ToList();
     DataListkategori.DataBind();
     ListViewMenu.DataSource = db.menus.ToList();
     ListViewMenu.DataBind();
     DataListSpe.DataSource = db.specials.ToList();
     DataListSpe.DataBind();
     ListView1.DataSource = db.specials.ToList();
     ListView1.DataBind();
     ListViewOrganizasyon.DataSource = db.organizasyons.ToList();
     ListViewOrganizasyon.DataBind();
     ListViewYorum.DataSource = db.yorums.Where(p => p.onay == true).ToList();
     ListViewYorum.DataBind();
     ListViewGaleri.DataSource = db.galeris.Where(p => p.onay == true).ToList();
     ListViewGaleri.DataBind();
     ListViewSef.DataSource = db.sefs.ToList();
     ListViewSef.DataBind();
     Repeateriletisim.DataSource = db.anasayfas.ToList();
     Repeateriletisim.DataBind();
 }
Exemplo n.º 2
0
 private void listView2_MouseUp(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         try
         {
             if (listView2.FocusedItem.Bounds.Contains(e.Location) == true)
             {
                 ItemContexMenu.Show(Cursor.Position);
                 //selectedItem = listView2.SelectedItems[0].Index;
                 foreach (var item in items)
                 {
                     if (item.displayName == listView2.SelectedItems[0].Text)
                     {
                         selectedItem = item.id;
                     }
                 }
                 //MessageBox.Show($"{selectedItem} = {items[selectedItem].hostName}");
             }
             else
             {
                 //if(listView1.)
                 ListViewMenu.Show(Cursor.Position);
             }
         }
         catch
         {
             ListViewMenu.Show(Cursor.Position);
         }
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Inicializar ListViewMenu
        /// </summary>
        internal void InicializarListView()
        {
            ListViewMenu.Visibility         = Visibility.Visible;
            BoxMenu.Visibility              = Visibility.Visible;
            Gridcolunas.AllowsColumnReorder = false;

            Gridcolunas.Columns[0].Width = _mrColunaTipo;
            Gridcolunas.Columns[1].Width = _mrColunaModulo;
            Gridcolunas.Columns[2].Width = _mrColunaDescricao;

            if (ArrayList.Count == 0)
            {
                return;
            }
            ListViewMenu.Items.Clear();


            foreach (var vitem in ArrayList.Cast <Menu>())
            {
                ListViewMenu.Items.Add(new Menu()
                {
                    Tipo      = vitem.Tipo,
                    Modulo    = vitem.Modulo,
                    Descricao = vitem.Descricao,
                    ModPai    = vitem.ModPai
                });
            }
            /*ListViewMenu.Foreground = Color.DodgerBlue;*/
            ArrayList.Clear();
            ListViewMenu.Focus();
            //ListViewMenu.Focusable = false;
            ListViewMenu.SelectedItem = ListViewMenu.Items[0];
        }
Exemplo n.º 4
0
        private async void ListViewOption_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            try
            {
                await Task.Delay(100);

                ListViewMenu.UnselectAll();

                if (ListViewOption.SelectedItem != null)
                {
                    content.Children.Clear();
                    UserControl usc;
                    switch (((ListViewItem)((ListView)sender).SelectedItem).Name)
                    {
                    case "ItemPengaturan":
                        usc = new viewPengaturan();
                        content.Children.Add(usc);
                        break;

                    case "ItemLogout":
                        var login = new Window_Login();
                        this.Close();
                        login.Show();
                        break;

                    default:
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("error di " + ex);
            }
        }
Exemplo n.º 5
0
 public Janela()
 {
     InitializeComponent();
     // Delegate listview event
     ListViewMenu.AddHandler(Thumb.DragDeltaEvent,
                             new DragDeltaEventHandler(Thumb_DragDelta),
                             true);
 }
        private void PageContentFrame_Navigated(object sender, NavigationEventArgs e)
        {
            // Updates system back button
            SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = (PageContentFrame.CanGoBack == true) ? AppViewBackButtonVisibility.Visible : AppViewBackButtonVisibility.Collapsed;

            // Updates selected menu item and current page title
            for (int index = 0; index < ListViewMenu.Items.Count; index++)
            {
                var entry = ListViewMenu.Items[index] as MenuEntry;

                if (entry != null && entry.TargetPage == e.Content.GetType())
                {
                    TextBlockTitlePage.Text = entry.Label;

                    var menuItemContainer = ListViewMenu.ContainerFromIndex(index) as ListViewItem;

                    if (menuItemContainer != null)
                    {
                        menuItemContainer.IsSelected = true;
                        break;
                    }
                }
            }
        }
Exemplo n.º 7
0
        /////////////////////////////////////////////////////////////////////   Работа с элементами коллекции     //////////////////////////////////////////////////////////////////

        private void listView1_MouseUp(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                try
                {
                    if (listView1.FocusedItem.Bounds.Contains(e.Location) == true)
                    {
                        ItemContexMenu.Show(Cursor.Position);
                        selectedItem = listView1.SelectedIndices[0];
                        //MessageBox.Show($"{selectedItem} = {items[selectedItem].hostName}");
                    }
                    else
                    {
                        //if(listView1.)
                        ListViewMenu.Show(Cursor.Position);
                    }
                }
                catch
                {
                    ListViewMenu.Show(Cursor.Position);
                }
            }
        }
Exemplo n.º 8
0
 private void SettingButton_Click(object sender, RoutedEventArgs e)
 {
     ListViewMenu.UnselectAll();
 }