예제 #1
0
파일: QMessageBox.cs 프로젝트: KDE/qyoto
 public QAbstractButton Button(QMessageBox.StandardButton which)
 {
     return (QAbstractButton) interceptor.Invoke("button$", "button(QMessageBox::StandardButton) const", typeof(QAbstractButton), typeof(QMessageBox.StandardButton), which);
 }
예제 #2
0
파일: QMessageBox.cs 프로젝트: KDE/qyoto
 public void SetEscapeButton(QMessageBox.StandardButton button)
 {
     interceptor.Invoke("setEscapeButton$", "setEscapeButton(QMessageBox::StandardButton)", typeof(void), typeof(QMessageBox.StandardButton), button);
 }
예제 #3
0
파일: QMessageBox.cs 프로젝트: KDE/qyoto
 public QPushButton AddButton(string text, QMessageBox.ButtonRole role)
 {
     return (QPushButton) interceptor.Invoke("addButton$$", "addButton(const QString&, QMessageBox::ButtonRole)", typeof(QPushButton), typeof(string), text, typeof(QMessageBox.ButtonRole), role);
 }
예제 #4
0
파일: QMessageBox.cs 프로젝트: KDE/qyoto
 public QPushButton AddButton(QMessageBox.StandardButton button)
 {
     return (QPushButton) interceptor.Invoke("addButton$", "addButton(QMessageBox::StandardButton)", typeof(QPushButton), typeof(QMessageBox.StandardButton), button);
 }
예제 #5
0
 public static int CreateKMessageBox(KDialog dialog, QMessageBox.Icon icon, string text, List<string> strlist, string ask, ref bool checkboxReturn, uint options)
 {
     StackItem[] stack = new StackItem[8];
     #if DEBUG
     stack[1].s_class = (IntPtr) DebugGCHandle.Alloc(dialog);
     #else
     stack[1].s_class = (IntPtr) GCHandle.Alloc(dialog);
     #endif
     stack[2].s_int = (int) icon;
     #if DEBUG
     stack[3].s_class = (IntPtr) DebugGCHandle.Alloc(text);
     #else
     stack[3].s_class = (IntPtr) GCHandle.Alloc(text);
     #endif
     #if DEBUG
     stack[4].s_class = (IntPtr) DebugGCHandle.Alloc(strlist);
     #else
     stack[4].s_class = (IntPtr) GCHandle.Alloc(strlist);
     #endif
     #if DEBUG
     stack[5].s_class = (IntPtr) DebugGCHandle.Alloc(ask);
     #else
     stack[5].s_class = (IntPtr) GCHandle.Alloc(ask);
     #endif
     stack[6].s_bool = checkboxReturn;
     stack[7].s_uint = options;
     staticInterceptor.Invoke("createKMessageBox#$$?$$$", "createKMessageBox(KDialog*, QMessageBox::Icon, const QString&, const QStringList&, const QString&, bool*, KMessageBox::Options)", stack);
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[1].s_class);
     #else
     ((GCHandle) stack[1].s_class).Free();
     #endif
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[3].s_class);
     #else
     ((GCHandle) stack[3].s_class).Free();
     #endif
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[4].s_class);
     #else
     ((GCHandle) stack[4].s_class).Free();
     #endif
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[5].s_class);
     #else
     ((GCHandle) stack[5].s_class).Free();
     #endif
     checkboxReturn = stack[6].s_bool;
     return stack[0].s_int;
 }
예제 #6
0
파일: QMessageBox.cs 프로젝트: KDE/qyoto
 public void AddButton(QAbstractButton button, QMessageBox.ButtonRole role)
 {
     interceptor.Invoke("addButton#$", "addButton(QAbstractButton*, QMessageBox::ButtonRole)", typeof(void), typeof(QAbstractButton), button, typeof(QMessageBox.ButtonRole), role);
 }
예제 #7
0
파일: QMessageBox.cs 프로젝트: KDE/qyoto
 public static QPixmap StandardIcon(QMessageBox.Icon icon)
 {
     return (QPixmap) staticInterceptor.Invoke("standardIcon$", "standardIcon(QMessageBox::Icon)", typeof(QPixmap), typeof(QMessageBox.Icon), icon);
 }
예제 #8
0
파일: QMessageBox.cs 프로젝트: KDE/qyoto
 public QMessageBox(string title, string text, QMessageBox.Icon icon, int button0, int button1, int button2, QWidget parent, uint f)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("QMessageBox$$$$$$#$", "QMessageBox(const QString&, const QString&, QMessageBox::Icon, int, int, int, QWidget*, Qt::WindowFlags)", typeof(void), typeof(string), title, typeof(string), text, typeof(QMessageBox.Icon), icon, typeof(int), button0, typeof(int), button1, typeof(int), button2, typeof(QWidget), parent, typeof(uint), f);
 }
예제 #9
0
		private void DeleteContactsSim()
		{
			QMessageBox dmsg = new QMessageBox(QMessageBox.Icon.Question,
				MainClass.AppNameVer + " - " + GlobalObjUI.LMan.GetString("deletesimact"),
				GlobalObjUI.LMan.GetString("suredeletesim"),
				(uint)QMessageBox.StandardButton.Yes | (uint)QMessageBox.StandardButton.No);
			
			int respType = dmsg.Exec();
			
			dmsg.Close();
			dmsg.Dispose();
			
			
			if (respType != (uint)QMessageBox.StandardButton.Yes)
			{
				return;
			}


			// Delete sim
			ScanSimBefore();
			
			// Reset status values
			GlobalObjUI.SimADNStatus = 1;
			GlobalObjUI.SimADNPosition = 0;
			GlobalObjUI.SimADNError = "";
			
            // Start thread for reading process
            isReading = false;
			isEnd = false;
            simThread = new System.Threading.Thread(new System.Threading.ThreadStart(GlobalObjUI.DeleteAllSimContactsList));
            simThread.Start();

			return;
			

		}
예제 #10
0
파일: QMessageBox.cs 프로젝트: KDE/qyoto
 public static QMessageBox.StandardButton Information(QWidget parent, string title, string text, QMessageBox.StandardButton button0)
 {
     return (QMessageBox.StandardButton) staticInterceptor.Invoke("information#$$$", "information(QWidget*, const QString&, const QString&, QMessageBox::StandardButton)", typeof(QMessageBox.StandardButton), typeof(QWidget), parent, typeof(string), title, typeof(string), text, typeof(QMessageBox.StandardButton), button0);
 }
예제 #11
0
		/// <summary>
		/// Save file contacts on file.
		/// </summary>
		private void SaveContactsFile()
		{
			QMessageBox mdlg = null;
			
			if (GlobalObjUI.ContactsFilePath != "")
			{
				mdlg = new QMessageBox(QMessageBox.Icon.Question, 
					MainClass.AppNameVer + " - " + GlobalObjUI.LMan.GetString("savefileact"),
					GlobalObjUI.LMan.GetString("override") + "\r\n" + 
					Path.GetFileNameWithoutExtension(GlobalObjUI.ContactsFilePath),
					0x00400400 , this);
				
				int respType = mdlg.Exec();

				if (respType == 0x00000400)
				{
					// override (Ok)
					mdlg.Close();
					mdlg.Dispose();
					mdlg = null;
					
					WriteContactsOnFile(GlobalObjUI.ContactsFilePath, GlobalObjUI.FileContacts.SimContacts);
					return;
				}

				mdlg.Close();
				mdlg.Dispose();
				mdlg = null;

			}
			
			// select new file to save
			string fileToSave = ChooseFileToSave(GlobalObjUI.LMan.GetString("savefileact"));
			if (fileToSave == "")
			{
				// no file selected
				return;
			}
			
			WriteContactsOnFile(fileToSave, GlobalObjUI.FileContacts.SimContacts);
			GlobalObjUI.ContactsFilePath = fileToSave;
			
		}
예제 #12
0
파일: KMessageBox.cs 프로젝트: KDE/kimono
 /// <remarks>
 ///  Create content and layout of a standard dialog
 /// <param> name="dialog" The parent dialog base
 /// </param><param> name="icon" A QPixmap containing the icon to be displayed in the
 ///                 dialog next to the text.
 /// </param><param> name="text" Message string.
 /// </param><param> name="strlist" List of strings to be written in the listbox.
 ///                 If the list is empty, it doesn't show any listbox
 /// </param><param> name="ask" The text of the checkbox. If empty none will be shown.
 /// </param><param> name="checkboxReturn" The result of the checkbox. If it's initially
 ///                 true then the checkbox will be checked by default.
 /// </param><param> name="options" see Options
 /// </param><param> name="details" Detailed message string.
 /// </param><param> name="notifyType" The type of notification to send when this message
 ///                 is presentend.
 /// </param></remarks>        <return> A KDialog button code, not a KMessageBox button code,
 ///          based on the buttonmask given to the constructor of the
 ///          <code>dialog</code> (ie. will return KDialog.Yes [256] instead of 
 ///          KMessageBox.Yes [3]). Will return KMessageBox.Cancel
 ///          if the message box is queued for display instead of 
 ///          exec()ed immediately or if the option NoExec is set.
 ///  @note   Unless NoExec is used,
 ///          the <code>dialog</code> that is passed in is deleted by this
 ///          function. Do not delete it yourself.
 ///      </return>
 ///         <short>    Create content and layout of a standard dialog </short>
 public static int CreateKMessageBox(KDialog dialog, QIcon icon, string text, List<string> strlist, string ask, ref bool checkboxReturn, uint options, string details, QMessageBox.Icon notifyType)
 {
     StackItem[] stack = new StackItem[10];
     #if DEBUG
     stack[1].s_class = (IntPtr) DebugGCHandle.Alloc(dialog);
     #else
     stack[1].s_class = (IntPtr) GCHandle.Alloc(dialog);
     #endif
     #if DEBUG
     stack[2].s_class = (IntPtr) DebugGCHandle.Alloc(icon);
     #else
     stack[2].s_class = (IntPtr) GCHandle.Alloc(icon);
     #endif
     #if DEBUG
     stack[3].s_class = (IntPtr) DebugGCHandle.Alloc(text);
     #else
     stack[3].s_class = (IntPtr) GCHandle.Alloc(text);
     #endif
     #if DEBUG
     stack[4].s_class = (IntPtr) DebugGCHandle.Alloc(strlist);
     #else
     stack[4].s_class = (IntPtr) GCHandle.Alloc(strlist);
     #endif
     #if DEBUG
     stack[5].s_class = (IntPtr) DebugGCHandle.Alloc(ask);
     #else
     stack[5].s_class = (IntPtr) GCHandle.Alloc(ask);
     #endif
     stack[6].s_bool = checkboxReturn;
     stack[7].s_uint = options;
     #if DEBUG
     stack[8].s_class = (IntPtr) DebugGCHandle.Alloc(details);
     #else
     stack[8].s_class = (IntPtr) GCHandle.Alloc(details);
     #endif
     stack[9].s_int = (int) notifyType;
     staticInterceptor.Invoke("createKMessageBox##$?$$$$$", "createKMessageBox(KDialog*, const QIcon&, const QString&, const QStringList&, const QString&, bool*, KMessageBox::Options, const QString&, QMessageBox::Icon)", stack);
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[1].s_class);
     #else
     ((GCHandle) stack[1].s_class).SynchronizedFree();
     #endif
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[2].s_class);
     #else
     ((GCHandle) stack[2].s_class).SynchronizedFree();
     #endif
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[3].s_class);
     #else
     ((GCHandle) stack[3].s_class).SynchronizedFree();
     #endif
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[4].s_class);
     #else
     ((GCHandle) stack[4].s_class).SynchronizedFree();
     #endif
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[5].s_class);
     #else
     ((GCHandle) stack[5].s_class).SynchronizedFree();
     #endif
     checkboxReturn = stack[6].s_bool;
     #if DEBUG
     DebugGCHandle.Free((GCHandle) stack[8].s_class);
     #else
     ((GCHandle) stack[8].s_class).SynchronizedFree();
     #endif
     return stack[0].s_int;
 }
예제 #13
0
        public void ShowMessage(string message, string title, MessageBoxButtons buttons, MessageBoxIcon icon)
        {
            QMessageBox.StandardButton nativeButtons;
            QMessageBox.Icon nativeIcon;
            switch (buttons)
            {
                case Moai.Platform.UI.MessageBoxButtons.OK:
                    nativeButtons = QMessageBox.StandardButton.Ok;
                    break;
                case Moai.Platform.UI.MessageBoxButtons.OKCancel:
                    nativeButtons = QMessageBox.StandardButton.Ok | QMessageBox.StandardButton.Cancel;
                    break;
                case Moai.Platform.UI.MessageBoxButtons.YesNo:
                    nativeButtons = QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No;
                    break;
                default:
                    throw new NotSupportedException();
            }
            switch (icon)
            {
                case Moai.Platform.UI.MessageBoxIcon.None:
                    nativeIcon = QMessageBox.Icon.NoIcon;
                    break;
                case Moai.Platform.UI.MessageBoxIcon.Information:
                    nativeIcon = QMessageBox.Icon.Information;
                    break;
                case Moai.Platform.UI.MessageBoxIcon.Warning:
                    nativeIcon = QMessageBox.Icon.Warning;
                    break;
                case Moai.Platform.UI.MessageBoxIcon.Error:
                    nativeIcon = QMessageBox.Icon.Critical;
                    break;
                default:
                    throw new NotSupportedException();
            }

            QMessageBox dialog = new QMessageBox(nativeIcon, title, message, (uint)nativeButtons, (Central.Manager.IDE as LinuxIDE));
            dialog.Show();
            //MessageDialog dialog = new MessageDialog((Central.Manager.IDE as LinuxIDE), DialogFlags.Modal, nativeIcon, nativeButtons, message);
            //dialog.Show();
        }
예제 #14
0
파일: QMessageBox.cs 프로젝트: KDE/qyoto
 public QMessageBox(QMessageBox.Icon icon, string title, string text, uint buttons)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("QMessageBox$$$$", "QMessageBox(QMessageBox::Icon, const QString&, const QString&, QMessageBox::StandardButtons)", typeof(void), typeof(QMessageBox.Icon), icon, typeof(string), title, typeof(string), text, typeof(uint), buttons);
 }
예제 #15
0
파일: QMessageBox.cs 프로젝트: KDE/qyoto
 public static QMessageBox.StandardButton Warning(QWidget parent, string title, string text, uint buttons, QMessageBox.StandardButton defaultButton)
 {
     return (QMessageBox.StandardButton) staticInterceptor.Invoke("warning#$$$$", "warning(QWidget*, const QString&, const QString&, QMessageBox::StandardButtons, QMessageBox::StandardButton)", typeof(QMessageBox.StandardButton), typeof(QWidget), parent, typeof(string), title, typeof(string), text, typeof(uint), buttons, typeof(QMessageBox.StandardButton), defaultButton);
 }
예제 #16
0
파일: QMessageBox.cs 프로젝트: KDE/qyoto
 public QMessageBox(QMessageBox.Icon icon, string title, string text)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("QMessageBox$$$", "QMessageBox(QMessageBox::Icon, const QString&, const QString&)", typeof(void), typeof(QMessageBox.Icon), icon, typeof(string), title, typeof(string), text);
 }
예제 #17
0
파일: QMessageBox.cs 프로젝트: KDE/qyoto
 public static int Warning(QWidget parent, string title, string text, QMessageBox.StandardButton button0, QMessageBox.StandardButton button1)
 {
     return (int) staticInterceptor.Invoke("warning#$$$$", "warning(QWidget*, const QString&, const QString&, QMessageBox::StandardButton, QMessageBox::StandardButton)", typeof(int), typeof(QWidget), parent, typeof(string), title, typeof(string), text, typeof(QMessageBox.StandardButton), button0, typeof(QMessageBox.StandardButton), button1);
 }
예제 #18
0
파일: QMessageBox.cs 프로젝트: KDE/qyoto
 public QMessageBox(string title, string text, QMessageBox.Icon icon, int button0, int button1, int button2)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("QMessageBox$$$$$$", "QMessageBox(const QString&, const QString&, QMessageBox::Icon, int, int, int)", typeof(void), typeof(string), title, typeof(string), text, typeof(QMessageBox.Icon), icon, typeof(int), button0, typeof(int), button1, typeof(int), button2);
 }
예제 #19
0
		/// <summary>
		/// Are you sure dialog
		/// </summary>
		private bool DeleteContactQuestion()
		{
			QMessageBox mdlg = new QMessageBox(QMessageBox.Icon.Question, 
				MainClass.AppNameVer + " - " + GlobalObjUI.LMan.GetString("delcontacts"),
				GlobalObjUI.LMan.GetString("suredelcontact"), 
				(uint)QMessageBox.StandardButton.Yes | 
				(uint)QMessageBox.StandardButton.No);
			
			int respType = mdlg.Exec();
			mdlg.Close();
			mdlg.Dispose();
			mdlg = null;
			
			if (respType == (uint)QMessageBox.StandardButton.Yes)
			{
				return true;
			}
			return false;			
		}