public UserControlMenuItem(ItemMenu itemMenu) { InitializeComponent(); ExpanderMenu.Visibility = itemMenu.SubItems == null ? Visibility.Collapsed : Visibility.Visible; ListViewItemMenu.Visibility = itemMenu.SubItems == null ? Visibility.Visible : Visibility.Collapsed; this.DataContext = itemMenu; }
public UserControlMenuItem(ItemMenu itemMenu, MainWindow context) { InitializeComponent(); _context = context; ExpanderMenu.Visibility = itemMenu.SubItems == null ? Visibility.Collapsed : Visibility.Visible; ListViewItemMenu.Visibility = itemMenu.SubItems == null ? Visibility.Visible : Visibility.Collapsed; DataContext = itemMenu; }
public MainWindow() { InitializeComponent(); HalamanDepan dashboard = new HalamanDepan(); myframe.NavigationService.Navigate(dashboard); var menuRegister = new List <SubItem> { new SubItem("Pelanggan"), new SubItem("Penyedia"), new SubItem("Karyawan"), new SubItem("Produk") }; var item6 = new ItemMenu("Pendaftaran", menuRegister, PackIconKind.Register); var menuSchedule = new List <SubItem> { new SubItem("Layanan"), new SubItem("Informasi") }; var item1 = new ItemMenu("Notifikasi", menuSchedule, PackIconKind.Schedule); var menuReports = new List <SubItem> { new SubItem("Pelanggan"), new SubItem("Penyedia"), new SubItem("Produk"), new SubItem("Stok Barang"), new SubItem("Penjual") }; var item2 = new ItemMenu("Laporan", menuReports, PackIconKind.FileReport); var menuExpenses = new List <SubItem> { new SubItem("Masalah harian"), new SubItem("Catatan") }; var item3 = new ItemMenu("Lain-lain", menuExpenses, PackIconKind.ShoppingBasket); var item4 = new ItemMenu("Tentang Aplikasi", new UserControl(), PackIconKind.AboutCircleOutline); var item0 = new ItemMenu("Dashboard", new UserControl(), PackIconKind.ViewDashboard); Menu.Children.Add(new UserControlMenuItem(item0)); Menu.Children.Add(new UserControlMenuItem(item6)); Menu.Children.Add(new UserControlMenuItem(item1)); Menu.Children.Add(new UserControlMenuItem(item2)); Menu.Children.Add(new UserControlMenuItem(item3)); Menu.Children.Add(new UserControlMenuItem(item4)); }
public MainWindow() { InitializeComponent(); var menuRegister = new List <SubItem>(); menuRegister.Add(new SubItem("Customer")); menuRegister.Add(new SubItem("Provider")); menuRegister.Add(new SubItem("Employees")); menuRegister.Add(new SubItem("Products")); var itemMenu0 = new ItemMenu("Register", menuRegister, PackIconKind.Register); var menuSchedule = new List <SubItem>(); menuSchedule.Add(new SubItem("Services")); menuSchedule.Add(new SubItem("Meetings")); var itemMenu1 = new ItemMenu("Appointments", menuSchedule, PackIconKind.Schedule); var menuReports = new List <SubItem>(); menuReports.Add(new SubItem("Customers")); menuReports.Add(new SubItem("Providers")); menuReports.Add(new SubItem("Products")); menuReports.Add(new SubItem("Stock")); menuReports.Add(new SubItem("Sales")); var itemMenu2 = new ItemMenu("Reports", menuReports, PackIconKind.FileReport); var menuExpenses = new List <SubItem>(); menuExpenses.Add(new SubItem("Fixed")); menuExpenses.Add(new SubItem("Variable")); var itemMenu3 = new ItemMenu("Expenses", menuExpenses, PackIconKind.ShoppingBasket); var menuFinancial = new List <SubItem>(); menuFinancial.Add(new SubItem("Services")); menuFinancial.Add(new SubItem("Meetings")); var itemMenu4 = new ItemMenu("Financial", menuFinancial, PackIconKind.ScaleBalance); var itemMenu5 = new ItemMenu("Dashboard", new UserControl(), PackIconKind.ViewDashboard); Menu.Children.Add(new UserControlMenuItem(itemMenu0)); Menu.Children.Add(new UserControlMenuItem(itemMenu1)); Menu.Children.Add(new UserControlMenuItem(itemMenu2)); Menu.Children.Add(new UserControlMenuItem(itemMenu3)); Menu.Children.Add(new UserControlMenuItem(itemMenu4)); Menu.Children.Add(new UserControlMenuItem(itemMenu5)); }
public MainWindow() { InitializeComponent(); var menuRegister = new List <SubItem> { new SubItem("Customer", new Dashboard()), new SubItem("Providers", new UserControlProviders()), new SubItem("Shoes", new ShoesStore()), new SubItem("Products") }; var item6 = new ItemMenu("Register", menuRegister, PackIconKind.Register); var menuSchedule = new List <SubItem> { new SubItem("Services"), new SubItem("Meetings") }; var item1 = new ItemMenu("Appointments", menuSchedule, PackIconKind.Schedule); var menuReports = new List <SubItem> { new SubItem("Customers"), new SubItem("Providers"), new SubItem("Employees"), new SubItem("Products"), new SubItem("Stock"), new SubItem("Sales"), }; var item2 = new ItemMenu("Reports", menuReports, PackIconKind.FileReport); var menuExpenses = new List <SubItem> { new SubItem("Fixed"), new SubItem("Variable") }; var item3 = new ItemMenu("Expenses", menuExpenses, PackIconKind.ShoppingBasket); var menuFinancial = new List <SubItem> { new SubItem("Cash flow") }; var item4 = new ItemMenu("Financial", menuFinancial, PackIconKind.ScaleBalance); var item0 = new ItemMenu("Dashboard", new UserControl(), PackIconKind.ViewDashboard); //Menu.Children.Add(new UserControlMenuItem(item0)); Menu.Children.Add(new UserControlMenuItem(item6, this)); Menu.Children.Add(new UserControlMenuItem(item1, this)); Menu.Children.Add(new UserControlMenuItem(item2, this)); Menu.Children.Add(new UserControlMenuItem(item3, this)); Menu.Children.Add(new UserControlMenuItem(item4, this)); }
public MainWindow() { InitializeComponent(); var menuRegister = new List <SubItem> { new SubItem("客户", new UserControlCustomers()), new SubItem("供应商", new UserControlProviders()), new SubItem("员工"), new SubItem("产品"), }; var register = new ItemMenu("登记", menuRegister, PackIconKind.Register); var menuSchedule = new List <SubItem> { new SubItem("服务"), new SubItem("会议"), }; var schedule = new ItemMenu("预约", menuSchedule, PackIconKind.Schedule); var menuReports = new List <SubItem> { new SubItem("客户"), new SubItem("供应商"), new SubItem("产品"), new SubItem("库存"), new SubItem("销售额"), }; var reports = new ItemMenu("报告", menuReports, PackIconKind.FileReport); var menuExpenses = new List <SubItem> { new SubItem("固定资产"), new SubItem("流动资金"), }; var expenses = new ItemMenu("费用", menuExpenses, PackIconKind.ShoppingBasket); var menuFinancial = new List <SubItem> { new SubItem("现金流"), }; var financial = new ItemMenu("财务", menuFinancial, PackIconKind.ScaleBalance); Menu.Children.Add(new UserControlMenuItem(register, this)); Menu.Children.Add(new UserControlMenuItem(schedule, this)); Menu.Children.Add(new UserControlMenuItem(expenses, this)); Menu.Children.Add(new UserControlMenuItem(reports, this)); Menu.Children.Add(new UserControlMenuItem(financial, this)); using (var db = new Db()) { //var human = new Human() //{ // IsMale = true, // Name = "Name", // Addresses = "浙江温州", // Phones="10086", // Ethnic="汉族" //}; //db.Humen.Add(human); //var result = db.SaveChanges(); var result = db.Humen.OrderBy(b => b.ID).First(); MessageBox.Show(result.Name + result.Addresses); } }