├── .travis.yml ├── Languages ├── monosim-en-US.xml ├── monosim-es-ES.xml └── monosim-it-IT.xml ├── README.md ├── base-components ├── Contact.cs ├── Contacts.cs ├── GlobalConst.cs ├── GlobalObjUI.Sim.cs ├── GlobalObjUI.cs ├── LanguageManager.cs └── MonosimEventHandler.cs ├── build-linux ├── build-lnx-monosim-gtk-full.sh ├── build-lnx-monosim-gtk.sh ├── build-lnx-monosim-qt-full.sh ├── build-lnx-monosim-qt.sh └── prepare.sh ├── build-win └── build-win-monosim-gtk.bat ├── copying.gpl ├── docs ├── GSM11-11v6-2.pdf └── TonNpi ├── monosim-gtk ├── Properties │ └── AssemblyInfo.cs ├── Resources │ └── monosim-gtk ├── Src │ ├── Glade_Files │ │ ├── AboutDialog.glade │ │ ├── ChangePinStatusDialog.glade │ │ ├── MainWindow.glade │ │ ├── NewContactDialog.glade │ │ ├── SelectWriteModeDialog.glade │ │ └── SettingsDialog.glade │ ├── Gui_Classes │ │ ├── AboutDialogClass.cs │ │ ├── ChangePinStatusDialogClass.cs │ │ ├── MainWindowClass.Designer.cs │ │ ├── MainWindowClass.Popup.cs │ │ ├── MainWindowClass.Reactors.cs │ │ ├── MainWindowClass.cs │ │ ├── NewContactDialogClass.cs │ │ ├── SelectWriteModeDialogClass.cs │ │ └── SettingsDialogClass.cs │ └── MainClass.cs ├── monosim-gtk-full.csproj ├── monosim-gtk.csproj └── readme ├── monosim-qt ├── Properties │ └── AssemblyInfo.cs ├── Resources │ └── monosim-qt ├── Src │ ├── Gui_Classes │ │ ├── AboutDialogClass.cs │ │ ├── ChangePinStatusDialogClass.cs │ │ ├── MainWindowClass.Designer.cs │ │ ├── MainWindowClass.Popup.cs │ │ ├── MainWindowClass.Reactors.cs │ │ ├── MainWindowClass.cs │ │ ├── NewContactDialogClass.cs │ │ ├── SelectWriteModeDialogClass.cs │ │ ├── SettingsDialogClass.cs │ │ └── ThreadNotify.cs │ ├── MainClass.cs │ ├── Qt_Classes │ │ ├── AboutDialog.cs │ │ ├── ChangePinStatusDialog.cs │ │ ├── MainWindow.cs │ │ ├── NewContactDialog.cs │ │ ├── ResManager.cs │ │ ├── SelectWriteModeDialog.cs │ │ └── SettingsDialog.cs │ └── Qt_Files │ │ ├── AboutDialog.ui │ │ ├── ChangePinStatusDialog.ui │ │ ├── MainWindow.ui │ │ ├── NewContactDialog.ui │ │ ├── SelectWriteModeDialog.ui │ │ └── SettingsDialog.ui ├── Tools │ └── uisetup │ │ ├── Arguments.cs │ │ ├── AssemblyInfo.cs │ │ ├── Main.cs │ │ ├── UiStreamer.cs │ │ ├── bin │ │ └── Debug │ │ │ ├── uisetup │ │ │ ├── uisetup.exe │ │ │ └── uisetup.exe.mdb │ │ ├── uisetup.csproj │ │ └── uisetup.sln ├── monosim-qt-full.csproj ├── monosim-qt.csproj └── readme ├── resources ├── chip_112.png ├── chip_16.png ├── chip_24.png ├── chip_32.png ├── chip_48.png ├── lock_16.png ├── monologo.png ├── monosim.png ├── monosim_16.png ├── monosim_32.png ├── monosim_48.png └── monosim_win.ico └── solutions ├── monosim-gtk-full.sln ├── monosim-gtk.sln ├── monosim-qt-full.sln └── monosim-qt.sln /.travis.yml: -------------------------------------------------------------------------------- 1 | language: csharp 2 | 3 | install: 4 | - sudo apt-get install -y libglib2.0-cil-dev libgtk2.0-cil-dev libglade2.0-cil-dev 5 | - sudo apt-get install -y liblog4net-cil-dev libpcsclite-dev 6 | 7 | mono: 8 | - latest 9 | - 3.12.0 10 | 11 | script: # build gtk gui 12 | - ./build-linux/prepare.sh 13 | - ./build-linux/build-lnx-monosim-gtk-full.sh 14 | -------------------------------------------------------------------------------- /Languages/monosim-en-US.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | about 5 | thanks 6 | info about ... 7 | application to manage sim card contacts using PC/SC or serial readers 8 | 9 | _File 10 | Create contacts file 11 | Open contacts file 12 | Save contacts file 13 | Save contacts file on sim 14 | Close contacts file 15 | Settings serial port 16 | Exit 17 | 18 | _Reader 19 | 20 | _Sim card 21 | Connect to sim card 22 | Disconnect sim card 23 | Change Pin status on sim card 24 | Save sim contacts 25 | Save sim contacts on file 26 | Delete sim contacts 27 | 28 | _Help 29 | View informations window 30 | 31 | File Contacts 32 | Sim Contacts 33 | 34 | description 35 | phone number 36 | 37 | Add contact 38 | Del contact 39 | Copy contact to sim 40 | Copy contact to file 41 | 42 | Open 43 | Cancel 44 | Save 45 | 46 | Pin1 enabled. To use monosim you need to disable it 47 | 48 | Reading sim contact n. 49 | Writing sim contact n. 50 | Total contacts founded 51 | 52 | Saved contacts successfully 53 | Override contacts file 54 | Are you sure to delete all contacts on sim ? 55 | Are you sure to delete follow contact ? 56 | All fields required, retry 57 | Max phone number len 20 digits 58 | Maximum description length exceeded for 'description'. Max digits is 59 | Not enough space on sim 60 | 61 | Pin1 62 | Enabled 63 | Disabled 64 | Set Pin1 status to 65 | Pin1 check 66 | Pin1 check value don't match with Pin1, please retry 67 | Pin1 need to be 4-digit numbers, retry 68 | only one attempt, perform it on phone]]> 69 | haven't any attempt to verify Pin1, try to use Puk1 on phone]]> 70 | Pin1 status changed 71 | 72 | Override 73 | Append 74 | 75 | 76 | Override: delete all phonebook on sim and after write new contacts
77 | Append: use all empty position on phonebook on sim to write new contacts]]>
78 | Write contacts on sim successfully completed 79 | 80 | 81 | - Multilanguage (using xml language files in Languages folder)
82 | - Gui (using GTK# binding for GTK graphic libraries and Qyoto binding for QT graphic libraries)
83 | - Debug/Trace (can be sended to console and also to a log file to read after)
84 |
85 | author:
86 |    Armando Basile (hmandevteam@gmail.com)
87 |
88 | website:
89 |    http://monosim.integrazioneweb.com
90 |
91 | issue tracker:
92 |    http://code.google.com/p/monosim/issues/list
93 | ]]>
94 | 95 | 98 | 99 |
100 |
101 | -------------------------------------------------------------------------------- /Languages/monosim-es-ES.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Acerca de 5 | Agradecimientos 6 | Información sobre... 7 | Aplicación para gestionar los contactos de una tarjeta SIM usando lectores PC/SC o serie 8 | 9 | _Archivo 10 | Crear archivo de contactos 11 | Abrir archivo de contactos 12 | Guardar archivo de contactos 13 | Guardar archivo de contactos en SIM 14 | Cerrar archivo de contactos 15 | Ajustes del puerto serie 16 | Salir 17 | 18 | _Lector 19 | 20 | _Tarjeta SIM 21 | Conectar a tarjeta SIM 22 | Desconectar tarjeta SIM 23 | Cambiar el estado del pin en la tarjeta SIM 24 | Guardar contactos de la SIM 25 | Guardar contactos de la SIM en un archivo 26 | Borrar contactos de la SIM 27 | 28 | A_yuda 29 | Ver ventana de información 30 | 31 | Contactos del archivo 32 | Contactos de la SIM 33 | 34 | descripción 35 | número de teléfono 36 | 37 | Añadir contacto 38 | Borrar contacto 39 | Copiar contacto a la SIM 40 | Copiar contacto al archivo 41 | 42 | Abrir 43 | Cancelar 44 | Guardar 45 | 46 | Pin1 activado. Para usar monosim necesita desactivarlo 47 | 48 | Leyendo contacto n 49 | Escribiendo contacto n. 50 | Todos los contactos encontrados 51 | 52 | Guardado de contactos completado con éxito 53 | Sobreescribir archivo de contactos 54 | ¿Está seguro de querer borrar todos los contactos de la SIM? 55 | ¿Está seguro de querer borrar el siguiente contacto? 56 | Se requieren todos los campos, reintentar 57 | Longitud máxima del número de teléfono: 20 dígitos 58 | Longitud máxima de la descripción superada por 'description'. El número máximo de caracteres es 59 | No hay espacio suficiente en ls SIM 60 | 61 | Pin1 62 | Habilitado 63 | Deshabilitado 64 | Establecer el estado de Pin1 a 65 | Verificación de Pin1 66 | El valor de verificación de Pin1 no coincide con Pin1, por favor, vuélvalo a intentar 67 | Pin1 debe ser un número de 4 dígitos, vuélvalo a intentar 68 | sólo un intento, hágalo en el teléfono]]> 69 | ya no tiene más intentos para verificar Pin1, intente usar Puk1 en el teléfono]]> 70 | Cambiado el estado de Pin1 71 | 72 | Sobreescribir 73 | Añadir 74 | 75 | 76 | Sobreescribiendo: borra todos los teléfonos de la SIM y después escribe los nuevos contactos
77 | Añadiendo: usa todas las entradas vacías de la libreta de direcciones de la SIM para escribir nuevos contactos]]>
78 | Escritura de contactos en la SIM completada con éxito 79 | 80 | 81 | - Múltiples idiomas (usando archivos de idioma xml en carpeta Languages)
82 | - Interfaz gráfica (usando enlace GTK# para las bibliotecas gráficas GTK y enlace Qyoto para las bibliotecas gráficas QT)
83 | - Depuración/Trazado (puede ser enviado a la consola y también a un archivo de registro que puede ser leído posteriormente)
84 |
85 | Autor:
86 |    Armando Basile (hmandevteam@gmail.com)
87 |
88 | Página Web:
89 |    http://monosim.integrazioneweb.com
90 |
91 | Seguimiento de incidencias:
92 |    http://code.google.com/p/monosim/issues/list
93 | ]]>
94 | 95 | 98 | 99 |
100 |
101 | -------------------------------------------------------------------------------- /Languages/monosim-it-IT.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | informazioni 5 | ringraziamenti 6 | informazioni su ... 7 | applicazione per la gestione dei contatti su sim card mediante lettori di tipo PC/SC e seriale 8 | 9 | _File 10 | Nuovo file dei contatti 11 | Apri file dei contatti 12 | Salva file dei contatti 13 | Salva file dei contatti su sim 14 | Chiudi file dei contatti 15 | Configura la porta seriale 16 | Esci 17 | 18 | _Lettore 19 | 20 | _Sim card 21 | Connetti la sim card 22 | Disconnetti la sim card 23 | Cambia lo stato del Pin su sim 24 | Salva i contatti sim 25 | Salva i contatti sim su file 26 | Cancella i contatti sim 27 | 28 | _Aiuto 29 | Apri la finestra informazioni su 30 | 31 | Contatti su file 32 | Contatti su sim 33 | 34 | descrizione 35 | numbero telefonico 36 | 37 | Aggiungi contatto 38 | Cancella contatto 39 | Copia contatto su sim 40 | Copia contatto su file 41 | 42 | Apri 43 | Annulla 44 | Salva 45 | 46 | Il Pin1 e' abilitato. Per usare monosim devi disabilitarlo 47 | 48 | Lettura in corso del contatto n. 49 | Scrittura in corso del contatto n. 50 | Totale contatti trovati 51 | 52 | Salvataggio contatti avvenuto. 53 | Sovrascrivo il file dei contatti 54 | Sei sicuro di voler cancellare tutti i contatti sulla sim ? 55 | Sei sicuro di voler eliminare il seguente contatto ? 56 | Entrambi i campi sono necessari, riprova 57 | Lunghezza massima del numero 20 cifre 58 | Lunghezza massima per la descrizione del contatto superata per 'description'. Il numero massimo di caratteri è 59 | Spazio insufficiente su sim 60 | 61 | Pin1 62 | Abilitato 63 | Disabilitato 64 | Imposta lo stato del Pin1 a 65 | Pin1 verifica 66 | I due valori del Pin1 non corrispondono, riprova 67 | Il Pin1 deve essere composto da 4 numeri, riprova 68 | un solo tentativo, effettua l'operazione sul telefono]]> 69 | esaurito i tentativi di presentazione del Pin1, prova ad usare il Puk1 sul telefono]]> 70 | Lo stato del Pin1 è stato variato 71 | 72 | Sovrascrive 73 | Aggiunge 74 | 75 | 76 | Sovrascrive: cancella tutta la rubrica su sim e poi scrive i nuovi contatti
77 | Aggiunge: usa tutte le posizioni vuote nella rubrica su sim per scrivere i nuovi contatti]]>
78 | Scrittura contatti su sim terminata con successo 79 | 80 | 81 | - Multilanguage (usando files di lingua xml nella cartella Languages)
82 | - Gui (usando il binding GTK# delle librerie grafiche GTK e il binding Qyoto delle librerie grafiche QT)
83 | - Debug/Trace (può essere inviato sia alla console che ad un file di log da consultare successivamente)
84 |
85 | autore:
86 |    Armando Basile (hmandevteam@gmail.com)
87 |
88 | sito web:
89 |    http://monosim.integrazioneweb.com
90 |
91 | segnalazioni:
92 |    http://code.google.com/p/monosim/issues/list
93 | ]]>
94 | 95 | 98 | 99 |
100 |
101 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Monosim     2 | **monosim** is a simple application cross platform, written in C# that can be used 3 | to read, write, update, delete and backup your sim card contacts. It open and 4 | save also .monosim files to manage contacts also in a text files. To connect monosim 5 | to your sim card you need use a standard [PC/SC](http://www.pcscworkgroup.com/) smartcard reader 6 | as acs, scm, athena, towitoko, etc. or Smartmouse/Phoenix serial reader. 7 | 8 | monosim is distributed under the terms of the GNU General Public License (GPLv2) 9 | 10 | * **monosim-gtk** - GTK user interface 11 | * **monosim-qt** - Qt user interface 12 | 13 | 14 | Cross platform is possible by: 15 | * [Mono framework](http://www.mono-project.com/Main_Page)/.Net framework _Runtime_ 16 | * [Pcsc-lite framework](http://pcsclite.alioth.debian.org/)/Winscard _Middleware for PC/SC smartcard readers communication_ 17 | * [Gtk-sharp](http://www.mono-project.com/GtkSharp) _C# bindings for GTK libraries_ 18 | * [Qyoto](http://techbase.kde.org/Development/Languages/Qyoto) _C# bindings for QT libraries_ 19 | 20 |
21 | 22 | 23 | for build and run see [Wiki pages](https://github.com/armando-basile/monosim/wiki) 24 | 25 | --- 26 | 27 | 28 | ## VIDEO ## 29 |

30 |


31 | 32 | 33 | 34 | 35 | Copyright (c) 2008-2016, Armando Basile 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /base-components/Contact.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace monosimbase 4 | { 5 | public class Contact 6 | { 7 | // Properties 8 | public string Description {get; set;} 9 | public string PhoneNumber {get; set;} 10 | 11 | /// 12 | /// Constructor 13 | /// 14 | public Contact (string description, string phoneNumber) 15 | { 16 | Description = description; 17 | PhoneNumber = phoneNumber; 18 | } 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /base-components/Contacts.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace monosimbase 5 | { 6 | public class Contacts 7 | { 8 | // Properties 9 | public List SimContacts {get; set;} 10 | 11 | /// 12 | /// Constructor 13 | /// 14 | public Contacts () 15 | { 16 | SimContacts = new List(); 17 | } 18 | 19 | 20 | 21 | public bool Contains(string contactDescription) 22 | { 23 | if (FindIndex(contactDescription) >= 0) 24 | { 25 | return true; 26 | } 27 | return false; 28 | } 29 | 30 | 31 | 32 | public int FindIndex(string contactDescription) 33 | { 34 | for (int cnt=0; cnt 8 | /// Manage languages 9 | /// 10 | public class LanguageManager 11 | { 12 | 13 | // Attributes 14 | XmlDocument xmlDoc; 15 | 16 | 17 | /// 18 | /// Costructor 19 | /// 20 | public LanguageManager(string resourceFilePath) 21 | { 22 | // Load Resource file 23 | xmlDoc = new XmlDocument(); 24 | xmlDoc.Load(resourceFilePath); 25 | 26 | } 27 | 28 | 29 | 30 | /// 31 | /// Get value of requested key 32 | /// 33 | public string GetString(string keyName) 34 | { 35 | XmlNode xmlDocNode = xmlDoc.SelectSingleNode("/Settings/language/" + keyName); 36 | return xmlDocNode.InnerText; 37 | } 38 | 39 | 40 | 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /base-components/MonosimEventHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace monosimbase 4 | { 5 | public delegate void MonosimEventHandler(object sender, EventArgs args); 6 | } 7 | -------------------------------------------------------------------------------- /build-linux/build-lnx-monosim-gtk-full.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | TARGET="Debug" 4 | DIRNAME="$(dirname "$(readlink -f "$0")")" 5 | 6 | # detect if there is a target specified 7 | if [ $# -gt 0 ] ; then 8 | TARGET="$1" 9 | fi 10 | 11 | # Clean and Build 12 | xbuild /t:Rebuild /p:Configuration=$TARGET $DIRNAME/../solutions/monosim-gtk-full.sln 13 | 14 | -------------------------------------------------------------------------------- /build-linux/build-lnx-monosim-gtk.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | TARGET="Debug" 4 | DIRNAME="$(dirname "$(readlink -f "$0")")" 5 | 6 | # detect if there is a target specified 7 | if [ $# -gt 0 ] ; then 8 | TARGET="$1" 9 | fi 10 | 11 | # Clean and Build 12 | xbuild /t:Rebuild /p:Configuration=$TARGET $DIRNAME/../solutions/monosim-gtk.sln 13 | 14 | -------------------------------------------------------------------------------- /build-linux/build-lnx-monosim-qt-full.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | TARGET="Debug" 4 | DIRNAME="$(dirname "$(readlink -f "$0")")" 5 | 6 | # detect if there is a target specified 7 | if [ $# -gt 0 ] ; then 8 | TARGET="$1" 9 | fi 10 | 11 | # Clean and Build 12 | xbuild /t:Rebuild /p:Configuration=$TARGET $DIRNAME/../solutions/monosim-qt-full.sln 13 | 14 | -------------------------------------------------------------------------------- /build-linux/build-lnx-monosim-qt.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | TARGET="Debug" 4 | DIRNAME="$(dirname "$(readlink -f "$0")")" 5 | 6 | # detect if there is a target specified 7 | if [ $# -gt 0 ] ; then 8 | TARGET="$1" 9 | fi 10 | 11 | # Clean and Build 12 | xbuild /t:Rebuild /p:Configuration=$TARGET $DIRNAME/../solutions/monosim-qt.sln 13 | 14 | -------------------------------------------------------------------------------- /build-linux/prepare.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | DIRNAME="$(dirname "$(readlink -f "$0")")" 3 | 4 | mkdir -p $DIRNAME/../Dependencies 5 | cd $DIRNAME/../Dependencies 6 | rm -rf master.tar.gz 7 | rm -rf comex-project 8 | wget -O master.tar.gz https://github.com/armando-basile/comex-project/archive/master.tar.gz 9 | tar xf master.tar.gz 10 | rm -rf master.tar.gz 11 | mv comex-project-master comex-project 12 | cd ../build-linux 13 | -------------------------------------------------------------------------------- /build-win/build-win-monosim-gtk.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM build script for windows system 3 | 4 | SET TARGET=Debug 5 | 6 | REM detect if there is a target specified 7 | IF NOT "%1"=="" ( 8 | SET TARGET=%1 9 | ) 10 | 11 | REM Clean and Build 12 | msbuild /t:Rebuild /p:Configuration=%TARGET% ../solutions/monosim-gtk.sln 13 | -------------------------------------------------------------------------------- /docs/GSM11-11v6-2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armando-basile/monosim/5d3c89582de859611d1ef6937e950a35db0a7d0b/docs/GSM11-11v6-2.pdf -------------------------------------------------------------------------------- /docs/TonNpi: -------------------------------------------------------------------------------- 1 | TonNpi Byte is codify as follow: 2 | 3 | ----------------------------------------- 4 | | b8 | b7 | b6 | b5 | b4 | b3 | b2 | b1 | 5 | ----------------------------------------- 6 | | | | | |----|----|----|---> Npi 7 | | |----|----|-----------------------> Ton 8 | |--------------------------------------> 1 9 | 10 | 11 | TON values 12 | --------------------- 13 | Unknown ......... = 0 14 | International ... = 1 15 | National ........ = 2 16 | Network Specific = 3 17 | Subscriber Number = 4 18 | Alphanumeric .... = 5 19 | Abbreviated ..... = 6 20 | 21 | 22 | NPI values 23 | --------------------- 24 | Unknown = 0 25 | ISDN/telephone numbering plan (E163/E164) = 1 26 | Data numbering plan (X.121) = 3 27 | Telex numbering plan (F.69) = 4 28 | Land Mobile (E.212) = 6 29 | National numbering plan = 8 30 | Private numbering plan = 9 31 | ERMES numbering plan (ETSI DE/PS 3 01-3) = 10 32 | Internet (IP) = 13 33 | WAP Client Id = 18 34 | 35 | 36 | Examples: 37 | Unknow number have Ton=0 and Npi=1 (10000001 = 81) 38 | International number have Ton=1 and Npi=1 (10010001 = 91) 39 | National number have Ton=2 and Npi=1 (10100001 = A1) 40 | -------------------------------------------------------------------------------- /monosim-gtk/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("monosim-gtk")] 8 | [assembly: AssemblyDescription("GTK application to manage sim card contacts")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("monosim-gtk")] 12 | [assembly: AssemblyCopyright("Armando Basile (c) 2008-2015")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("2.0.1")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] -------------------------------------------------------------------------------- /monosim-gtk/Resources/monosim-gtk: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Categories=Office;ContactManagement;GTK;GNOME; 3 | Comment=GTK application to manage sim card contacts 4 | Comment[it]=Applicazione GTK per gestire i contatti su sim card 5 | Comment[it_IT]=Applicazione GTK per gestire i contatti su sim card 6 | Comment[es]=Aplicación GTK para gestionar los contactos de una tarjeta SIM 7 | Comment[es_ES]=Aplicación GTK para gestionar los contactos de una tarjeta SIM 8 | Encoding=UTF-8 9 | Exec=monosim-gtk 10 | GenericName=monosim-gtk 11 | Icon=monosim-gtk 12 | Name=monosim-gtk 13 | StartupNotify=true 14 | Terminal=false 15 | Type=Application 16 | -------------------------------------------------------------------------------- /monosim-gtk/Src/Glade_Files/AboutDialog.glade: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | True 7 | center 8 | 550 9 | 400 10 | 11 | 12 | True 13 | vertical 14 | 2 15 | 16 | 17 | True 18 | vertical 19 | 20 | 21 | True 22 | 3 23 | 3 24 | 3 25 | 3 26 | 27 | 28 | True 29 | 30 | 50 | 51 | False 52 | 0 53 | 54 | 55 | 56 | 57 | True 58 | queue 59 | 60 | 61 | True 62 | 63 | 64 | True 65 | 0 66 | 5 67 | label 68 | 69 | 70 | 71 | 72 | 73 | 74 | 1 75 | 76 | 77 | 78 | 79 | 80 | 81 | False 82 | 0 83 | 84 | 85 | 86 | 87 | True 88 | 8 89 | 4 90 | 4 91 | 92 | 93 | True 94 | True 95 | automatic 96 | automatic 97 | 98 | 99 | True 100 | True 101 | 102 | 103 | 104 | 105 | 106 | 107 | 1 108 | 109 | 110 | 111 | 112 | True 113 | end 114 | 115 | 116 | True 117 | 8 118 | 8 119 | 8 120 | 121 | 122 | gtk-ok 123 | True 124 | True 125 | True 126 | True 127 | 128 | 129 | 130 | 131 | False 132 | False 133 | 0 134 | 135 | 136 | 137 | 138 | False 139 | end 140 | 2 141 | 142 | 143 | 144 | 145 | 1 146 | 147 | 148 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /monosim-gtk/Src/Glade_Files/ChangePinStatusDialog.glade: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 360 7 | 160 8 | False 9 | 5 10 | False 11 | True 12 | center-on-parent 13 | dialog 14 | 15 | 16 | True 17 | False 18 | 2 19 | 20 | 21 | True 22 | False 23 | 8 24 | 8 25 | 26 | 27 | True 28 | False 29 | label 30 | 31 | 32 | 33 | 34 | False 35 | True 36 | 0 37 | 38 | 39 | 40 | 41 | False 42 | end 43 | 44 | 45 | gtk-cancel 46 | -1 47 | True 48 | True 49 | True 50 | False 51 | True 52 | 53 | 54 | False 55 | False 56 | 0 57 | 58 | 59 | 60 | 61 | gtk-ok 62 | True 63 | True 64 | True 65 | False 66 | True 67 | 68 | 69 | False 70 | False 71 | 1 72 | 73 | 74 | 75 | 76 | False 77 | True 78 | end 79 | 0 80 | 81 | 82 | 83 | 84 | 60 85 | True 86 | False 87 | 3 88 | 3 89 | 5 90 | 5 91 | 92 | 93 | True 94 | False 95 | 2 96 | 2 97 | 98 | 99 | True 100 | False 101 | 0 102 | 3 103 | Pin1 104 | 105 | 106 | GTK_FILL 107 | 108 | 109 | 110 | 111 | True 112 | False 113 | 0 114 | 3 115 | Pin1 check 116 | 117 | 118 | 1 119 | 2 120 | GTK_FILL 121 | 122 | 123 | 124 | 125 | True 126 | True 127 | 4 128 | False 129 | True 130 | False 131 | False 132 | True 133 | True 134 | 135 | 136 | 1 137 | 2 138 | 139 | 140 | 141 | 142 | True 143 | True 144 | 4 145 | False 146 | True 147 | False 148 | False 149 | True 150 | True 151 | 152 | 153 | 1 154 | 2 155 | 1 156 | 2 157 | 158 | 159 | 160 | 161 | 162 | 163 | False 164 | True 165 | 3 166 | 167 | 168 | 169 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /monosim-gtk/Src/Glade_Files/NewContactDialog.glade: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 360 7 | 160 8 | False 9 | 5 10 | False 11 | True 12 | center-on-parent 13 | dialog 14 | 15 | 16 | True 17 | False 18 | 2 19 | 20 | 21 | True 22 | False 23 | 8 24 | 8 25 | 26 | 27 | True 28 | False 29 | label 30 | 31 | 32 | 33 | 34 | False 35 | True 36 | 0 37 | 38 | 39 | 40 | 41 | False 42 | end 43 | 44 | 45 | gtk-cancel 46 | -1 47 | True 48 | True 49 | True 50 | False 51 | True 52 | 53 | 54 | False 55 | False 56 | 0 57 | 58 | 59 | 60 | 61 | gtk-ok 62 | True 63 | True 64 | True 65 | False 66 | True 67 | 68 | 69 | False 70 | False 71 | 1 72 | 73 | 74 | 75 | 76 | False 77 | True 78 | end 79 | 0 80 | 81 | 82 | 83 | 84 | 60 85 | True 86 | False 87 | 3 88 | 3 89 | 5 90 | 5 91 | 92 | 93 | True 94 | False 95 | 2 96 | 2 97 | 98 | 99 | True 100 | False 101 | 0 102 | 3 103 | Description 104 | 105 | 106 | GTK_FILL 107 | 108 | 109 | 110 | 111 | True 112 | False 113 | 0 114 | 3 115 | Phone number 116 | 117 | 118 | 1 119 | 2 120 | GTK_FILL 121 | 122 | 123 | 124 | 125 | True 126 | True 127 | 128 | True 129 | False 130 | False 131 | True 132 | True 133 | 134 | 135 | 1 136 | 2 137 | 138 | 139 | 140 | 141 | True 142 | True 143 | 144 | True 145 | False 146 | False 147 | True 148 | True 149 | 150 | 151 | 1 152 | 2 153 | 1 154 | 2 155 | 156 | 157 | 158 | 159 | 160 | 161 | False 162 | True 163 | 3 164 | 165 | 166 | 167 | 168 | 169 | 170 | -------------------------------------------------------------------------------- /monosim-gtk/Src/Glade_Files/SelectWriteModeDialog.glade: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 420 7 | 200 8 | False 9 | 5 10 | False 11 | True 12 | center-on-parent 13 | dialog 14 | 15 | 16 | True 17 | False 18 | 2 19 | 20 | 21 | False 22 | end 23 | 24 | 25 | gtk-cancel 26 | -1 27 | True 28 | True 29 | True 30 | False 31 | True 32 | 33 | 34 | False 35 | False 36 | 0 37 | True 38 | 39 | 40 | 41 | 42 | 2 43 | True 44 | True 45 | True 46 | False 47 | True 48 | 49 | 50 | False 51 | False 52 | 1 53 | 54 | 55 | 56 | 57 | Append 58 | 1 59 | True 60 | True 61 | True 62 | False 63 | 64 | 65 | False 66 | False 67 | 2 68 | 69 | 70 | 71 | 72 | False 73 | True 74 | end 75 | 0 76 | 77 | 78 | 79 | 80 | True 81 | False 82 | 8 83 | 8 84 | 85 | 86 | True 87 | False 88 | label 89 | True 90 | 91 | 92 | 93 | 94 | False 95 | True 96 | 1 97 | 98 | 99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /monosim-gtk/Src/Gui_Classes/AboutDialogClass.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Glade; 3 | using Gtk; 4 | using Gdk; 5 | 6 | using comexbase; 7 | using monosimbase; 8 | 9 | namespace monosimgtk 10 | { 11 | 12 | public class AboutDialogClass 13 | { 14 | 15 | 16 | [Glade.Widget] Gtk.Window AboutDialog = null; 17 | [Glade.Widget] Gtk.Image imgLogo = null; 18 | [Glade.Widget] Gtk.Label lblTitle = null; 19 | [Glade.Widget] Gtk.Label lblAbout = null; 20 | [Glade.Widget] Gtk.Label lblThanks = null; 21 | [Glade.Widget] Gtk.Notebook tabInfo = null; 22 | [Glade.Widget] Gtk.Button btnOk = null; 23 | [Glade.Widget] Gtk.Viewport vpTitle = null; 24 | [Glade.Widget] Gtk.Viewport vpLogo = null; 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | #region Properties 34 | 35 | 36 | /// 37 | /// GtkWindow Title 38 | /// 39 | public string Title 40 | { 41 | get { return AboutDialog.Title; } 42 | set { AboutDialog.Title = value; } 43 | } 44 | 45 | 46 | 47 | /// 48 | /// Description area (use markup format) 49 | /// 50 | public string Description 51 | { 52 | set { lblTitle.Markup = value; } 53 | } 54 | 55 | 56 | 57 | /// 58 | /// About area (use markup format) 59 | /// 60 | public string About 61 | { 62 | set { lblAbout.Markup = value; } 63 | } 64 | 65 | 66 | 67 | 68 | /// 69 | /// Thanks area (use markup format) 70 | /// 71 | public string Thanks 72 | { 73 | set { lblThanks.Markup = value; } 74 | } 75 | 76 | 77 | 78 | 79 | #endregion Properties 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | /// 90 | /// Constructor 91 | /// 92 | public AboutDialogClass() 93 | { 94 | // Instance glade xml object using glade file 95 | Glade.XML gxml = new Glade.XML("AboutDialog.glade", "AboutDialog"); 96 | 97 | // Aonnect glade xml object to this Gtk.Dialog 98 | gxml.Autoconnect(this); 99 | 100 | // Update Gtk graphic objects 101 | UpdateGraphicObjects(); 102 | 103 | // Update Event Handlers 104 | UpdateReactors(); 105 | 106 | } 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | #region Public Methods 118 | 119 | 120 | 121 | 122 | 123 | /// 124 | /// Set Parend gtk widget 125 | /// 126 | public void SetParent(ref Gtk.Window parent) 127 | { 128 | AboutDialog.TransientFor = parent; 129 | AboutDialog.DestroyWithParent = true; 130 | } 131 | 132 | 133 | 134 | 135 | 136 | /// 137 | /// Show GtkWindow object 138 | /// 139 | public void Show() 140 | { 141 | tabInfo.ShowAll(); 142 | AboutDialog.Show(); 143 | } 144 | 145 | 146 | 147 | 148 | 149 | 150 | #endregion Public Methods 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | #region Reactors 165 | 166 | 167 | /// 168 | /// Close GtkWindows 169 | /// 170 | public void ActionCancel(object sender, EventArgs args) 171 | { 172 | AboutDialog.Destroy(); 173 | AboutDialog.Dispose(); 174 | } 175 | 176 | 177 | 178 | #endregion Reactors 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | #region Private Methods 196 | 197 | 198 | 199 | /// 200 | /// Update Gtk objects properties 201 | /// 202 | private void UpdateGraphicObjects() 203 | { 204 | // Set dialog icon 205 | AboutDialog.Icon = Gdk.Pixbuf.LoadFromResource("monosim.png"); 206 | 207 | // Set description area back color 208 | vpTitle.ModifyBg(StateType.Normal, new Gdk.Color(255,255,255)); 209 | 210 | // Create and add tab for About info 211 | AddLabelTab(ref lblAbout, GlobalObjUI.LMan.GetString("about")); 212 | 213 | // Create and add tab for Thanks info 214 | AddLabelTab(ref lblThanks, GlobalObjUI.LMan.GetString("thanks")); 215 | 216 | imgLogo.Pixbuf = Gdk.Pixbuf.LoadFromResource("monosim.png"); 217 | vpLogo.ModifyBg(StateType.Normal, new Gdk.Color(255,255,255)); 218 | 219 | lblTitle.ModifyBg(StateType.Normal, new Gdk.Color(255,255,255)); 220 | 221 | //Gdk.Geometry geo = new Gdk.Geometry(); 222 | //geo.MinHeight = 380; 223 | //geo.MinWidth = 500; 224 | //AboutDialog.SetGeometryHints(tabInfo, geo, Gdk.WindowHints.MinSize); 225 | 226 | } 227 | 228 | 229 | 230 | 231 | 232 | 233 | /// 234 | /// Update Gtk objects reactors 235 | /// 236 | private void UpdateReactors() 237 | { 238 | AboutDialog.DeleteEvent += ActionCancel; 239 | btnOk.Clicked += ActionCancel; 240 | 241 | } 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | /// 251 | /// Add tab to notebook object 252 | /// 253 | private void AddLabelTab(ref Gtk.Label lblObj, string title) 254 | { 255 | // Create and add tab for Thanks info 256 | ScrolledWindow sw = new ScrolledWindow(); 257 | Viewport vp = new Viewport(); 258 | sw.AddWithViewport(vp); 259 | lblObj = new Label(); 260 | lblObj.SetPadding(4,4); 261 | lblObj.SetAlignment((float)0, (float)0); 262 | vp.ModifyBg(StateType.Normal, new Gdk.Color(255,255,255)); 263 | vp.Add(lblObj); 264 | tabInfo.AppendPage(sw, new Gtk.Label(title)); 265 | } 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | #endregion Private Methods 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | } 296 | } 297 | 298 | -------------------------------------------------------------------------------- /monosim-gtk/Src/Gui_Classes/ChangePinStatusDialogClass.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | using Glade; 4 | using Gtk; 5 | using Gdk; 6 | 7 | using comexbase; 8 | using monosimbase; 9 | 10 | namespace monosimgtk 11 | { 12 | 13 | public class ChangePinStatusDialogClass 14 | { 15 | 16 | [Glade.Widget] Gtk.Dialog ChangePinStatusDialog = null; 17 | [Glade.Widget] Gtk.Label LblTitle = null; 18 | [Glade.Widget] Gtk.Label LblPin1 = null; 19 | [Glade.Widget] Gtk.Label LblPin1check = null; 20 | [Glade.Widget] Gtk.Entry TxtPin1 = null; 21 | [Glade.Widget] Gtk.Entry TxtPin1check = null; 22 | 23 | // Attributes 24 | private Gtk.Window mainWin = null; 25 | 26 | 27 | /// 28 | /// Constructor 29 | /// 30 | public ChangePinStatusDialogClass (Gtk.Window parent) 31 | { 32 | mainWin = parent; 33 | SetupDialog(); 34 | } 35 | 36 | 37 | 38 | /// 39 | /// Show Dialog to change Pin1 status 40 | /// 41 | public string Show() 42 | { 43 | int respType = -1; 44 | string pin1 = "", pin1check = ""; 45 | int retNumber = 0; 46 | 47 | while (1==1) 48 | { 49 | SetupDialog(); 50 | respType = ChangePinStatusDialog.Run(); 51 | pin1 = TxtPin1.Text.Trim(); 52 | pin1check = TxtPin1check.Text.Trim(); 53 | ChangePinStatusDialog.Destroy(); 54 | 55 | if (respType != 0) 56 | { 57 | // Cancel button pressed 58 | return null; 59 | } 60 | 61 | // check data entry 62 | if (pin1 == "" || pin1check == "") 63 | { 64 | // send warning message 65 | MainClass.ShowMessage(mainWin, "ERROR", 66 | GlobalObjUI.LMan.GetString("pinsimchk2"), 67 | MessageType.Warning); 68 | } 69 | else if (pin1.Trim() != pin1check.Trim()) 70 | { 71 | // send warning message 72 | MainClass.ShowMessage(mainWin, "ERROR", 73 | GlobalObjUI.LMan.GetString("pinsimchk1"), 74 | MessageType.Warning); 75 | } 76 | else if (pin1.Trim().Length != 4) 77 | { 78 | // send warning message 79 | MainClass.ShowMessage(mainWin, "ERROR", 80 | GlobalObjUI.LMan.GetString("pinsimchk2"), 81 | MessageType.Warning); 82 | } 83 | else if (!int.TryParse(pin1.Trim(), out retNumber)) 84 | { 85 | // send warning message 86 | MainClass.ShowMessage(mainWin, "ERROR", 87 | GlobalObjUI.LMan.GetString("pinsimchk2"), 88 | MessageType.Warning); 89 | } 90 | else 91 | { 92 | // Data are correct 93 | return GetHexFromPin(pin1); 94 | } 95 | } 96 | 97 | 98 | } 99 | 100 | 101 | /// 102 | /// Setup Dialog 103 | /// 104 | private void SetupDialog() 105 | { 106 | Glade.XML gxml = new Glade.XML("ChangePinStatusDialog.glade", "ChangePinStatusDialog"); 107 | gxml.Autoconnect(this); 108 | 109 | string title = GlobalObjUI.LMan.GetString("pinsimsetlbl"); 110 | 111 | // check for actual Pin1 status 112 | if (GlobalObjUI.SimPin1Status) 113 | { 114 | // set disables 115 | title += "" + GlobalObjUI.LMan.GetString("pin1off") + ""; 116 | } 117 | else 118 | { 119 | // set enabled 120 | title += "" + GlobalObjUI.LMan.GetString("pin1on") + ""; 121 | } 122 | 123 | ChangePinStatusDialog.Icon = Gdk.Pixbuf.LoadFromResource("monosim.png"); 124 | ChangePinStatusDialog.Title = MainClass.AppNameVer + " - " + GlobalObjUI.LMan.GetString("pinsimact"); 125 | LblTitle.Markup = title; 126 | LblPin1.Text = GlobalObjUI.LMan.GetString("pinsimlbl"); 127 | LblPin1check.Text = GlobalObjUI.LMan.GetString("pinsimchklbl"); 128 | 129 | ChangePinStatusDialog.TransientFor = mainWin; 130 | ChangePinStatusDialog.DestroyWithParent = true; 131 | } 132 | 133 | 134 | 135 | 136 | /// 137 | /// Get hexadecimal value of passed pin. 138 | /// 139 | private string GetHexFromPin(string pinValue) 140 | { 141 | string pinHexValue = ""; 142 | 143 | for (int d=0; d 20 | /// Add new contact action 21 | /// 22 | private void PopupFileAdd() 23 | { 24 | NewContactDialogClass ncdc = new NewContactDialogClass(MainWindow, 0, "", ""); 25 | Contact newContact = ncdc.Show(); 26 | 27 | if (newContact == null) 28 | { 29 | return; 30 | } 31 | 32 | // Add contact to file contacts 33 | GlobalObjUI.FileContacts.SimContacts.Add(newContact); 34 | lstFileContacts.AppendValues(newContact.Description, newContact.PhoneNumber); 35 | } 36 | 37 | 38 | 39 | /// 40 | /// Del contact 41 | /// 42 | private void PopupFileDel() 43 | { 44 | if (LstFileContacts.Selection.CountSelectedRows() == 0) 45 | { 46 | // no selected rows 47 | return; 48 | } 49 | 50 | if (!DeleteContactQuestion()) 51 | { 52 | return; 53 | } 54 | 55 | // loop for all selected items 56 | TreePath[] tps = LstFileContacts.Selection.GetSelectedRows(); 57 | Contacts contacts = GlobalObjUI.FileContacts; 58 | RemoveItems(ref contacts, ref lstFileContacts, tps); 59 | 60 | } 61 | 62 | 63 | 64 | 65 | 66 | 67 | /// 68 | /// Add new contact action 69 | /// 70 | private void PopupSimAdd() 71 | { 72 | NewContactDialogClass ncdc = new NewContactDialogClass(MainWindow, 73 | GlobalObjUI.SimADNMaxAlphaChars,"", ""); 74 | Contact newContact = ncdc.Show(); 75 | 76 | if (newContact == null) 77 | { 78 | return; 79 | } 80 | 81 | // Add contact to file contacts 82 | GlobalObjUI.SimContacts.SimContacts.Add(newContact); 83 | lstSimContacts.AppendValues(newContact.Description, newContact.PhoneNumber); 84 | } 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | /// 95 | /// Del contact 96 | /// 97 | private void PopupSimDel() 98 | { 99 | if (LstSimContacts.Selection.CountSelectedRows() == 0) 100 | { 101 | // no selected rows 102 | return; 103 | } 104 | 105 | if (!DeleteContactQuestion()) 106 | { 107 | return; 108 | } 109 | 110 | // loop for all selected items 111 | TreePath[] tps = LstSimContacts.Selection.GetSelectedRows(); 112 | Contacts contacts = GlobalObjUI.SimContacts; 113 | RemoveItems(ref contacts, ref lstSimContacts, tps); 114 | 115 | } 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | private void PopupFileMoveToSim() 125 | { 126 | if (!LstSimContacts.Sensitive) 127 | { 128 | // ListView disabled 129 | return; 130 | } 131 | 132 | // loop for all selected items 133 | TreePath[] tps = LstFileContacts.Selection.GetSelectedRows(); 134 | int pos = -1; 135 | for(int p=0; p 177 | /// Are you sure dialog 178 | /// 179 | private bool DeleteContactQuestion() 180 | { 181 | MessageDialog mdlg = new MessageDialog(MainWindow, DialogFlags.Modal, 182 | MessageType.Question, ButtonsType.YesNo, GlobalObjUI.LMan.GetString("suredelcontact")); 183 | mdlg.TransientFor = MainWindow; 184 | mdlg.Title = MainClass.AppNameVer + " - " + GlobalObjUI.LMan.GetString("delcontacts"); 185 | 186 | ResponseType respType = (ResponseType)mdlg.Run(); 187 | mdlg.Destroy(); 188 | mdlg.Dispose(); 189 | mdlg = null; 190 | 191 | if (respType == ResponseType.Yes) 192 | { 193 | return true; 194 | } 195 | return false; 196 | } 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | private void RemoveItems(ref Contacts cnts, ref ListStore lstore, TreePath[] tPath) 206 | { 207 | 208 | for(int p=(tPath.Length-1); p>=0; p--) 209 | { 210 | // remove contact from list 211 | cnts.SimContacts.RemoveAt(tPath[p].Indices[0]); 212 | } 213 | 214 | for(int p=(tPath.Length-1); p>=0; p--) 215 | { 216 | // remove contact from list 217 | TreeIter ti; 218 | bool isIter = lstore.GetIter(out ti, tPath[p]); 219 | if (isIter) 220 | { 221 | lstore.Remove(ref ti); 222 | } 223 | } 224 | } 225 | 226 | 227 | 228 | 229 | } 230 | } 231 | 232 | -------------------------------------------------------------------------------- /monosim-gtk/Src/Gui_Classes/NewContactDialogClass.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Glade; 3 | using Gtk; 4 | using Gdk; 5 | 6 | using comexbase; 7 | using monosimbase; 8 | 9 | namespace monosimgtk 10 | { 11 | 12 | public class NewContactDialogClass 13 | { 14 | 15 | [Glade.Widget] Gtk.Dialog NewContactDialog = null; 16 | [Glade.Widget] Gtk.Label LblTitle = null; 17 | [Glade.Widget] Gtk.Label LblDesc = null; 18 | [Glade.Widget] Gtk.Label LblNumber = null; 19 | [Glade.Widget] Gtk.Entry TxtDesc = null; 20 | [Glade.Widget] Gtk.Entry TxtNumber = null; 21 | //[Glade.Widget] Gtk.HButtonBox Buttons = null; 22 | //[Glade.Widget] Gtk.Button BtnCancel = null; 23 | //[Glade.Widget] Gtk.Button BtnOk = null; 24 | 25 | // Attributes 26 | private Gtk.Window mainWin = null; 27 | private int maxAlphaChars = 0; 28 | private string txtDesc = ""; 29 | private string txtNumber = ""; 30 | 31 | 32 | 33 | /// 34 | /// Constructor 35 | /// 36 | public NewContactDialogClass (Gtk.Window parent, int maxAlphaCharacters, 37 | string desc, string phone) 38 | { 39 | maxAlphaChars = maxAlphaCharacters; 40 | mainWin = parent; 41 | txtDesc = desc; 42 | txtNumber = phone; 43 | SetupDialog(); 44 | } 45 | 46 | 47 | 48 | /// 49 | /// Show Dialog to add new contact and return it. 50 | /// 51 | public Contact Show() 52 | { 53 | int respType = -1; 54 | string txtDesc = "", txtNumber = ""; 55 | 56 | while (1==1) 57 | { 58 | SetupDialog(); 59 | respType = NewContactDialog.Run(); 60 | txtDesc = TxtDesc.Text.Trim(); 61 | txtNumber = TxtNumber.Text.Trim(); 62 | NewContactDialog.Destroy(); 63 | 64 | if (respType != 0) 65 | { 66 | // Cancel button pressed 67 | return null; 68 | } 69 | 70 | // check data entry 71 | if (txtDesc == "" || txtNumber == "") 72 | { 73 | // send warning message 74 | MainClass.ShowMessage(mainWin, "ERROR", 75 | GlobalObjUI.LMan.GetString("fieldsreq"), 76 | MessageType.Warning); 77 | } 78 | else if ((txtNumber.Length == 21) && 79 | (txtNumber.Substring(0,1) != "+")) 80 | { 81 | // number max len is 20 digits 82 | MainClass.ShowMessage(mainWin, "ERROR", 83 | GlobalObjUI.LMan.GetString("maxnumlen"), 84 | MessageType.Warning); 85 | 86 | 87 | } 88 | else 89 | { 90 | // Data are correct 91 | Contact cnt = new Contact(txtDesc, txtNumber); 92 | return cnt; 93 | } 94 | } 95 | 96 | 97 | } 98 | 99 | 100 | /// 101 | /// Setup Dialog 102 | /// 103 | private void SetupDialog() 104 | { 105 | Glade.XML gxml = new Glade.XML("NewContactDialog.glade", "NewContactDialog"); 106 | gxml.Autoconnect(this); 107 | NewContactDialog.Icon = Gdk.Pixbuf.LoadFromResource("monosim.png"); 108 | NewContactDialog.Title = MainClass.AppNameVer + " - " + GlobalObjUI.LMan.GetString("addcontacts"); 109 | LblTitle.Text = GlobalObjUI.LMan.GetString("addcontacts"); 110 | LblDesc.Text = GlobalObjUI.LMan.GetString("descnumber"); 111 | LblNumber.Text = GlobalObjUI.LMan.GetString("phonenumber"); 112 | 113 | if ( maxAlphaChars > 0) 114 | { 115 | TxtDesc.MaxLength = maxAlphaChars; 116 | } 117 | 118 | TxtDesc.Text = txtDesc; 119 | TxtNumber.Text = txtNumber; 120 | TxtNumber.MaxLength = 21; 121 | NewContactDialog.TransientFor = mainWin; 122 | NewContactDialog.DestroyWithParent = true; 123 | } 124 | 125 | 126 | 127 | } 128 | 129 | } 130 | 131 | -------------------------------------------------------------------------------- /monosim-gtk/Src/Gui_Classes/SelectWriteModeDialogClass.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | using Glade; 4 | using Gtk; 5 | using Gdk; 6 | 7 | using comexbase; 8 | using monosimbase; 9 | 10 | namespace monosimgtk 11 | { 12 | public class SelectWriteModeDialogClass 13 | { 14 | [Glade.Widget] Gtk.Dialog SelectWriteModeDialog = null; 15 | [Glade.Widget] Gtk.Label LblTitle = null; 16 | [Glade.Widget] Gtk.Button BtnOverride = null; 17 | [Glade.Widget] Gtk.Button BtnAppend = null; 18 | 19 | 20 | 21 | public SelectWriteModeDialogClass(Gtk.Window parent, string winTitle) 22 | { 23 | Glade.XML gxml = new Glade.XML("SelectWriteModeDialog.glade", "SelectWriteModeDialog"); 24 | gxml.Autoconnect(this); 25 | 26 | SelectWriteModeDialog.Icon = Gdk.Pixbuf.LoadFromResource("monosim.png"); 27 | SelectWriteModeDialog.TransientFor = parent; 28 | SelectWriteModeDialog.DestroyWithParent = true; 29 | 30 | SelectWriteModeDialog.Title = MainClass.AppNameVer + " - " + winTitle; 31 | 32 | string title = GlobalObjUI.LMan.GetString("simwritemode"); 33 | title = title.Replace("
", "").Replace(" ", " "); 34 | 35 | LblTitle.Markup = title; 36 | 37 | BtnOverride.Image = new Gtk.Image(Stock.Remove, IconSize.Button); 38 | BtnAppend.Image = new Gtk.Image(Stock.Add, IconSize.Button); 39 | BtnOverride.Label = GlobalObjUI.LMan.GetString("simoverride"); 40 | BtnAppend.Label = GlobalObjUI.LMan.GetString("simappend"); 41 | } 42 | 43 | 44 | 45 | 46 | public int Show() 47 | { 48 | int respType = -1; 49 | respType = SelectWriteModeDialog.Run(); 50 | SelectWriteModeDialog.Destroy(); 51 | return respType; 52 | } 53 | 54 | 55 | 56 | 57 | 58 | } 59 | } 60 | 61 | -------------------------------------------------------------------------------- /monosim-gtk/Src/Gui_Classes/SettingsDialogClass.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Glade; 3 | using Gtk; 4 | using Gdk; 5 | 6 | using comexbase; 7 | 8 | namespace monosimgtk 9 | { 10 | 11 | public class SettingsDialogClass 12 | { 13 | 14 | 15 | [Glade.Widget] Gtk.Window SettingsDialog = null; 16 | [Glade.Widget] Gtk.ComboBox CmbPortSpeed = null; 17 | [Glade.Widget] Gtk.ComboBox CmbPortSpeedReset = null; 18 | [Glade.Widget] Gtk.ComboBox CmbStopBits = null; 19 | [Glade.Widget] Gtk.ComboBox CmbParity = null; 20 | [Glade.Widget] Gtk.ComboBox CmbDataBits = null; 21 | [Glade.Widget] Gtk.ComboBox CmbConvention = null; 22 | [Glade.Widget] Gtk.Button BtnCancel = null; 23 | [Glade.Widget] Gtk.Button BtnOk = null; 24 | 25 | 26 | 27 | /// 28 | /// Constructor 29 | /// 30 | public SettingsDialogClass () 31 | { 32 | // Instance glade xml object using glade file 33 | Glade.XML gxml = new Glade.XML("SettingsDialog.glade", "SettingsDialog"); 34 | 35 | // Aonnect glade xml object to this Gtk.Dialog 36 | gxml.Autoconnect(this); 37 | 38 | // Update Gtk graphic objects 39 | UpdateGraphicObjects(); 40 | 41 | // Update Event Handlers 42 | UpdateReactors(); 43 | } 44 | 45 | 46 | 47 | 48 | 49 | 50 | #region Public Methods 51 | 52 | 53 | /// 54 | /// Set Parend gtk widget 55 | /// 56 | public void SetParent(ref Gtk.Window parent) 57 | { 58 | SettingsDialog.TransientFor = parent; 59 | SettingsDialog.DestroyWithParent = true; 60 | } 61 | 62 | 63 | 64 | 65 | 66 | /// 67 | /// Show GtkWindow object 68 | /// 69 | public void Show() 70 | { 71 | SettingsDialog.Show(); 72 | } 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | #endregion Public Methods 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | #region Reactors 100 | 101 | 102 | /// 103 | /// Close GtkWindows 104 | /// 105 | public void ActionCancel(object sender, EventArgs args) 106 | { 107 | SettingsDialog.Destroy(); 108 | SettingsDialog.Dispose(); 109 | } 110 | 111 | 112 | 113 | /// 114 | /// Update settings 115 | /// 116 | public void ActionOk(object sender, EventArgs args) 117 | { 118 | UpdateSettings(); 119 | 120 | SettingsDialog.Destroy(); 121 | SettingsDialog.Dispose(); 122 | } 123 | 124 | 125 | 126 | #endregion Reactors 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | #region Private Methods 144 | 145 | 146 | 147 | /// 148 | /// Update Gtk objects properties 149 | /// 150 | private void UpdateGraphicObjects() 151 | { 152 | // Set dialog icon 153 | SettingsDialog.Icon = Gdk.Pixbuf.LoadFromResource("monosim.png"); 154 | SettingsDialog.Title = GlobalObj.LMan.GetString("frmset"); 155 | 156 | 157 | // PortSpeed 158 | SetItem(ref CmbPortSpeed, SerialSettings.PortSpeed.ToString()); 159 | SetItem(ref CmbPortSpeedReset, SerialSettings.PortSpeedReset.ToString()); 160 | SetItem(ref CmbDataBits, SerialSettings.DataBits.ToString()); 161 | SetItem(ref CmbStopBits, SerialSettings.StopBits.ToString()); 162 | SetItem(ref CmbParity, SerialSettings.Parity); 163 | 164 | // Convention 165 | if (SerialSettings.IsDirectConvention) 166 | { 167 | // Direct 168 | SetItem(ref CmbConvention, "Direct"); 169 | } 170 | else 171 | { 172 | // Inverse 173 | SetItem(ref CmbConvention, "Inverse"); 174 | } 175 | 176 | 177 | } 178 | 179 | 180 | 181 | 182 | 183 | 184 | /// 185 | /// Update Gtk objects reactors 186 | /// 187 | private void UpdateReactors() 188 | { 189 | SettingsDialog.DeleteEvent += ActionCancel; 190 | BtnCancel.Clicked += ActionCancel; 191 | BtnOk.Clicked += ActionOk; 192 | 193 | } 194 | 195 | 196 | 197 | 198 | 199 | 200 | private void SetItem(ref ComboBox combo, string itemValue) 201 | { 202 | Gtk.TreeIter iter; 203 | bool existsItem = combo.Model.GetIterFirst (out iter); 204 | combo.SetActiveIter(iter); 205 | 206 | while (existsItem) 207 | { 208 | // check for item 209 | if ( (string)combo.Model.GetValue(iter, 0) == itemValue) 210 | { 211 | // select item 212 | combo.SetActiveIter(iter); 213 | break; 214 | } 215 | 216 | existsItem = combo.Model.IterNext (ref iter); 217 | } 218 | } 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | /// 227 | /// Update serial port settings 228 | /// 229 | private void UpdateSettings() 230 | { 231 | SerialSettings.PortSpeedReset = int.Parse(CmbPortSpeedReset.ActiveText); 232 | SerialSettings.PortSpeed = int.Parse(CmbPortSpeed.ActiveText); 233 | SerialSettings.DataBits = int.Parse(CmbDataBits.ActiveText); 234 | SerialSettings.StopBits = int.Parse(CmbStopBits.ActiveText); 235 | SerialSettings.Parity = CmbParity.ActiveText; 236 | 237 | 238 | if (CmbConvention.ActiveText == "Direct") 239 | { 240 | SerialSettings.IsDirectConvention = true; 241 | } 242 | else 243 | { 244 | SerialSettings.IsDirectConvention = false; 245 | } 246 | 247 | GlobalObj.WriteSettings(); 248 | } 249 | 250 | 251 | 252 | 253 | 254 | 255 | #endregion Private Methods 256 | 257 | 258 | 259 | 260 | 261 | 262 | } 263 | } 264 | 265 | 266 | 267 | -------------------------------------------------------------------------------- /monosim-gtk/Src/MainClass.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using System.Collections.Generic; 4 | 5 | using log4net; 6 | using log4net.Config; 7 | 8 | using Gtk; 9 | using Gdk; 10 | 11 | using comexbase; 12 | using monosimbase; 13 | 14 | 15 | namespace monosimgtk 16 | { 17 | 18 | public class MainClass 19 | { 20 | 21 | 22 | // Log4Net object 23 | private static readonly ILog log = LogManager.GetLogger(typeof(monosimgtk.MainClass)); 24 | 25 | 26 | private static string retStr = ""; 27 | 28 | public static string AppNameVer = ""; 29 | 30 | 31 | 32 | #region Public Methods 33 | 34 | 35 | 36 | [STAThread] 37 | public static void Main (string[] args) 38 | { 39 | AppNameVer = Assembly.GetExecutingAssembly().GetName().Name + " " + 40 | Assembly.GetExecutingAssembly().GetName().Version.ToString(); 41 | 42 | // check for help request 43 | if (new List(args).Contains("--help")) 44 | { 45 | Console.WriteLine(GetHelpMsg()); 46 | return; 47 | } 48 | 49 | Application.Init(); 50 | 51 | retStr = GlobalObj.Initialize(args); 52 | 53 | // check for problems detected 54 | if (retStr != "") 55 | { 56 | // check for problem type 57 | if (!retStr.Contains("SCARD_")) 58 | { 59 | // error detected (not scard problem) 60 | ShowMessage(null, "ERROR", retStr, MessageType.Error); 61 | return; 62 | } 63 | else 64 | { 65 | // warning (scard problem, can use serial reader) 66 | ShowMessage(null, "WARNING", retStr, MessageType.Warning); 67 | } 68 | 69 | } 70 | 71 | try 72 | { 73 | // try to set language 74 | GlobalObjUI.SetLanguage("monosim-gtk"); 75 | } 76 | catch (Exception Ex) 77 | { 78 | // error detected 79 | log.Error("GlobalObjUI::SetLanguage: " + Ex.Message + "\r\n" + Ex.StackTrace); 80 | ShowMessage(null, "LANGUAGE SET ERROR", Ex.Message, MessageType.Error); 81 | return; 82 | } 83 | 84 | 85 | // create new Gtk Gui for application and show it 86 | MainWindowClass mwc = new MainWindowClass(); 87 | mwc.Show(); 88 | Application.Run (); 89 | } 90 | 91 | 92 | 93 | 94 | 95 | /// 96 | /// Show Message Window 97 | /// 98 | public static void ShowMessage(Gtk.Window parent, string title, string message, MessageType mt) 99 | { 100 | 101 | // Gui Message 102 | MessageDialog mdl = new MessageDialog(parent, 103 | DialogFlags.DestroyWithParent, 104 | mt, 105 | ButtonsType.Ok, 106 | true, 107 | message); 108 | mdl.Show(); 109 | mdl.Title = title; 110 | mdl.Icon = Gdk.Pixbuf.LoadFromResource("monosim.png"); 111 | mdl.Run(); 112 | mdl.Destroy(); 113 | 114 | } 115 | 116 | 117 | 118 | 119 | /// 120 | /// Wait for pending GTK processes 121 | /// 122 | public static void GtkWait() 123 | { 124 | // Update GUI... 125 | while (Gtk.Application.EventsPending ()) 126 | { 127 | Gtk.Application.RunIteration (); 128 | } 129 | } 130 | 131 | 132 | 133 | 134 | 135 | 136 | #endregion Public Methods 137 | 138 | 139 | 140 | 141 | 142 | 143 | #region Private Methods 144 | 145 | 146 | 147 | /// 148 | /// Get help message to send to console 149 | /// 150 | private static string GetHelpMsg() 151 | { 152 | string msg = AppNameVer + " - GTK application to manage sim card contacts\r\n" + 153 | GlobalObj.AppNameVer + " - base component\r\n\r\n"; 154 | msg += " usage:\r\n"; 155 | msg += " --log-console enable log into console\r\n"; 156 | msg += " --log-file enable log into file comex.log into home folder\r\n"; 157 | msg += " --help show this message\r\n"; 158 | 159 | return msg; 160 | } 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | #endregion Private Methods 169 | 170 | 171 | 172 | } 173 | 174 | 175 | 176 | 177 | } 178 | -------------------------------------------------------------------------------- /monosim-gtk/monosim-gtk-full.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | x86 6 | {BB8D3BDC-1003-4C8F-A947-CFD6BF1E4C6E} 7 | WinExe 8 | monosimgtk 9 | monosim-gtk 10 | 2.0.1 11 | ..\resources\monosim_win.ico 12 | GTK application to manage sim card contacts 13 | v4.5 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug 20 | DEBUG 21 | prompt 22 | 4 23 | x86 24 | false 25 | 26 | 27 | none 28 | false 29 | bin\Release 30 | prompt 31 | 4 32 | x86 33 | false 34 | 35 | 36 | 37 | 38 | False 39 | 40 | 41 | False 42 | 43 | 44 | False 45 | 46 | 47 | False 48 | 49 | 50 | False 51 | 52 | 53 | 54 | False 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | Src\Base_Components\LanguageManager.cs 69 | 70 | 71 | 72 | Src\Base_Components\GlobalObjUI.cs 73 | 74 | 75 | Src\Base_Components\GlobalConst.cs 76 | 77 | 78 | Src\Base_Components\Contact.cs 79 | 80 | 81 | Src\Base_Components\Contacts.cs 82 | 83 | 84 | Src\Base_Components\GlobalObjUI.Sim.cs 85 | 86 | 87 | Src\Base_Components\MonosimEventHandler.cs 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | copying.gpl 97 | 98 | 99 | 100 | Languages\monosim-en-US.xml 101 | PreserveNewest 102 | 103 | 104 | Languages\monosim-it-IT.xml 105 | PreserveNewest 106 | 107 | 108 | Languages\monosim-es-ES.xml 109 | PreserveNewest 110 | 111 | 112 | Linux.DesktopApplications 113 | 114 | 115 | 116 | 117 | AboutDialog.glade 118 | 119 | 120 | SettingsDialog.glade 121 | 122 | 123 | Resources\chip_32.png 124 | chip_32.png 125 | 126 | 127 | Resources\monosim.png 128 | monosim.png 129 | 130 | 131 | MainWindow.glade 132 | 133 | 134 | Resources\chip_16.png 135 | chip_16.png 136 | 137 | 138 | Resources\chip_24.png 139 | chip_24.png 140 | 141 | 142 | Resources\chip_48.png 143 | chip_48.png 144 | 145 | 146 | NewContactDialog.glade 147 | 148 | 149 | ChangePinStatusDialog.glade 150 | 151 | 152 | SelectWriteModeDialog.glade 153 | 154 | 155 | 156 | 157 | {1E5D7CAD-9D30-47DA-A699-CE1F5F4C7475} 158 | comex-base 159 | 160 | 161 | 162 | -------------------------------------------------------------------------------- /monosim-gtk/monosim-gtk.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | x86 6 | {7B8D3BDC-1003-4C8F-A947-CFD6BF1E4C6E} 7 | WinExe 8 | monosimgtk 9 | monosim-gtk 10 | 2.0.1 11 | ..\resources\monosim_win.ico 12 | GTK application to manage sim card contacts 13 | v4.5 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug 20 | DEBUG 21 | prompt 22 | 4 23 | x86 24 | false 25 | 26 | 27 | none 28 | false 29 | bin\Release 30 | prompt 31 | 4 32 | x86 33 | false 34 | 35 | 36 | 37 | 38 | False 39 | 40 | 41 | False 42 | 43 | 44 | False 45 | 46 | 47 | False 48 | 49 | 50 | False 51 | 52 | 53 | 54 | False 55 | 56 | 57 | 58 | 59 | 60 | ..\comex-base.dll 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | Src\Base_Components\LanguageManager.cs 72 | 73 | 74 | 75 | Src\Base_Components\GlobalObjUI.cs 76 | 77 | 78 | Src\Base_Components\GlobalConst.cs 79 | 80 | 81 | Src\Base_Components\Contact.cs 82 | 83 | 84 | Src\Base_Components\Contacts.cs 85 | 86 | 87 | Src\Base_Components\GlobalObjUI.Sim.cs 88 | 89 | 90 | Src\Base_Components\MonosimEventHandler.cs 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | copying.gpl 100 | 101 | 102 | 103 | Languages\monosim-en-US.xml 104 | PreserveNewest 105 | 106 | 107 | Languages\monosim-it-IT.xml 108 | PreserveNewest 109 | 110 | 111 | Languages\monosim-es-ES.xml 112 | PreserveNewest 113 | 114 | 115 | Linux.DesktopApplications 116 | 117 | 118 | 119 | 120 | AboutDialog.glade 121 | 122 | 123 | SettingsDialog.glade 124 | 125 | 126 | Resources\chip_32.png 127 | chip_32.png 128 | 129 | 130 | Resources\monosim.png 131 | monosim.png 132 | 133 | 134 | MainWindow.glade 135 | 136 | 137 | Resources\chip_16.png 138 | chip_16.png 139 | 140 | 141 | Resources\chip_24.png 142 | chip_24.png 143 | 144 | 145 | Resources\chip_48.png 146 | chip_48.png 147 | 148 | 149 | NewContactDialog.glade 150 | 151 | 152 | ChangePinStatusDialog.glade 153 | 154 | 155 | SelectWriteModeDialog.glade 156 | 157 | 158 | 159 | -------------------------------------------------------------------------------- /monosim-gtk/readme: -------------------------------------------------------------------------------- 1 | monosim is a cross platform application to manage sim card contacts 2 | using PC/SC standard readers and SmartMouse/Phoenix serial reader. 3 | 4 | monosim-gtk - GTK application to manage sim card contacts 5 | ========================================================= 6 | Copyright (c) 2008-2011, Armando Basile 7 | 8 | Thank you for using ( or at least trying out :) ) monosim-gtk 9 | 10 | monosim-gtk is distributed under the terms of the GNU General Public License (GPLv2) 11 | See the file COPYING for more information 12 | 13 | 14 | 15 | BUILD AND INSTALL FROM TARBALL ON LINUX 16 | ------------------------------------------------------------------------------- 17 | 18 | 1. you need to install: log4net, log4net-devel, gtk-sharp2, glade-sharp2, mono 19 | 2. you need to install also latest comex-base, can download tarball from official 20 | project website http://code.google.com/p/comex-project/downloads/list 21 | follow this instruction bo build and register component in GAC 22 | http://code.google.com/p/comex-project/wiki/Build_Comex#Build_and_install_from_tarballs 23 | 3. use 24 | $ ./configure --prefix=/usr 25 | $ make (build output will be generated in monosim-gtk/bin/Debug folder) 26 | # make install (to install) 27 | 28 | 29 | 30 | RUN FROM BUILD OUTPUT 31 | $ mono monosim-gtk.exe --help (for help message) 32 | $ mono monosim-gtk.exe (to run without log) 33 | 34 | 35 | RUN FROM INSTALLED 36 | $ monosim-gtk --help (for help message) 37 | $ monosim-gtk (to run without log) 38 | -------------------------------------------------------------------------------- /monosim-qt/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("monosim-qt")] 8 | [assembly: AssemblyDescription("Qt application to manage sim card contacts")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("monosim-qt")] 12 | [assembly: AssemblyCopyright("Armando Basile (c) 2008-2015")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("2.0.1")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] -------------------------------------------------------------------------------- /monosim-qt/Resources/monosim-qt: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Categories=Office;ContactManagement;Qt;KDE; 3 | Comment=Qt application to manage sim card contacts 4 | Comment[it]=Applicazione Qt per gestire i contatti su sim card 5 | Comment[it_IT]=Applicazione Qt per gestire i contatti su sim card 6 | Comment[es]=Aplicación Qt para gestionar los contactos de una tarjeta SIM 7 | Comment[es_ES]=Aplicación Qt para gestionar los contactos de una tarjeta SIM 8 | Encoding=UTF-8 9 | Exec=monosim-qt 10 | GenericName=monosim-qt 11 | Icon=monosim-qt 12 | Name=monosim-qt 13 | StartupNotify=true 14 | Terminal=false 15 | Type=Application 16 | -------------------------------------------------------------------------------- /monosim-qt/Src/Gui_Classes/AboutDialogClass.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using Qyoto; 4 | using System.IO; 5 | using System.Reflection; 6 | using System.Collections.Generic; 7 | 8 | using comexbase; 9 | using monosimbase; 10 | 11 | using log4net; 12 | 13 | namespace monosimqt 14 | { 15 | 16 | 17 | public class AboutDialogClass: QDialog 18 | { 19 | 20 | // ATTRIBUTES 21 | Ui.AboutDialog aboutdialog_UI; 22 | 23 | 24 | 25 | // CONSTRUCTOR 26 | public AboutDialogClass() 27 | { 28 | 29 | // Create new aboutwindow_UI object 30 | aboutdialog_UI = new Ui.AboutDialog(); 31 | 32 | // Configure layout of this new QDialog with 33 | // aboutdialog_UI objects and data 34 | aboutdialog_UI.SetupUi(this); 35 | 36 | // Update Qt graphic objects 37 | UpdateGraphicObjects(); 38 | 39 | 40 | // Update reactors (eventhandler) 41 | UpdateReactors(); 42 | 43 | 44 | } 45 | 46 | 47 | 48 | 49 | 50 | private void UpdateGraphicObjects() 51 | { 52 | 53 | // fill graphic objects informations 54 | this.WindowTitle = GlobalObjUI.LMan.GetString("frmabout"); 55 | aboutdialog_UI.tabInfo.SetTabText(0, GlobalObjUI.LMan.GetString("about")); 56 | aboutdialog_UI.TxtInfo.SetHtml(GlobalObjUI.LMan.GetString("infodesc").Replace("\t", "")); 57 | 58 | aboutdialog_UI.tabInfo.SetTabText(1, GlobalObjUI.LMan.GetString("thanks")); 59 | aboutdialog_UI.TxtThanks.SetText(GlobalObjUI.LMan.GetString("thanksdesc").Replace("\t", "") + monosimbase.GlobalConst.ThanksTo); 60 | 61 | aboutdialog_UI.LblName.Text = MainClass.AppNameVer + " [" + GlobalObj.AppNameVer + "]"; 62 | aboutdialog_UI.LblDesc.Text = GlobalObjUI.LMan.GetString("description"); 63 | 64 | 65 | 66 | 67 | 68 | 69 | // add logo 70 | aboutdialog_UI.FrameTop.Palette.Background().SetColor(new QColor(255,255,255)); 71 | 72 | } 73 | 74 | 75 | 76 | 77 | private void UpdateReactors() 78 | { 79 | // Configure events reactors 80 | Connect( aboutdialog_UI.buttonBox, SIGNAL("clicked(QAbstractButton*)"), this, SLOT("ActionExit(QAbstractButton*)")); 81 | 82 | } 83 | 84 | 85 | 86 | 87 | #region Q_SLOTS 88 | 89 | [Q_SLOT] 90 | public void ActionExit(QAbstractButton buttonPressed) 91 | { 92 | //Console.WriteLine("Pressed::" + buttonPressed.Text); 93 | this.Close(); 94 | 95 | } 96 | 97 | 98 | 99 | 100 | #endregion Q_SLOTS 101 | 102 | 103 | 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /monosim-qt/Src/Gui_Classes/ChangePinStatusDialogClass.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | using Qyoto; 4 | 5 | using comexbase; 6 | using monosimbase; 7 | 8 | namespace monosimqt 9 | { 10 | 11 | /// 12 | /// Change pin status dialog widget 13 | /// 14 | public class ChangePinStatusDialogWidget: QDialog 15 | { 16 | 17 | // Attributes 18 | private Ui.ChangePinStatusDialog cpsDialog_Ui; 19 | 20 | 21 | // Properties 22 | public string Pin1 {get { return cpsDialog_Ui.TxtPin1.Text; }} 23 | public string Pin1check {get { return cpsDialog_Ui.TxtPin1check.Text; }} 24 | 25 | 26 | [Q_SLOT] 27 | public void ActionExit(QAbstractButton buttonPressed) 28 | { 29 | QDialogButtonBox.StandardButton sBtn = cpsDialog_Ui.Buttons.standardButton(buttonPressed); 30 | 31 | if (sBtn == QDialogButtonBox.StandardButton.Ok) 32 | { 33 | Accept(); 34 | } 35 | else 36 | { 37 | Reject(); 38 | } 39 | } 40 | 41 | 42 | /// 43 | /// Constructor 44 | /// 45 | public ChangePinStatusDialogWidget() 46 | { 47 | cpsDialog_Ui = new Ui.ChangePinStatusDialog(); 48 | cpsDialog_Ui.SetupUi(this); 49 | 50 | cpsDialog_Ui.LblPin1.Text = GlobalObjUI.LMan.GetString("pinsimlbl"); 51 | cpsDialog_Ui.LblPin1check.Text = GlobalObjUI.LMan.GetString("pinsimchklbl"); 52 | this.WindowTitle = MainClass.AppNameVer + " - " + GlobalObjUI.LMan.GetString("pinsimact"); 53 | 54 | string title = GlobalObjUI.LMan.GetString("pinsimsetlbl"); 55 | 56 | // check for actual Pin1 status 57 | if (GlobalObjUI.SimPin1Status) 58 | { 59 | // set disables 60 | title += "" + GlobalObjUI.LMan.GetString("pin1off") + ""; 61 | } 62 | else 63 | { 64 | // set enabled 65 | title += "" + GlobalObjUI.LMan.GetString("pin1on") + ""; 66 | } 67 | 68 | cpsDialog_Ui.LblTitle.Text = title; 69 | Connect( cpsDialog_Ui.Buttons, SIGNAL("clicked(QAbstractButton*)"), this, SLOT("ActionExit(QAbstractButton*)")); 70 | } 71 | 72 | 73 | } 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | public class ChangePinStatusDialogClass 82 | { 83 | 84 | // Attributes 85 | private ChangePinStatusDialogWidget cpsDialogWidget; 86 | private QMainWindow mainWin = null; 87 | 88 | 89 | /// 90 | /// Constructor 91 | /// 92 | public ChangePinStatusDialogClass (QMainWindow topWin) 93 | { 94 | mainWin = topWin; 95 | SetupDialog(); 96 | } 97 | 98 | 99 | 100 | /// 101 | /// Show Dialog to change Pin1 status 102 | /// 103 | public string Show() 104 | { 105 | int respType = 0; 106 | string pin1 = "", pin1check = ""; 107 | int retNumber = 0; 108 | 109 | while (1==1) 110 | { 111 | SetupDialog(); 112 | respType = cpsDialogWidget.Exec(); 113 | 114 | pin1 = cpsDialogWidget.Pin1; 115 | pin1check = cpsDialogWidget.Pin1check; 116 | cpsDialogWidget.Close(); 117 | cpsDialogWidget.Dispose(); 118 | 119 | if (respType != 0x01) 120 | { 121 | // Cancel button pressed 122 | return null; 123 | } 124 | 125 | // check data entry 126 | if (pin1.Trim() == "" || pin1check.Trim() == "") 127 | { 128 | // send warning message 129 | MainClass.ShowMessage(mainWin, "ERROR", 130 | GlobalObjUI.LMan.GetString("pinsimchk2"), 131 | MainClass.MessageType.Warning); 132 | } 133 | else if (pin1.Trim() != pin1check.Trim()) 134 | { 135 | // send warning message 136 | MainClass.ShowMessage(mainWin, "ERROR", 137 | GlobalObjUI.LMan.GetString("pinsimchk1"), 138 | MainClass.MessageType.Warning); 139 | } 140 | else if (pin1.Trim().Length != 4) 141 | { 142 | // send warning message 143 | MainClass.ShowMessage(mainWin, "ERROR", 144 | GlobalObjUI.LMan.GetString("pinsimchk2"), 145 | MainClass.MessageType.Warning); 146 | } 147 | else if (!int.TryParse(pin1.Trim(), out retNumber)) 148 | { 149 | // send warning message 150 | MainClass.ShowMessage(mainWin, "ERROR", 151 | GlobalObjUI.LMan.GetString("pinsimchk2"), 152 | MainClass.MessageType.Warning); 153 | } 154 | else 155 | { 156 | // Data are correct 157 | return GetHexFromPin(pin1); 158 | } 159 | 160 | 161 | } 162 | 163 | 164 | } 165 | 166 | 167 | /// 168 | /// Setup Dialog 169 | /// 170 | private void SetupDialog() 171 | { 172 | cpsDialogWidget = new ChangePinStatusDialogWidget(); 173 | 174 | } 175 | 176 | 177 | 178 | 179 | /// 180 | /// Get hexadecimal value of passed pin. 181 | /// 182 | private string GetHexFromPin(string pinValue) 183 | { 184 | string pinHexValue = ""; 185 | 186 | for (int d=0; d 17 | /// Add new contact action 18 | /// 19 | private void PopupFileAdd() 20 | { 21 | NewContactDialogClass ncdc = new NewContactDialogClass(this, 0, "", ""); 22 | Contact newContact = ncdc.Show(); 23 | 24 | if (newContact == null) 25 | { 26 | return; 27 | } 28 | 29 | // Add contact to file contacts 30 | GlobalObjUI.FileContacts.SimContacts.Add(newContact); 31 | List contact = new List(); 32 | contact.Add(" "); 33 | contact.Add(newContact.Description); 34 | contact.Add(newContact.PhoneNumber); 35 | new QTreeWidgetItem(mainwindow_Ui.LstFileContacts, contact); 36 | } 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | /// 45 | /// Add new contact action 46 | /// 47 | private void PopupSimAdd() 48 | { 49 | NewContactDialogClass ncdc = new NewContactDialogClass(this, 50 | GlobalObjUI.SimADNMaxAlphaChars, "", ""); 51 | Contact newContact = ncdc.Show(); 52 | 53 | if (newContact == null) 54 | { 55 | return; 56 | } 57 | 58 | // Add contact to file contacts 59 | GlobalObjUI.SimContacts.SimContacts.Add(newContact); 60 | List contact = new List(); 61 | contact.Add(" "); 62 | contact.Add(newContact.Description); 63 | contact.Add(newContact.PhoneNumber); 64 | new QTreeWidgetItem(mainwindow_Ui.LstSimContacts, contact); 65 | } 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | /// 76 | /// Del contact 77 | /// 78 | private void PopupFileDel() 79 | { 80 | if (mainwindow_Ui.LstFileContacts.SelectedItems().Count == 0) 81 | { 82 | // no selected rows 83 | return; 84 | } 85 | 86 | if (!DeleteContactQuestion()) 87 | { 88 | return; 89 | } 90 | 91 | // loop for all selected items 92 | List selContacts = mainwindow_Ui.LstFileContacts.SelectedItems(); 93 | 94 | int posw = -1; 95 | for (int qwidx=selContacts.Count-1; qwidx>=0; qwidx--) 96 | { 97 | posw = mainwindow_Ui.LstFileContacts.IndexOfTopLevelItem(selContacts[qwidx]); 98 | mainwindow_Ui.LstFileContacts.TakeTopLevelItem(posw); 99 | GlobalObjUI.FileContacts.SimContacts.RemoveAt(posw); 100 | } 101 | } 102 | 103 | 104 | 105 | 106 | 107 | 108 | /// 109 | /// Del contact 110 | /// 111 | private void PopupSimDel() 112 | { 113 | if (mainwindow_Ui.LstSimContacts.SelectedItems().Count == 0) 114 | { 115 | // no selected rows 116 | return; 117 | } 118 | 119 | if (!DeleteContactQuestion()) 120 | { 121 | return; 122 | } 123 | 124 | // loop for all selected items 125 | List selContacts = mainwindow_Ui.LstSimContacts.SelectedItems(); 126 | 127 | int posw = -1; 128 | for (int qwidx=selContacts.Count-1; qwidx>=0; qwidx--) 129 | { 130 | posw = mainwindow_Ui.LstSimContacts.IndexOfTopLevelItem(selContacts[qwidx]); 131 | mainwindow_Ui.LstSimContacts.TakeTopLevelItem(posw); 132 | GlobalObjUI.SimContacts.SimContacts.RemoveAt(posw); 133 | } 134 | } 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | private void PopupFileMoveToSim() 144 | { 145 | // loop for all selected items 146 | List selContacts = mainwindow_Ui.LstFileContacts.SelectedItems(); 147 | 148 | List cntValues = new List(); 149 | foreach (QTreeWidgetItem fromw in selContacts) 150 | { 151 | cntValues = new List(); 152 | cntValues.Add(" "); 153 | cntValues.Add(fromw.Text(1)); 154 | cntValues.Add(fromw.Text(2)); 155 | new QTreeWidgetItem(mainwindow_Ui.LstSimContacts, cntValues); 156 | } 157 | 158 | foreach (QTreeWidgetItem qtwi in selContacts) 159 | { 160 | GlobalObjUI.SimContacts.SimContacts.Add(new Contact(qtwi.Text(1), qtwi.Text(2))); 161 | } 162 | } 163 | 164 | 165 | 166 | 167 | 168 | 169 | private void PopupSimMoveToFile() 170 | { 171 | // loop for all selected items 172 | List selContacts = mainwindow_Ui.LstSimContacts.SelectedItems(); 173 | 174 | List cntValues = new List(); 175 | foreach (QTreeWidgetItem fromw in selContacts) 176 | { 177 | cntValues = new List(); 178 | cntValues.Add(" "); 179 | cntValues.Add(fromw.Text(1)); 180 | cntValues.Add(fromw.Text(2)); 181 | new QTreeWidgetItem(mainwindow_Ui.LstFileContacts, cntValues); 182 | } 183 | 184 | foreach (QTreeWidgetItem qtwi in selContacts) 185 | { 186 | GlobalObjUI.FileContacts.SimContacts.Add(new Contact(qtwi.Text(1), qtwi.Text(2))); 187 | } 188 | } 189 | 190 | 191 | 192 | 193 | 194 | /// 195 | /// Are you sure dialog 196 | /// 197 | private bool DeleteContactQuestion() 198 | { 199 | QMessageBox mdlg = new QMessageBox(QMessageBox.Icon.Question, 200 | MainClass.AppNameVer + " - " + GlobalObjUI.LMan.GetString("delcontacts"), 201 | GlobalObjUI.LMan.GetString("suredelcontact"), 202 | (uint)QMessageBox.StandardButton.Yes | 203 | (uint)QMessageBox.StandardButton.No); 204 | 205 | int respType = mdlg.Exec(); 206 | mdlg.Close(); 207 | mdlg.Dispose(); 208 | mdlg = null; 209 | 210 | if (respType == (uint)QMessageBox.StandardButton.Yes) 211 | { 212 | return true; 213 | } 214 | return false; 215 | } 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | } 226 | } 227 | 228 | -------------------------------------------------------------------------------- /monosim-qt/Src/Gui_Classes/MainWindowClass.Reactors.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Qyoto; 3 | using System.IO; 4 | using System.Reflection; 5 | using System.Collections.Generic; 6 | 7 | using comexbase; 8 | using monosimbase; 9 | 10 | using log4net; 11 | 12 | namespace monosimqt 13 | { 14 | 15 | 16 | public partial class MainWindowClass: QMainWindow 17 | { 18 | 19 | 20 | 21 | 22 | 23 | #region Q_SLOTS 24 | 25 | 26 | [Q_SLOT] 27 | public void ActionExit() 28 | { 29 | QApplication.CloseAllWindows(); 30 | QApplication.Quit(); 31 | } 32 | 33 | 34 | 35 | 36 | [Q_SLOT] 37 | public void ActionChangeReader() 38 | { 39 | QAction sender = (QAction)Sender(); 40 | string newReader = sender.Text; 41 | 42 | log.Info("ActionChangeReader " + newReader); 43 | UpdateSelectedReader(newReader); 44 | } 45 | 46 | 47 | 48 | 49 | [Q_SLOT] 50 | public void ActionSettingsSerial() 51 | { 52 | OpenSettings(); 53 | } 54 | 55 | 56 | 57 | [Q_SLOT] 58 | public void ActionInfo() 59 | { 60 | OpenInfo(); 61 | } 62 | 63 | 64 | 65 | [Q_SLOT] 66 | public void ActionFileNew() 67 | { 68 | NewContactsFile(); 69 | } 70 | 71 | 72 | 73 | 74 | [Q_SLOT] 75 | public void ActionFileOpen() 76 | { 77 | OpenContactsFile(); 78 | } 79 | 80 | 81 | 82 | [Q_SLOT] 83 | public void ActionFileSaveFile() 84 | { 85 | SaveContactsFile(); 86 | } 87 | 88 | 89 | 90 | [Q_SLOT] 91 | public void ActionFileSaveSim() 92 | { 93 | SaveContactsFileOnSim(); 94 | } 95 | 96 | 97 | 98 | [Q_SLOT] 99 | public void ActionFileClose() 100 | { 101 | CloseContactsFile(); 102 | } 103 | 104 | 105 | 106 | [Q_SLOT] 107 | public void ActionThreadNotify() 108 | { 109 | if (isReading) 110 | { 111 | ReadingUpdate(); 112 | } 113 | else 114 | { 115 | WritingUpdate(); 116 | } 117 | } 118 | 119 | 120 | 121 | 122 | [Q_SLOT] 123 | public void ActionSimConnect() 124 | { 125 | SimConnect(); 126 | } 127 | 128 | 129 | 130 | [Q_SLOT] 131 | public void ActionSimSaveFile() 132 | { 133 | SaveContactsSimOnFile(); 134 | } 135 | 136 | 137 | 138 | [Q_SLOT] 139 | public void ActionSimSaveSim() 140 | { 141 | SaveContactsSim(); 142 | } 143 | 144 | 145 | 146 | [Q_SLOT] 147 | public void ActionSimChangePin() 148 | { 149 | SimChangePin(); 150 | } 151 | 152 | 153 | 154 | [Q_SLOT] 155 | public void ActionSimDeleteAll() 156 | { 157 | DeleteContactsSim(); 158 | } 159 | 160 | 161 | 162 | [Q_SLOT] 163 | public void ActionSimDisconnect() 164 | { 165 | SimDisconnect(); 166 | } 167 | 168 | 169 | 170 | 171 | [Q_SLOT] 172 | public void ActionFileContactsMenu(QPoint point) 173 | { 174 | menuFileActions[2].Enabled = false; 175 | menuFileActions[1].Enabled = false; 176 | if ((mainwindow_Ui.LstFileContacts.SelectedItems().Count > 0) && 177 | (mainwindow_Ui.LstSimContacts.Enabled)) 178 | { 179 | menuFileActions[2].Enabled = true; 180 | } 181 | 182 | if (mainwindow_Ui.LstFileContacts.SelectedItems().Count > 0) 183 | { 184 | menuFileActions[1].Enabled = true; 185 | } 186 | 187 | menuFileItem.Popup(mainwindow_Ui.LstFileContacts.MapToGlobal(point)); 188 | } 189 | 190 | 191 | 192 | [Q_SLOT] 193 | public void ActionSimContactsMenu(QPoint point) 194 | { 195 | menuSimActions[2].Enabled = false; 196 | menuSimActions[1].Enabled = false; 197 | if ((mainwindow_Ui.LstSimContacts.SelectedItems().Count > 0) && 198 | (mainwindow_Ui.LstFileContacts.Enabled)) 199 | { 200 | menuSimActions[2].Enabled = true; 201 | } 202 | 203 | if (mainwindow_Ui.LstSimContacts.SelectedItems().Count > 0) 204 | { 205 | menuSimActions[1].Enabled = true; 206 | } 207 | 208 | menuSimItem.Popup(mainwindow_Ui.LstSimContacts.MapToGlobal(point)); 209 | } 210 | 211 | 212 | 213 | 214 | 215 | [Q_SLOT] 216 | public void ActionAddContact() 217 | { 218 | QAction sender = (QAction)Sender(); 219 | 220 | if (sender.ObjectName == "fileadd") 221 | { 222 | PopupFileAdd(); 223 | } 224 | else if (sender.ObjectName == "simadd") 225 | { 226 | PopupSimAdd(); 227 | } 228 | } 229 | 230 | 231 | 232 | [Q_SLOT] 233 | public void ActionDelContact() 234 | { 235 | QAction sender = (QAction)Sender(); 236 | 237 | if (sender.ObjectName == "filedel") 238 | { 239 | PopupFileDel(); 240 | } 241 | else if (sender.ObjectName == "simdel") 242 | { 243 | PopupSimDel(); 244 | } 245 | } 246 | 247 | 248 | 249 | [Q_SLOT] 250 | public void ActionCopyContact() 251 | { 252 | QAction sender = (QAction)Sender(); 253 | 254 | if (sender.ObjectName == "filecopy") 255 | { 256 | PopupFileMoveToSim(); 257 | } 258 | else if (sender.ObjectName == "simcopy") 259 | { 260 | PopupSimMoveToFile(); 261 | } 262 | } 263 | 264 | 265 | 266 | 267 | #endregion Q_SLOTS 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | #region Private Methods 280 | 281 | 282 | 283 | 284 | private void UpdateReactors() 285 | { 286 | 287 | notify = new ThreadNotify(); 288 | GlobalObjUI.MonosimEvent += SimEvent; 289 | 290 | // Connect Signal 291 | Connect( notify, SIGNAL("UpdateGui()"), this, SLOT("ActionThreadNotify()")); 292 | 293 | // Configure events reactors 294 | Connect( mainwindow_Ui.MenuFileNew, SIGNAL("activated()"), this, SLOT("ActionFileNew()")); 295 | Connect( mainwindow_Ui.MenuFileOpen, SIGNAL("activated()"), this, SLOT("ActionFileOpen()")); 296 | Connect( mainwindow_Ui.MenuFileSaveFile, SIGNAL("activated()"), this, SLOT("ActionFileSaveFile()")); 297 | Connect( mainwindow_Ui.MenuFileSaveSim, SIGNAL("activated()"), this, SLOT("ActionFileSaveSim()")); 298 | Connect( mainwindow_Ui.MenuFileClose, SIGNAL("activated()"), this, SLOT("ActionFileClose()")); 299 | Connect( mainwindow_Ui.MenuFileSettings, SIGNAL("activated()"), this, SLOT("ActionSettingsSerial()")); 300 | Connect( mainwindow_Ui.MenuFileExit, SIGNAL("activated()"), this, SLOT("ActionExit()")); 301 | 302 | Connect( mainwindow_Ui.MenuSimConnect, SIGNAL("activated()"), this, SLOT("ActionSimConnect()")); 303 | Connect( mainwindow_Ui.MenuSimPin, SIGNAL("activated()"), this, SLOT("ActionSimChangePin()")); 304 | Connect( mainwindow_Ui.MenuSimSaveFile, SIGNAL("activated()"), this, SLOT("ActionSimSaveFile()")); 305 | Connect( mainwindow_Ui.MenuSimSaveSim, SIGNAL("activated()"), this, SLOT("ActionSimSaveSim()")); 306 | Connect( mainwindow_Ui.MenuSimDeleteAll, SIGNAL("activated()"), this, SLOT("ActionSimDeleteAll()")); 307 | Connect( mainwindow_Ui.MenuSimDisconnect, SIGNAL("activated()"), this, SLOT("ActionSimDisconnect()")); 308 | 309 | Connect( mainwindow_Ui.MenuAboutInfo, SIGNAL("activated()"), this, SLOT("ActionInfo()")); 310 | 311 | mainwindow_Ui.LstFileContacts.ContextMenuPolicy = Qt.ContextMenuPolicy.CustomContextMenu; 312 | Connect( mainwindow_Ui.LstFileContacts, SIGNAL("customContextMenuRequested(QPoint)"), this, SLOT("ActionFileContactsMenu(QPoint)")); 313 | 314 | mainwindow_Ui.LstSimContacts.ContextMenuPolicy = Qt.ContextMenuPolicy.CustomContextMenu; 315 | Connect( mainwindow_Ui.LstSimContacts, SIGNAL("customContextMenuRequested(QPoint)"), this, SLOT("ActionSimContactsMenu(QPoint)")); 316 | 317 | Connect( menuFileActions[0], SIGNAL("activated()"), this, SLOT("ActionAddContact()")); 318 | Connect( menuSimActions[0], SIGNAL("activated()"), this, SLOT("ActionAddContact()")); 319 | Connect( menuFileActions[1], SIGNAL("activated()"), this, SLOT("ActionDelContact()")); 320 | Connect( menuSimActions[1], SIGNAL("activated()"), this, SLOT("ActionDelContact()")); 321 | Connect( menuFileActions[2], SIGNAL("activated()"), this, SLOT("ActionCopyContact()")); 322 | Connect( menuSimActions[2], SIGNAL("activated()"), this, SLOT("ActionCopyContact()")); 323 | } 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | #endregion Private Methods 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | } 345 | } 346 | 347 | -------------------------------------------------------------------------------- /monosim-qt/Src/Gui_Classes/NewContactDialogClass.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Qyoto; 3 | 4 | using comexbase; 5 | using monosimbase; 6 | 7 | namespace monosimqt 8 | { 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | /// 20 | /// New contact dialog widget 21 | /// 22 | public class NewContactDialogWidget: QDialog 23 | { 24 | 25 | // Attributes 26 | private Ui.NewContactDialog ncDialog_Ui; 27 | 28 | 29 | // Properties 30 | public string Desc 31 | { 32 | get { return ncDialog_Ui.TxtDesc.Text; } 33 | set { ncDialog_Ui.TxtDesc.Text = value; } 34 | } 35 | 36 | public string Number 37 | { 38 | get { return ncDialog_Ui.TxtNumber.Text; } 39 | set { ncDialog_Ui.TxtNumber.Text = value; } 40 | } 41 | 42 | public int MaxAlphaLen {set { ncDialog_Ui.TxtDesc.MaxLength = value; }} 43 | 44 | 45 | 46 | [Q_SLOT] 47 | public void ActionExit(QAbstractButton buttonPressed) 48 | { 49 | QDialogButtonBox.StandardButton sBtn = ncDialog_Ui.Buttons.standardButton(buttonPressed); 50 | 51 | if (sBtn == QDialogButtonBox.StandardButton.Ok) 52 | { 53 | Accept(); 54 | } 55 | else 56 | { 57 | Reject(); 58 | } 59 | } 60 | 61 | 62 | 63 | /// 64 | /// Constructor 65 | /// 66 | public NewContactDialogWidget() 67 | { 68 | ncDialog_Ui = new Ui.NewContactDialog(); 69 | ncDialog_Ui.SetupUi(this); 70 | 71 | ncDialog_Ui.LblDesc.Text = GlobalObjUI.LMan.GetString("descnumber"); 72 | ncDialog_Ui.LblNumber.Text = GlobalObjUI.LMan.GetString("phonenumber"); 73 | this.WindowTitle = MainClass.AppNameVer + " - " + GlobalObjUI.LMan.GetString("phonenumber"); 74 | 75 | string title = GlobalObjUI.LMan.GetString("addcontacts"); 76 | ncDialog_Ui.LblTitle.Text = title; 77 | ncDialog_Ui.TxtNumber.MaxLength = 21; 78 | 79 | Connect( ncDialog_Ui.Buttons, SIGNAL("clicked(QAbstractButton*)"), this, SLOT("ActionExit(QAbstractButton*)")); 80 | } 81 | 82 | 83 | } 84 | 85 | 86 | 87 | 88 | 89 | public class NewContactDialogClass 90 | { 91 | 92 | 93 | // Attributes 94 | private QMainWindow mainWin = null; 95 | private NewContactDialogWidget ncDialogWidget; 96 | private int maxAlphaChars = 0; 97 | private string txtDesc = ""; 98 | private string txtNumber = ""; 99 | 100 | 101 | 102 | /// 103 | /// Constructor 104 | /// 105 | public NewContactDialogClass (QMainWindow parent, int maxAlphaCharacters, 106 | string desc, string phone) 107 | { 108 | maxAlphaChars = maxAlphaCharacters; 109 | mainWin = parent; 110 | txtDesc = desc; 111 | txtNumber = phone; 112 | SetupDialog(); 113 | } 114 | 115 | 116 | 117 | /// 118 | /// Show Dialog to add new contact and return it. 119 | /// 120 | public Contact Show() 121 | { 122 | int respType = -1; 123 | string txtDesc = "", txtNumber = ""; 124 | 125 | while (1==1) 126 | { 127 | SetupDialog(); 128 | respType = ncDialogWidget.Exec(); 129 | txtDesc = ncDialogWidget.Desc; 130 | txtNumber = ncDialogWidget.Number; 131 | ncDialogWidget.Close(); 132 | ncDialogWidget.Dispose(); 133 | 134 | if (respType != 1) 135 | { 136 | // Cancel button pressed 137 | return null; 138 | } 139 | 140 | // check data entry 141 | if (txtDesc == "" || txtNumber == "") 142 | { 143 | // send warning message 144 | MainClass.ShowMessage(mainWin, "ERROR", 145 | GlobalObjUI.LMan.GetString("fieldsreq"), 146 | MainClass.MessageType.Warning); 147 | } 148 | else if ((txtNumber.Length == 21) && 149 | (txtNumber.Substring(0,1) != "+")) 150 | { 151 | // number max len is 20 digits 152 | MainClass.ShowMessage(mainWin, "ERROR", 153 | GlobalObjUI.LMan.GetString("maxnumlen"), 154 | MainClass.MessageType.Warning); 155 | 156 | 157 | } 158 | else 159 | { 160 | // Data are correct 161 | Contact cnt = new Contact(txtDesc, txtNumber); 162 | return cnt; 163 | } 164 | } 165 | 166 | 167 | } 168 | 169 | 170 | /// 171 | /// Setup Dialog 172 | /// 173 | private void SetupDialog() 174 | { 175 | ncDialogWidget = new NewContactDialogWidget(); 176 | if (maxAlphaChars > 0) 177 | { 178 | ncDialogWidget.MaxAlphaLen = maxAlphaChars; 179 | } 180 | 181 | ncDialogWidget.Desc = txtDesc; 182 | ncDialogWidget.Number = txtNumber; 183 | } 184 | 185 | 186 | 187 | } 188 | 189 | } 190 | 191 | -------------------------------------------------------------------------------- /monosim-qt/Src/Gui_Classes/SelectWriteModeDialogClass.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | using Qyoto; 4 | 5 | using comexbase; 6 | using monosimbase; 7 | 8 | namespace monosimqt 9 | { 10 | 11 | 12 | 13 | 14 | 15 | 16 | /// 17 | /// Select write mode dialog widget 18 | /// 19 | public class SelectWriteModeDialogWidget: QDialog 20 | { 21 | 22 | // Attributes 23 | private Ui.SelectWriteModeDialog swDialog_Ui; 24 | private int result = -1; 25 | 26 | // Properties 27 | public int ResultSelection { get { return result; }} 28 | 29 | 30 | [Q_SLOT] 31 | public void ActionExit() 32 | { 33 | result = -1; 34 | Close(); 35 | } 36 | 37 | 38 | [Q_SLOT] 39 | public void ActionOverride() 40 | { 41 | result = 2; 42 | Close(); 43 | } 44 | 45 | 46 | [Q_SLOT] 47 | public void ActionAppend() 48 | { 49 | result = 1; 50 | Close(); 51 | } 52 | 53 | 54 | /// 55 | /// Constructor 56 | /// 57 | public SelectWriteModeDialogWidget() 58 | { 59 | string title = GlobalObjUI.LMan.GetString("simwritemode"); 60 | title = title.Replace(" ", " "); 61 | swDialog_Ui = new Ui.SelectWriteModeDialog(); 62 | swDialog_Ui.SetupUi(this); 63 | 64 | swDialog_Ui.LblTitle.Text = title; 65 | swDialog_Ui.BtnOverride.Text = GlobalObjUI.LMan.GetString("simoverride"); 66 | swDialog_Ui.BtnAppend.Text = GlobalObjUI.LMan.GetString("simappend"); 67 | swDialog_Ui.BtnCancel.Text = GlobalObjUI.LMan.GetString("cancellbl"); 68 | 69 | // Configure events reactors 70 | Connect( swDialog_Ui.BtnCancel, SIGNAL("clicked()"), this, SLOT("ActionExit()")); 71 | Connect( swDialog_Ui.BtnOverride, SIGNAL("clicked()"), this, SLOT("ActionOverride()")); 72 | Connect( swDialog_Ui.BtnAppend, SIGNAL("clicked()"), this, SLOT("ActionAppend()")); 73 | } 74 | 75 | 76 | } 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | public class SelectWriteModeDialogClass 93 | { 94 | 95 | private string wintitle = ""; 96 | private SelectWriteModeDialogWidget swmDialogWidget = null; 97 | 98 | public SelectWriteModeDialogClass(string winTitle) 99 | { 100 | wintitle = winTitle; 101 | SetupDialog(); 102 | } 103 | 104 | 105 | 106 | 107 | public int Show() 108 | { 109 | SetupDialog(); 110 | int respType = -1; 111 | respType = swmDialogWidget.Exec(); 112 | respType = swmDialogWidget.ResultSelection; 113 | swmDialogWidget.Close(); 114 | swmDialogWidget.Dispose(); 115 | swmDialogWidget = null; 116 | 117 | return respType; 118 | } 119 | 120 | 121 | 122 | 123 | /// 124 | /// Setup Dialog 125 | /// 126 | private void SetupDialog() 127 | { 128 | swmDialogWidget = new SelectWriteModeDialogWidget(); 129 | swmDialogWidget.WindowTitle = wintitle; 130 | 131 | } 132 | 133 | 134 | 135 | } 136 | } 137 | 138 | -------------------------------------------------------------------------------- /monosim-qt/Src/Gui_Classes/SettingsDialogClass.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using Qyoto; 4 | using System.IO; 5 | using System.Reflection; 6 | using System.Collections.Generic; 7 | 8 | using comexbase; 9 | 10 | using log4net; 11 | 12 | namespace monosimqt 13 | { 14 | 15 | 16 | public class SettingsDialogClass: QDialog 17 | { 18 | 19 | // ATTRIBUTES 20 | Ui.SettingsDialog settingsdialog_UI; 21 | 22 | // Log4Net object 23 | // private static readonly ILog log = LogManager.GetLogger(typeof(SettingsDialogClass)); 24 | 25 | 26 | // CONSTRUCTOR 27 | public SettingsDialogClass() 28 | { 29 | 30 | // Create new settings object 31 | settingsdialog_UI = new Ui.SettingsDialog(); 32 | 33 | // Configure layout of this new QDialog with 34 | // settingsdialog_UI objects and data 35 | settingsdialog_UI.SetupUi(this); 36 | 37 | // Update Qt graphic objects 38 | UpdateGraphicObjects(); 39 | 40 | 41 | // Update reactors (eventhandler) 42 | UpdateReactors(); 43 | 44 | 45 | } 46 | 47 | 48 | 49 | 50 | 51 | private void UpdateGraphicObjects() 52 | { 53 | 54 | // fill graphic objects informations 55 | this.SetVisible(false); 56 | this.WindowTitle = GlobalObj.LMan.GetString("frmset"); 57 | settingsdialog_UI.FrameSettings.Title = ""; 58 | 59 | 60 | settingsdialog_UI.Buttons.Clear(); 61 | settingsdialog_UI.Buttons.AddButton(QDialogButtonBox.StandardButton.Ok); 62 | settingsdialog_UI.Buttons.AddButton(QDialogButtonBox.StandardButton.Cancel); 63 | 64 | int index = 0; 65 | 66 | // PortSpeed 67 | index = settingsdialog_UI.CmbPortSpeed.FindText(SerialSettings.PortSpeed.ToString()); 68 | if (index >= 0) 69 | { 70 | settingsdialog_UI.CmbPortSpeed.SetCurrentIndex(index); 71 | } 72 | 73 | // PortSpeedReset 74 | index = settingsdialog_UI.CmbPortSpeedReset.FindText(SerialSettings.PortSpeedReset.ToString()); 75 | if (index >= 0) 76 | { 77 | settingsdialog_UI.CmbPortSpeedReset.SetCurrentIndex(index); 78 | } 79 | 80 | // DataBits 81 | index = settingsdialog_UI.CmbDataBits.FindText(SerialSettings.DataBits.ToString()); 82 | if (index >= 0) 83 | { 84 | settingsdialog_UI.CmbDataBits.SetCurrentIndex(index); 85 | } 86 | 87 | // StopBits 88 | index = settingsdialog_UI.CmbStopBits.FindText(SerialSettings.StopBits.ToString()); 89 | if (index >= 0) 90 | { 91 | settingsdialog_UI.CmbStopBits.SetCurrentIndex(index); 92 | } 93 | 94 | // Parity 95 | index = settingsdialog_UI.CmbParity.FindText(SerialSettings.Parity.ToString()); 96 | if (index >= 0) 97 | { 98 | settingsdialog_UI.CmbParity.SetCurrentIndex(index); 99 | } 100 | 101 | // Convention 102 | if (SerialSettings.IsDirectConvention) 103 | { 104 | // Direct 105 | settingsdialog_UI.CmbConvention.SetCurrentIndex(0); 106 | } 107 | else 108 | { 109 | // Inverse 110 | settingsdialog_UI.CmbConvention.SetCurrentIndex(1); 111 | } 112 | 113 | } 114 | 115 | 116 | 117 | 118 | private void UpdateReactors() 119 | { 120 | // Configure events reactors 121 | Connect( settingsdialog_UI.Buttons, SIGNAL("clicked(QAbstractButton*)"), this, SLOT("ActionExit(QAbstractButton*)")); 122 | 123 | } 124 | 125 | 126 | 127 | 128 | #region Q_SLOTS 129 | 130 | [Q_SLOT] 131 | public void ActionExit(QAbstractButton buttonPressed) 132 | { 133 | if (buttonPressed == settingsdialog_UI.Buttons.Buttons()[0]) 134 | { 135 | // Update settings 136 | UpdateSettings(); 137 | } 138 | 139 | this.Close(); 140 | } 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | #endregion Q_SLOTS 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | /// 157 | /// Update serial port settings 158 | /// 159 | private void UpdateSettings() 160 | { 161 | SerialSettings.PortSpeedReset = int.Parse(settingsdialog_UI.CmbPortSpeedReset.CurrentText); 162 | SerialSettings.PortSpeed = int.Parse(settingsdialog_UI.CmbPortSpeed.CurrentText); 163 | SerialSettings.DataBits = int.Parse(settingsdialog_UI.CmbDataBits.CurrentText); 164 | SerialSettings.StopBits = int.Parse(settingsdialog_UI.CmbStopBits.CurrentText); 165 | SerialSettings.Parity = settingsdialog_UI.CmbParity.CurrentText; 166 | 167 | 168 | if (settingsdialog_UI.CmbConvention.CurrentText == "Direct") 169 | { 170 | SerialSettings.IsDirectConvention = true; 171 | } 172 | else 173 | { 174 | SerialSettings.IsDirectConvention = false; 175 | } 176 | 177 | GlobalObj.WriteSettings(); 178 | } 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | } 187 | } 188 | 189 | 190 | 191 | -------------------------------------------------------------------------------- /monosim-qt/Src/Gui_Classes/ThreadNotify.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Qyoto; 3 | 4 | namespace monosimqt 5 | { 6 | 7 | /// 8 | /// Interface for gui update method 9 | /// 10 | public interface IThreadNotify: IQWidgetSignals 11 | { 12 | [Q_SIGNAL] 13 | void UpdateGui(); 14 | } 15 | 16 | 17 | /// 18 | /// Class to manage Qt signal to gui update 19 | /// 20 | public class ThreadNotify: QWidget 21 | { 22 | 23 | 24 | /// 25 | /// Method recalled from client 26 | /// 27 | public void WakeupMain() 28 | { 29 | Emit.UpdateGui(); 30 | } 31 | 32 | 33 | 34 | /// 35 | /// Emitter 36 | /// 37 | protected new IThreadNotify Emit 38 | { 39 | get 40 | { 41 | return (IThreadNotify) Q_EMIT; 42 | } 43 | } 44 | 45 | 46 | 47 | } 48 | } 49 | 50 | -------------------------------------------------------------------------------- /monosim-qt/Src/MainClass.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | using log4net; 5 | using Qyoto; 6 | 7 | using comexbase; 8 | using monosimbase; 9 | 10 | namespace monosimqt 11 | { 12 | public class MainClass: Qt 13 | { 14 | 15 | 16 | // Log4Net object 17 | private static readonly ILog log = LogManager.GetLogger(typeof(monosimqt.MainClass)); 18 | 19 | // Attributes 20 | private static string retStr = ""; 21 | 22 | 23 | // Properties 24 | public static string AppNameVer = ""; 25 | 26 | 27 | 28 | public enum MessageType 29 | { 30 | Info=0, 31 | Warning=1, 32 | Error=2, 33 | } 34 | 35 | 36 | 37 | #region Public Methods 38 | 39 | 40 | 41 | [STAThread] 42 | public static void Main (string[] args) 43 | { 44 | AppNameVer = Assembly.GetExecutingAssembly().GetName().Name + " " + 45 | Assembly.GetExecutingAssembly().GetName().Version.ToString(); 46 | 47 | // check for help request 48 | if (new List(args).Contains("--help")) 49 | { 50 | Console.WriteLine(GetHelpMsg()); 51 | return; 52 | } 53 | 54 | 55 | // Init resource class manager 56 | Q_INIT_RESOURCE("ResManager"); 57 | 58 | 59 | // Create new Qyoto Application 60 | new QApplication(args); 61 | 62 | 63 | retStr = GlobalObj.Initialize(args); 64 | 65 | // check for problems detected 66 | if (retStr != "") 67 | { 68 | // check for problem type 69 | if (!retStr.Contains("SCARD_")) 70 | { 71 | // error detected (not scard problem) 72 | ShowMessage(null, "ERROR", retStr, MessageType.Error); 73 | QApplication.Quit(); 74 | return; 75 | } 76 | else 77 | { 78 | // warning (scard problem, can use serial reader) 79 | ShowMessage(null, "WARNING", retStr, MessageType.Warning); 80 | } 81 | 82 | } 83 | 84 | try 85 | { 86 | // try to set language 87 | GlobalObjUI.SetLanguage("monosim-qt"); 88 | } 89 | catch (Exception Ex) 90 | { 91 | // error detected 92 | log.Error("GlobalObjUI::SetLanguage: " + Ex.Message + "\r\n" + Ex.StackTrace); 93 | ShowMessage(null, "LANGUAGE SET ERROR", Ex.Message, MessageType.Error); 94 | return; 95 | } 96 | 97 | // Create new Qyoto Desktop Object 98 | QDesktopWidget qdw = new QDesktopWidget(); 99 | 100 | // Create MainWindow class manager 101 | MainWindowClass mwc = new MainWindowClass(); 102 | 103 | int wWidth = Convert.ToInt32(mwc.Width() / 2); 104 | int wHeight = Convert.ToInt32(mwc.Height() / 2); 105 | int dWidth = Convert.ToInt32(qdw.Width() / 2); 106 | int dHeight = Convert.ToInt32(qdw.Height() / 2); 107 | 108 | mwc.Move(dWidth - wWidth, dHeight - wHeight - 20); 109 | 110 | mwc.Show(); 111 | 112 | 113 | // Run Qyoto Application 114 | QApplication.Exec(); 115 | 116 | } 117 | 118 | 119 | 120 | 121 | 122 | /// 123 | /// Show Message Window 124 | /// 125 | public static void ShowMessage(QWidget parent, string title, string message, MessageType mt) 126 | { 127 | // Gui Message 128 | if (mt == MainClass.MessageType.Info) 129 | { 130 | QMessageBox.Information(parent, title, message); 131 | } 132 | else if (mt == MainClass.MessageType.Warning) 133 | { 134 | QMessageBox.Warning(parent, title, message); 135 | } 136 | else if (mt == MainClass.MessageType.Error) 137 | { 138 | QMessageBox.Critical(parent, title, message); 139 | } 140 | } 141 | 142 | 143 | 144 | 145 | 146 | /// 147 | /// Wait for pending QT processes 148 | /// 149 | public static void QtWait() 150 | { 151 | // Update GUI... 152 | QApplication.ProcessEvents(); 153 | } 154 | 155 | 156 | 157 | 158 | 159 | 160 | #endregion Public Methods 161 | 162 | 163 | 164 | 165 | 166 | 167 | #region Private Methods 168 | 169 | 170 | 171 | /// 172 | /// Get help message to send to console 173 | /// 174 | private static string GetHelpMsg() 175 | { 176 | string msg = AppNameVer + " - Qt application to manage sim card contacts\r\n" + 177 | GlobalObj.AppNameVer + " - base component\r\n\r\n"; 178 | msg += " usage:\r\n"; 179 | msg += " --log-console enable log into console\r\n"; 180 | msg += " --log-file enable log into file comex.log into home folder\r\n"; 181 | msg += " --help show this message\r\n"; 182 | 183 | return msg; 184 | } 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | #endregion Private Methods 193 | 194 | 195 | 196 | } 197 | 198 | } 199 | 200 | 201 | -------------------------------------------------------------------------------- /monosim-qt/Src/Qt_Classes/AboutDialog.cs: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading ui file 'AboutDialog.ui' 3 | ** 4 | ** Created: sab ott 29 23:38:41 2011 5 | ** by: Qt User Interface Compiler for C# version 4.7.3 6 | ** 7 | ** WARNING! All changes made in this file will be lost when recompiling ui file! 8 | ********************************************************************************/ 9 | 10 | 11 | using Qyoto; 12 | 13 | public class Ui_AboutDialog 14 | { 15 | public QGridLayout gridLayout; 16 | public QVBoxLayout vboxLayout; 17 | public QFrame FrameTop; 18 | public QGridLayout gridLayout1; 19 | public QWidget Logo; 20 | public QVBoxLayout vboxLayout1; 21 | public QLabel LblName; 22 | public QLabel LblDesc; 23 | public QTabWidget tabInfo; 24 | public QWidget Informations; 25 | public QGridLayout gridLayout2; 26 | public QTextEdit TxtInfo; 27 | public QWidget Components; 28 | public QGridLayout gridLayout3; 29 | public QTextEdit TxtThanks; 30 | public QDialogButtonBox buttonBox; 31 | 32 | public void SetupUi(QDialog AboutDialog) 33 | { 34 | if (AboutDialog.ObjectName == "") 35 | AboutDialog.ObjectName = "AboutDialog"; 36 | QSize Size = new QSize(660, 460); 37 | Size = Size.ExpandedTo(AboutDialog.MinimumSizeHint()); 38 | AboutDialog.Size = Size; 39 | AboutDialog.MinimumSize = new QSize(660, 460); 40 | AboutDialog.WindowIcon = new QIcon(":/main/resources/monosim_128.png"); 41 | AboutDialog.Modal = true; 42 | gridLayout = new QGridLayout(AboutDialog); 43 | gridLayout.ObjectName = "gridLayout"; 44 | vboxLayout = new QVBoxLayout(); 45 | vboxLayout.ObjectName = "vboxLayout"; 46 | FrameTop = new QFrame(AboutDialog); 47 | FrameTop.ObjectName = "FrameTop"; 48 | FrameTop.MinimumSize = new QSize(0, 64); 49 | FrameTop.AutoFillBackground = false; 50 | FrameTop.FrameShape = QFrame.Shape.StyledPanel; 51 | FrameTop.FrameShadow = QFrame.Shadow.Raised; 52 | gridLayout1 = new QGridLayout(FrameTop); 53 | gridLayout1.ObjectName = "gridLayout1"; 54 | Logo = new QWidget(FrameTop); 55 | Logo.ObjectName = "Logo"; 56 | Logo.MinimumSize = new QSize(48, 48); 57 | Logo.MaximumSize = new QSize(48, 48); 58 | Logo.StyleSheet = "background-image: url(:/main/resources/monosim_48.png);"; 59 | 60 | gridLayout1.AddWidget(Logo, 0, 0, 1, 1); 61 | 62 | vboxLayout1 = new QVBoxLayout(); 63 | vboxLayout1.ObjectName = "vboxLayout1"; 64 | LblName = new QLabel(FrameTop); 65 | LblName.ObjectName = "LblName"; 66 | QFont font = new QFont(); 67 | font.SetBold(true); 68 | font.SetWeight(75); 69 | LblName.Font = font; 70 | LblName.Margin = 1; 71 | 72 | vboxLayout1.AddWidget(LblName); 73 | 74 | LblDesc = new QLabel(FrameTop); 75 | LblDesc.ObjectName = "LblDesc"; 76 | LblDesc.Margin = 1; 77 | 78 | vboxLayout1.AddWidget(LblDesc); 79 | 80 | 81 | gridLayout1.AddLayout(vboxLayout1, 0, 1, 1, 1); 82 | 83 | 84 | vboxLayout.AddWidget(FrameTop); 85 | 86 | tabInfo = new QTabWidget(AboutDialog); 87 | tabInfo.ObjectName = "tabInfo"; 88 | tabInfo.AutoFillBackground = false; 89 | Informations = new QWidget(); 90 | Informations.ObjectName = "Informations"; 91 | gridLayout2 = new QGridLayout(Informations); 92 | gridLayout2.ObjectName = "gridLayout2"; 93 | TxtInfo = new QTextEdit(Informations); 94 | TxtInfo.ObjectName = "TxtInfo"; 95 | TxtInfo.lineWrapMode = QTextEdit.LineWrapMode.NoWrap; 96 | TxtInfo.ReadOnly = true; 97 | 98 | gridLayout2.AddWidget(TxtInfo, 0, 0, 1, 1); 99 | 100 | tabInfo.AddTab(Informations, QApplication.Translate("AboutDialog", "Informazioni su", null, QApplication.Encoding.UnicodeUTF8)); 101 | Components = new QWidget(); 102 | Components.ObjectName = "Components"; 103 | gridLayout3 = new QGridLayout(Components); 104 | gridLayout3.ObjectName = "gridLayout3"; 105 | TxtThanks = new QTextEdit(Components); 106 | TxtThanks.ObjectName = "TxtThanks"; 107 | TxtThanks.ReadOnly = true; 108 | 109 | gridLayout3.AddWidget(TxtThanks, 0, 0, 1, 1); 110 | 111 | tabInfo.AddTab(Components, QApplication.Translate("AboutDialog", "Componenti", null, QApplication.Encoding.UnicodeUTF8)); 112 | 113 | vboxLayout.AddWidget(tabInfo); 114 | 115 | buttonBox = new QDialogButtonBox(AboutDialog); 116 | buttonBox.ObjectName = "buttonBox"; 117 | buttonBox.StandardButtons = Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Ok"); 118 | 119 | vboxLayout.AddWidget(buttonBox); 120 | 121 | 122 | gridLayout.AddLayout(vboxLayout, 0, 0, 1, 1); 123 | 124 | 125 | RetranslateUi(AboutDialog); 126 | 127 | tabInfo.CurrentIndex = 0; 128 | 129 | 130 | QMetaObject.ConnectSlotsByName(AboutDialog); 131 | } // SetupUi 132 | 133 | public void RetranslateUi(QDialog AboutDialog) 134 | { 135 | AboutDialog.WindowTitle = QApplication.Translate("AboutDialog", "Dialog", null, QApplication.Encoding.UnicodeUTF8); 136 | FrameTop.StyleSheet = QApplication.Translate("AboutDialog", "background-color: rgb(255, 255, 255);", null, QApplication.Encoding.UnicodeUTF8); 137 | tabInfo.SetTabText(tabInfo.IndexOf(Informations), QApplication.Translate("AboutDialog", "Informazioni su", null, QApplication.Encoding.UnicodeUTF8)); 138 | tabInfo.SetTabText(tabInfo.IndexOf(Components), QApplication.Translate("AboutDialog", "Componenti", null, QApplication.Encoding.UnicodeUTF8)); 139 | } // RetranslateUi 140 | 141 | } 142 | 143 | namespace Ui { 144 | public class AboutDialog : Ui_AboutDialog {} 145 | } // namespace Ui 146 | 147 | -------------------------------------------------------------------------------- /monosim-qt/Src/Qt_Classes/ChangePinStatusDialog.cs: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading ui file 'ChangePinStatusDialog.ui' 3 | ** 4 | ** Created: sab ott 29 23:38:41 2011 5 | ** by: Qt User Interface Compiler for C# version 4.7.3 6 | ** 7 | ** WARNING! All changes made in this file will be lost when recompiling ui file! 8 | ********************************************************************************/ 9 | 10 | 11 | using Qyoto; 12 | 13 | public class Ui_ChangePinStatusDialog 14 | { 15 | public QGridLayout gridLayout; 16 | public QLabel LblTitle; 17 | public QLabel LblPin1; 18 | public QLineEdit TxtPin1; 19 | public QLabel LblPin1check; 20 | public QLineEdit TxtPin1check; 21 | public QSpacerItem spacerItem; 22 | public QDialogButtonBox Buttons; 23 | public QSpacerItem spacerItem1; 24 | 25 | public void SetupUi(QDialog ChangePinStatusDialog) 26 | { 27 | if (ChangePinStatusDialog.ObjectName == "") 28 | ChangePinStatusDialog.ObjectName = "ChangePinStatusDialog"; 29 | QSize Size = new QSize(357, 159); 30 | Size = Size.ExpandedTo(ChangePinStatusDialog.MinimumSizeHint()); 31 | ChangePinStatusDialog.Size = Size; 32 | ChangePinStatusDialog.WindowIcon = new QIcon(":/main/resources/monosim_128.png"); 33 | gridLayout = new QGridLayout(ChangePinStatusDialog); 34 | gridLayout.ObjectName = "gridLayout"; 35 | LblTitle = new QLabel(ChangePinStatusDialog); 36 | LblTitle.ObjectName = "LblTitle"; 37 | LblTitle.Alignment = Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignCenter"); 38 | LblTitle.WordWrap = true; 39 | 40 | gridLayout.AddWidget(LblTitle, 0, 0, 1, 2); 41 | 42 | LblPin1 = new QLabel(ChangePinStatusDialog); 43 | LblPin1.ObjectName = "LblPin1"; 44 | 45 | gridLayout.AddWidget(LblPin1, 2, 0, 1, 1); 46 | 47 | TxtPin1 = new QLineEdit(ChangePinStatusDialog); 48 | TxtPin1.ObjectName = "TxtPin1"; 49 | TxtPin1.MaxLength = 4; 50 | TxtPin1.echoMode = QLineEdit.EchoMode.Password; 51 | 52 | gridLayout.AddWidget(TxtPin1, 2, 1, 1, 1); 53 | 54 | LblPin1check = new QLabel(ChangePinStatusDialog); 55 | LblPin1check.ObjectName = "LblPin1check"; 56 | 57 | gridLayout.AddWidget(LblPin1check, 3, 0, 1, 1); 58 | 59 | TxtPin1check = new QLineEdit(ChangePinStatusDialog); 60 | TxtPin1check.ObjectName = "TxtPin1check"; 61 | TxtPin1check.MaxLength = 4; 62 | TxtPin1check.echoMode = QLineEdit.EchoMode.Password; 63 | 64 | gridLayout.AddWidget(TxtPin1check, 3, 1, 1, 1); 65 | 66 | spacerItem = new QSpacerItem(282, 37, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding); 67 | 68 | gridLayout.AddItem(spacerItem, 4, 1, 1, 1); 69 | 70 | Buttons = new QDialogButtonBox(ChangePinStatusDialog); 71 | Buttons.ObjectName = "Buttons"; 72 | Buttons.Orientation = Qt.Orientation.Horizontal; 73 | Buttons.StandardButtons = Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Cancel") | Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Ok"); 74 | 75 | gridLayout.AddWidget(Buttons, 5, 0, 1, 2); 76 | 77 | spacerItem1 = new QSpacerItem(20, 8, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Fixed); 78 | 79 | gridLayout.AddItem(spacerItem1, 1, 0, 1, 1); 80 | 81 | 82 | RetranslateUi(ChangePinStatusDialog); 83 | QObject.Connect(Buttons, Qt.SIGNAL("accepted()"), ChangePinStatusDialog, Qt.SLOT("accept()")); 84 | QObject.Connect(Buttons, Qt.SIGNAL("rejected()"), ChangePinStatusDialog, Qt.SLOT("reject()")); 85 | 86 | QMetaObject.ConnectSlotsByName(ChangePinStatusDialog); 87 | } // SetupUi 88 | 89 | public void RetranslateUi(QDialog ChangePinStatusDialog) 90 | { 91 | ChangePinStatusDialog.WindowTitle = QApplication.Translate("ChangePinStatusDialog", "Dialog", null, QApplication.Encoding.UnicodeUTF8); 92 | LblTitle.Text = QApplication.Translate("ChangePinStatusDialog", "TextLabel", null, QApplication.Encoding.UnicodeUTF8); 93 | LblPin1.Text = QApplication.Translate("ChangePinStatusDialog", "TextLabel", null, QApplication.Encoding.UnicodeUTF8); 94 | LblPin1check.Text = QApplication.Translate("ChangePinStatusDialog", "TextLabel", null, QApplication.Encoding.UnicodeUTF8); 95 | } // RetranslateUi 96 | 97 | } 98 | 99 | namespace Ui { 100 | public class ChangePinStatusDialog : Ui_ChangePinStatusDialog {} 101 | } // namespace Ui 102 | 103 | -------------------------------------------------------------------------------- /monosim-qt/Src/Qt_Classes/NewContactDialog.cs: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading ui file 'NewContactDialog.ui' 3 | ** 4 | ** Created: sab ott 29 23:38:41 2011 5 | ** by: Qt User Interface Compiler for C# version 4.7.3 6 | ** 7 | ** WARNING! All changes made in this file will be lost when recompiling ui file! 8 | ********************************************************************************/ 9 | 10 | 11 | using Qyoto; 12 | 13 | public class Ui_NewContactDialog 14 | { 15 | public QGridLayout gridLayout; 16 | public QLabel LblTitle; 17 | public QLabel LblDesc; 18 | public QLineEdit TxtDesc; 19 | public QLabel LblNumber; 20 | public QLineEdit TxtNumber; 21 | public QSpacerItem spacerItem; 22 | public QDialogButtonBox Buttons; 23 | public QSpacerItem spacerItem1; 24 | 25 | public void SetupUi(QDialog NewContactDialog) 26 | { 27 | if (NewContactDialog.ObjectName == "") 28 | NewContactDialog.ObjectName = "NewContactDialog"; 29 | QSize Size = new QSize(360, 150); 30 | Size = Size.ExpandedTo(NewContactDialog.MinimumSizeHint()); 31 | NewContactDialog.Size = Size; 32 | NewContactDialog.MinimumSize = new QSize(360, 150); 33 | NewContactDialog.WindowIcon = new QIcon(":/main/resources/monosim_128.png"); 34 | gridLayout = new QGridLayout(NewContactDialog); 35 | gridLayout.ObjectName = "gridLayout"; 36 | LblTitle = new QLabel(NewContactDialog); 37 | LblTitle.ObjectName = "LblTitle"; 38 | LblTitle.Alignment = Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignCenter"); 39 | LblTitle.WordWrap = true; 40 | 41 | gridLayout.AddWidget(LblTitle, 0, 0, 1, 2); 42 | 43 | LblDesc = new QLabel(NewContactDialog); 44 | LblDesc.ObjectName = "LblDesc"; 45 | 46 | gridLayout.AddWidget(LblDesc, 2, 0, 1, 1); 47 | 48 | TxtDesc = new QLineEdit(NewContactDialog); 49 | TxtDesc.ObjectName = "TxtDesc"; 50 | 51 | gridLayout.AddWidget(TxtDesc, 2, 1, 1, 1); 52 | 53 | LblNumber = new QLabel(NewContactDialog); 54 | LblNumber.ObjectName = "LblNumber"; 55 | 56 | gridLayout.AddWidget(LblNumber, 3, 0, 1, 1); 57 | 58 | TxtNumber = new QLineEdit(NewContactDialog); 59 | TxtNumber.ObjectName = "TxtNumber"; 60 | 61 | gridLayout.AddWidget(TxtNumber, 3, 1, 1, 1); 62 | 63 | spacerItem = new QSpacerItem(282, 37, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding); 64 | 65 | gridLayout.AddItem(spacerItem, 4, 1, 1, 1); 66 | 67 | Buttons = new QDialogButtonBox(NewContactDialog); 68 | Buttons.ObjectName = "Buttons"; 69 | Buttons.Orientation = Qt.Orientation.Horizontal; 70 | Buttons.StandardButtons = Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Cancel") | Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Ok"); 71 | 72 | gridLayout.AddWidget(Buttons, 5, 0, 1, 2); 73 | 74 | spacerItem1 = new QSpacerItem(20, 8, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Fixed); 75 | 76 | gridLayout.AddItem(spacerItem1, 1, 0, 1, 1); 77 | 78 | 79 | RetranslateUi(NewContactDialog); 80 | QObject.Connect(Buttons, Qt.SIGNAL("accepted()"), NewContactDialog, Qt.SLOT("accept()")); 81 | QObject.Connect(Buttons, Qt.SIGNAL("rejected()"), NewContactDialog, Qt.SLOT("reject()")); 82 | 83 | QMetaObject.ConnectSlotsByName(NewContactDialog); 84 | } // SetupUi 85 | 86 | public void RetranslateUi(QDialog NewContactDialog) 87 | { 88 | NewContactDialog.WindowTitle = QApplication.Translate("NewContactDialog", "Dialog", null, QApplication.Encoding.UnicodeUTF8); 89 | LblTitle.Text = QApplication.Translate("NewContactDialog", "TextLabel", null, QApplication.Encoding.UnicodeUTF8); 90 | LblDesc.Text = QApplication.Translate("NewContactDialog", "TextLabel", null, QApplication.Encoding.UnicodeUTF8); 91 | LblNumber.Text = QApplication.Translate("NewContactDialog", "TextLabel", null, QApplication.Encoding.UnicodeUTF8); 92 | } // RetranslateUi 93 | 94 | } 95 | 96 | namespace Ui { 97 | public class NewContactDialog : Ui_NewContactDialog {} 98 | } // namespace Ui 99 | 100 | -------------------------------------------------------------------------------- /monosim-qt/Src/Qt_Classes/SelectWriteModeDialog.cs: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading ui file 'SelectWriteModeDialog.ui' 3 | ** 4 | ** Created: sab ott 29 23:38:41 2011 5 | ** by: Qt User Interface Compiler for C# version 4.7.3 6 | ** 7 | ** WARNING! All changes made in this file will be lost when recompiling ui file! 8 | ********************************************************************************/ 9 | 10 | 11 | using Qyoto; 12 | 13 | public class Ui_SelectWriteModeDialog 14 | { 15 | public QGridLayout gridLayout; 16 | public QLabel LblTitle; 17 | public QPushButton BtnCancel; 18 | public QSpacerItem spacerItem; 19 | public QPushButton BtnOverride; 20 | public QPushButton BtnAppend; 21 | 22 | public void SetupUi(QDialog SelectWriteModeDialog) 23 | { 24 | if (SelectWriteModeDialog.ObjectName == "") 25 | SelectWriteModeDialog.ObjectName = "SelectWriteModeDialog"; 26 | QSize Size = new QSize(443, 125); 27 | Size = Size.ExpandedTo(SelectWriteModeDialog.MinimumSizeHint()); 28 | SelectWriteModeDialog.Size = Size; 29 | SelectWriteModeDialog.WindowIcon = new QIcon(":/main/resources/monosim_128.png"); 30 | gridLayout = new QGridLayout(SelectWriteModeDialog); 31 | gridLayout.ObjectName = "gridLayout"; 32 | LblTitle = new QLabel(SelectWriteModeDialog); 33 | LblTitle.ObjectName = "LblTitle"; 34 | LblTitle.Alignment = Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeading") | Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeft") | Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignTop"); 35 | 36 | gridLayout.AddWidget(LblTitle, 0, 0, 1, 4); 37 | 38 | BtnCancel = new QPushButton(SelectWriteModeDialog); 39 | BtnCancel.ObjectName = "BtnCancel"; 40 | 41 | gridLayout.AddWidget(BtnCancel, 1, 0, 1, 1); 42 | 43 | spacerItem = new QSpacerItem(152, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum); 44 | 45 | gridLayout.AddItem(spacerItem, 1, 1, 1, 1); 46 | 47 | BtnOverride = new QPushButton(SelectWriteModeDialog); 48 | BtnOverride.ObjectName = "BtnOverride"; 49 | BtnOverride.icon = new QIcon(":/toolbar/resources/qt/draw-eraser.png"); 50 | 51 | gridLayout.AddWidget(BtnOverride, 1, 2, 1, 1); 52 | 53 | BtnAppend = new QPushButton(SelectWriteModeDialog); 54 | BtnAppend.ObjectName = "BtnAppend"; 55 | BtnAppend.icon = new QIcon(":/toolbar/resources/qt/list-add.png"); 56 | 57 | gridLayout.AddWidget(BtnAppend, 1, 3, 1, 1); 58 | 59 | 60 | RetranslateUi(SelectWriteModeDialog); 61 | 62 | QMetaObject.ConnectSlotsByName(SelectWriteModeDialog); 63 | } // SetupUi 64 | 65 | public void RetranslateUi(QDialog SelectWriteModeDialog) 66 | { 67 | SelectWriteModeDialog.WindowTitle = QApplication.Translate("SelectWriteModeDialog", "Dialog", null, QApplication.Encoding.UnicodeUTF8); 68 | LblTitle.Text = QApplication.Translate("SelectWriteModeDialog", "TextLabel", null, QApplication.Encoding.UnicodeUTF8); 69 | BtnCancel.Text = QApplication.Translate("SelectWriteModeDialog", "PushButton", null, QApplication.Encoding.UnicodeUTF8); 70 | BtnOverride.Text = QApplication.Translate("SelectWriteModeDialog", "Override", null, QApplication.Encoding.UnicodeUTF8); 71 | BtnAppend.Text = QApplication.Translate("SelectWriteModeDialog", "Append", null, QApplication.Encoding.UnicodeUTF8); 72 | } // RetranslateUi 73 | 74 | } 75 | 76 | namespace Ui { 77 | public class SelectWriteModeDialog : Ui_SelectWriteModeDialog {} 78 | } // namespace Ui 79 | 80 | -------------------------------------------------------------------------------- /monosim-qt/Src/Qt_Files/AboutDialog.ui: -------------------------------------------------------------------------------- 1 | 2 | AboutDialog 3 | 4 | 5 | 6 | 0 7 | 0 8 | 660 9 | 460 10 | 11 | 12 | 13 | 14 | 660 15 | 460 16 | 17 | 18 | 19 | Dialog 20 | 21 | 22 | 23 | :/main/resources/monosim_128.png:/main/resources/monosim_128.png 24 | 25 | 26 | true 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 0 36 | 64 37 | 38 | 39 | 40 | false 41 | 42 | 43 | background-color: rgb(255, 255, 255); 44 | 45 | 46 | QFrame::StyledPanel 47 | 48 | 49 | QFrame::Raised 50 | 51 | 52 | 53 | 54 | 55 | 56 | 48 57 | 48 58 | 59 | 60 | 61 | 62 | 48 63 | 48 64 | 65 | 66 | 67 | background-image: url(:/main/resources/monosim_48.png); 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 75 78 | true 79 | 80 | 81 | 82 | 83 | 84 | 85 | 1 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 1 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | false 108 | 109 | 110 | 111 | 112 | 113 | 0 114 | 115 | 116 | 117 | Informazioni su 118 | 119 | 120 | 121 | 122 | 123 | QTextEdit::NoWrap 124 | 125 | 126 | true 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | Componenti 135 | 136 | 137 | 138 | 139 | 140 | true 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | QDialogButtonBox::Ok 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | -------------------------------------------------------------------------------- /monosim-qt/Src/Qt_Files/ChangePinStatusDialog.ui: -------------------------------------------------------------------------------- 1 | 2 | ChangePinStatusDialog 3 | 4 | 5 | 6 | 0 7 | 0 8 | 357 9 | 159 10 | 11 | 12 | 13 | Dialog 14 | 15 | 16 | 17 | :/main/resources/monosim_128.png:/main/resources/monosim_128.png 18 | 19 | 20 | 21 | 22 | 23 | TextLabel 24 | 25 | 26 | Qt::AlignCenter 27 | 28 | 29 | true 30 | 31 | 32 | 33 | 34 | 35 | 36 | TextLabel 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 4 50 | 51 | 52 | QLineEdit::Password 53 | 54 | 55 | 56 | 57 | 58 | 59 | TextLabel 60 | 61 | 62 | 63 | 64 | 65 | 66 | 4 67 | 68 | 69 | QLineEdit::Password 70 | 71 | 72 | 73 | 74 | 75 | 76 | Qt::Vertical 77 | 78 | 79 | 80 | 282 81 | 37 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | Qt::Horizontal 90 | 91 | 92 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 93 | 94 | 95 | 96 | 97 | 98 | 99 | Qt::Vertical 100 | 101 | 102 | QSizePolicy::Fixed 103 | 104 | 105 | 106 | 20 107 | 8 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | Buttons 120 | accepted() 121 | ChangePinStatusDialog 122 | accept() 123 | 124 | 125 | 248 126 | 254 127 | 128 | 129 | 157 130 | 274 131 | 132 | 133 | 134 | 135 | Buttons 136 | rejected() 137 | ChangePinStatusDialog 138 | reject() 139 | 140 | 141 | 316 142 | 260 143 | 144 | 145 | 286 146 | 274 147 | 148 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /monosim-qt/Src/Qt_Files/NewContactDialog.ui: -------------------------------------------------------------------------------- 1 | 2 | NewContactDialog 3 | 4 | 5 | 6 | 0 7 | 0 8 | 360 9 | 150 10 | 11 | 12 | 13 | 14 | 360 15 | 150 16 | 17 | 18 | 19 | Dialog 20 | 21 | 22 | 23 | :/main/resources/monosim_128.png:/main/resources/monosim_128.png 24 | 25 | 26 | 27 | 28 | 29 | TextLabel 30 | 31 | 32 | Qt::AlignCenter 33 | 34 | 35 | true 36 | 37 | 38 | 39 | 40 | 41 | 42 | TextLabel 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | TextLabel 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | Qt::Vertical 63 | 64 | 65 | 66 | 282 67 | 37 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | Qt::Horizontal 76 | 77 | 78 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 79 | 80 | 81 | 82 | 83 | 84 | 85 | Qt::Vertical 86 | 87 | 88 | QSizePolicy::Fixed 89 | 90 | 91 | 92 | 20 93 | 8 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | Buttons 106 | accepted() 107 | NewContactDialog 108 | accept() 109 | 110 | 111 | 248 112 | 254 113 | 114 | 115 | 157 116 | 274 117 | 118 | 119 | 120 | 121 | Buttons 122 | rejected() 123 | NewContactDialog 124 | reject() 125 | 126 | 127 | 316 128 | 260 129 | 130 | 131 | 286 132 | 274 133 | 134 | 135 | 136 | 137 | 138 | -------------------------------------------------------------------------------- /monosim-qt/Src/Qt_Files/SelectWriteModeDialog.ui: -------------------------------------------------------------------------------- 1 | 2 | SelectWriteModeDialog 3 | 4 | 5 | 6 | 0 7 | 0 8 | 443 9 | 125 10 | 11 | 12 | 13 | Dialog 14 | 15 | 16 | 17 | :/main/resources/monosim_128.png:/main/resources/monosim_128.png 18 | 19 | 20 | 21 | 22 | 23 | TextLabel 24 | 25 | 26 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop 27 | 28 | 29 | 30 | 31 | 32 | 33 | PushButton 34 | 35 | 36 | 37 | 38 | 39 | 40 | Qt::Horizontal 41 | 42 | 43 | 44 | 152 45 | 20 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | Override 54 | 55 | 56 | 57 | :/toolbar/resources/qt/draw-eraser.png:/toolbar/resources/qt/draw-eraser.png 58 | 59 | 60 | 61 | 62 | 63 | 64 | Append 65 | 66 | 67 | 68 | :/toolbar/resources/qt/list-add.png:/toolbar/resources/qt/list-add.png 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /monosim-qt/Tools/uisetup/Arguments.cs: -------------------------------------------------------------------------------- 1 | // hman 2 | // 3 | // Copyright (C) 2008 [hman] 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; either version 2 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU General Public License 16 | // along with this program; if not, write to the Free Software 17 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | // 19 | // 20 | 21 | using System; 22 | using System.Collections.Specialized; 23 | using System.Text.RegularExpressions; 24 | 25 | namespace uisetup 26 | { 27 | 28 | 29 | public class Arguments 30 | { 31 | 32 | private StringDictionary Parameters; 33 | 34 | // Constructor 35 | 36 | public Arguments(string[] Args) 37 | { 38 | Parameters = new StringDictionary(); 39 | Regex Spliter = new Regex(@"^-{1,2}|^/|=|:", 40 | RegexOptions.IgnoreCase|RegexOptions.Compiled); 41 | 42 | Regex Remover = new Regex(@"^['""]?(.*?)['""]?$", 43 | RegexOptions.IgnoreCase|RegexOptions.Compiled); 44 | 45 | string Parameter = null; 46 | string[] Parts; 47 | 48 | // Valid parameters forms: 49 | 50 | // {-,/,--}param{ ,=,:}((",')value(",')) 51 | 52 | // Examples: 53 | 54 | // -param1 value1 --param2 /param3:"Test-:-work" 55 | 56 | // /param4=happy -param5 '--=nice=--' 57 | 58 | foreach(string Txt in Args) 59 | { 60 | // Look for new parameters (-,/ or --) and a 61 | 62 | // possible enclosed value (=,:) 63 | 64 | Parts = Spliter.Split(Txt,3); 65 | 66 | switch(Parts.Length){ 67 | // Found a value (for the last parameter 68 | 69 | // found (space separator)) 70 | 71 | case 1: 72 | if(Parameter != null) 73 | { 74 | if(!Parameters.ContainsKey(Parameter)) 75 | { 76 | Parts[0] = 77 | Remover.Replace(Parts[0], "$1"); 78 | 79 | Parameters.Add(Parameter, Parts[0]); 80 | } 81 | Parameter=null; 82 | } 83 | // else Error: no parameter waiting for a value (skipped) 84 | 85 | break; 86 | 87 | // Found just a parameter 88 | 89 | case 2: 90 | // The last parameter is still waiting. 91 | 92 | // With no value, set it to true. 93 | 94 | if(Parameter!=null) 95 | { 96 | if(!Parameters.ContainsKey(Parameter)) 97 | Parameters.Add(Parameter, "true"); 98 | } 99 | Parameter=Parts[1]; 100 | break; 101 | 102 | // Parameter with enclosed value 103 | 104 | case 3: 105 | // The last parameter is still waiting. 106 | 107 | // With no value, set it to true. 108 | 109 | if(Parameter != null) 110 | { 111 | if(!Parameters.ContainsKey(Parameter)) 112 | Parameters.Add(Parameter, "true"); 113 | } 114 | 115 | Parameter = Parts[1]; 116 | 117 | // Remove possible enclosing characters (",') 118 | 119 | if(!Parameters.ContainsKey(Parameter)) 120 | { 121 | Parts[2] = Remover.Replace(Parts[2], "$1"); 122 | Parameters.Add(Parameter, Parts[2]); 123 | } 124 | 125 | Parameter=null; 126 | break; 127 | } 128 | } 129 | // In case a parameter is still waiting 130 | 131 | if(Parameter != null) 132 | { 133 | if(!Parameters.ContainsKey(Parameter)) 134 | Parameters.Add(Parameter, "true"); 135 | } 136 | } 137 | 138 | public string this [string Param] 139 | { 140 | get 141 | { 142 | return(Parameters[Param]); 143 | } 144 | } 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /monosim-qt/Tools/uisetup/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("uisetup")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.2.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | [assembly: AssemblyDelaySign(false)] 26 | [assembly: AssemblyKeyFile("")] 27 | -------------------------------------------------------------------------------- /monosim-qt/Tools/uisetup/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace uisetup 5 | { 6 | class MainClass 7 | { 8 | // ATTRIBUTI 9 | static UiStreamer uis = new UiStreamer(); 10 | static Arguments AppArgs; 11 | 12 | 13 | 14 | public static void Main(string[] args) 15 | { 16 | 17 | string helpMessage = 18 | "use one of this command lines type:\r\n\r\n" + 19 | "uisetup -if -of \r\n" + 20 | "uisetup -id -od \r\n\r\n"; 21 | 22 | // if there aren't arguments, generate help message 23 | if (args.Length < 1) 24 | { 25 | Console.WriteLine(helpMessage); 26 | return; 27 | } 28 | 29 | // fill Arguments object 30 | AppArgs = new Arguments(args); 31 | 32 | if ((AppArgs["if"] != null) && (AppArgs["of"] != null)) 33 | { 34 | // single file 35 | parseFile(AppArgs["if"].ToString(), AppArgs["of"].ToString()); 36 | 37 | } 38 | else if ((AppArgs["id"] != null) && (AppArgs["od"] != null)) 39 | { 40 | // folder 41 | parseFolder(AppArgs["id"].ToString(), AppArgs["od"].ToString()); 42 | 43 | } 44 | else 45 | { 46 | // wrong command, generate help message 47 | Console.WriteLine(helpMessage); 48 | return; 49 | 50 | } 51 | 52 | } 53 | 54 | 55 | /// 56 | /// manage file and produce output 57 | /// 58 | static bool parseFile(string inputPath, string outputPath) 59 | { 60 | 61 | inputPath = Path.GetFullPath(inputPath); 62 | outputPath = Path.GetFullPath (outputPath); 63 | 64 | if (Path.GetExtension(inputPath).ToLower() == ".ui") 65 | { 66 | // User Interface File 67 | return uis.ManageUiFile(inputPath, outputPath); 68 | 69 | } 70 | else if (Path.GetExtension(inputPath).ToLower() == ".qrc") 71 | { 72 | // Qt Resource File 73 | return uis.ManageQrcFile(inputPath, outputPath); 74 | 75 | } 76 | 77 | return true; 78 | } 79 | 80 | 81 | 82 | 83 | /// 84 | /// Parse all files in folder 85 | /// 86 | static void parseFolder(string inputPath, string outputPath) 87 | { 88 | DirectoryInfo di = new DirectoryInfo(inputPath); 89 | string tmpOutFile; 90 | 91 | foreach (FileInfo dif in di.GetFiles()) 92 | { 93 | tmpOutFile = Path.GetFileNameWithoutExtension(dif.FullName) + ".cs"; 94 | tmpOutFile = outputPath + Path.DirectorySeparatorChar + tmpOutFile; 95 | 96 | if (parseFile(dif.FullName, tmpOutFile) != true) 97 | { 98 | return; 99 | 100 | } 101 | } 102 | } 103 | 104 | 105 | 106 | 107 | 108 | 109 | } 110 | } -------------------------------------------------------------------------------- /monosim-qt/Tools/uisetup/UiStreamer.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.IO; 4 | using System.Diagnostics; 5 | 6 | namespace uisetup 7 | { 8 | 9 | public class UiStreamer 10 | { 11 | // ATTRIBUTI 12 | StreamReader sr; 13 | StreamWriter sw; 14 | 15 | 16 | public UiStreamer() 17 | { 18 | } 19 | 20 | 21 | 22 | public bool ManageUiFile(string inputFile, string outputFile) 23 | { 24 | Console.WriteLine("Manage UI file: " + Path.GetFileName(inputFile)); 25 | 26 | // remove xml tag from ui file 27 | RemoveXmlTag(inputFile); 28 | 29 | // rewrite .cs file to manage associated ui file 30 | return RewriteUiClasses(inputFile, outputFile); 31 | 32 | } 33 | 34 | 35 | 36 | public bool ManageQrcFile(string inputFile, string outputFile) 37 | { 38 | Console.WriteLine("Manage QRC file: " + Path.GetFileName(inputFile)); 39 | 40 | // rewrite .cs file to manage associated qrc file 41 | return UpdateResourceClass(inputFile, outputFile); 42 | 43 | } 44 | 45 | 46 | 47 | /// 48 | /// Remove xml initial tag from ui file 49 | /// 50 | private void RemoveXmlTag(string p_UiFilePath) 51 | { 52 | sr = new StreamReader(p_UiFilePath); 53 | string firstLine = sr.ReadLine(); 54 | string oldUi = sr.ReadToEnd(); 55 | 56 | if (firstLine.IndexOf(" " + fileName); 170 | Console.WriteLine("OUTPUT:" + outBuffer); 171 | Console.WriteLine("ERROR:" + errBuffer); 172 | return false; 173 | } 174 | 175 | return true; 176 | 177 | 178 | } 179 | 180 | 181 | 182 | 183 | 184 | } 185 | } 186 | -------------------------------------------------------------------------------- /monosim-qt/Tools/uisetup/bin/Debug/uisetup: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | function pause(){ 4 | read -s -n 1 -p "Press any key to continue . . ." 5 | echo 6 | } 7 | 8 | mono uisetup.exe -id "../../../../Resources" -od "../../../../Src/Qt_Classes" 9 | mono uisetup.exe -id "../../../../Src/Qt_Files" -od "../../../../Src/Qt_Classes" 10 | 11 | #pause 12 | -------------------------------------------------------------------------------- /monosim-qt/Tools/uisetup/bin/Debug/uisetup.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armando-basile/monosim/5d3c89582de859611d1ef6937e950a35db0a7d0b/monosim-qt/Tools/uisetup/bin/Debug/uisetup.exe -------------------------------------------------------------------------------- /monosim-qt/Tools/uisetup/bin/Debug/uisetup.exe.mdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armando-basile/monosim/5d3c89582de859611d1ef6937e950a35db0a7d0b/monosim-qt/Tools/uisetup/bin/Debug/uisetup.exe.mdb -------------------------------------------------------------------------------- /monosim-qt/Tools/uisetup/uisetup.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.50727 7 | 2.0 8 | {D09C2883-F792-46A2-B9A4-29C47B2C67D7} 9 | Exe 10 | uisetup 11 | 12 | 13 | true 14 | full 15 | false 16 | bin\Debug 17 | DEBUG 18 | prompt 19 | 4 20 | 21 | 22 | none 23 | false 24 | bin\Release 25 | prompt 26 | 4 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /monosim-qt/Tools/uisetup/uisetup.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 9.00 3 | # Visual Studio 2005 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "uisetup", "uisetup.csproj", "{D09C2883-F792-46A2-B9A4-29C47B2C67D7}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {D09C2883-F792-46A2-B9A4-29C47B2C67D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {D09C2883-F792-46A2-B9A4-29C47B2C67D7}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {D09C2883-F792-46A2-B9A4-29C47B2C67D7}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {D09C2883-F792-46A2-B9A4-29C47B2C67D7}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(MonoDevelopProperties) = preSolution 18 | StartupItem = uisetup.csproj 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /monosim-qt/monosim-qt-full.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | x86 6 | {AAC0DA96-E4A2-4765-8FCC-A523EBAD2E69} 7 | WinExe 8 | monosimqt 9 | monosim-qt 10 | Qt application to manage sim card contacts 11 | 2.0.1 12 | ..\resources\monosim_win.ico 13 | v4.5 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug 20 | DEBUG 21 | prompt 22 | 4 23 | x86 24 | false 25 | true 26 | 27 | 28 | none 29 | false 30 | bin\Release 31 | prompt 32 | 4 33 | x86 34 | false 35 | true 36 | 37 | 38 | 39 | 40 | 41 | False 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | Src\Base_Components\Contact.cs 59 | 60 | 61 | Src\Base_Components\Contacts.cs 62 | 63 | 64 | Src\Base_Components\GlobalConst.cs 65 | 66 | 67 | Src\Base_Components\GlobalObjUI.cs 68 | 69 | 70 | Src\Base_Components\GlobalObjUI.Sim.cs 71 | 72 | 73 | Src\Base_Components\LanguageManager.cs 74 | 75 | 76 | Src\Base_Components\MonosimEventHandler.cs 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | Languages\monosim-en-US.xml 95 | PreserveNewest 96 | 97 | 98 | Languages\monosim-es-ES.xml 99 | PreserveNewest 100 | 101 | 102 | Languages\monosim-it-IT.xml 103 | PreserveNewest 104 | 105 | 106 | 107 | 108 | 109 | Resources\monosim.png 110 | 111 | 112 | Linux.DesktopApplications 113 | 114 | 115 | 116 | 117 | copying.gpl 118 | 119 | 120 | 121 | 122 | {1E5D7CAD-9D30-47DA-A699-CE1F5F4C7475} 123 | comex-base 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /monosim-qt/monosim-qt.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | x86 6 | {59C0DA96-E4A2-4765-8FCC-A523EBAD2E69} 7 | WinExe 8 | monosimqt 9 | monosim-qt 10 | Qt application to manage sim card contacts 11 | 2.0.1 12 | ..\resources\monosim_win.ico 13 | v4.5 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug 20 | DEBUG 21 | prompt 22 | 4 23 | x86 24 | false 25 | true 26 | 27 | 28 | none 29 | false 30 | bin\Release 31 | prompt 32 | 4 33 | x86 34 | false 35 | true 36 | 37 | 38 | 39 | 40 | 41 | False 42 | 43 | 44 | 45 | 46 | ..\comex-base.dll 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | Src\Base_Components\Contact.cs 62 | 63 | 64 | Src\Base_Components\Contacts.cs 65 | 66 | 67 | Src\Base_Components\GlobalConst.cs 68 | 69 | 70 | Src\Base_Components\GlobalObjUI.cs 71 | 72 | 73 | Src\Base_Components\GlobalObjUI.Sim.cs 74 | 75 | 76 | Src\Base_Components\LanguageManager.cs 77 | 78 | 79 | Src\Base_Components\MonosimEventHandler.cs 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | Languages\monosim-en-US.xml 98 | PreserveNewest 99 | 100 | 101 | Languages\monosim-es-ES.xml 102 | PreserveNewest 103 | 104 | 105 | Languages\monosim-it-IT.xml 106 | PreserveNewest 107 | 108 | 109 | 110 | 111 | 112 | Resources\monosim.png 113 | 114 | 115 | Linux.DesktopApplications 116 | 117 | 118 | 119 | 120 | copying.gpl 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /monosim-qt/readme: -------------------------------------------------------------------------------- 1 | monosim is a cross platform application to manage sim card contacts 2 | using PC/SC standard readers and SmartMouse/Phoenix serial reader. 3 | 4 | monosim-qt - Qt application to manage sim card contacts 5 | ======================================================= 6 | Copyright (c) 2008-2011, Armando Basile 7 | 8 | Thank you for using ( or at least trying out :) ) monosim-qt 9 | 10 | monosim-qt is distributed under the terms of the GNU General Public License (GPLv2) 11 | See the file COPYING for more information 12 | 13 | 14 | 15 | BUILD AND INSTALL FROM TARBALL ON LINUX 16 | ------------------------------------------------------------------------------- 17 | 18 | 1. you need to install: log4net, log4net-devel, qyoto, qyoto-devel, mono 19 | 2. you need to install also latest comex-base, can download tarball from official 20 | project website http://code.google.com/p/comex-project/downloads/list 21 | follow this instruction bo build and register component in GAC 22 | http://code.google.com/p/comex-project/wiki/Build_Comex#Build_and_install_from_tarballs 23 | 3. use 24 | $ ./configure --prefix=/usr 25 | $ make (build output will be generated in monosim-qt/bin/Debug folder) 26 | # make install (to install) 27 | 28 | 29 | 30 | RUN FROM BUILD OUTPUT 31 | $ mono monosim-qt.exe --help (for help message) 32 | $ mono monosim-qt.exe (to run without log) 33 | 34 | 35 | RUN FROM INSTALLED 36 | $ monosim-qt --help (for help message) 37 | $ monosim-qt (to run without log) 38 | -------------------------------------------------------------------------------- /resources/chip_112.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armando-basile/monosim/5d3c89582de859611d1ef6937e950a35db0a7d0b/resources/chip_112.png -------------------------------------------------------------------------------- /resources/chip_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armando-basile/monosim/5d3c89582de859611d1ef6937e950a35db0a7d0b/resources/chip_16.png -------------------------------------------------------------------------------- /resources/chip_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armando-basile/monosim/5d3c89582de859611d1ef6937e950a35db0a7d0b/resources/chip_24.png -------------------------------------------------------------------------------- /resources/chip_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armando-basile/monosim/5d3c89582de859611d1ef6937e950a35db0a7d0b/resources/chip_32.png -------------------------------------------------------------------------------- /resources/chip_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armando-basile/monosim/5d3c89582de859611d1ef6937e950a35db0a7d0b/resources/chip_48.png -------------------------------------------------------------------------------- /resources/lock_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armando-basile/monosim/5d3c89582de859611d1ef6937e950a35db0a7d0b/resources/lock_16.png -------------------------------------------------------------------------------- /resources/monologo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armando-basile/monosim/5d3c89582de859611d1ef6937e950a35db0a7d0b/resources/monologo.png -------------------------------------------------------------------------------- /resources/monosim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armando-basile/monosim/5d3c89582de859611d1ef6937e950a35db0a7d0b/resources/monosim.png -------------------------------------------------------------------------------- /resources/monosim_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armando-basile/monosim/5d3c89582de859611d1ef6937e950a35db0a7d0b/resources/monosim_16.png -------------------------------------------------------------------------------- /resources/monosim_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armando-basile/monosim/5d3c89582de859611d1ef6937e950a35db0a7d0b/resources/monosim_32.png -------------------------------------------------------------------------------- /resources/monosim_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armando-basile/monosim/5d3c89582de859611d1ef6937e950a35db0a7d0b/resources/monosim_48.png -------------------------------------------------------------------------------- /resources/monosim_win.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/armando-basile/monosim/5d3c89582de859611d1ef6937e950a35db0a7d0b/resources/monosim_win.ico -------------------------------------------------------------------------------- /solutions/monosim-gtk-full.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "monosim-gtk-full", "..\monosim-gtk\monosim-gtk-full.csproj", "{BB8D3BDC-1003-4C8F-A947-CFD6BF1E4C6E}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "comex-base", "..\Dependencies\comex-project\comex-base\comex-base.csproj", "{1E5D7CAD-9D30-47DA-A699-CE1F5F4C7475}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x86 = Debug|x86 11 | Release|x86 = Release|x86 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {1E5D7CAD-9D30-47DA-A699-CE1F5F4C7475}.Debug|x86.ActiveCfg = Debug|x86 15 | {1E5D7CAD-9D30-47DA-A699-CE1F5F4C7475}.Debug|x86.Build.0 = Debug|x86 16 | {1E5D7CAD-9D30-47DA-A699-CE1F5F4C7475}.Release|x86.ActiveCfg = Release|x86 17 | {1E5D7CAD-9D30-47DA-A699-CE1F5F4C7475}.Release|x86.Build.0 = Release|x86 18 | {BB8D3BDC-1003-4C8F-A947-CFD6BF1E4C6E}.Debug|x86.ActiveCfg = Debug|x86 19 | {BB8D3BDC-1003-4C8F-A947-CFD6BF1E4C6E}.Debug|x86.Build.0 = Debug|x86 20 | {BB8D3BDC-1003-4C8F-A947-CFD6BF1E4C6E}.Release|x86.ActiveCfg = Release|x86 21 | {BB8D3BDC-1003-4C8F-A947-CFD6BF1E4C6E}.Release|x86.Build.0 = Release|x86 22 | EndGlobalSection 23 | GlobalSection(MonoDevelopProperties) = preSolution 24 | Policies = $0 25 | $0.VersionControlPolicy = $1 26 | $1.inheritsSet = Mono 27 | $0.ChangeLogPolicy = $2 28 | $2.UpdateMode = ProjectRoot 29 | $2.MessageStyle = $3 30 | $3.LineAlign = 0 31 | $2.inheritsSet = Mono 32 | description = GTK application to manage sim card contacts 33 | version = 2.0.1 34 | EndGlobalSection 35 | EndGlobal 36 | -------------------------------------------------------------------------------- /solutions/monosim-gtk.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "monosim-gtk", "..\monosim-gtk\monosim-gtk.csproj", "{7B8D3BDC-1003-4C8F-A947-CFD6BF1E4C6E}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|x86 = Debug|x86 9 | Release|x86 = Release|x86 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {7B8D3BDC-1003-4C8F-A947-CFD6BF1E4C6E}.Debug|x86.ActiveCfg = Debug|x86 13 | {7B8D3BDC-1003-4C8F-A947-CFD6BF1E4C6E}.Debug|x86.Build.0 = Debug|x86 14 | {7B8D3BDC-1003-4C8F-A947-CFD6BF1E4C6E}.Release|x86.ActiveCfg = Release|x86 15 | {7B8D3BDC-1003-4C8F-A947-CFD6BF1E4C6E}.Release|x86.Build.0 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(MonoDevelopProperties) = preSolution 18 | Policies = $0 19 | $0.VersionControlPolicy = $1 20 | $1.inheritsSet = Mono 21 | $0.ChangeLogPolicy = $2 22 | $2.UpdateMode = ProjectRoot 23 | $2.MessageStyle = $3 24 | $3.LineAlign = 0 25 | $2.inheritsSet = Mono 26 | description = GTK application to manage sim card contacts 27 | version = 2.0.1 28 | EndGlobalSection 29 | EndGlobal 30 | -------------------------------------------------------------------------------- /solutions/monosim-qt-full.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "monosim-qt-full", "..\monosim-qt\monosim-qt-full.csproj", "{AAC0DA96-E4A2-4765-8FCC-A523EBAD2E69}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "comex-base", "..\Dependencies\comex-project\comex-base\comex-base.csproj", "{1E5D7CAD-9D30-47DA-A699-CE1F5F4C7475}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x86 = Debug|x86 11 | Release|x86 = Release|x86 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {1E5D7CAD-9D30-47DA-A699-CE1F5F4C7475}.Debug|x86.ActiveCfg = Debug|x86 15 | {1E5D7CAD-9D30-47DA-A699-CE1F5F4C7475}.Debug|x86.Build.0 = Debug|x86 16 | {1E5D7CAD-9D30-47DA-A699-CE1F5F4C7475}.Release|x86.ActiveCfg = Release|x86 17 | {1E5D7CAD-9D30-47DA-A699-CE1F5F4C7475}.Release|x86.Build.0 = Release|x86 18 | {AAC0DA96-E4A2-4765-8FCC-A523EBAD2E69}.Debug|x86.ActiveCfg = Debug|x86 19 | {AAC0DA96-E4A2-4765-8FCC-A523EBAD2E69}.Debug|x86.Build.0 = Debug|x86 20 | {AAC0DA96-E4A2-4765-8FCC-A523EBAD2E69}.Release|x86.ActiveCfg = Release|x86 21 | {AAC0DA96-E4A2-4765-8FCC-A523EBAD2E69}.Release|x86.Build.0 = Release|x86 22 | EndGlobalSection 23 | GlobalSection(MonoDevelopProperties) = preSolution 24 | Policies = $0 25 | $0.DotNetNamingPolicy = $1 26 | $1.DirectoryNamespaceAssociation = None 27 | $1.ResourceNamePolicy = FileFormatDefault 28 | $0.ChangeLogPolicy = $2 29 | $2.UpdateMode = ProjectRoot 30 | $2.MessageStyle = $3 31 | $3.LineAlign = 0 32 | $2.inheritsSet = Mono 33 | description = Qt application to manage sim card contacts 34 | version = 2.0.1 35 | EndGlobalSection 36 | EndGlobal 37 | -------------------------------------------------------------------------------- /solutions/monosim-qt.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "monosim-qt", "..\monosim-qt\monosim-qt.csproj", "{59C0DA96-E4A2-4765-8FCC-A523EBAD2E69}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|x86 = Debug|x86 9 | Release|x86 = Release|x86 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {59C0DA96-E4A2-4765-8FCC-A523EBAD2E69}.Debug|x86.ActiveCfg = Debug|x86 13 | {59C0DA96-E4A2-4765-8FCC-A523EBAD2E69}.Debug|x86.Build.0 = Debug|x86 14 | {59C0DA96-E4A2-4765-8FCC-A523EBAD2E69}.Release|x86.ActiveCfg = Release|x86 15 | {59C0DA96-E4A2-4765-8FCC-A523EBAD2E69}.Release|x86.Build.0 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(MonoDevelopProperties) = preSolution 18 | Policies = $0 19 | $0.DotNetNamingPolicy = $1 20 | $1.DirectoryNamespaceAssociation = None 21 | $1.ResourceNamePolicy = FileFormatDefault 22 | $0.ChangeLogPolicy = $2 23 | $2.UpdateMode = ProjectRoot 24 | $2.MessageStyle = $3 25 | $3.LineAlign = 0 26 | $2.inheritsSet = Mono 27 | description = Qt application to manage sim card contacts 28 | version = 2.0.1 29 | EndGlobalSection 30 | EndGlobal 31 | --------------------------------------------------------------------------------