Esempio n. 1
0
        public App()
        {
            InitializeComponent();
            Suspending        += OnSuspending;
            LeavingBackground += OnLeavingBackground;
            // Initialize NLog
            Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
            NLog.LogManager.Configuration.Variables["LogPath"] = storageFolder.Path;

            RegisterUncaughtExceptionLogger();

            ConsentDialogDisplay    = new Dialogs.ConsentDialog();
            PropertiesDialogDisplay = new Dialogs.PropertiesDialog();
            LayoutDialogDisplay     = new Dialogs.LayoutDialog();
            AddItemDialogDisplay    = new Dialogs.AddItemDialog();
            ExceptionDialogDisplay  = new Dialogs.ExceptionDialog();
            // this.UnhandledException += App_UnhandledException;
            Clipboard.ContentChanged += Clipboard_ContentChanged;
            Clipboard_ContentChanged(null, null);
            AppCenter.Start("682666d1-51d3-4e4a-93d0-d028d43baaa0", typeof(Analytics), typeof(Crashes));

            SidebarPinned                    = new SidebarPinnedModel();
            AppSettings                      = new SettingsViewModel();
            InteractionViewModel             = new InteractionViewModel();
            SelectedItemsPropertiesViewModel = new SelectedItemsPropertiesViewModel();
            DirectoryPropertiesViewModel     = new DirectoryPropertiesViewModel();
        }
Esempio n. 2
0
        public App()
        {
            var args = Environment.GetCommandLineArgs();

            if (args.Length == 2)
            {
                var parsedCommands = CommandLineParser.ParseUntrustedCommands(args);

                if (parsedCommands != null && parsedCommands.Count > 0)
                {
                    foreach (var command in parsedCommands)
                    {
                        switch (command.Type)
                        {
                        case ParsedCommandType.ExplorerShellCommand:
                            var proc = Process.GetCurrentProcess();
                            OpenShellCommandInExplorer(command.Payload, proc.Id).GetAwaiter().GetResult();

                            //this is useless.
                            Exit();
                            return;

                        default:
                            break;
                        }
                    }
                }
            }

            InitializeComponent();
            Suspending += OnSuspending;

            // Initialize NLog
            Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
            NLog.LogManager.Configuration.Variables["LogPath"] = storageFolder.Path;

            RegisterUncaughtExceptionLogger();

            ConsentDialogDisplay    = new Dialogs.ConsentDialog();
            PropertiesDialogDisplay = new Dialogs.PropertiesDialog();
            LayoutDialogDisplay     = new Dialogs.LayoutDialog();
            AddItemDialogDisplay    = new Dialogs.AddItemDialog();
            ExceptionDialogDisplay  = new Dialogs.ExceptionDialog();
            // this.UnhandledException += App_UnhandledException;
            Clipboard.ContentChanged += Clipboard_ContentChanged;
            Clipboard_ContentChanged(null, null);
            AppCenter.Start("682666d1-51d3-4e4a-93d0-d028d43baaa0", typeof(Analytics), typeof(Crashes));

            AppSettings                     = new SettingsViewModel();
            InteractionViewModel            = new InteractionViewModel();
            SelectedItemPropertiesViewModel = new SelectedItemPropertiesViewModel();
        }
Esempio n. 3
0
        public App()
        {
            this.InitializeComponent();
            this.Suspending += OnSuspending;
            consentDialog    = new Dialogs.ConsentDialog();
            propertiesDialog = new Dialogs.PropertiesDialog();
            layoutDialog     = new Dialogs.LayoutDialog();
            addItemDialog    = new Dialogs.AddItemDialog();
            exceptionDialog  = new Dialogs.ExceptionDialog();
            //this.UnhandledException += App_UnhandledException;
            Clipboard.ContentChanged += Clipboard_ContentChanged;
            Clipboard_ContentChanged(null, null);
            AppCenter.Start("682666d1-51d3-4e4a-93d0-d028d43baaa0", typeof(Analytics), typeof(Crashes));

            AppSettings = new SettingsViewModel();
        }
Esempio n. 4
0
 public App()
 {
     this.InitializeComponent();
     this.Suspending += OnSuspending;
     consentDialog    = new Dialogs.ConsentDialog();
     propertiesDialog = new Dialogs.PropertiesDialog();
     layoutDialog     = new Dialogs.LayoutDialog();
     addItemDialog    = new Dialogs.AddItemDialog();
     exceptionDialog  = new Dialogs.ExceptionDialog();
     //this.UnhandledException += App_UnhandledException;
     Clipboard.ContentChanged += Clipboard_ContentChanged;
     Clipboard_ContentChanged(null, null);
     AppCenter.Start("682666d1-51d3-4e4a-93d0-d028d43baaa0", typeof(Analytics), typeof(Crashes));
     localSettings = ApplicationData.Current.LocalSettings;
     SetPropertiesFromLocalSettings();
     DetectCustomLocations();
     PopulatePinnedSidebarItems();
     DetectWSLDistros();
     QuickLookIntegration();
 }
Esempio n. 5
0
        public App()
        {
            this.InitializeComponent();
            this.Suspending += OnSuspending;

            // Initialize NLog
            Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
            NLog.LogManager.Configuration.Variables["LogPath"] = storageFolder.Path;

            RegisterUncaughtExceptionLogger();

            consentDialog    = new Dialogs.ConsentDialog();
            propertiesDialog = new Dialogs.PropertiesDialog();
            layoutDialog     = new Dialogs.LayoutDialog();
            addItemDialog    = new Dialogs.AddItemDialog();
            exceptionDialog  = new Dialogs.ExceptionDialog();
            // this.UnhandledException += App_UnhandledException;
            Clipboard.ContentChanged += Clipboard_ContentChanged;
            Clipboard_ContentChanged(null, null);
            AppCenter.Start("682666d1-51d3-4e4a-93d0-d028d43baaa0", typeof(Analytics), typeof(Crashes));

            AppSettings = new SettingsViewModel();
        }
Esempio n. 6
0
        public App()
        {
            InitializeComponent();
            Suspending        += OnSuspending;
            LeavingBackground += OnLeavingBackground;
            // Initialize NLog
            Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
            NLog.LogManager.Configuration.Variables["LogPath"] = storageFolder.Path;

            RegisterUncaughtExceptionLogger();

            ConsentDialogDisplay    = new Dialogs.ConsentDialog();
            PropertiesDialogDisplay = new Dialogs.PropertiesDialog();
            LayoutDialogDisplay     = new Dialogs.LayoutDialog();
            AddItemDialogDisplay    = new Dialogs.AddItemDialog();
            ExceptionDialogDisplay  = new Dialogs.ExceptionDialog();

            Clipboard.ContentChanged += Clipboard_ContentChanged;
            Clipboard_ContentChanged(null, null);

#if !DEBUG
            AppCenter.Start("682666d1-51d3-4e4a-93d0-d028d43baaa0", typeof(Analytics), typeof(Crashes));
#endif
        }