public FinancesHost() { InitializeComponent(); Window = this; if (Properties.Settings.Default.User_AdvancedLogging) { Log.Commit("[FinanceHost] Loaded."); } }
/// <summary> /// Sets the content of the main content section of the window. /// </summary> /// <param name="Content">The usercontrol that is to be loaded.</param> public static void SetContent(string Content) { switch (Content) { case "Reviews": //Set the content Window.MainContent.Content = new WebsiteHost(); //Set the toolbar Window.ToolbarContent.Content = new WebsiteToolbar(); //Set the specific content on the host control. WebsiteHost.SetContent(Content); break; case "Costs": Window.MainContent.Content = new FinancesHost(); Window.ToolbarContent.Content = new FinancesToolbar(); FinancesHost.SetContent(Content); break; case "Prices": Window.MainContent.Content = new FinancesHost(); Window.ToolbarContent.Content = new FinancesToolbar(); FinancesHost.SetContent(Content); break; case "Bookings": Window.MainContent.Content = new BookingsHost(); Window.ToolbarContent.Content = new BookingsToolbar(); BookingsHost.SetContent(Content); break; case "ViewCustomers": Window.MainContent.Content = new CustomersHost(); Window.ToolbarContent.Content = new CustomersToolbar(); CustomersHost.SetContent(Content); break; case "Tasks": Window.MainContent.Content = new TasksHost(); Window.ToolbarContent.Content = new TasksToolbar(); TasksHost.SetContent(Content); break; } }
private void Costs_Click(object sender, RoutedEventArgs e) { string Content = "Costs"; FinancesHost.SetContent(Content); }