Пример #1
0
        private void SaveContactsSim()
        {
            // check for contacts description chars len
            string retCheck = GlobalObjUI.CheckAlphaCharsLen(GlobalObjUI.SimContacts);

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

                return;
            }

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

            int retMode = swmdc.Show();

            if (retMode < 1)
            {
                // 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(this, "ERROR",
					GlobalObjUI.LMan.GetString("maxlenexceeded")
					.Replace("'description'", "'<b>" + retCheck + "</b>'")
					+ "<b>" + GlobalObjUI.SimADNMaxAlphaChars.ToString() + "</b>", 
					MainClass.MessageType.Warning);
				
				return;
			}
			
			SelectWriteModeDialogClass swmdc = 
				new SelectWriteModeDialogClass(GlobalObjUI.LMan.GetString("savesimact"));
			
			int retMode = swmdc.Show();
			
			if (retMode < 1)
			{
				// 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);	
			}
		}