예제 #1
0
파일: mainForm.cs 프로젝트: cisti/WinLess
        public void LoadDirectories(CommandArguments args)
        {
            if (args.ClearDirectories)
            {
                Program.Settings.DirectoryList.ClearDirectories();
            }

            //load directories specified in arguments
            foreach (string directoryPath in args.DirectoryPaths)
            {
                if (!System.IO.Directory.Exists(directoryPath))
                {
                    continue;
                }

                Models.Directory directory = Program.Settings.DirectoryList.AddDirectory(directoryPath);

                foreach (File file in directory.Files)
                {
                    file.Minify = args.Minify;
                    if (args.InitialCompile)
                    {
                        file.Compile();
                    }
                }
            }
            foldersListBox_DataChanged();
            SelectDirectory();
            Program.Settings.SaveSettings();
        }
예제 #2
0
 private void refreshDirectoryButton_Click(object sender, EventArgs e)
 {
     if (foldersListBox.SelectedItem != null)
     {
         Models.Directory directory = (Models.Directory)foldersListBox.SelectedItem;
         directory.Refresh();
         SelectDirectory();
         Program.Settings.SaveSettings();
     }
 }
예제 #3
0
        private void SelectDirectory()
        {
            Models.Directory directory = (Models.Directory)foldersListBox.SelectedItem;
            if (directory != null)
            {
                filesDataGridView.DataSource = directory.Files;
            }
            else
            {
                filesDataGridView.DataSource = new List <Models.File>();
            }

            filesDataGridView_DataChanged();
        }