Exemplo n.º 1
0
        //Runs on window open
        public DriveScanWindow()
        {
            InitializeComponent();

            //Get selected theme from config handler
            ThemeSwitch(ConfigHandler.readValue("theme"));
            HiddenFiles.IsChecked = Convert.ToBoolean(Convert.ToInt16(ConfigHandler.readValue("hidden")));

            //Singleton Init
            currentWindow = this;

            //Populate Drive List
            RefreshDrives(this, null);

            //Define Label Formatting
            PointLabel = chartPoint =>
                         FormatSizeConverter.Convert((long)chartPoint.Y).ToString();

            //Bind binding to labelpoint
            pointLabelBinding.Source = PointLabel;

            //Init scanned Drives list
            scannedDrives = new ObservableCollection <FolderInfo>();

            //Populate Dir Tree
            DirectoryTree.ItemsSource = scannedDrives;
        }
Exemplo n.º 2
0
        private void OnStartup(object sender, StartupEventArgs e)
        {
            // Show window console if debug mode is enabled
            if (Convert.ToBoolean(Convert.ToInt16(ConfigHandler.readValue("debug"))))
            {
                AllocConsole();
            }

            // Create the startup window
            DriveScanWindow wnd = new DriveScanWindow();

            // Show the window
            wnd.Show();
        }