private void MessageBox(string message, string title)
		{
			var alert = new NSAlert();
			alert.AddButton ("OK");
			alert.MessageText = title;
			alert.InformativeText = message;
			
			alert.BeginSheet(this, delegate
			{
			    alert.Dispose();
			});
		}
        public override WindowResponse Show(object parent, string message, string title, MessageWindowType type, MessageWindowButtons bType)
        {
            NSAlert al = new NSAlert();
            al.AlertStyle = CocoaHelper.GetWinType(type);
            al.MessageText = title;
            al.InformativeText = message;

            switch (bType)
            {
                case MessageWindowButtons.AbortRetryIgnore:
                    al.AddButton(Message.GetString("Abort"));
                    al.AddButton(Message.GetString("Retry"));
                    al.AddButton(Message.GetString("Ignore"));
                    break;
                case MessageWindowButtons.Cancel:
                    al.AddButton(Message.GetString("Cancel"));
                    break;
                case MessageWindowButtons.Close:
                    al.AddButton(Message.GetString("Close"));
                    break;
                case  MessageWindowButtons.Ok:
                    al.AddButton(Message.GetString("Ok"));
                    break;
                case MessageWindowButtons.OkCancel:
                    al.AddButton(Message.GetString("Ok"));
                    al.AddButton(Message.GetString("Cancel"));
                    break;
                case MessageWindowButtons.RetryCancel:
                    al.AddButton(Message.GetString("Retry"));
                    al.AddButton(Message.GetString("Cancel"));
                    break;
                case MessageWindowButtons.YesNo:
                    al.AddButton(Message.GetString("Yes"));
                    al.AddButton(Message.GetString("No"));
                    break;
                case MessageWindowButtons.YesNoCancel:
                    al.AddButton(Message.GetString("Yes"));
                    al.AddButton(Message.GetString("No"));
                    al.AddButton(Message.GetString("Cancel"));
                    break;
            }

            WindowResponse resp = CocoaHelper.GetResponse(al.RunModal(), bType);
            al.Dispose();
            return resp;
        }
partial         void startDownload(MonoMac.AppKit.NSButton sender)
        {
            elenco.elencoImmagini.Clear();
            lstImg.ReloadData();
            getImmagini(null);
            if(elenco.elencoImmagini.Count==0)
                return;
            var dlgConfirm=new NSAlert { MessageText="Confirm donwload images" };
            dlgConfirm.AddButton("Yes");
            dlgConfirm.AddButton("No");
            var result=dlgConfirm.RunModal();
            dlgConfirm.Dispose();
            if(result==1001)
                return;

            if(_pdlg==null)
                _pdlg=new PreviewFileDlgController();
            _pdlg.Elenco=elenco;
            _pdlg.destPath=destPath.StringValue;
            _pdlg.Window.MakeKeyAndOrderFront(this.Window);
            _pdlg.DownloadImages();
            _pdlg.Close();
            //_pdlg.doModal(this);
        }