Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MainWindow"/> class.
        /// </summary>
        public MainWindow()
        {
            InitializeComponent();
            AppearanceManager.Current.AccentColor = Colors.DarkViolet;

            ContentSource = MenuLinkGroups.First().Links.First().Source;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="MainWindow"/> class.
 /// </summary>
 public MainWindow()
 {
     InitializeComponent();
     RegisterNavigation();
     AppearanceManager.Current.AccentColor = Colors.Green;
     ContentSource = MenuLinkGroups.First().Links.First().Source;
 }
        public MainWindow()
        {
            InitializeComponent();
            ViewModel.LaunchMeetingAction = async uri =>
            {
                // You will not be able to comprehend how awesome this is.
                var browser = new WebBrowser();
                browser.Navigate(uri);

                await Task.Delay(500);

                WindowState = WindowState.Minimized;
            };
            Messenger.Default.Register(this, new Action <RequestNavigationEvent>(NavigationRequested));

            if (!ApplicationSettings.Current.Save())
            {
                MessageBox.Show("This application requires a configuration file to be saved in the same directory as the application. You do not have write access to the directory or configuration file. Please correct the issue.", "Settings", MessageBoxButton.OK, MessageBoxImage.Error);
                Application.Current.Shutdown(1);
            }

            if (!ApplicationSettings.Current.OutlookIntegration && ApplicationSettings.Current.HideOutlookIntegration)
            {
                MenuLinkGroups.First().Links.Remove(MenuLinkGroups.First().Links.First());
                MenuLinkGroups.First().Links.Remove(MenuLinkGroups.First().Links.First());
                ContentSource = new Uri("/Views/CustomMeetingsView.xaml", UriKind.RelativeOrAbsolute);
            }
        }
Beispiel #4
0
 /// <summary>
 /// Called when page is loaded.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
 private void OnLoaded(object sender, RoutedEventArgs e)
 {
     if (ContentSource == null)
     {
         ContentSource = MenuLinkGroups.First().Links.First().Source;
     }
 }
        //public partial class MainWindow : MetroWindow {
        public MainWindow()
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;

            AppearanceManager.Current.AccentColor = Colors.BlueViolet;
            ContentSource = MenuLinkGroups.First().Links.First().Source;
        }