示例#1
0
        private void SaveContactsSim()
        {
            // check for contacts description chars len
            string retCheck = GlobalObjUI.CheckAlphaCharsLen(GlobalObjUI.SimContacts);

            if (retCheck != "")
            {
                MainClass.ShowMessage(MainWindow, "ERROR",
                                      GlobalObjUI.LMan.GetString("maxlenexceeded")
                                      .Replace("'description'", "'<b>" + retCheck + "</b>'")
                                      + "<b>" + GlobalObjUI.SimADNMaxAlphaChars.ToString() + "</b>", MessageType.Warning);
                return;
            }

            SelectWriteModeDialogClass swmdc =
                new SelectWriteModeDialogClass(MainWindow, GlobalObjUI.LMan.GetString("savesimact"));

            int retMode = swmdc.Show();

            if (retMode < 0)
            {
                // cancel button pressed
                return;
            }

            log.Debug("MainWindowClass::SaveContactsSim: SELECTED SIM WRITE MODE: " + retMode.ToString());
            if (retMode == 1)
            {
                WriteContactsOnSim(GlobalObjUI.SimContacts, true);
            }
            else
            {
                WriteContactsOnSim(GlobalObjUI.SimContacts, false);
            }
        }
示例#2
0
		private void SaveContactsSim()
		{
			// check for contacts description chars len
			string retCheck = GlobalObjUI.CheckAlphaCharsLen(GlobalObjUI.SimContacts);
			if (retCheck != "")
			{
				MainClass.ShowMessage(MainWindow, "ERROR",
					GlobalObjUI.LMan.GetString("maxlenexceeded")
					.Replace("'description'", "'<b>" + retCheck + "</b>'")
					+ "<b>" + GlobalObjUI.SimADNMaxAlphaChars.ToString() + "</b>", MessageType.Warning);
				return;
			}
			
			SelectWriteModeDialogClass swmdc = 
				new SelectWriteModeDialogClass(MainWindow, GlobalObjUI.LMan.GetString("savesimact"));
			
			int retMode = swmdc.Show();
			
			if (retMode < 0)
			{
				// cancel button pressed
				return;
			}
			
			log.Debug("MainWindowClass::SaveContactsSim: SELECTED SIM WRITE MODE: " + retMode.ToString());
			if (retMode == 1)
			{			
				WriteContactsOnSim(GlobalObjUI.SimContacts, true);	
			}
			else
			{
				WriteContactsOnSim(GlobalObjUI.SimContacts, false);	
			}
		}