コード例 #1
0
        private void btnContactsFile_Click(object sender, EventArgs e)
        {
            var dlgOpenSheet = new Ookii.Dialogs.VistaOpenFileDialog()
            {
                DefaultExt  = ".csv",
                Multiselect = false,
                Title       = "Please select the input csv coming from Apptivo",
                Filter      = @"csv files (*.csv)|*.*",
                FilterIndex = 0,
            };

            if (dlgOpenSheet.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                myUI.ContactsFile = dlgOpenSheet.FileName;
            }
        }
コード例 #2
0
	    private void AddFile()
	    {
			var dialog = new Ookii.Dialogs.VistaOpenFileDialog
			{
				CheckFileExists = true,
				CheckPathExists = true,
				Multiselect = false,
				Filter = "SourcePawn Files|*.sp",
				InitialDirectory = System.IO.Directory.GetCurrentDirectory(),
				Title = "Choose a file."
			};

			if (dialog.ShowDialog() != System.Windows.Forms.DialogResult.OK)
			{
				return;
			}

			if (FilesToCompile.All(c => c.File != dialog.FileName))
			{
				FilesToCompile.Add(new CompilationFileViewModel { File = dialog.FileName });
			}
	    }
コード例 #3
0
	    private void BrowseCompiler()
	    {
		    var dialog = new Ookii.Dialogs.VistaOpenFileDialog
		    {
			    CheckFileExists = true,
			    CheckPathExists = true,
			    Multiselect = false,
			    Filter = "SourcePawn Compiler|*.exe",
			    InitialDirectory = System.IO.Directory.GetCurrentDirectory(),
			    Title = "Choose a SourcePawn Compiler."
		    };

		    if (dialog.ShowDialog() != System.Windows.Forms.DialogResult.OK)
			{
				return;
			}

			SourcePawnCompiler = dialog.FileName;
	    }