本文整理汇总了C#中Gtk.FileChooserDialog.HideAll方法的典型用法代码示例。如果您正苦于以下问题:C# FileChooserDialog.HideAll方法的具体用法?C# FileChooserDialog.HideAll怎么用?C# FileChooserDialog.HideAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.FileChooserDialog
的用法示例。
在下文中一共展示了FileChooserDialog.HideAll方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnButton1Clicked
protected void OnButton1Clicked(object sender, EventArgs e)
{
FileChooserDialog Dlg;
Dlg = new FileChooserDialog ("Directorio Inicial", null, FileChooserAction.SelectFolder, Stock.Open, ResponseType.Ok, Stock.Cancel, ResponseType.Cancel);
Dlg.ShowAll ();
if (Dlg.Run () == (int)ResponseType.Ok) {
E1.Text = Dlg.Filename;
}
Dlg.HideAll ();
Dlg.Destroy ();
}
示例2: OnCreateButtonClicked
protected virtual void OnCreateButtonClicked(object sender, System.EventArgs e)
{
savePathChooser = new FileChooserDialog(_("Save Torrent As..."), this, FileChooserAction.Save, Gtk.Stock.Cancel, ResponseType.Cancel, Gtk.Stock.Save, ResponseType.Accept);
ResponseType result = (ResponseType) savePathChooser.Run();
if(result == ResponseType.Accept){
savePathChooser.HideAll();
createTorrent();
}
if(result == ResponseType.Cancel || result == ResponseType.DeleteEvent){
savePathChooser.Destroy();
//createTorrentDialog.Destroy();
return;
}
}
示例3: openLibFile
private void openLibFile(object s, EventArgs e)
{
FileChooserDialog fcd = new FileChooserDialog("Open Library File...", this, FileChooserAction.Open);
fcd.TransientFor = this;
fcd.AddButton(Stock.Cancel, ResponseType.Cancel);
fcd.AddButton(Stock.Ok, ResponseType.Ok);
FileFilter ff = new FileFilter();
ff.Name = "Dynamic Link Library (.dll,.exe)";
ff.AddPattern(@"*.dll");
ff.AddPattern(@"*.exe");
fcd.AddFilter(ff);
int result = fcd.Run();
fcd.HideAll();
if(result == (int)ResponseType.Ok) {
ss.ConnectAlgorithmLibrary(fcd.Filename);
}
fcd.Dispose();
}
示例4: openConfigFile
private void openConfigFile(object s, EventArgs e)
{
FileChooserDialog fcd = new FileChooserDialog("Open Config File...", this, FileChooserAction.Open);
fcd.TransientFor = this;
fcd.AddButton(Stock.Cancel, ResponseType.Cancel);
fcd.AddButton(Stock.Ok, ResponseType.Ok);
FileFilter ff = new FileFilter();
ff.Name = "Config file (.xml)";
ff.AddMimeType("text/xml");
ff.AddMimeType("application/xml");
fcd.AddFilter(ff);
int result = fcd.Run();
fcd.HideAll();
if(result == (int)ResponseType.Ok) {
try {
ss.ReadConfigFile(fcd.Filename);
this.sr = ss.Simulator.CollectResults();
this.bs.SetMinCurrentMax(1, 1, this.sr.ChapterCount);
this.bpsp.SimulatorResult = sr;
}
catch(Exception ex) {
Console.Error.WriteLine(ex);
MessageDialog md = new MessageDialog(this, DialogFlags.DestroyWithParent, MessageType.Error, ButtonsType.Ok, true, ex.Message);
md.Run();
md.Destroy();
}
this.bpsp.Reload();
}
fcd.Dispose();
}
示例5: tool_saveaspdf
private void tool_saveaspdf(object sender, EventArgs e)
{
using(FileChooserDialog fcd_pdf = new FileChooserDialog("PDF File",this,FileChooserAction.Save)) {
FileFilter ff = new FileFilter();
ff.AddPattern("*.pdf");
ff.Name = "PDF file";
fcd_pdf.AddFilter(ff);
fcd_pdf.AddButton("OK",ResponseType.Ok);
int result = fcd_pdf.Run();
if(result == (int) ResponseType.Ok) {
PointD siz = this.sketchpad.MeasureSize();
using(PdfSurface pdfs = new PdfSurface(fcd_pdf.Filename,siz.X,siz.Y)) {
using(Context ctx = new Context(pdfs)) {
this.sketchpad.PaintContext(ctx,(int) Math.Ceiling(siz.X),(int) Math.Ceiling(siz.Y));
}
}
}
fcd_pdf.HideAll();
}
}
示例6: window_Shown
void window_Shown(object sender, EventArgs e)
{
FileChooserDialog dialog = new FileChooserDialog("Choose a directory", (Window)sender, FileChooserAction.SelectFolder);
Button button = (Button)dialog.AddButton("OK", ResponseType.Ok);
dialog.TransientFor = (Window)sender;
ResponseType result = (ResponseType)dialog.Run();
dialog.HideAll();
if (result == ResponseType.Ok)
{
RunDirectoryScan(dialog.Filename);
}
}