コード例 #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();
        }
コード例 #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();
        }
コード例 #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();
        }
コード例 #4
0
ファイル: App.xaml.cs プロジェクト: xJavii8/files-uwp
 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();
 }
コード例 #5
0
ファイル: App.xaml.cs プロジェクト: piotrulos/files-uwp
        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();
        }
コード例 #6
0
ファイル: App.xaml.cs プロジェクト: rjnb50/files-uwp
        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
        }