1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 using System;
6 using System.Collections.Generic;
7 using System.ComponentModel;
8 using System.Data;
9 using System.Drawing;
10 using System.Text;
11 using System.Windows.Forms;
12 
13 namespace StatsViewer
14 {
15   public partial class OpenDialog : Form
16   {
OpenDialog()17     public OpenDialog()
18     {
19       InitializeComponent();
20     }
21 
22     /// <summary>
23     /// Get the user selected filename
24     /// </summary>
25     public string FileName
26     {
27       get {
28         return this.name_box_.Text;
29       }
30     }
31 
button1_Click(object sender, EventArgs e)32     private void button1_Click(object sender, EventArgs e)
33     {
34       this.Close();
35     }
36 
OnKeyUp(object sender, KeyEventArgs e)37     private void OnKeyUp(object sender, KeyEventArgs e)
38     {
39       if (e.KeyCode == Keys.Enter)
40       {
41         this.Close();
42       }
43     }
44   }
45 }
46