상속: IFileDialog
예제 #1
0
        // Wizard Page 1

        protected void BtnBrowse_Clicked (object sender, EventArgs e)
        {
            var dialog = new FileDialog(this, FileChooserAction.SelectFolder);
            var result = dialog.Run();

            if (result == ResponseType.Ok)
            {
                entryGameDir.Text = dialog.FileName;
                entryGameDir.Position = entryGameDir.Text.Length;

                treestore1.Clear();
                treestore1.AppendValues("Scanning directory...");

                if (scanningThread != null && scanningThread.IsAlive)
                    scanningThread.Abort();

                scanningThread = new Thread(new ThreadStart(this.ScanningThread));
                scanningThread.Start();
            }
        }
예제 #2
0
        // Wizard Page 1

        protected void BtnBrowse_Clicked(object sender, EventArgs e)
        {
            var dialog = new FileDialog(this, FileChooserAction.SelectFolder);
            var result = dialog.Run();

            if (result == ResponseType.Ok)
            {
                entryGameDir.Text     = dialog.FileName;
                entryGameDir.Position = entryGameDir.Text.Length;

                treestore1.Clear();
                treestore1.AppendValues("Scanning directory...");

                if (scanningThread != null && scanningThread.IsAlive)
                {
                    scanningThread.Abort();
                }

                scanningThread = new Thread(new ThreadStart(this.ScanningThread));
                scanningThread.Start();
            }
        }
예제 #3
0
        // Wizard Page 3

        protected void BtnBrowse2_Clicked (object sender, EventArgs e)
        {
            var dialog = new FileDialog(this, FileChooserAction.SelectFolder);
            var result = dialog.Run();

            if (result == ResponseType.Ok)
            {
                entryOutputDir.Text = dialog.FileName;
                entryOutputDir.Position = entryOutputDir.Text.Length;

                btnNext.Sensitive = true;
            }
        }
예제 #4
0
        // Wizard Page 2

        protected void BtnIcon_Clicked (object sender, EventArgs e)
        {
            var dialog = new FileDialog(this, FileChooserAction.Open);
            dialog.AddFilter("Icon files (*.ico)", "*.ico");
            dialog.AddFilter("All Files (*.*)", "*.*");

            if (dialog.Run() == ResponseType.Ok)
            {
                try
                {
                    generatorData.Icon = new System.Drawing.Icon(dialog.FileName);
                    imageIcon.Pixbuf = (new Gdk.Pixbuf(dialog.FileName)).ScaleSimple(32, 32, Gdk.InterpType.Bilinear);
                }
                catch
                {
                }
            }
        }