[Gtk-sharp-list] Redraw window

Mathias Tausig mtausig at fsmat.at
Mon May 19 10:52:43 EDT 2008


Sure, here are the relevant (abbreviated) parts. In SignPDF I would like
to have access to the UI (display a Dialog for Smartcard-Pin
verification), but the whole window is greyed until SignPDF is finished.

cheers
Mathias

private void PdfSign_Click(object o, EventArgs args){
                        try{
                                String filename=OpenFileDialog("Bitte die
gewünschte PDF Datei
auswählen.");
                                String outfile=OpenFileDialog("Bitte die
geünschte Ausgabedatei
auswählen.");
                                SignPDF(filename, outfile,
SelectedCertificate, "reason",
"location");
                        }catch{}
        }

protected String RunFileDialog(FileChooserDialog fc){
                        String filename="";
                        try{
                                if(fc.Run()== (int)ResponseType.Accept)
                                        filename=fc.Filename;
                        }catch{}
                        }finally{
                                fc.Destroy();
                        }
                        return filename;

                }

                protected String OpenFileDialog(String label){
                        FileChooserDialog fc=new FileChooserDialog(label,
MainWindow,
FileChooserAction.Open, "Abort", ResponseType.Cancel, "Open",
ResponseType.Accept);
                        fc.Modal=false;
                        return RunFileDialog(fc);
                }

> Mathias Tausig escribió:
>>
> can you put some source code to understand your problem?



More information about the Gtk-sharp-list mailing list