Пример #1
0
        private void filesList_FileSelected(object sender, FileSelectEventArgs fse)
        {
            var ext = Path.GetExtension(Convert.ToString(fse.FileName));

            //Do different stuff depending on file type.
            if (ext == ".inc" || ext == ".pwn")
            {
                Program.MainForm.OpenFile(fse.FileName);
            }
            else
            {
                Program.MainForm.ShowStatus(translations.ProjExplorerDock_filesList_FileSelected_FileNotSupported, 5000, false);
                Process.Start(new ProcessStartInfo
                {
                    WorkingDirectory = Path.GetDirectoryName(Convert.ToString(fse.FileName)),
                    FileName         = fse.FileName
                });
            }
        }
Пример #2
0
 private void OnFileSelected(object sender, FileSelectEventArgs e)
 {
     ReRender();
 }