Esempio n. 1
0
        // Save to PC button clicked
        public void SaveToPCButton_Clicked(System.Object obj, EventArgs args)
        {
            if(!messageListPopulated)
            {
                GetSIMMessagesButton_Clicked(obj, args);
            }

            string ContactFrom = "OpenSIMKit";

            XMLUtilities xmlUtilities = new XMLUtilities();
            xmlUtilities.SaveMessagesXMLFile(ContactFrom, messages);
        }
Esempio n. 2
0
        // Copy from PC button clicked
        public void CopyFromPCButton_Clicked(System.Object obj, EventArgs args)
        {
            if(connectionActive)
            {
                XMLUtilities xmlUtilites = new XMLUtilities();
                List<string> messages;
                string contact;

                xmlUtilites.LoadMessagesXMLFile();
                messages = xmlUtilites.StringArray;
                contact = xmlUtilites.ContactText;

                switch(connectionType)
                {
                case SelectedConnectionType.SerialPortConnection:
                    if(contact != null && messages != null)
                    {
                        SerialPortUtility MySerialPortUtility = new SerialPortUtility(smReader.PortObject);

                        foreach(string Message in messages)
                        {
                            // Save these messages to SIM card
                            MySerialPortUtility.StoreMessage(contact, Message);
                        }
                    }
                    break;

                case SelectedConnectionType.PCSCConnection:
                    break;
                }
            }
        }