Ejemplo n.º 1
0
        private void ListView_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            MenuItem item = listView.SelectedItem as MenuItem;

            if (item == null)
            {
                return;
            }
            MenuPresenter presenter = DataContext as MenuPresenter;

            if (presenter == null)
            {
                return;
            }
            presenter.Enter(item);
        }
Ejemplo n.º 2
0
        public MenuView()
        {
            InitializeComponent();
            Button btn = new Button();

            btn.Content = Core.Database.GetText("Back", "System");
            btn.Click  += (sender, e) =>
            {
                MenuPresenter presenter = DataContext as MenuPresenter;
                if (presenter == null)
                {
                    return;
                }
                presenter.Back();
            };
            toolBar.Items.Add(btn);
        }
Ejemplo n.º 3
0
 private void ChangePage(MenuPresenter current)
 {
     try
     {
         MenuPresenter presenter = View.DataContext as MenuPresenter;
         current.View     = View;
         current.Preview  = presenter;
         View.DataContext = current;
     }
     catch (Exception ex)
     {
         AppPresenter.Inst.DlgPresenter.ShowFatalBox(ex.Message, null);
         MenuPresenter presenter = (View.DataContext as MenuPresenter).Preview;
         if (presenter != null)
         {
             View.DataContext = presenter;
         }
     }
 }
Ejemplo n.º 4
0
 private void ChangePage(MenuPresenter current)
 {
     try
     {
         MenuPresenter presenter = View.DataContext as MenuPresenter;
         current.View = View;
         current.Preview = presenter;
         View.DataContext = current;
     }
     catch (Exception ex)
     {
         AppPresenter.Inst.DlgPresenter.ShowFatalBox(ex.Message, null);
         MenuPresenter presenter = (View.DataContext as MenuPresenter).Preview;
         if (presenter != null)
         {
             View.DataContext = presenter;
         }
     }
 }