コード例 #1
0
ファイル: HomeContent.xaml.cs プロジェクト: ultrasonicsoft/G1
 private void btnOpenNotification_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         Dashboard parent = Window.GetWindow(this) as Dashboard;
         if (parent != null)
         {
             DashboardMenu sideMenu = parent.ucDashboardMenu.CurrentPage as DashboardMenu;
             DashboardHelper.ChangeDashboardSelection(parent, sideMenu.btnBarcodePrinter);
             BarcodePrinter barcodePrinter = new BarcodePrinter();
             parent.ucMainContent.ShowPage(barcodePrinter);
         }
     }
     catch (Exception ex)
     {
         Logger.LogException(ex);
     }
 }
コード例 #2
0
        public DashboardMenu()
        {
            try
            {
                InitializeComponent();

                availableOptions = new Dictionary<System.Windows.Controls.Primitives.ToggleButton, UserControl>();

                home = new HomeContent();
                newQuote = new NewQuoteContent();
                customer = new CustomerSettingsContent();
                priceSettings = new PriceSettingsContent();
                soSection = new SalesOrderContent();
                worksheetSection = new WorksheetContent();
                invoice = new InvoiceContent();
                makePayment = new MakeInvoicePayment();
                commanderSection = new CommanderSectionContent();
                barcodePrinter = new BarcodePrinter();

                availableOptions.Add(btnHome, home);
                availableOptions.Add(btnCreateNewQuote, newQuote);
                availableOptions.Add(btnPriceSettings, priceSettings);
                availableOptions.Add(btnCustomerSettings, customer);
                availableOptions.Add(btnSaleOrder, soSection);
                availableOptions.Add(btnWorksheet, worksheetSection);
                availableOptions.Add(btnInvoice, invoice);
                availableOptions.Add(btnMakePayment, makePayment);
                availableOptions.Add(btnCommanderSection, commanderSection);
                availableOptions.Add(btnBarcodePrinter, barcodePrinter);

                btnHome.IsChecked = true;
            }
            catch (Exception ex)
            {
                Logger.LogException(ex);
            }
        }