├── debian ├── compat ├── changelog ├── rules └── control ├── divel-calendar ├── debian │ ├── compat │ ├── changelog │ ├── control │ ├── rules │ └── copyright ├── StdAfx.h ├── AddEvent.cpp ├── DivChat.cpp ├── StdAfx.cpp ├── resource1.h ├── targetver.h ├── Calendario.cpp ├── DivelCalendar.ico ├── DivelCalendar.png ├── Divel Calendar.cpp ├── DivelCalendar.desktop ├── DivChat.h ├── AddEvent.h ├── Divel Calendar.h ├── License.txt ├── Resource.h ├── Calendario.h ├── PKGBUILD └── CMakeLists.txt.old ├── freedesktop ├── AUTHORS.txt ├── monopoly.png ├── div-video.png ├── DivVerifyFTP.png ├── DivVerifyHTTP.png ├── divel-calendar.png ├── divel-write.desktop ├── monopoly.desktop ├── div-agenda.desktop ├── div-video.desktop ├── divel-calendar.desktop ├── div-verify-ftp.desktop └── div-verify-http.desktop ├── librandom ├── CMakeLists.txt ├── librandom.hpp └── librandom.cpp ├── monopoly ├── Monopoly.ico ├── monopoly.PNG ├── monopoly.bmp ├── monopoly.jpg ├── monopolyHD.bmp ├── MonopolyApp.cpp ├── MonopolyApp.h └── MonopolyFrm.h ├── config └── config.h.in ├── .travis.yml ├── div-verify-ftp ├── app.h ├── frame.h ├── app.cpp └── frame.cpp ├── div-verify-http ├── app.h ├── frame.h ├── app.cpp └── frame.cpp ├── .gitignore ├── .gitattributes ├── cmake ├── FindLIBVNCCLIENT.cmake └── FindLIBVLC.cmake ├── divel-write ├── DivelWriteApp.h ├── DivelWriteApp.cpp ├── DivelWriteFrm.h └── DivelWriteFrm.cpp ├── PKGBUILD ├── README.md ├── div-agenda ├── sample.xpm └── correos.cpp ├── divwork.spec ├── div-vnc └── app.cpp ├── CMakeLists.txt ├── div-video └── player.cpp └── LICENSE /debian/compat: -------------------------------------------------------------------------------- 1 | 7 2 | -------------------------------------------------------------------------------- /divel-calendar/debian/compat: -------------------------------------------------------------------------------- 1 | 7 -------------------------------------------------------------------------------- /freedesktop/AUTHORS.txt: -------------------------------------------------------------------------------- 1 | div-video.png was based on Asher designs from FindIcons.com 2 | -------------------------------------------------------------------------------- /librandom/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | PROJECT(librandom) 2 | 3 | add_library(librandom "librandom.cpp") -------------------------------------------------------------------------------- /monopoly/Monopoly.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/divwork/master/monopoly/Monopoly.ico -------------------------------------------------------------------------------- /monopoly/monopoly.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/divwork/master/monopoly/monopoly.PNG -------------------------------------------------------------------------------- /monopoly/monopoly.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/divwork/master/monopoly/monopoly.bmp -------------------------------------------------------------------------------- /monopoly/monopoly.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/divwork/master/monopoly/monopoly.jpg -------------------------------------------------------------------------------- /divel-calendar/StdAfx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/divwork/master/divel-calendar/StdAfx.h -------------------------------------------------------------------------------- /freedesktop/monopoly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/divwork/master/freedesktop/monopoly.png -------------------------------------------------------------------------------- /monopoly/monopolyHD.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/divwork/master/monopoly/monopolyHD.bmp -------------------------------------------------------------------------------- /divel-calendar/AddEvent.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/divwork/master/divel-calendar/AddEvent.cpp -------------------------------------------------------------------------------- /divel-calendar/DivChat.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/divwork/master/divel-calendar/DivChat.cpp -------------------------------------------------------------------------------- /divel-calendar/StdAfx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/divwork/master/divel-calendar/StdAfx.cpp -------------------------------------------------------------------------------- /divel-calendar/resource1.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/divwork/master/divel-calendar/resource1.h -------------------------------------------------------------------------------- /divel-calendar/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/divwork/master/divel-calendar/targetver.h -------------------------------------------------------------------------------- /freedesktop/div-video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/divwork/master/freedesktop/div-video.png -------------------------------------------------------------------------------- /librandom/librandom.hpp: -------------------------------------------------------------------------------- 1 | #ifndef LIBRANDOM_H 2 | #define LIBRANDOM_H 3 | 4 | int librandom(); 5 | 6 | #endif -------------------------------------------------------------------------------- /divel-calendar/Calendario.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/divwork/master/divel-calendar/Calendario.cpp -------------------------------------------------------------------------------- /freedesktop/DivVerifyFTP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/divwork/master/freedesktop/DivVerifyFTP.png -------------------------------------------------------------------------------- /freedesktop/DivVerifyHTTP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/divwork/master/freedesktop/DivVerifyHTTP.png -------------------------------------------------------------------------------- /divel-calendar/DivelCalendar.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/divwork/master/divel-calendar/DivelCalendar.ico -------------------------------------------------------------------------------- /divel-calendar/DivelCalendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/divwork/master/divel-calendar/DivelCalendar.png -------------------------------------------------------------------------------- /freedesktop/divel-calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/divwork/master/freedesktop/divel-calendar.png -------------------------------------------------------------------------------- /divel-calendar/Divel Calendar.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/divwork/master/divel-calendar/Divel Calendar.cpp -------------------------------------------------------------------------------- /librandom/librandom.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int librandom() 4 | { 5 | printf("I'm so random"); 6 | return 0; 7 | } -------------------------------------------------------------------------------- /divel-calendar/debian/changelog: -------------------------------------------------------------------------------- 1 | divel-calendar (1.0.0.3) precise; urgency=low 2 | 3 | * Ready to release 4 | 5 | -- Adrian Arroyo Calle (Divel) Tue, 06 Aug 2013 13:46:00 +1200 6 | -------------------------------------------------------------------------------- /config/config.h.in: -------------------------------------------------------------------------------- 1 | #ifndef CONFIG_H 2 | #define CONFIG_H 3 | 4 | #define DIVWORK_VERSION_MAJOR @DIVWORK_VERSION_MAJOR@ 5 | #define DIVWORK_VERSION_MINOR @DIVWORK_VERSION_MAJOR@ 6 | #cmakedefine USE_LIBRANDOM 7 | 8 | #endif -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | divwork (0.1.1.3) precise; urgency=low 2 | 3 | * First debian package 4 | * Added DivVideo 5 | 6 | -- Adrián Arroyo Calle (Divel) Mon, 22 Mar 2010 00:37:31 +0100 7 | -------------------------------------------------------------------------------- /freedesktop/divel-write.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=Divel Write 4 | Comment=Divel Write is a fast text editor 5 | Exec=DivelWrite 6 | Terminal=false 7 | Type=Application 8 | Categories=Utility 9 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: cpp 2 | compiler: 3 | - gcc 4 | - clang 5 | # Change this to your needs 6 | script: cmake . && make 7 | install: sudo apt-get update && sudo apt-get install wxgtk2.8-dev libvlc-dev libgdk-pixbuf2.0-dev libgtk2.0-dev 8 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | %: 3 | dh $@ 4 | override_dh_auto_configure: 5 | cmake . -DCMAKE_INSTALL_PREFIX:PATH=${CURDIR}/debian/divwork/usr 6 | override_dh_auto_build: 7 | make 8 | override_dh_auto_install: 9 | make install 10 | -------------------------------------------------------------------------------- /freedesktop/monopoly.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=Monopoly 4 | Comment=Monopoly for two players 5 | Comment[es]=Monopoly para dos jugadores 6 | Exec=Monopoly 7 | Icon=monopoly 8 | Terminal=false 9 | Type=Application 10 | Categories=Game;StrategyGame 11 | -------------------------------------------------------------------------------- /div-verify-ftp/app.h: -------------------------------------------------------------------------------- 1 | /* 2 | * DivVerifyFTP App Class header 3 | */ 4 | #ifndef APP_H 5 | #define APP_H 6 | 7 | #include "wx/wx.h" 8 | 9 | class DivVerifyFTP : public wxApp 10 | { 11 | public: 12 | virtual bool OnInit(); 13 | 14 | }; 15 | 16 | IMPLEMENT_APP(DivVerifyFTP) 17 | #endif 18 | -------------------------------------------------------------------------------- /div-verify-http/app.h: -------------------------------------------------------------------------------- 1 | /* 2 | * DivVerifyHTTP App Class header 3 | */ 4 | #ifndef APP_H 5 | #define APP_H 6 | 7 | #include "wx/wx.h" 8 | 9 | class DivVerifyHTTP : public wxApp 10 | { 11 | public: 12 | virtual bool OnInit(); 13 | 14 | }; 15 | 16 | IMPLEMENT_APP(DivVerifyHTTP) 17 | #endif -------------------------------------------------------------------------------- /freedesktop/div-agenda.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=DivAgenda 4 | Comment=DivAgenda is a simply and fast contact manager. 5 | Comment[es]=DivAgenda es un rápido y simple gestor de contactos. 6 | Exec=DivAgenda 7 | Terminal=false 8 | Type=Application 9 | Categories=Utility 10 | -------------------------------------------------------------------------------- /freedesktop/div-video.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=DivVideo 4 | Comment=DivVideo, play music and videos in a minimal interface. 5 | Comment[es]=DivVideo, pon música y vídeos en una interfaz minimalista. 6 | Exec=DivVideo 7 | Icon=div-video 8 | Terminal=false 9 | Type=Application 10 | Categories=Video 11 | -------------------------------------------------------------------------------- /freedesktop/divel-calendar.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=Divel Calendar 4 | Comment=Divel Calendar, chat with friends and create events. 5 | Comment[es]=Divel Calendar, chatea con amigos y crea eventos. 6 | Exec=DivelCalendar 7 | Terminal=false 8 | Type=Application 9 | Icon=divel-calendar 10 | Categories=Office 11 | -------------------------------------------------------------------------------- /divel-calendar/DivelCalendar.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=Divel Calendar 4 | Comment=Divel Calendar, chat with friends and create events. 5 | Comment[es]=Divel Calendar, chatea con amigos y crea eventos. 6 | Exec=DIVEL_CALENDAR 7 | Terminal=false 8 | Type=Application 9 | Icon=divel-calendar 10 | Categories=Utilities 11 | -------------------------------------------------------------------------------- /freedesktop/div-verify-ftp.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=DivVerifyFTP 4 | Comment=DivVerifyFTP, check the state of an remote FTP server. 5 | Comment[es]=DivVerifyFTP, comprueba el estado de un servidor FTP remoto. 6 | Exec=DivVerifyFTP 7 | Icon=DivVerifyFTP 8 | Terminal=false 9 | Type=Application 10 | Categories=Utility 11 | -------------------------------------------------------------------------------- /div-verify-http/frame.h: -------------------------------------------------------------------------------- 1 | /* 2 | * DivVerifyHTTP MainFrame header 3 | */ 4 | #ifndef FRAME_H 5 | #define FRAME_H 6 | 7 | #include "wx/wx.h" 8 | 9 | class MainFrame : public wxFrame 10 | { 11 | public: 12 | MainFrame(); 13 | private: 14 | void Check(wxCommandEvent&); 15 | wxTextCtrl* results; 16 | wxTextCtrl* server; 17 | 18 | }; 19 | 20 | #endif -------------------------------------------------------------------------------- /div-verify-ftp/frame.h: -------------------------------------------------------------------------------- 1 | /* 2 | * DivVerifyFTP MainFrame header 3 | */ 4 | #ifndef FRAME_H 5 | #define FRAME_H 6 | 7 | #include "wx/wx.h" 8 | 9 | class MainFrame : public wxFrame 10 | { 11 | public: 12 | MainFrame(); 13 | private: 14 | void Check(wxCommandEvent&); 15 | wxTextCtrl* results; 16 | wxTextCtrl* server; 17 | 18 | }; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /freedesktop/div-verify-http.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=DivVerifyHTTP 4 | Comment=DivVerifyHTTP, check the state of an remote HTTP server. 5 | Comment[es]=DivVerifyHTTP, comprueba el estado de un servidor HTTP remoto. 6 | Exec=DivVerifyHTTP 7 | Icon=DivVerifyHTTP 8 | Terminal=false 9 | Type=Application 10 | Categories=Utility 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | #Logs 7 | *.log 8 | 9 | # Compiled Dynamic libraries 10 | *.so 11 | *.dylib 12 | *.dll 13 | 14 | # Compiled Static libraries 15 | *.lai 16 | *.la 17 | *.a 18 | *.lib 19 | 20 | #Visual Studio Projects 21 | *.vcxproj 22 | *.vcproj 23 | *.sln 24 | *.sdf 25 | #Build results 26 | build/* -------------------------------------------------------------------------------- /div-verify-http/app.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * DivVerifyHTTP App class 3 | */ 4 | #include "app.h" 5 | #include "frame.h" 6 | 7 | bool DivVerifyHTTP::OnInit() 8 | { 9 | this->SetAppName(wxT("DivVerifyHTTP")); 10 | this->SetVendorName(wxT("Adrian Arroyo Calle")); 11 | MainFrame* frame=new MainFrame(); 12 | frame->Show(true); 13 | SetTopWindow(frame); 14 | return true; 15 | } -------------------------------------------------------------------------------- /div-verify-ftp/app.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * DivVerifyFTP App class 3 | */ 4 | #include "app.h" 5 | #include "frame.h" 6 | 7 | bool DivVerifyFTP::OnInit() 8 | { 9 | this->SetAppName(wxT("DivVerifyFTP")); 10 | this->SetVendorName(wxT("Adrian Arroyo Calle")); 11 | MainFrame* frame=new MainFrame(); 12 | frame->Show(true); 13 | SetTopWindow(frame); 14 | return true; 15 | } 16 | -------------------------------------------------------------------------------- /divel-calendar/debian/control: -------------------------------------------------------------------------------- 1 | Source: divel-calendar 2 | Section: editors 3 | Priority: optional 4 | Maintainer: Adrian Arroyo Calle (Divel) 5 | Build-Depends: debhelper (>= 7), libstdc++6(>= 4.1), libwxgtk2.8-dev, cmake 6 | Standards-Version: 3.9.3 7 | Homepage: http://sites.google.com/site/divelmedia 8 | 9 | 10 | Architecture: any 11 | Depends:${shlibs:Depends} 12 | Version: 1.0.0.3 13 | Description: Divel Calendar 14 | Day by day storages your cites and events 15 | Package: divel-calendar 16 | -------------------------------------------------------------------------------- /divel-calendar/DivChat.h: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #ifndef DIVCHAT_H 3 | #define DIVCHAT_H 4 | #define SOCKET int 5 | 6 | 7 | class DivChat : public wxFrame 8 | { 9 | public: 10 | DivChat(const wxString& title); 11 | ~DivChat(void); 12 | void Servidor(wxCommandEvent& event); 13 | void Cliente(wxCommandEvent& event); 14 | void Enviar(wxCommandEvent& event); 15 | private: 16 | wxTextCtrl* chat; 17 | wxTextCtrl* input; 18 | bool online; 19 | SOCKET DivServer; 20 | SOCKET DIVCliente[10]; 21 | long amigos; 22 | }; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: divwork 2 | Section: utils 3 | Priority: optional 4 | Maintainer: Adrian Arroyo Calle 5 | Build-Depends: debhelper (>= 7), libwxgtk2.8-dev, cmake, binutils, libvlc-dev, libgdk-pixbuf2.0-dev, libgtk2.0-dev 6 | Standards-Version: 3.9.3 7 | Homepage: http://github.com/AdrianArroyoCalle/divwork 8 | 9 | Architecture: any 10 | Depends:${shlibs:Depends} 11 | Version: 0.1.1.3 12 | Description: DivWork 13 | DivWork is an utilitary suite with some interesting programs 14 | Package: divwork 15 | 16 | -------------------------------------------------------------------------------- /divel-calendar/AddEvent.h: -------------------------------------------------------------------------------- 1 | #ifndef ADDEVENT_H 2 | #define ADDEVENT_H 3 | #include "StdAfx.h" 4 | class AddEvent : 5 | public wxDialog 6 | { 7 | public: 8 | AddEvent(const wxString& title,int diadelano2,int mes2,int ano2); 9 | virtual ~AddEvent(void); 10 | void Cancelar(wxCommandEvent& event); 11 | void OK(wxCommandEvent& event); 12 | int ano; 13 | int mes; 14 | int diadelano; 15 | private: 16 | 17 | wxStaticText* idia; 18 | wxTextCtrl* comentario; 19 | wxTextCtrl* titulo; 20 | wxTextCtrl* lugar; 21 | wxTextCtrl* duracion; 22 | }; 23 | #endif 24 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /cmake/FindLIBVNCCLIENT.cmake: -------------------------------------------------------------------------------- 1 | #Check if LibVNC is installed on the system 2 | find_package(PkgConfig) 3 | pkg_check_modules(PC_LIBVNCCLIENT QUIET libvncclient) 4 | set(LIBVNCCLIENT_DEFINITIONS ${PC_LIBVNCCLIENT_CFLAGS_OTHER}) 5 | 6 | find_path(LIBVNCCLIENT_INCLUDE_DIR rfb/rfb.h HINTS ${PC_LIBVNCCLIENT_INCLUDEDIR} ${PC_LIBVNCCLIENT_INCLUDE_DIRS}) 7 | 8 | find_library(LIBVNCCLIENT_LIBRARY NAMES vncclient libvncclient HINTS ${PC_LIBVNCCLIET_LIBDIR} ${PC_LIBVNCCLIENT_LIBRARY_DIRS}) 9 | 10 | set(LIBVNCCLIENT_LIBRARIES ${LIBVNCCLIENT_LIBRARY} ) 11 | set(LIBVNCCLIET_INCLUDE_DIRS ${LIBVNCCLIENT_INCLUDE_DIR} ) 12 | -------------------------------------------------------------------------------- /monopoly/MonopolyApp.cpp: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------- 2 | // 3 | // Name: MonopolyApp.cpp 4 | // Author: Adrian Arroyo 5 | // Created: 18/12/2011 20:55:13 6 | // Description: 7 | // 8 | //--------------------------------------------------------------------------- 9 | 10 | #include "MonopolyApp.h" 11 | #include "MonopolyFrm.h" 12 | 13 | IMPLEMENT_APP(MonopolyFrmApp) 14 | 15 | bool MonopolyFrmApp::OnInit() 16 | { 17 | MonopolyFrm* frame = new MonopolyFrm(NULL); 18 | SetTopWindow(frame); 19 | frame->Show(); 20 | return true; 21 | } 22 | 23 | int MonopolyFrmApp::OnExit() 24 | { 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /monopoly/MonopolyApp.h: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------- 2 | // 3 | // Name: MonopolyApp.h 4 | // Author: Adrian Arroyo 5 | // Created: 18/12/2011 20:55:12 6 | // Description: 7 | // 8 | //--------------------------------------------------------------------------- 9 | 10 | #ifndef __MONOPOLYFRMApp_h__ 11 | #define __MONOPOLYFRMApp_h__ 12 | 13 | #ifdef __BORLANDC__ 14 | #pragma hdrstop 15 | #endif 16 | 17 | #ifndef WX_PRECOMP 18 | #include 19 | #else 20 | #include 21 | #endif 22 | 23 | class MonopolyFrmApp : public wxApp 24 | { 25 | public: 26 | bool OnInit(); 27 | int OnExit(); 28 | }; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /divel-write/DivelWriteApp.h: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------- 2 | // 3 | // Name: Divel WriteApp.h 4 | // Author: Arroyo 5 | // Created: 18/01/2012 20:57:00 6 | // Description: 7 | // 8 | //--------------------------------------------------------------------------- 9 | 10 | #ifndef __DIVEL_WRITEFRMApp_h__ 11 | #define __DIVEL_WRITEFRMApp_h__ 12 | 13 | #ifdef __BORLANDC__ 14 | #pragma hdrstop 15 | #endif 16 | 17 | #ifndef WX_PRECOMP 18 | #include 19 | #else 20 | #include 21 | #endif 22 | 23 | class Divel_WriteFrmApp : public wxApp 24 | { 25 | public: 26 | bool OnInit(); 27 | int OnExit(); 28 | }; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /divel-write/DivelWriteApp.cpp: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------- 2 | // 3 | // Name: Divel WriteApp.cpp 4 | // Author: Arroyo 5 | // Created: 18/01/2012 20:57:00 6 | // Description: 7 | // 8 | //--------------------------------------------------------------------------- 9 | 10 | #include "DivelWriteApp.h" 11 | #include "DivelWriteFrm.h" 12 | 13 | IMPLEMENT_APP(Divel_WriteFrmApp) 14 | 15 | bool Divel_WriteFrmApp::OnInit() 16 | { 17 | Divel_WriteFrm* frame = new Divel_WriteFrm(NULL); 18 | SetTopWindow(frame); 19 | frame->Maximize(); 20 | frame->Show(); 21 | return true; 22 | } 23 | 24 | int Divel_WriteFrmApp::OnExit() 25 | { 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /divel-calendar/Divel Calendar.h: -------------------------------------------------------------------------------- 1 | //#pragma once 2 | //GUID {917BDFD2-0425-45D6-A495-5AA24EFD2C03} 3 | //#include "resource.h" 4 | #ifndef DIVCALENDAR_H 5 | #define DIVCALENDAR_H 6 | 7 | class DivCalendar: public wxApp 8 | { 9 | virtual bool OnInit(); 10 | virtual int OnExit(); 11 | private: 12 | wxTaskBarIcon* icono; 13 | }; 14 | 15 | 16 | 17 | 18 | 19 | 20 | enum 21 | { 22 | ID_Quit = 1, 23 | ID_About, 24 | ID_ADDEVT, 25 | ID_ADDEVTOK, 26 | ID_ADDEVTCANCEL, 27 | ID_ADDREC, 28 | ID_SAVE, 29 | ID_OPEN, 30 | ID_CHAT, 31 | ID_EVENTS, 32 | ID_NOTES, 33 | ID_PICKUPCAL, 34 | ID_EDIT, 35 | ID_DELETE, 36 | ID_SHARE, 37 | ID_ADDRSS, 38 | ID_OPT, 39 | ID_CAL, 40 | ID_VER, 41 | ID_JOIN, 42 | ID_HOST, 43 | ID_ENVIAR, 44 | }; 45 | 46 | 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /divel-calendar/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | %: 3 | dh $@ 4 | 5 | override_dh_auto_configure: 6 | cmake . -DCMAKE_INSTALL_PREFIX=${CURDIR}/debian/divel-calendar/usr 7 | #mkdir -p ${CURDIR}/debian/azpazeta 8 | #cp -rv build/* ${CURDIR}/debian/azpazeta/ 9 | #dh_auto_configure 10 | override_dh_auto_build: 11 | make 12 | override_dh_auto_install: 13 | make install 14 | mkdir -p ${CURDIR}/debian/divel-calendar/usr/share/applications 15 | mkdir -p ${CURDIR}/debian/divel-calendar/usr/share/pixmaps 16 | cp DivelCalendar.desktop.desktop.desktop ${CURDIR}/debian/divel-calendar/usr/share/applications/ 17 | cp DivelCalendar.png ${CURDIR}/debian/divel-calendar/usr/share/pixmaps/divel-calendar.png 18 | #ln -s ${CURDIR}/debian/azpazeta/opt/azpazeta/doc/html/ ${CURDIR}/debian/azpazeta/usr/share/help/C/azpazeta 19 | -------------------------------------------------------------------------------- /divel-calendar/License.txt: -------------------------------------------------------------------------------- 1 | Divel Calendar 2 | Copyright (C) 2013-2013 Adrián Arroyo Calle 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | -------------------------------------------------------------------------------- /divel-calendar/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Divel Calendar.rc 4 | // 5 | 6 | #define IDS_APP_TITLE 103 7 | 8 | #define IDR_MAINFRAME 128 9 | #define IDD_DIVELCALENDAR_DIALOG 102 10 | #define IDD_ABOUTBOX 103 11 | #define IDM_ABOUT 104 12 | #define IDM_EXIT 105 13 | #define IDI_DIVELCALENDAR 107 14 | #define IDI_SMALL 108 15 | #define IDC_DIVELCALENDAR 109 16 | #define IDC_MYICON 2 17 | #ifndef IDC_STATIC 18 | #define IDC_STATIC -1 19 | #endif 20 | // Valores predeterminados siguientes para nuevos objetos 21 | // 22 | #ifdef APSTUDIO_INVOKED 23 | #ifndef APSTUDIO_READONLY_SYMBOLS 24 | 25 | #define _APS_NO_MFC 130 26 | #define _APS_NEXT_RESOURCE_VALUE 129 27 | #define _APS_NEXT_COMMAND_VALUE 32771 28 | #define _APS_NEXT_CONTROL_VALUE 1000 29 | #define _APS_NEXT_SYMED_VALUE 110 30 | #endif 31 | #endif 32 | -------------------------------------------------------------------------------- /PKGBUILD: -------------------------------------------------------------------------------- 1 | # This is an example PKGBUILD file. Use this as a start to creating your own, 2 | # and remove these comments. For more information, see 'man PKGBUILD'. 3 | # NOTE: Please fill out the license field for your package! If it is unknown, 4 | # then please put 'unknown'. 5 | 6 | #Create tar.gz file with tar -zcvf divel-calendar.tar.gz . 7 | 8 | # Maintainer: Adrian Arroyo Calle 9 | pkgname=divwork 10 | pkgver=1.0.0 11 | pkgrel=1 12 | pkgdesc="Suite of utilitary software" 13 | arch=('i686' 'x86_64') 14 | url="http://sites.google.com/site/divelmedia" 15 | license=('GPL') 16 | groups=() 17 | depends=('wxgtk') 18 | makedepends=('wxgtk' 'cmake') 19 | optdepends=() 20 | provides=() 21 | conflicts=() 22 | replaces=() 23 | backup=() 24 | options=() 25 | install= 26 | changelog= 27 | source=("$pkgname"::'git://github.com/AdrianArroyoCalle/divwork') 28 | noextract=() 29 | md5sums=('SKIP') #generate with 'makepkg -g' 30 | 31 | build() { 32 | cd "$pkgname" 33 | cmake . -DCMAKE_INSTALL_PREFIX=/usr 34 | make 35 | } 36 | 37 | package() { 38 | cd "$pkgname" 39 | make DESTDIR=$pkgdir install 40 | } -------------------------------------------------------------------------------- /divel-calendar/Calendario.h: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #ifndef CALENDARIO_H 3 | #define CALENDARIO_H 4 | 5 | class Calendario: public wxFrame 6 | { 7 | public: 8 | Calendario(const wxString& title, const wxPoint& pos, const wxSize& size); 9 | 10 | void OnQuit(wxCommandEvent& event); 11 | void OnAbout(wxCommandEvent& event); 12 | void Movimiento(wxMouseEvent& event); 13 | void Paint(wxPaintEvent& event); 14 | void Render(wxDC& dc); 15 | void SeleccionarDia(wxCalendarEvent& event); 16 | void SeleccionarEventos(short unsigned int dia,int elmes,int ano); 17 | void CrearEvento(wxCommandEvent& event); 18 | void CrearRecordatorio(wxCommandEvent& event); 19 | void Guardar(wxCommandEvent& event); 20 | void ObtenerRSS(wxTimerEvent& event); 21 | void VerEvento(wxCommandEvent& event); 22 | void BorrarEvento(wxCommandEvent& event); 23 | void Options(wxCommandEvent& event); 24 | void NuevoRSS(wxCommandEvent& event); 25 | void DivelChat(wxCommandEvent& event); 26 | void DivEvents(wxCommandEvent& event); 27 | void DivNotes(wxCommandEvent& event); 28 | 29 | private: 30 | wxPanel* panel; 31 | wxPanel* calendar; 32 | wxStaticText* desc; 33 | int fondo; 34 | unsigned short diadelmes; 35 | int ano; 36 | int mes; 37 | DECLARE_EVENT_TABLE() 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | DivWork [![Build Status](https://travis-ci.org/AdrianArroyoCalle/divwork.png)] (https://travis-ci.org/AdrianArroyoCalle/divwork) 2 | ======= 3 | 4 | DivWork is a utilitary suite free for personal use and little bussiness. DivWork is built with libraries and a GUI (always in wxWidgets, but other libs can also be supported like FLTK or BeAPI). 5 | 6 | DivWork comes with these programs: 7 | 8 | * Divel Calendar 9 | * Divel Calendar Mobile 10 | * Agenda Correos 11 | * DivIRC 12 | * DivXMPP 13 | * DivZip 14 | * DivTar 15 | * DivImage 16 | * DivVideo 17 | * DivDraw 18 | * DivVerifyHTTP 19 | * DivVNC 20 | * DivGPG 21 | * DivTasks 22 | * Divel Write 23 | * Divel Quiz 24 | 25 | Compiling 26 | ========= 27 | 28 | To compile DivWork run the following commands: 29 | 30 | ``` sh 31 | git clone https://github.com/AdrianArroyoCalle/divwork.git 32 | cd divwork 33 | mkdir build && cd build 34 | cmake .. 35 | make 36 | ``` 37 | 38 | To enable and disable DivWork components try hacking the CMakeLists.txt or via CMake GUI 39 | 40 | Installing 41 | ======== 42 | 43 | To install your custom DivWork build you need to run: 44 | 45 | ``` sh 46 | make install 47 | ``` 48 | 49 | or 50 | 51 | ``` sh 52 | cpack -G 53 | ``` 54 | 55 | where package can be DEB, RPM, TGZ, ZIP or NSIS. Optionally if you are on Arch Linux you can run 56 | 57 | ``` sh 58 | makepkg 59 | sudo pacman -U divwork*.pkg.tar.xz 60 | ``` 61 | -------------------------------------------------------------------------------- /divel-calendar/PKGBUILD: -------------------------------------------------------------------------------- 1 | # This is an example PKGBUILD file. Use this as a start to creating your own, 2 | # and remove these comments. For more information, see 'man PKGBUILD'. 3 | # NOTE: Please fill out the license field for your package! If it is unknown, 4 | # then please put 'unknown'. 5 | 6 | #Create tar.gz file with tar -zcvf divel-calendar.tar.gz . 7 | 8 | # Maintainer: Adrian Arroyo Calle 9 | pkgname=Divel_Calendar 10 | pkgver=1.0.0 11 | pkgrel=2 12 | pkgdesc="Day by day storage your cites and events in Divel Calendar" 13 | arch=('i686' 'x86_64') 14 | url="http://sites.google.com/site/divelmedia" 15 | license=('GPL') 16 | groups=() 17 | depends=('wxgtk') 18 | makedepends=('wxgtk' 'cmake') 19 | optdepends=() 20 | provides=() 21 | conflicts=() 22 | replaces=() 23 | backup=() 24 | options=() 25 | install= 26 | changelog= 27 | source=(divel-calendar.tar.gz) #generate with tar -zcvf divel-calendar.tar.gz . 28 | noextract=() 29 | md5sums=('223e698bf0c61ff81b945944a66a1737') #generate with 'makepkg -g' 30 | 31 | build() { 32 | cd "$srcdir" 33 | cmake . -DCMAKE_INSTALL_PREFIX=/usr 34 | make 35 | } 36 | 37 | package() { 38 | make DESTDIR=$pkgdir install 39 | mkdir -p $pkgdir/usr/share/applications 40 | mkdir -p $pkgdir/usr/share/pixmaps 41 | cp $srcdir/DivelCalendar.desktop.desktop.desktop $pkgdir/usr/share/applications/ 42 | cp $srcdir/DivelCalendar.png $pkgdir/usr/share/pixmaps/ 43 | } 44 | -------------------------------------------------------------------------------- /div-agenda/sample.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char *const sample_xpm[] = { 3 | /* columns rows colors chars-per-pixel */ 4 | "32 32 6 1", 5 | " c black", 6 | ". c navy", 7 | "X c red", 8 | "o c yellow", 9 | "O c gray100", 10 | "+ c None", 11 | /* pixels */ 12 | "++++++++++++++++++++++++++++++++", 13 | "++++++++++++++++++++++++++++++++", 14 | "++++++++++++++++++++++++++++++++", 15 | "++++++++++++++++++++++++++++++++", 16 | "++++++++++++++++++++++++++++++++", 17 | "++++++++ ++++++++++", 18 | "++++++++ ............ ++++++++++", 19 | "++++++++ ............ ++++++++++", 20 | "++++++++ .OO......... ++++++++++", 21 | "++++++++ .OO......... ++++++++++", 22 | "++++++++ .OO......... ++++++++++", 23 | "++++++++ .OO...... ", 24 | "++++++++ .OO...... oooooooooooo ", 25 | " .OO...... oooooooooooo ", 26 | " XXXXXXX .OO...... oOOooooooooo ", 27 | " XXXXXXX .OO...... oOOooooooooo ", 28 | " XOOXXXX ......... oOOooooooooo ", 29 | " XOOXXXX ......... oOOooooooooo ", 30 | " XOOXXXX oOOooooooooo ", 31 | " XOOXXXXXXXXX ++++ oOOooooooooo ", 32 | " XOOXXXXXXXXX ++++ oOOooooooooo ", 33 | " XOOXXXXXXXXX ++++ oOOooooooooo ", 34 | " XOOXXXXXXXXX ++++ oooooooooooo ", 35 | " XOOXXXXXXXXX ++++ oooooooooooo ", 36 | " XXXXXXXXXXXX ++++ ", 37 | " XXXXXXXXXXXX ++++++++++++++++++", 38 | " ++++++++++++++++++", 39 | "++++++++++++++++++++++++++++++++", 40 | "++++++++++++++++++++++++++++++++", 41 | "++++++++++++++++++++++++++++++++", 42 | "++++++++++++++++++++++++++++++++", 43 | "++++++++++++++++++++++++++++++++" 44 | }; 45 | -------------------------------------------------------------------------------- /divel-calendar/debian/copyright: -------------------------------------------------------------------------------- 1 | This work was packaged for Debian by: 2 | 3 | Adrian Arroyo Calle on Fri, 08 Jun 2012 17:06:42 +-700 4 | 5 | It was downloaded from: 6 | 7 | http://sites.google.com/site/divelmedia 8 | 9 | Upstream Author(s): 10 | 11 | Adrian Arroyo Calle 12 | 13 | Copyright: 14 | 15 | > 16 | 17 | License: 18 | 19 | This program is free software: you can redistribute it and/or modify 20 | it under the terms of the GNU General Public License as published by 21 | the Free Software Foundation, either version 3 of the License, or 22 | (at your option) any later version. 23 | 24 | This package is distributed in the hope that it will be useful, 25 | but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | GNU General Public License for more details. 28 | 29 | You should have received a copy of the GNU General Public License 30 | along with this program. If not, see . 31 | 32 | On Debian systems, the complete text of the GNU General 33 | Public License version 3 can be found in `/usr/share/common-licenses/GPL-3`. 34 | 35 | The Debian packaging is: 36 | 37 | > 38 | 39 | # Please chose a license for your packaging work. If the program you package 40 | # uses a mainstream license, using the same license is the safest choice. 41 | # Please avoid to pick license terms that are more restrictive than the 42 | # packaged work, as it may make Debian`s contributions unacceptable upstream. 43 | # If you just want it to be GPL version 3, leave the following line in. 44 | 45 | and is licensed under the GPL version 3, see above. 46 | 47 | # Please also look if there are files or directories which have a 48 | # different copyright/license attached and list them here. 49 | -------------------------------------------------------------------------------- /divel-calendar/CMakeLists.txt.old: -------------------------------------------------------------------------------- 1 | PROJECT(DIVEL_CALENDAR) 2 | CMAKE_MINIMUM_REQUIRED(VERSION 2.8) 3 | 4 | SET(welcome,"Welcome to Divel Calendar") 5 | SET(PROJECT_NAME_SHORT "Divel Calendar") 6 | SET(PROJECT_NAME_LONG "Divel Calendar") 7 | SET(PROJECT_DESCRIPTION "Day by day storage your cites and events with Divel Calendar") 8 | SET(PROJECT_COPYRIGHT "Copyright (C) 2012-2013 Adrián Arroyo Calle") 9 | SET(PROJECT_CONTACT "adrian.arroyocalle@gmail.com") 10 | SET(PROJECT_VENDOR "Divel") 11 | SET(ORG_WEBSITE "http://sites.google.com/site/divelmedia") 12 | 13 | MESSAGE(STATUS ${welcome}) 14 | SET(CMAKE_CXX_FLAGS_DEBUG,"-O0 -g3 -Wall -Werror -W -Wno-return-type") 15 | SET(CMAKE_CXX_FLAGS_RELEASE,"-O2 -pipe") 16 | SET(wxWidgets_USE_LIBS) 17 | FIND_PACKAGE(wxWidgets COMPONENTS gl aui adv html core net base QUIET) 18 | 19 | IF(NOT CMAKE_BUILD_TYPE ) 20 | SET( CMAKE_BUILD_TYPE "Release" ) 21 | ENDIF() 22 | 23 | IF(NOT CMAKE_INSTALL_PREFIX) 24 | SET(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/build") 25 | ENDIF() 26 | 27 | INCLUDE("${wxWidgets_USE_FILE}") 28 | 29 | SET(CALENDAR_SRC 30 | AddEvent.cpp 31 | Calendario.cpp 32 | DivChat.cpp 33 | "Divel Calendar.cpp" 34 | ) 35 | SET(CALENDAR_LIB 36 | ${wxWidgets_LIBRARIES} 37 | ) 38 | MESSAGE(STATUS ${welcome}) 39 | MESSAGE(STATUS ${CMAKE_SYSTEM}) 40 | MESSAGE(STATUS ${CMAKE_SYSTEM_PROCESSOR}) 41 | MESSAGE(STATUS ${CMAKE_CXX_COMPILER}) 42 | MESSAGE(STATUS ${CMAKE_VERSION}) 43 | ADD_EXECUTABLE(DIVEL_CALENDAR ${CALENDAR_SRC}) 44 | SET_TARGET_PROPERTIES(DIVEL_CALENDAR PROPERTIES RUNTIME "${CMAKE_CURRENT_SOURCE_DIR}/DIVEL_CALENDAR") 45 | TARGET_LINK_LIBRARIES(DIVEL_CALENDAR ${CALENDAR_LIB} ) 46 | INSTALL(TARGETS DIVEL_CALENDAR 47 | RUNTIME DESTINATION bin) 48 | # build a CPack driven installer package 49 | include (InstallRequiredSystemLibraries) 50 | set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1) 51 | set (CPACK_RESOURCE_FILE_LICENSE 52 | "${CMAKE_CURRENT_SOURCE_DIR}/License.txt") 53 | set (CPACK_PACKAGE_VERSION_MAJOR "1") 54 | set (CPACK_PACKAGE_VERSION_MINOR "0") 55 | include (CPack) 56 | -------------------------------------------------------------------------------- /div-verify-ftp/frame.cpp: -------------------------------------------------------------------------------- 1 | #include "frame.h" 2 | #include "wx/wx.h" 3 | #include "wx/sstream.h" 4 | #include "wx/protocol/ftp.h" 5 | 6 | MainFrame::MainFrame() : wxFrame(NULL,wxID_ANY,wxT("DivVerifyFTP")) 7 | { 8 | this->SetSize(400,600); 9 | wxPanel* panel=new wxPanel(this); 10 | wxStaticText* info=new wxStaticText(panel,wxID_ANY,wxT("Insert a URL, DivVerifyFTP will verfify the server and you can read the metadata"),wxPoint(1,1)); 11 | wxPanel* direction=new wxPanel(panel); 12 | wxStaticText* http=new wxStaticText(direction,wxID_ANY,wxT("ftp://"),wxPoint(1,30)); 13 | server=new wxTextCtrl(direction,wxID_ANY,wxT(""),wxPoint(50,30),wxSize(200,25)); 14 | wxButton* check=new wxButton(direction,wxID_ANY,wxT("Verify FTP"),wxPoint(260,30)); 15 | check->Connect(wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(MainFrame::Check),NULL,this); 16 | results=new wxTextCtrl(panel,wxID_ANY,wxT("[INFO] Started DivVerifyFTP"),wxPoint(1,1),wxSize(400,200),wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH2|wxTE_AUTO_URL); 17 | wxBoxSizer* sizer=new wxBoxSizer(wxVERTICAL); 18 | sizer->Add(info,1,wxEXPAND); 19 | sizer->Add(direction,1,wxEXPAND); 20 | sizer->Add(results,1,wxEXPAND); 21 | panel->SetSizer(sizer); 22 | panel->SetAutoLayout(true); 23 | 24 | 25 | } 26 | void MainFrame::Check(wxCommandEvent& event) 27 | { 28 | results->SetDefaultStyle(wxTextAttr(*wxBLUE)); 29 | results->AppendText(wxT("\n[INFO] User starts a check procress")); 30 | 31 | wxFTP ftp; 32 | wxString uri=server->GetValue(); 33 | wxString server=uri.BeforeFirst('/'); 34 | wxString file=uri.AfterFirst('/').Cmp(wxT(""))==0 ? wxT("/") : uri.AfterFirst('/'); 35 | 36 | if(!ftp.Connect(server)) 37 | { 38 | results->SetDefaultStyle(wxTextAttr(*wxRED)); 39 | results->AppendText(wxT("\n[ERROR] DivVerifyFTP can't connect to the server")); 40 | } 41 | if(ftp.GetInputStream(file)!=NULL) 42 | { 43 | results->SetDefaultStyle(wxTextAttr(*wxGREEN)); 44 | results->AppendText(wxT("\n[OK] File encountered")); 45 | }else{ 46 | results->SetDefaultStyle(wxTextAttr(*wxRED)); 47 | results->AppendText(wxT("\n[ERROR] The file doesn't exist")); 48 | } 49 | ftp.Close(); 50 | 51 | /*int size=results->GetSize().GetHeight(); 52 | int pos=results->GetScrollPos(wxVERTICAL); 53 | results->SetScrollPos(wxVERTICAL, pos - size);*/ 54 | } 55 | -------------------------------------------------------------------------------- /divwork.spec: -------------------------------------------------------------------------------- 1 | #RPM Build of DivWork 2 | #First download a tar.gz of the source code 3 | #Second, copy the file to SPECS dir 4 | #Third, run rpmbuild -ba or rpmbuild -bb 5 | 6 | Summary: DivWork is a suite of utilitary work 7 | Name: divwork 8 | Version: 0.1.1 9 | Release: 1 10 | License: GPLv2 11 | Group: Applications/Internet 12 | Source0: http://github.com/AdrianArroyoCalle/divwork/archive/master.tar.gz 13 | %if 0%{?suse_version} 14 | BuildRequires: cmake gcc-c++ libstdc++-devel wxWidgets-devel libwx_gtk2u_core-2_8-0-wxcontainer update-desktop-files 15 | Requires: xdg-utils libwx_gtk2u_core-2_8-0-wxcontainer 16 | %endif 17 | %if 0%{?fedora_version} 18 | BuildRequires: wxGTK-devel cmake 19 | %endif 20 | %if 0%{?rhel_version} 21 | BuildRequires: wxGTK-devel cmake 22 | %endif 23 | %if 0%{?centos_version} 24 | BuildRequires: wxGTK-devel cmake 25 | %endif 26 | URL: http://github.com/AdrianArroyoCalle/divwork 27 | %description 28 | This package is a collection of some programs that might be util 29 | %prep 30 | %setup -qn divwork-master 31 | %build 32 | cmake . -DBUILD_DIV_VIDEO=OFF -DCMAKE_INSTALL_PREFIX=/usr 33 | make 34 | %install 35 | make DESTDIR=%{buildroot} install 36 | %if 0%{?suse_version} 37 | rm %{buildroot}/usr/share/applications/*.desktop 38 | 39 | %suse_update_desktop_file -c divel-calendar "Divel Calendar" "Divel Calendar" Divel_Calendar divel-calendar Utility 40 | %suse_update_desktop_file -r divel-calendar Utility PDA 41 | %suse_update_desktop_file -c agenda-correos "Agenda de Correos" "Agenda de Correos" AgendaCorreos divel-calendar Utility 42 | %suse_update_desktop_file -r agenda-correos Utility Telephony 43 | %suse_update_desktop_file -c divel-write "Divel Write" "Divel Write" DivelWrite divel-calendar Utility 44 | %suse_update_desktop_file -r divel-write Utility TextEditor 45 | %suse_update_desktop_file -c div-verify-ftp "DivVerifyFTP" "DivVerifyFTP" DivVerifyFTP DivVerifyFTP Utility 46 | %suse_update_desktop_file -r div-verify-ftp Utility WebUtility 47 | %suse_update_desktop_file -c div-verify-http "DivVerifyHTTP" "DivVerifyHTTP" DivVerifyHTTP DivVerifyHTTP Utility 48 | %suse_update_desktop_file -r div-verify-http Utility WebUtility 49 | %endif 50 | %files 51 | /usr/bin 52 | /usr/share/applications 53 | /usr/share/icons/hicolor/64x64/apps 54 | %changelog 55 | * Wed Oct 16 2013 Adrian Arroyo Calle 56 | - First SPEC file 57 | 58 | -------------------------------------------------------------------------------- /divel-write/DivelWriteFrm.h: -------------------------------------------------------------------------------- 1 | ///----------------------------------------------------------------- 2 | /// 3 | /// @file Divel WriteFrm.h 4 | /// @author Arroyo 5 | /// Created: 18/01/2012 20:57:01 6 | /// @section DESCRIPTION 7 | /// Divel_WriteFrm class declaration 8 | /// 9 | ///------------------------------------------------------------------ 10 | 11 | #ifndef __DIVEL_WRITEFRM_H__ 12 | #define __DIVEL_WRITEFRM_H__ 13 | 14 | #ifdef __BORLANDC__ 15 | #pragma hdrstop 16 | #endif 17 | 18 | #ifndef WX_PRECOMP 19 | #include 20 | #include 21 | #else 22 | #include 23 | #endif 24 | 25 | //Do not add custom headers between 26 | //Header Include Start and Header Include End. 27 | //wxDev-C++ designer will remove them. Add custom headers after the block. 28 | ////Header Include Start 29 | #include 30 | ////Header Include End 31 | 32 | ////Dialog Style Start 33 | #undef Divel_WriteFrm_STYLE 34 | #define Divel_WriteFrm_STYLE wxCAPTION | wxSYSTEM_MENU | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxCLOSE_BOX 35 | ////Dialog Style End 36 | 37 | class Divel_WriteFrm : public wxFrame 38 | { 39 | private: 40 | DECLARE_EVENT_TABLE(); 41 | 42 | public: 43 | Divel_WriteFrm(wxWindow *parent, wxWindowID id = 1, const wxString &title = wxT("Divel Write"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = Divel_WriteFrm_STYLE); 44 | virtual ~Divel_WriteFrm(); 45 | 46 | private: 47 | //Do not add custom control declarations between 48 | //GUI Control Declaration Start and GUI Control Declaration End. 49 | //wxDev-C++ will remove them. Add custom code after the block. 50 | ////GUI Control Declaration Start 51 | wxTextCtrl *WxMemo1; 52 | ////GUI Control Declaration End 53 | 54 | private: 55 | //Note: if you receive any error with these enum IDs, then you need to 56 | //change your old form code that are based on the #define control IDs. 57 | //#defines may replace a numeric value for the enum names. 58 | //Try copy and pasting the below block in your old form header files. 59 | enum 60 | { 61 | ////GUI Enum Control ID Start 62 | ID_WXMEMO1 = 1002, 63 | ID_Abrir, 64 | ID_Nuevo, 65 | ID_Guardar, 66 | ID_Acerca, 67 | ID_Cerrar, 68 | ////GUI Enum Control ID End 69 | ID_DUMMY_VALUE_ //don't remove this value unless you have other enum values 70 | }; 71 | 72 | private: 73 | void OnClose(wxCloseEvent& event); 74 | void CreateGUIControls(); 75 | void OnAbrir(wxCommandEvent& event); 76 | void OnNuevo(wxCommandEvent& event); 77 | void OnGuardar(wxCommandEvent& event); 78 | void OnAcerca(wxCommandEvent& event); 79 | void OnCerrar(wxCommandEvent& event); 80 | }; 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /div-vnc/app.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | DivVNC is a simply client for VNC protocol 3 | (C) Adrian Arroyo Calle 2013 4 | */ 5 | #include "wx/wx.h" 6 | #include "rfb/rfbclient.h" 7 | 8 | class DivVNC : public wxApp 9 | { 10 | public: 11 | // override base class virtuals 12 | // ---------------------------- 13 | 14 | // this one is called on application startup and is a good place for the app 15 | // initialization (doing it here and not in the ctor allows to have an error 16 | // return: if OnInit() returns false, the application terminates) 17 | virtual bool OnInit(); 18 | //virtual int OnRun(); //Hacer comprobaciones 19 | 20 | 21 | 22 | 23 | }; 24 | class VNCFrame : public wxFrame 25 | { 26 | public: 27 | // ctor(s) 28 | VNCFrame(const wxString& title); 29 | void VNCLoop(wxIdleEvent&); 30 | private: 31 | rfbClient* cl; 32 | DECLARE_EVENT_TABLE() 33 | }; 34 | BEGIN_EVENT_TABLE(VNCFrame, wxFrame) 35 | EVT_IDLE(VNCFrame::VNCLoop) 36 | END_EVENT_TABLE() 37 | bool DivVNC::OnInit() 38 | { 39 | SetAppName(wxT("DivVNC")); 40 | SetVendorName(wxT("Adrian Arroyo Calle for Divel")); 41 | 42 | // create the main application window 43 | VNCFrame *frame = new VNCFrame(wxT("DivVNC")); 44 | 45 | // and show it (the frames, unlike simple controls, are not shown when 46 | // created initially) 47 | frame->Show(true); 48 | 49 | 50 | } 51 | static void update(rfbClient* cl,int x,int y,int w,int h) { 52 | rfbPixelFormat* pf=&cl->format; 53 | int bpp=pf->bitsPerPixel/8; 54 | int row_stride=cl->width*bpp; 55 | for(int j=0;jheight*row_stride;j+=row_stride) 56 | for(int i=0;iwidth*bpp;i+=bpp) { 57 | unsigned char* p=cl->frameBuffer+j+i; 58 | unsigned int v; 59 | if(bpp==4) 60 | v=*(unsigned int*)p; 61 | else if(bpp==2) 62 | v=*(unsigned short*)p; 63 | else 64 | v=*(unsigned char*)p; 65 | fputc((v>>pf->redShift)*256/(pf->redMax+1),stdout); 66 | fputc((v>>pf->greenShift)*256/(pf->greenMax+1),stdout); 67 | fputc((v>>pf->blueShift)*256/(pf->blueMax+1),stdout); 68 | } 69 | } 70 | VNCFrame::VNCFrame(const wxString& title) : wxFrame(NULL, wxID_ANY, title) 71 | { 72 | SetSize(800,600); 73 | cl=rfbGetClient(8,3,4); 74 | cl->GotFrameBufferUpdate=update; 75 | cl->listenPort = 5500; 76 | cl->appData.encodingsString="raw"; 77 | int dos=2; 78 | 79 | strcmp(wxApp::argv[0],"vnc"); 80 | strcmp(wxApp::argv[1],"127.0.0.1:5500"); 81 | if(!rfbInitClient(cl,&wxApp::argc,wxApp::argv)) 82 | { 83 | wxLogError(wxT("Can't start VNC client'")); 84 | } 85 | } 86 | void VNCFrame::VNCLoop(wxIdleEvent& event) 87 | { 88 | int i=WaitForMessage(cl,1000000/60); 89 | if(i<0) { 90 | wxClose(true); 91 | } 92 | if(i) 93 | if(!HandleRFBServerMessage(cl)) 94 | wxClose(true); 95 | } 96 | IMPLEMENT_APP(DivVNC) 97 | -------------------------------------------------------------------------------- /cmake/FindLIBVLC.cmake: -------------------------------------------------------------------------------- 1 | # CMake module to search for LIBVLC (VLC library) 2 | # Authors: Rohit Yadav 3 | # Harald Sitter 4 | # 5 | # If it's found it sets LIBVLC_FOUND to TRUE 6 | # and following variables are set: 7 | # LIBVLC_INCLUDE_DIR 8 | # LIBVLC_LIBRARY 9 | # LIBVLC_VERSION 10 | 11 | if(NOT LIBVLC_MIN_VERSION) 12 | set(LIBVLC_MIN_VERSION "0.0") 13 | endif(NOT LIBVLC_MIN_VERSION) 14 | 15 | # find_path and find_library normally search standard locations 16 | # before the specified paths. To search non-standard paths first, 17 | # FIND_* is invoked first with specified paths and NO_DEFAULT_PATH 18 | # and then again with no specified paths to search the default 19 | # locations. When an earlier FIND_* succeeds, subsequent FIND_*s 20 | # searching for the same item do nothing. 21 | 22 | if (NOT WIN32) 23 | find_package(PkgConfig) 24 | pkg_check_modules(PC_LIBVLC libvlc) 25 | set(LIBVLC_DEFINITIONS ${PC_LIBVLC_CFLAGS_OTHER}) 26 | endif (NOT WIN32) 27 | 28 | #Put here path to custom location 29 | #example: /home/user/vlc/include etc.. 30 | find_path(LIBVLC_INCLUDE_DIR vlc/vlc.h 31 | HINTS "$ENV{LIBVLC_INCLUDE_PATH}" 32 | PATHS 33 | "$ENV{LIB_DIR}/include" 34 | "$ENV{LIB_DIR}/include/vlc" 35 | "/usr/include" 36 | "/usr/include/vlc" 37 | "/usr/local/include" 38 | "/usr/local/include/vlc" 39 | #mingw 40 | c:/msys/local/include 41 | ) 42 | find_path(LIBVLC_INCLUDE_DIR PATHS "${CMAKE_INCLUDE_PATH}/vlc" NAMES vlc.h 43 | HINTS ${PC_LIBVLC_INCLUDEDIR} ${PC_LIBVLC_INCLUDE_DIRS}) 44 | 45 | #Put here path to custom location 46 | #example: /home/user/vlc/lib etc.. 47 | find_library(LIBVLC_LIBRARY NAMES vlc libvlc 48 | HINTS "$ENV{LIBVLC_LIBRARY_PATH}" ${PC_LIBVLC_LIBDIR} ${PC_LIBVLC_LIBRARY_DIRS} 49 | PATHS 50 | "$ENV{LIB_DIR}/lib" 51 | #mingw 52 | c:/msys/local/lib 53 | ) 54 | find_library(LIBVLC_LIBRARY NAMES vlc libvlc) 55 | find_library(LIBVLCCORE_LIBRARY NAMES vlccore libvlccore 56 | HINTS "$ENV{LIBVLC_LIBRARY_PATH}" ${PC_LIBVLC_LIBDIR} ${PC_LIBVLC_LIBRARY_DIRS} 57 | PATHS 58 | "$ENV{LIB_DIR}/lib" 59 | #mingw 60 | c:/msys/local/lib 61 | ) 62 | find_library(LIBVLCCORE_LIBRARY NAMES vlccore libvlccore) 63 | 64 | set(LIBVLC_VERSION ${PC_LIBVLC_VERSION}) 65 | if (NOT LIBVLC_VERSION) 66 | # TODO: implement means to detect version on windows (vlc --version && regex? ... ultimately we would get it from a header though...) 67 | endif (NOT LIBVLC_VERSION) 68 | 69 | if (LIBVLC_INCLUDE_DIR AND LIBVLC_LIBRARY AND LIBVLCCORE_LIBRARY) 70 | set(LIBVLC_FOUND TRUE) 71 | endif (LIBVLC_INCLUDE_DIR AND LIBVLC_LIBRARY AND LIBVLCCORE_LIBRARY) 72 | 73 | if (LIBVLC_VERSION STRLESS "${LIBVLC_MIN_VERSION}") 74 | message(WARNING "LibVLC version not found: version searched: ${LIBVLC_MIN_VERSION}, found ${LIBVLC_VERSION}\nUnless you are on Windows this is bound to fail.") 75 | # TODO: only activate once version detection can be garunteed (which is currently not the case on windows) 76 | # set(LIBVLC_FOUND FALSE) 77 | endif (LIBVLC_VERSION STRLESS "${LIBVLC_MIN_VERSION}") 78 | 79 | if (LIBVLC_FOUND) 80 | if (NOT LIBVLC_FIND_QUIETLY) 81 | message(STATUS "Found LibVLC include-dir path: ${LIBVLC_INCLUDE_DIR}") 82 | message(STATUS "Found LibVLC library path:${LIBVLC_LIBRARY}") 83 | message(STATUS "Found LibVLCcore library path:${LIBVLCCORE_LIBRARY}") 84 | message(STATUS "Found LibVLC version: ${LIBVLC_VERSION} (searched for: ${LIBVLC_MIN_VERSION})") 85 | endif (NOT LIBVLC_FIND_QUIETLY) 86 | else (LIBVLC_FOUND) 87 | if (LIBVLC_FIND_REQUIRED) 88 | message(FATAL_ERROR "Could not find LibVLC") 89 | endif (LIBVLC_FIND_REQUIRED) 90 | endif (LIBVLC_FOUND) 91 | -------------------------------------------------------------------------------- /div-verify-http/frame.cpp: -------------------------------------------------------------------------------- 1 | #include "frame.h" 2 | #include "wx/wx.h" 3 | #include "wx/sstream.h" 4 | #include "wx/protocol/http.h" 5 | 6 | MainFrame::MainFrame() : wxFrame(NULL,wxID_ANY,wxT("DivVerifyHTTP")) 7 | { 8 | this->SetSize(400,600); 9 | wxPanel* panel=new wxPanel(this); 10 | wxStaticText* info=new wxStaticText(panel,wxID_ANY,wxT("Insert a URL, DivVerifyHTTP will verfify the server and you can read the metadata"),wxPoint(1,1)); 11 | wxPanel* direction=new wxPanel(panel); 12 | wxStaticText* http=new wxStaticText(direction,wxID_ANY,wxT("http://"),wxPoint(1,1)); 13 | server=new wxTextCtrl(direction,wxID_ANY,wxT(""),wxPoint(50,1),wxSize(200,25)); 14 | wxButton* check=new wxButton(direction,wxID_ANY,wxT("Verify HTTP"),wxPoint(260,1)); 15 | check->Connect(wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(MainFrame::Check),NULL,this); 16 | results=new wxTextCtrl(panel,wxID_ANY,wxT("[INFO] Started DivVerifyHTTP"),wxPoint(1,1),wxSize(400,200),wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH2|wxTE_AUTO_URL); 17 | wxBoxSizer* sizer=new wxBoxSizer(wxVERTICAL); 18 | sizer->Add(info,1,wxEXPAND); 19 | sizer->Add(direction,1,wxEXPAND); 20 | sizer->Add(results,1,wxEXPAND); 21 | panel->SetSizer(sizer); 22 | panel->SetAutoLayout(true); 23 | 24 | 25 | } 26 | void MainFrame::Check(wxCommandEvent& event) 27 | { 28 | results->SetDefaultStyle(wxTextAttr(*wxBLUE)); 29 | results->AppendText(wxT("\n[INFO] User starts a check procress")); 30 | 31 | wxHTTP get; 32 | get.SetHeader(wxT("Content-Type"),wxT("text/html; charset=utf8")); 33 | results->AppendText(wxT("\n[Request] Content-Type: text/html; charset=utf8")); 34 | get.SetHeader(wxT("User-Agent"),wxT("DivVerifyHTTP/1.0 wxHTTP/2.8 (+http://github.com/AdrianArroyoCalle/divwork)")); 35 | results->AppendText(wxT("\n[Request] User-Agent: DivVerifyHTTP/1.0 wxHTTP/2.8 (+http://github.com/AdrianArroyoCalle/divwork)")); 36 | get.SetHeader(wxT("Accept-Charset"),wxT("utf-8")); 37 | results->AppendText(wxT("\n[Request] Accept-Charset: utf-8")); 38 | get.SetHeader(wxT("X-Requested-With"),wxT("DivVerifyHTTP")); 39 | results->AppendText(wxT("\n[Request] X-Requested-With: DivVerifyHTTP")); 40 | get.SetHeader(wxT("DNT"),wxT("1")); 41 | results->AppendText(wxT("\n[Request] DNT: 1")); 42 | get.SetTimeout(10); 43 | 44 | while (!get.Connect(server->GetValue().BeforeFirst('/'))) // only the server, no pages here yet ... 45 | wxSleep(5); 46 | 47 | results->AppendText(wxT("\n[INFO] Server host: ")+server->GetValue().BeforeFirst('/')); 48 | 49 | if(server->GetValue().AfterFirst('/').Cmp(wxT(""))==0) 50 | { 51 | wxInputStream *httpStream = get.GetInputStream(wxT("/")); 52 | results->AppendText(wxT("\n[INFO] Server page: /")); 53 | }else{ 54 | wxInputStream *httpStream = get.GetInputStream(server->GetValue().AfterFirst('/')); 55 | results->AppendText(wxT("\n[INFO] Server page: ")+server->GetValue().AfterFirst('/')); 56 | } 57 | 58 | results->SetDefaultStyle(wxTextAttr(*wxGREEN)); 59 | results->AppendText(wxString::Format(wxT("\n[Response] HTTP Code: %d"),get.GetResponse())); 60 | results->AppendText(wxT("\n[Response] X-Powered-By: ")+get.GetHeader(wxT("X-Powered-By"))); 61 | results->AppendText(wxT("\n[Response] Access-Control-Allow-Origin: ")+get.GetHeader(wxT("Access-Control-Allow-Origin"))); 62 | results->AppendText(wxT("\n[Response] Date:")+get.GetHeader(wxT("Date"))); 63 | results->AppendText(wxT("\n[Response] Content-Type: ")+get.GetHeader(wxT("Content-Type"))); 64 | results->AppendText(wxT("\n[Response] Location: ")+get.GetHeader(wxT("Location"))); 65 | 66 | switch(get.GetError()) 67 | { 68 | case wxPROTO_NOERR: { 69 | results->SetDefaultStyle(wxTextAttr(*wxGREEN)); 70 | results->AppendText(wxT("\n[OK] All almost good")); 71 | }break; 72 | case wxPROTO_NETERR: { 73 | results->SetDefaultStyle(wxTextAttr(*wxRED)); 74 | results->AppendText(wxT("\n[ERROR] Network error")); 75 | }break; 76 | case wxPROTO_PROTERR: { 77 | results->SetDefaultStyle(wxTextAttr(*wxRED)); 78 | results->AppendText(wxT("\n[ERROR] Negotiation error")); 79 | }break; 80 | case wxPROTO_CONNERR: { 81 | results->SetDefaultStyle(wxTextAttr(*wxRED)); 82 | results->AppendText(wxT("\n[ERROR] Connection error")); 83 | }break; 84 | case wxPROTO_INVVAL: { 85 | results->SetDefaultStyle(wxTextAttr(*wxRED)); 86 | results->AppendText(wxT("\n[ERROR] Invalid argument")); 87 | }break; 88 | case wxPROTO_NOFILE: { 89 | results->SetDefaultStyle(wxTextAttr(*wxRED)); 90 | results->AppendText(wxT("\n[ERROR] Remote file doesn't exist")); 91 | }break; 92 | default:{ 93 | results->SetDefaultStyle(wxTextAttr(*wxRED)); 94 | results->AppendText(wxT("\n[ERROR] Unknow error")); 95 | } 96 | 97 | } 98 | /*wxDELETE(httpStream);*/ 99 | get.Close(); 100 | } 101 | -------------------------------------------------------------------------------- /divel-write/DivelWriteFrm.cpp: -------------------------------------------------------------------------------- 1 | ///----------------------------------------------------------------- 2 | /// 3 | /// @file Divel WriteFrm.cpp 4 | /// @author Arroyo 5 | /// Created: 18/01/2012 20:57:01 6 | /// @section DESCRIPTION 7 | /// Divel_WriteFrm class implementation 8 | /// 9 | ///------------------------------------------------------------------ 10 | 11 | #include "DivelWriteFrm.h" 12 | 13 | //Do not add custom headers between 14 | //Header Include Start and Header Include End 15 | //wxDev-C++ designer will remove them 16 | ////Header Include Start 17 | ////Header Include End 18 | 19 | //---------------------------------------------------------------------------- 20 | // Divel_WriteFrm 21 | //---------------------------------------------------------------------------- 22 | //Add Custom Events only in the appropriate block. 23 | //Code added in other places will be removed by wxDev-C++ 24 | ////Event Table Start 25 | BEGIN_EVENT_TABLE(Divel_WriteFrm,wxFrame) 26 | ////Manual Code Start 27 | EVT_MENU(ID_Cerrar, Divel_WriteFrm::OnCerrar) 28 | EVT_MENU(ID_Abrir, Divel_WriteFrm::OnAbrir) 29 | EVT_MENU(ID_Nuevo, Divel_WriteFrm::OnNuevo) 30 | EVT_MENU(ID_Guardar, Divel_WriteFrm::OnGuardar) 31 | EVT_MENU(ID_Acerca, Divel_WriteFrm::OnAcerca) 32 | ////Manual Code End 33 | 34 | EVT_CLOSE(Divel_WriteFrm::OnClose) 35 | END_EVENT_TABLE() 36 | ////Event Table End 37 | 38 | Divel_WriteFrm::Divel_WriteFrm(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style) 39 | : wxFrame(parent, id, title, position, size, style) 40 | { 41 | CreateGUIControls(); 42 | wxMenu *menuArchivo = new wxMenu; 43 | wxMenu *menuAcerca = new wxMenu; 44 | 45 | menuArchivo->Append(ID_Nuevo, _("&Nuevo archivo")); 46 | menuArchivo->Append(ID_Abrir, _("&Abrir archivo...")); 47 | menuArchivo->Append(ID_Guardar, _("&Guardar archivo...")); 48 | menuArchivo->AppendSeparator(); 49 | menuArchivo->Append(ID_Cerrar, _("&Salir")); 50 | 51 | menuAcerca->Append(ID_Acerca,_("A&cerca de")); 52 | 53 | wxMenuBar *menuBar = new wxMenuBar; 54 | menuBar->Append(menuArchivo, _("&Archivo")); 55 | menuBar->Append(menuAcerca, _("A&cerca")); 56 | 57 | SetMenuBar(menuBar); 58 | 59 | 60 | } 61 | 62 | Divel_WriteFrm::~Divel_WriteFrm() 63 | { 64 | } 65 | 66 | void Divel_WriteFrm::CreateGUIControls() 67 | { 68 | //Do not add custom code between 69 | //GUI Items Creation Start and GUI Items Creation End 70 | //wxDev-C++ designer will remove them. 71 | //Add the custom code before or after the blocks 72 | ////GUI Items Creation Start 73 | 74 | WxMemo1 = new wxTextCtrl(this, ID_WXMEMO1, wxEmptyString, wxPoint(26, 25), wxSize(195, 184), wxTE_MULTILINE, wxDefaultValidator, wxT(" ")); 75 | WxMemo1->SetMaxLength(0); 76 | 77 | SetTitle(wxT("Divel Write")); 78 | SetIcon(wxNullIcon); 79 | SetSize(8,8,271,291); 80 | Center(); 81 | 82 | ////GUI Items Creation End 83 | } 84 | 85 | void Divel_WriteFrm::OnClose(wxCloseEvent& event) 86 | { 87 | Destroy(); 88 | } 89 | void Divel_WriteFrm::OnAbrir(wxCommandEvent& event) 90 | { 91 | wxString CurrentDocPath; 92 | wxFileDialog* OpenDialog = new wxFileDialog( 93 | this, _("Elige un archivo para abrir"), wxEmptyString, wxEmptyString, 94 | _("Archivos Divel Write(*.dwr)|*.dwr|Archivos Narciso(*.nar)|*.nar|Archivos de Texto (*.txt)|*.txt|Codigo Fuente C++ (*.cpp, *.cxx)|*.cpp;*.cxx|Archivo fuente de C (*.c)|*.c|Archivos de cabeza C (*.h)|*.h"), 95 | wxFD_OPEN, wxDefaultPosition); 96 | 97 | // Creates a "open file" dialog with 4 file types 98 | if (OpenDialog->ShowModal() == wxID_OK) // if the user click "Open" instead of "Cancel" 99 | { 100 | CurrentDocPath = OpenDialog->GetPath(); 101 | // Sets our current document to the file the user selected 102 | WxMemo1->LoadFile(OpenDialog->GetPath()); //Opens that file 103 | SetTitle(wxString()<< OpenDialog->GetFilename()); // Set the Title to reflect the file open 104 | } 105 | OpenDialog->Destroy(); 106 | 107 | } 108 | void Divel_WriteFrm::OnGuardar(wxCommandEvent& event) 109 | { 110 | wxFileDialog *SaveDialog = new wxFileDialog( 111 | this, _("Guardar"), wxEmptyString, wxEmptyString, 112 | _("Archivos Divel Write(*.dwr)|*.dwr|Archivos de texto (*.txt)|*.txt|Codigo fuente C++ (*.cpp)|*.cpp|Codigo fuente C (*.c)|*.c|Archivos de cabecera C (*.h)|*.h"), 113 | wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition); 114 | 115 | // Creates a Save Dialog with 4 file types 116 | if (SaveDialog->ShowModal() == wxID_OK) // If the user clicked "OK" 117 | { 118 | // set the path of our current document to the file the user chose to save under 119 | WxMemo1->SaveFile(SaveDialog->GetPath()); // Save the file to the selected path 120 | // Set the Title to reflect the file open 121 | SetTitle(wxString()<< SaveDialog->GetFilename()); 122 | } 123 | 124 | // Clean up after ourselves 125 | SaveDialog->Destroy(); 126 | } 127 | void Divel_WriteFrm::OnNuevo(wxCommandEvent& event) 128 | { 129 | SetTitle(wxT("Nuevo archivo")); 130 | WxMemo1->Clear(); 131 | } 132 | void Divel_WriteFrm::OnAcerca(wxCommandEvent& event) 133 | { 134 | wxMessageBox(_("Divel Write es el procesador de textos de Divel\n\n(C) Adrian Arroyo Calle 2012\nPara mas info visite:\nsites.google.com/site/divelmedia")); 135 | } 136 | void Divel_WriteFrm::OnCerrar(wxCommandEvent& event) 137 | { 138 | Destroy(); 139 | } 140 | -------------------------------------------------------------------------------- /monopoly/MonopolyFrm.h: -------------------------------------------------------------------------------- 1 | ///----------------------------------------------------------------- 2 | /// 3 | /// @file MonopolyFrm.h 4 | /// @author Adrian Arroyo 5 | /// Created: 18/12/2011 20:55:14 6 | /// @section DESCRIPTION 7 | /// MonopolyFrm class declaration 8 | /// 9 | ///------------------------------------------------------------------ 10 | 11 | #ifndef __MONOPOLYFRM_H__ 12 | #define __MONOPOLYFRM_H__ 13 | 14 | #ifdef __BORLANDC__ 15 | #pragma hdrstop 16 | #endif 17 | 18 | #ifndef WX_PRECOMP 19 | #include 20 | #include 21 | #else 22 | #include 23 | #endif 24 | 25 | //Do not add custom headers between 26 | //Header Include Start and Header Include End. 27 | //wxDev-C++ designer will remove them. Add custom headers after the block. 28 | ////Header Include Start 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | ////Header Include End 35 | 36 | ////Dialog Style Start 37 | #undef MonopolyFrm_STYLE 38 | #define MonopolyFrm_STYLE wxCAPTION | wxSYSTEM_MENU | wxMINIMIZE_BOX | wxCLOSE_BOX 39 | ////Dialog Style End 40 | 41 | class MonopolyFrm : public wxFrame 42 | { 43 | private: 44 | DECLARE_EVENT_TABLE(); 45 | 46 | public: 47 | MonopolyFrm(wxWindow *parent, wxWindowID id = 1, const wxString &title = wxT("Monopoly"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = MonopolyFrm_STYLE); 48 | virtual ~MonopolyFrm(); 49 | void WxButton1Click(wxCommandEvent& event); 50 | void WxButton2Click(wxCommandEvent& event); 51 | void WxButton6Click(wxCommandEvent& event); 52 | void WxButton6Click0(wxCommandEvent& event); 53 | void WxButton3Click(wxCommandEvent& event); 54 | void WxButton6Click1(wxCommandEvent& event); 55 | void WxButton5Click(wxCommandEvent& event); 56 | void WxButton7Click(wxCommandEvent& event); 57 | void MonopolyFrmActivate(wxActivateEvent& event); 58 | void WxButton6Click2(wxCommandEvent& event); 59 | void WxButton8Click(wxCommandEvent& event); 60 | void WxButton10Click(wxCommandEvent& event); 61 | void WxButton11Click(wxCommandEvent& event); 62 | void WxButton12Click(wxCommandEvent& event); 63 | void WxButton11Click0(wxCommandEvent& event); 64 | void WxButton12Click0(wxCommandEvent& event); 65 | void WxButton13Click(wxCommandEvent& event); 66 | void WxButton14Click(wxCommandEvent& event); 67 | void WxButton15Click(wxCommandEvent& event); 68 | void WxButton16Click(wxCommandEvent& event); 69 | void WxButton6Click3(wxCommandEvent& event); 70 | void WxButton5Click0(wxCommandEvent& event); 71 | 72 | private: 73 | //Do not add custom control declarations between 74 | //GUI Control Declaration Start and GUI Control Declaration End. 75 | //wxDev-C++ will remove them. Add custom code after the block. 76 | ////GUI Control Declaration Start 77 | wxTextCtrl *WxMemo2; 78 | wxTextCtrl *WxMemo1; 79 | wxButton *WxButton16; 80 | wxButton *WxButton15; 81 | wxButton *WxButton14; 82 | wxButton *WxButton13; 83 | wxButton *WxButton12; 84 | wxStaticBox *WxStaticBox5; 85 | wxButton *WxButton11; 86 | wxStaticBox *WxStaticBox4; 87 | wxTextCtrl *WxEdit20; 88 | wxTextCtrl *WxEdit19; 89 | wxTextCtrl *WxEdit18; 90 | wxTextCtrl *WxEdit17; 91 | wxTextCtrl *WxEdit16; 92 | wxTextCtrl *WxEdit15; 93 | wxTextCtrl *WxEdit10; 94 | wxTextCtrl *WxEdit3; 95 | wxTextCtrl *WxEdit9; 96 | wxTextCtrl *WxEdit8; 97 | wxTextCtrl *WxEdit7; 98 | wxTextCtrl *WxEdit6; 99 | wxTextCtrl *WxEdit5; 100 | wxTextCtrl *WxEdit4; 101 | wxTextCtrl *WxEdit14; 102 | wxButton *WxButton4; 103 | wxButton *WxButton10; 104 | wxTextCtrl *WxEdit13; 105 | wxTextCtrl *WxEdit12; 106 | wxTextCtrl *WxEdit11; 107 | wxButton *WxButton8; 108 | wxStaticText *WxStaticText10; 109 | wxStaticText *WxStaticText9; 110 | wxStaticText *WxStaticText7; 111 | wxStaticText *WxStaticText2; 112 | wxButton *WxButton6; 113 | wxStaticText *WxStaticText5; 114 | wxStaticText *WxStaticText4; 115 | wxStaticText *WxStaticText8; 116 | wxStaticText *WxStaticText6; 117 | wxStaticBox *WxStaticBox3; 118 | wxStaticBitmap *WxStaticBitmap1; 119 | wxButton *WxButton7; 120 | wxStaticText *WxStaticText15; 121 | wxStaticText *WxStaticText3; 122 | wxStaticText *WxStaticText1; 123 | wxStaticBox *WxStaticBox2; 124 | wxButton *WxButton5; 125 | wxButton *WxButton3; 126 | wxButton *WxButton2; 127 | wxStaticBox *WxStaticBox1; 128 | wxButton *WxButton1; 129 | ////GUI Control Declaration End 130 | 131 | private: 132 | //Note: if you receive any error with these enum IDs, then you need to 133 | //change your old form code that are based on the #define control IDs. 134 | //#defines may replace a numeric value for the enum names. 135 | //Try copy and pasting the below block in your old form header files. 136 | enum 137 | { 138 | ////GUI Enum Control ID Start 139 | ID_WXMEMO2 = 1085, 140 | ID_WXMEMO1 = 1084, 141 | ID_WXBUTTON16 = 1083, 142 | ID_WXBUTTON15 = 1082, 143 | ID_WXBUTTON14 = 1081, 144 | ID_WXBUTTON13 = 1080, 145 | ID_WXBUTTON12 = 1079, 146 | ID_WXSTATICBOX5 = 1078, 147 | ID_WXBUTTON11 = 1077, 148 | ID_WXSTATICBOX4 = 1076, 149 | ID_WXEDIT20 = 1072, 150 | ID_WXEDIT19 = 1071, 151 | ID_WXEDIT18 = 1070, 152 | ID_WXEDIT17 = 1069, 153 | ID_WXEDIT16 = 1068, 154 | ID_WXEDIT15 = 1067, 155 | ID_WXEDIT10 = 1066, 156 | ID_WXEDIT3 = 1065, 157 | ID_WXEDIT9 = 1064, 158 | ID_WXEDIT8 = 1063, 159 | ID_WXEDIT7 = 1062, 160 | ID_WXEDIT6 = 1061, 161 | ID_WXEDIT5 = 1060, 162 | ID_WXEDIT4 = 1059, 163 | ID_WXEDIT14 = 1058, 164 | ID_WXBUTTON4 = 1057, 165 | ID_WXBUTTON10 = 1056, 166 | ID_WXEDIT13 = 1053, 167 | ID_WXEDIT12 = 1052, 168 | ID_WXEDIT11 = 1051, 169 | ID_WXBUTTON8 = 1049, 170 | ID_WXSTATICTEXT10 = 1029, 171 | ID_WXSTATICTEXT9 = 1028, 172 | ID_WXSTATICTEXT7 = 1027, 173 | ID_WXSTATICTEXT2 = 1026, 174 | ID_WXBUTTON6 = 1025, 175 | ID_WXSTATICTEXT5 = 1024, 176 | ID_WXSTATICTEXT4 = 1023, 177 | ID_WXSTATICTEXT8 = 1022, 178 | ID_WXSTATICTEXT6 = 1020, 179 | ID_WXSTATICBOX3 = 1017, 180 | ID_WXSTATICBITMAP1 = 1015, 181 | ID_WXBUTTON7 = 1014, 182 | ID_WXSTATICTEXT15 = 1013, 183 | ID_WXSTATICTEXT3 = 1011, 184 | ID_WXSTATICTEXT1 = 1008, 185 | ID_WXSTATICBOX2 = 1007, 186 | ID_WXBUTTON5 = 1006, 187 | ID_WXBUTTON3 = 1004, 188 | ID_WXBUTTON2 = 1003, 189 | ID_WXSTATICBOX1 = 1002, 190 | ID_WXBUTTON1 = 1001, 191 | ////GUI Enum Control ID End 192 | ID_DUMMY_VALUE_ //don't remove this value unless you have other enum values 193 | }; 194 | 195 | private: 196 | void OnClose(wxCloseEvent& event); 197 | void CreateGUIControls(); 198 | }; 199 | 200 | #endif 201 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 2.8) 2 | PROJECT (DIVWORK) 3 | SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") 4 | #Version number 5 | SET(DIVWORK_VERSION_MAJOR 0) 6 | SET(DIVWORK_VERSION_MINOR 1) 7 | #Common source codes for projects (exclude platform independent) 8 | SET(DIVEL_CALENDAR_SRC 9 | "divel-calendar/AddEvent.cpp" 10 | "divel-calendar/Calendario.cpp" 11 | "divel-calendar/DivChat.cpp" 12 | "divel-calendar/Divel Calendar.cpp" 13 | "divel-calendar/StdAfx.cpp" 14 | ) 15 | SET(DIV_AGENDA_SRC 16 | "div-agenda/correos.cpp" 17 | ) 18 | SET(DIV_VNC_SRC 19 | "div-vnc/app.cpp" 20 | ) 21 | SET(DIVEL_WRITE_SRC 22 | "divel-write/DivelWriteFrm.cpp" 23 | "divel-write/DivelWriteApp.cpp" 24 | ) 25 | SET(DIV_VERIFY_HTTP 26 | "div-verify-http/app.cpp" 27 | "div-verify-http/frame.cpp" 28 | ) 29 | SET(DIV_VERIFY_FTP 30 | "div-verify-ftp/app.cpp" 31 | "div-verify-ftp/frame.cpp" 32 | ) 33 | SET(DIV_VIDEO_SRC 34 | "div-video/player.cpp" 35 | ) 36 | SET(MONOPOLY_SRC 37 | "monopoly/MonopolyApp.cpp" 38 | "monopoly/MonopolyFrm.cpp" 39 | ) 40 | SET(MONOPOLY_HELP_SRC 41 | "monopoly/AyudaApp.cpp" 42 | "monopoly/AyudaFrm.cpp" 43 | ) 44 | #Compiling options 45 | # should we use our stupid functions? 46 | option (USE_LIBRANDOM 47 | "Library example implementation" ON) 48 | option (BUILD_DIVELCALENDAR "Build Divel Calendar" ON) 49 | option (BUILD_DIV_AGENDA "Build DivAgenda" ON) 50 | option (BUILD_DIV_VNC "Build DivVNC (broked)" OFF) 51 | option (BUILD_DIVEL_WRITE "Build Divel Write" ON) 52 | option (BUILD_DIV_VERIFY_HTTP "Build DivVerifyHTTP" ON) 53 | option (BUILD_DIV_VERIFY_FTP "Build DivVerifyFTP" ON) 54 | option (BUILD_DIV_VIDEO "Build DivVideo" ON) 55 | option (BUILD_MONOPOLY "Build Monopoly" ON) 56 | option (BUILD_MONOPOLY_HELP "Build Monopoly Help" ON) 57 | #Custom builds 58 | if (USE_LIBRANDOM) 59 | include_directories("${PROJECT_BINARY_DIR}/librandom") 60 | add_subdirectory(librandom) 61 | set(COMMON_LIBS ${COMMON_LIBS} librandom) 62 | endif() 63 | #Get required libraries 64 | find_package(wxWidgets COMPONENTS core base aui adv html net gl)#REQUIRED) 65 | include( "${wxWidgets_USE_FILE}" ) 66 | SET(COMMON_LIBS ${COMMON_LIBS} ${wxWidgets_LIBRARIES}) 67 | # configure a header file to pass some of the CMake settings 68 | # to the source code 69 | configure_file ( 70 | "${PROJECT_SOURCE_DIR}/config/config.h.in" 71 | "${PROJECT_BINARY_DIR}/config/config.h" 72 | ) 73 | # add the binary tree to the search path for include files 74 | # so that we will find TutorialConfig.h 75 | include_directories("${PROJECT_BINARY_DIR}/config") 76 | 77 | # Add executables 78 | if(BUILD_DIVELCALENDAR) 79 | add_executable(Divel_Calendar ${DIVEL_CALENDAR_SRC}) 80 | target_link_libraries(Divel_Calendar ${COMMON_LIBS}) 81 | install(TARGETS Divel_Calendar DESTINATION bin) 82 | SET(DESKTOP_FILES ${DESKTOP_FILES} "freedesktop/divel-calendar.desktop") 83 | SET(SCALABLE_FILES ${SCALABLE_FILES}) #"freedesktop/divel-calendar.svg" 84 | SET(ICON64_FILES ${ICON64_FILES} "freedesktop/divel-calendar.png") 85 | SET(EXE_TARGETS ${EXE_TARGETS} Divel_Calendar) 86 | SET(EXE_DESC ${EXE_DESC} "Divel Calendar") 87 | endif() 88 | if(BUILD_DIV_AGENDA) 89 | add_executable(DivAgenda ${DIV_AGENDA_SRC}) 90 | target_link_libraries(DivAgenda ${COMMON_LIBS}) 91 | install(TARGETS DivAgenda DESTINATION bin) 92 | SET(DESKTOP_FILES ${DESKTOP_FILES} "freedesktop/div-agenda.desktop") 93 | SET(EXE_TARGETS ${EXE_TARGETS} DivAgenda) 94 | SET(EXE_DESC ${EXE_DESC} "DivAgenda") 95 | endif() 96 | if(BUILD_DIV_VNC) 97 | find_package(LIBVNCCLIENT REQUIRED) 98 | add_executable(DivVnc ${DIV_VNC_SRC}) 99 | target_link_libraries(DivVnc ${COMMON_LIBS} ${LIBVNCCLIENT_LIBRARY}) 100 | install(TARGETS DivVnc DESTINATION bin) 101 | endif() 102 | 103 | if(BUILD_DIVEL_WRITE) 104 | add_executable(DivelWrite ${DIVEL_WRITE_SRC}) 105 | target_link_libraries(DivelWrite ${COMMON_LIBS}) 106 | install(TARGETS DivelWrite DESTINATION bin) 107 | SET(DESKTOP_FILES ${DESKTOP_FILES} "freedesktop/divel-write.desktop") 108 | SET(EXE_TARGETS ${EXE_TARGETS} DivelWrite) 109 | SET(EXE_DESC ${EXE_DESC} "Divel Write") 110 | endif() 111 | if(BUILD_DIV_VERIFY_HTTP) 112 | add_executable(DivVerifyHTTP ${DIV_VERIFY_HTTP}) 113 | target_link_libraries(DivVerifyHTTP ${COMMON_LIBS}) 114 | install(TARGETS DivVerifyHTTP DESTINATION bin) 115 | SET(DESKTOP_FILES ${DESKTOP_FILES} "freedesktop/div-verify-http.desktop") 116 | SET(EXE_TARGETS ${EXE_TARGETS} DivVerifyHTTP) 117 | SET(EXE_DESC ${EXE_DESC} "DivVerifyHTTP") 118 | SET(ICON64_FILES ${ICON64_FILES} "freedesktop/DivVerifyHTTP.png") 119 | endif() 120 | if(BUILD_DIV_VERIFY_FTP) 121 | add_executable(DivVerifyFTP ${DIV_VERIFY_FTP}) 122 | target_link_libraries(DivVerifyFTP ${COMMON_LIBS}) 123 | install(TARGETS DivVerifyFTP DESTINATION bin) 124 | SET(DESKTOP_FILES ${DESKTOP_FILES} "freedesktop/div-verify-ftp.desktop") 125 | SET(EXE_TARGETS ${EXE_TARGETS} DivVerifyFTP) 126 | SET(EXE_DESC ${EXE_DESC} "DivVerifyFTP") 127 | SET(ICON64_FILES ${ICON64_FILES} "freedesktop/DivVerifyFTP.png") 128 | endif() 129 | if(BUILD_DIV_VIDEO) 130 | find_package(LIBVLC) 131 | find_package(GTK2) 132 | include_directories(${LIBVLC_INCLUDE_DIR}) 133 | include_directories(${GTK2_INCLUDE_DIRS}) 134 | add_executable(DivVideo ${DIV_VIDEO_SRC}) 135 | target_link_libraries(DivVideo ${COMMON_LIBS}) 136 | target_link_libraries(DivVideo ${LIBVLC_LIBRARY}) 137 | target_link_libraries(DivVideo ${GTK2_LIBRARIES}) 138 | install(TARGETS DivVideo DESTINATION bin) 139 | SET(DESKTOP_FILES ${DESKTOP_FILES} "freedesktop/div-video.desktop") 140 | SET(EXE_TARGETS ${EXE_TARGETS} DivVideo) 141 | SET(EXE_DESC ${EXE_DESC} "DivVideo") 142 | SET(ICON64_FILES ${ICON64_FILES} "freedesktop/div-video.png") 143 | endif() 144 | if(BUILD_MONOPOLY) 145 | add_executable(Monopoly ${MONOPOLY_SRC}) 146 | target_link_libraries(Monopoly ${COMMON_LIBS}) 147 | install(TARGETS Monopoly DESTINATION bin) 148 | SET(DESKTOP_FILES ${DESKTOP_FILES} "freedesktop/monopoly.desktop") 149 | SET(EXE_TARGETS ${EXE_TARGETS} Monopoly) 150 | SET(EXE_DESC ${EXE_DESC} "Monopoly") 151 | SET(ICON64_FILES ${ICON64_FILES} "freedesktop/monopoly.png") 152 | endif() 153 | #Desktop shourtcouts 154 | if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") 155 | SET(DESKTOP_DIR "share/applications/") 156 | SET(SCALABLE_DIR "share/icons/hicolor/scalable/apps/") 157 | set(ICON64_DIR "share/icons/hicolor/64x64/apps/") 158 | #INSTALL (FILES ${DESKTOP_FILES} DESTINATION ${DESKTOP_DIR}) 159 | INSTALL (PROGRAMS ${DESKTOP_FILES} DESTINATION ${DESKTOP_DIR}) 160 | INSTALL (FILES ${SCALABLE_FILES} DESTINATION ${SCALABLE_DIR}) 161 | INSTALL (FILES ${ICON64_FILES} DESTINATION ${ICON64_DIR}) 162 | endif() 163 | if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") 164 | set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CMAKE_PROJECT_NAME}-${DIVWORK_VERSION_MAJOR}") 165 | set(CPACK_NSIS_MENU_LINKS "http://github.com/AdrianArroyoCalle/divwork" "Homepage for DivWork") 166 | set(CPACK_NSIS_URL_INFO_ABOUT "http://github.com/AdrianArroyoCalle/divwork") 167 | set(CPACK_NSIS_HELP_LINK "http://github.com/AdrianArroyoCalle/divwork") 168 | set(CPACK_PACKAGE_EXECUTABLES "${EXE_TARGETS}" "${EXE_DESC}") 169 | endif() 170 | # build a CPack driven installer package 171 | include (InstallRequiredSystemLibraries) 172 | set (CPACK_RESOURCE_FILE_LICENSE 173 | "${CMAKE_CURRENT_SOURCE_DIR}/divel-calendar/License.txt") 174 | set (CPACK_PACKAGE_VERSION_MAJOR "${DIVWORK_VERSION_MAJOR}") 175 | set (CPACK_PACKAGE_VERSION_MINOR "${DIVWORK_VERSION_MINOR}") 176 | set (CPACK_PACKAGE_NAME "divwork") 177 | set (CPACK_PACKAGE_VENDOR "Adrian Arroyo Calle") 178 | SET (CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.1-6), libwxgtk2.8-dev") 179 | SET (CPACK_PACKAGE_CONTACT "adrian.arroyocalle@gmail.com") 180 | SET (CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_PACKAGE_VENDOR} <${CPACK_PACKAGE_CONTACT}>") 181 | SET (CPACK_PACKAGE_DESCRIPTION_SUMMARY "DivWork is a utilitary suite free for personal use and little bussiness") 182 | include (CPack) 183 | -------------------------------------------------------------------------------- /div-video/player.cpp: -------------------------------------------------------------------------------- 1 | // g++ wx_player.cpp `wx-config --libs` `wx-config --cxxflags` `pkg-config --cflags gtk+-2.0 libvlc` `pkg-config --libs gtk+-2.0 libvlc` -o wx_player 2 | 3 | /* License WTFPL http://sam.zoy.org/wtfpl/ */ 4 | /* Written by Vincent Schüßler */ 5 | /* Adapted for DivWork by Adrián Arroyo */ 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #ifdef __WXGTK__ 13 | #include 14 | #include 15 | #include 16 | #define GET_XID(window) GDK_WINDOW_XWINDOW(GTK_PIZZA(window->m_wxwindow)->bin_window) 17 | #endif 18 | 19 | #define myID_PLAYPAUSE wxID_HIGHEST+1 20 | #define myID_STOP wxID_HIGHEST+2 21 | #define myID_TIMELINE wxID_HIGHEST+3 22 | #define myID_VOLUME wxID_HIGHEST+4 23 | 24 | #define TIMELINE_MAX (INT_MAX-9) 25 | #define VOLUME_MAX 100 26 | 27 | DECLARE_EVENT_TYPE(vlcEVT_END, -1) 28 | DECLARE_EVENT_TYPE(vlcEVT_POS, -1) 29 | DEFINE_EVENT_TYPE(vlcEVT_END) 30 | DEFINE_EVENT_TYPE(vlcEVT_POS) 31 | 32 | void OnPositionChanged_VLC(const libvlc_event_t *event, void *data); 33 | void OnEndReached_VLC(const libvlc_event_t *event, void *data); 34 | 35 | class MainWindow : public wxFrame { 36 | public: 37 | MainWindow(const wxString& title); 38 | ~MainWindow(); 39 | 40 | private: 41 | void initVLC(); 42 | 43 | void OnOpen(wxCommandEvent& event); 44 | void OnPlayPause(wxCommandEvent& event); 45 | void OnStop(wxCommandEvent& event); 46 | void OnPositionChanged_USR(wxCommandEvent& event); 47 | void OnPositionChanged_VLC(wxCommandEvent& event); 48 | void OnEndReached_VLC(wxCommandEvent& event); 49 | void OnVolumeChanged(wxCommandEvent& event); 50 | void OnVolumeClicked(wxMouseEvent& event); 51 | void OnTimelineClicked(wxMouseEvent& event); 52 | 53 | void play(); 54 | void pause(); 55 | void stop(); 56 | void setTimeline(float value); 57 | void connectTimeline(); 58 | 59 | wxButton *playpause_button; 60 | wxButton *stop_button; 61 | wxSlider *timeline; 62 | wxSlider *volume_slider; 63 | wxWindow *player_widget; 64 | 65 | libvlc_media_player_t *media_player; 66 | libvlc_instance_t *vlc_inst; 67 | libvlc_event_manager_t *vlc_evt_man; 68 | }; 69 | 70 | MainWindow *mainWindow; 71 | 72 | MainWindow::MainWindow(const wxString& title) : wxFrame(NULL, wxID_ANY, title, wxDefaultPosition) { 73 | // setup menubar 74 | wxMenuBar *menubar; 75 | wxMenu *file; 76 | menubar = new wxMenuBar; 77 | file = new wxMenu; 78 | file->Append(wxID_OPEN, wxT("&Open")); 79 | menubar->Append(file, wxT("&File")); 80 | SetMenuBar(menubar); 81 | Connect(wxID_OPEN, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainWindow::OnOpen)); 82 | 83 | // setup vbox 84 | wxBoxSizer *vbox = new wxBoxSizer(wxVERTICAL); 85 | this->SetSizer(vbox); 86 | 87 | //setup player widget 88 | player_widget = new wxWindow(this, wxID_ANY); 89 | player_widget->SetBackgroundColour(wxColour(wxT("black"))); 90 | vbox->Add(player_widget, 1, wxEXPAND | wxALIGN_TOP); 91 | 92 | //setup timeline slider 93 | timeline = new wxSlider(this, myID_TIMELINE, 0, 0, TIMELINE_MAX); 94 | timeline->Enable(false); 95 | vbox->Add(timeline, 0, wxEXPAND); 96 | connectTimeline(); 97 | timeline->Connect(myID_TIMELINE, wxEVT_LEFT_UP, wxMouseEventHandler(MainWindow::OnTimelineClicked)); 98 | 99 | //setup control panel 100 | wxPanel *controlPanel = new wxPanel(this, wxID_ANY); 101 | 102 | //setup hbox 103 | wxBoxSizer *hbox = new wxBoxSizer(wxHORIZONTAL); 104 | controlPanel->SetSizer(hbox); 105 | vbox->Add(controlPanel, 0, wxEXPAND); 106 | 107 | //setup controls 108 | playpause_button = new wxButton(controlPanel, myID_PLAYPAUSE, wxT("Play")); 109 | stop_button = new wxButton(controlPanel, myID_STOP, wxT("Stop")); 110 | volume_slider = new wxSlider(controlPanel, myID_VOLUME, VOLUME_MAX, 0, VOLUME_MAX, wxDefaultPosition, wxSize(100, -1)); 111 | playpause_button->Enable(false); 112 | stop_button->Enable(false); 113 | hbox->Add(playpause_button); 114 | hbox->Add(stop_button); 115 | hbox->AddStretchSpacer(); 116 | hbox->Add(volume_slider); 117 | Connect(myID_PLAYPAUSE, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainWindow::OnPlayPause)); 118 | Connect(myID_STOP, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainWindow::OnStop)); 119 | Connect(myID_VOLUME, wxEVT_COMMAND_SLIDER_UPDATED, wxCommandEventHandler(MainWindow::OnVolumeChanged)); 120 | volume_slider->Connect(myID_VOLUME, wxEVT_LEFT_UP, wxMouseEventHandler(MainWindow::OnVolumeClicked)); 121 | 122 | //setup vlc 123 | vlc_inst = libvlc_new(0, NULL); 124 | media_player = libvlc_media_player_new(vlc_inst); 125 | vlc_evt_man = libvlc_media_player_event_manager(media_player); 126 | libvlc_event_attach(vlc_evt_man, libvlc_MediaPlayerEndReached, ::OnEndReached_VLC, NULL); 127 | libvlc_event_attach(vlc_evt_man, libvlc_MediaPlayerPositionChanged, ::OnPositionChanged_VLC, NULL); 128 | Connect(wxID_ANY, vlcEVT_END, wxCommandEventHandler(MainWindow::OnEndReached_VLC)); 129 | Connect(wxID_ANY, vlcEVT_POS, wxCommandEventHandler(MainWindow::OnPositionChanged_VLC)); 130 | 131 | Show(true); 132 | initVLC(); 133 | } 134 | 135 | MainWindow::~MainWindow() { 136 | libvlc_media_player_release(media_player); 137 | libvlc_release(vlc_inst); 138 | } 139 | 140 | void MainWindow::initVLC() { 141 | #ifdef __WXGTK__ 142 | libvlc_media_player_set_xwindow(media_player, GET_XID(this->player_widget)); 143 | #else 144 | libvlc_media_player_set_hwnd(media_player, this->player_widget->GetHandle()); 145 | #endif 146 | } 147 | 148 | void MainWindow::OnOpen(wxCommandEvent& event) { 149 | wxFileDialog openFileDialog(this, wxT("Choose File")); 150 | 151 | if (openFileDialog.ShowModal() == wxID_CANCEL) { 152 | return; 153 | } 154 | else { 155 | libvlc_media_t *media; 156 | wxFileName filename = wxFileName::FileName(openFileDialog.GetPath()); 157 | filename.MakeRelativeTo(); 158 | media = libvlc_media_new_path(vlc_inst, filename.GetFullPath().mb_str()); 159 | libvlc_media_player_set_media(media_player, media); 160 | play(); 161 | libvlc_media_release(media); 162 | } 163 | } 164 | 165 | void MainWindow::OnPlayPause(wxCommandEvent& event) { 166 | if(libvlc_media_player_is_playing(media_player) == 1) { 167 | pause(); 168 | } 169 | else { 170 | play(); 171 | } 172 | } 173 | 174 | void MainWindow::OnStop(wxCommandEvent& event) { 175 | stop(); 176 | } 177 | 178 | void MainWindow::OnPositionChanged_USR(wxCommandEvent& event) { 179 | libvlc_media_player_set_position(media_player, (float) event.GetInt() / (float) TIMELINE_MAX); 180 | } 181 | 182 | void MainWindow::OnPositionChanged_VLC(wxCommandEvent& event) { 183 | float factor = libvlc_media_player_get_position(media_player); 184 | setTimeline(factor); 185 | } 186 | 187 | void MainWindow::OnEndReached_VLC(wxCommandEvent& event) { 188 | stop(); 189 | } 190 | 191 | void MainWindow::OnVolumeChanged(wxCommandEvent& event) { 192 | libvlc_audio_set_volume(media_player, volume_slider->GetValue()); 193 | } 194 | 195 | void MainWindow::OnVolumeClicked(wxMouseEvent& event) { 196 | wxSize size = mainWindow->volume_slider->GetSize(); 197 | float position = (float) event.GetX() / (float) size.GetWidth(); 198 | mainWindow->volume_slider->SetValue(position*VOLUME_MAX); 199 | libvlc_audio_set_volume(mainWindow->media_player, position*VOLUME_MAX); 200 | event.Skip(); 201 | } 202 | 203 | void MainWindow::OnTimelineClicked(wxMouseEvent& event) { 204 | wxSize size = mainWindow->timeline->GetSize(); 205 | float position = (float) event.GetX() / (float) size.GetWidth(); 206 | libvlc_media_player_set_position(mainWindow->media_player, position); 207 | mainWindow->setTimeline(position); 208 | event.Skip(); 209 | } 210 | 211 | void MainWindow::play() { 212 | libvlc_media_player_play(media_player); 213 | playpause_button->SetLabel(wxT("Pause")); 214 | playpause_button->Enable(true); 215 | stop_button->Enable(true); 216 | timeline->Enable(true); 217 | } 218 | 219 | void MainWindow::pause() { 220 | libvlc_media_player_pause(media_player); 221 | playpause_button->SetLabel(wxT("Play")); 222 | } 223 | 224 | void MainWindow::stop() { 225 | pause(); 226 | libvlc_media_player_stop(media_player); 227 | stop_button->Enable(false); 228 | setTimeline(0.0); 229 | timeline->Enable(false); 230 | } 231 | 232 | void MainWindow::setTimeline(float value) { 233 | if(value < 0.0) value = 0.0; 234 | if(value > 1.0) value = 1.0; 235 | Disconnect(myID_TIMELINE); 236 | timeline->SetValue((int) (value * TIMELINE_MAX)); 237 | connectTimeline(); 238 | } 239 | 240 | void MainWindow::connectTimeline() { 241 | Connect(myID_TIMELINE, wxEVT_COMMAND_SLIDER_UPDATED, wxCommandEventHandler(MainWindow::OnPositionChanged_USR)); 242 | } 243 | 244 | class MyApp : public wxApp { 245 | public: 246 | virtual bool OnInit(); 247 | }; 248 | 249 | void OnPositionChanged_VLC(const libvlc_event_t *event, void *data) { 250 | wxCommandEvent evt(vlcEVT_POS, wxID_ANY); 251 | mainWindow->AddPendingEvent(evt); 252 | } 253 | 254 | void OnEndReached_VLC(const libvlc_event_t *event, void *data) { 255 | wxCommandEvent evt(vlcEVT_END, wxID_ANY); 256 | mainWindow->AddPendingEvent(evt); 257 | } 258 | 259 | bool MyApp::OnInit() { 260 | mainWindow = new MainWindow(wxT("DivVideo")); 261 | return true; 262 | } 263 | 264 | IMPLEMENT_APP(MyApp) 265 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | DivWork 294 | Copyright (C) 2013 Adrián Arroyo Calle 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /div-agenda/correos.cpp: -------------------------------------------------------------------------------- 1 | // for all others, include the necessary headers (this file is usually all you 2 | // need because it includes almost all "standard" wxWidgets headers) 3 | #ifndef WX_PRECOMP 4 | #include "wx/wx.h" 5 | #endif 6 | 7 | #include "wx/wxprec.h" 8 | #include 9 | #include 10 | #include 11 | #include 12 | using namespace std; 13 | wxString LINEA[800]; 14 | string LINEB[800]; 15 | int lectura=0; 16 | int pagina=0; 17 | char entornoFinal[1024]; 18 | 19 | #ifdef __BORLANDC__ 20 | #pragma hdrstop 21 | #endif 22 | 23 | 24 | 25 | // ---------------------------------------------------------------------------- 26 | // resources 27 | // ---------------------------------------------------------------------------- 28 | 29 | // the application icon (under Windows and OS/2 it is in resources and even 30 | // though we could still include the XPM here it would be unused) 31 | #if !defined(__WXMSW__) && !defined(__WXPM__) 32 | #include "sample.xpm" 33 | #endif 34 | 35 | // ---------------------------------------------------------------------------- 36 | // private classes 37 | // ---------------------------------------------------------------------------- 38 | 39 | // Define a new application type, each program should derive a class from wxApp 40 | class MyApp : public wxApp 41 | { 42 | public: 43 | // override base class virtuals 44 | // ---------------------------- 45 | 46 | // this one is called on application startup and is a good place for the app 47 | // initialization (doing it here and not in the ctor allows to have an error 48 | // return: if OnInit() returns false, the application terminates) 49 | virtual bool OnInit(); 50 | //virtual int OnRun(); //Hacer comprobaciones 51 | 52 | 53 | 54 | 55 | }; 56 | class MyFrame : public wxFrame 57 | { 58 | public: 59 | // ctor(s) 60 | MyFrame(const wxString& title); 61 | wxRadioButton* primero; 62 | wxRadioButton* segundo; 63 | wxRadioButton* tercero; 64 | wxRadioButton* cuarto; 65 | wxRadioButton* cinco; 66 | wxRadioButton* seis; 67 | wxRadioButton* siete; 68 | wxRadioButton* ocho; 69 | wxRadioButton* nueve; 70 | wxRadioButton* diez; 71 | wxRadioButton* once; 72 | wxRadioButton* doce; 73 | wxRadioButton* trece; 74 | wxRadioButton* catorce; 75 | wxRadioButton* quince; 76 | wxStaticText* primeroApellido; 77 | wxStaticText* primeroEmail; 78 | wxStaticText* primeroRed; 79 | wxStaticText* segundoApellido; 80 | wxStaticText* segundoEmail; 81 | wxStaticText* segundoRed; 82 | wxStaticText* terceroApellido; 83 | wxStaticText* terceroEmail; 84 | wxStaticText* terceroRed; 85 | wxStaticText* cuartoApellido; 86 | wxStaticText* cuartoEmail; 87 | wxStaticText* cuartoRed; 88 | wxStaticText* cincoApellido; 89 | wxStaticText* cincoEmail; 90 | wxStaticText* cincoRed; 91 | wxStaticText* seisApellido; 92 | wxStaticText* seisEmail; 93 | wxStaticText* seisRed; 94 | wxStaticText* sieteApellido; 95 | wxStaticText* sieteEmail; 96 | wxStaticText* sieteRed; 97 | wxStaticText* ochoApellido; 98 | wxStaticText* ochoEmail; 99 | wxStaticText* ochoRed; 100 | wxStaticText* nueveApellido; 101 | wxStaticText* nueveEmail; 102 | wxStaticText* nueveRed; 103 | wxStaticText* diezApellido; 104 | wxStaticText* diezEmail; 105 | wxStaticText* diezRed; 106 | wxStaticText* onceApellido; 107 | wxStaticText* onceEmail; 108 | wxStaticText* onceRed; 109 | wxStaticText* doceApellido; 110 | wxStaticText* doceEmail; 111 | wxStaticText* doceRed; 112 | wxStaticText* treceApellido; 113 | wxStaticText* treceEmail; 114 | wxStaticText* treceRed; 115 | wxStaticText* catorceApellido; 116 | wxStaticText* catorceEmail; 117 | wxStaticText* catorceRed; 118 | wxStaticText* quinceApellido; 119 | wxStaticText* quinceEmail; 120 | wxStaticText* quinceRed; 121 | // event handlers (these functions should _not_ be virtual) 122 | void OnQuit(wxCommandEvent& event); 123 | void OnAbout(wxCommandEvent& event); 124 | void OnAgregar(wxCommandEvent& event); 125 | void OnEliminar(wxCommandEvent& event); 126 | void OnLeer(wxCommandEvent& event); 127 | void OnSiguiente(wxCommandEvent& event); 128 | void OnAnterior(wxCommandEvent& event); 129 | void OnDetalles(wxCommandEvent& event); 130 | void OnTimer(wxTimerEvent& event); 131 | 132 | private: 133 | // any class wishing to process wxWidgets events must use this macro 134 | DECLARE_EVENT_TABLE() 135 | private: 136 | //Añadir botones 137 | 138 | }; 139 | enum 140 | { 141 | // menu items 142 | Minimal_Quit = wxID_EXIT, 143 | ID_CALC = 1001, 144 | ID_NET = 1002, 145 | ID_CORREOS = 1003, 146 | ID_WRITE = 1004, 147 | ID_TASKKILLER = 1005, 148 | ID_OPCIONES = 1006, 149 | ID_ADR = 1007, 150 | ID_INSTALADOS = 1008, 151 | ID_ARCHIVOS = 1009, 152 | ID_CERRAR = 1010, 153 | ID_APAGAR = 1011, 154 | ID_USER = 1012, 155 | ID_WINUNIX = 1013, 156 | ID_APPS = 1014, 157 | ID_PLAY = 1015, 158 | ID_EXECUTE = 1016, 159 | ID_COMPRIMIR = 1017, 160 | ID_AGREGAR = 1018, 161 | ID_ELIMINAR = 1019, 162 | ID_SIGUIENTE = 1020, 163 | ID_ANTERIOR = 1021, 164 | ID_IMPORTAR = 1022, 165 | ID_EXPORTAR = 1023, 166 | ID_PRIMERO = 1024, 167 | ID_SEGUNDO = 1025, 168 | ID_TERCERO = 1026, 169 | ID_CUARTO = 1027, 170 | ID_QUINTO = 1028, 171 | ID_SEXTO = 1029, 172 | ID_SEPTIMO = 1030, 173 | ID_OCTAVO = 1031, 174 | ID_NOVENO = 1032, 175 | ID_DECIMO = 1033, 176 | TIMER_ID = 1034, 177 | ID_UNDECIMO = 1035, 178 | ID_DUODECIMO = 1036, 179 | ID_DECIMOTERCERO = 1037, 180 | ID_DECIMOCUARTO = 1038, 181 | ID_DECIMOQUINTO = 1039, 182 | 183 | // it is important for the id corresponding to the "About" command to have 184 | // this standard value as otherwise it won't be handled properly under Mac 185 | // (where it is special and put into the "Apple" menu) 186 | Minimal_About = wxID_ABOUT 187 | }; 188 | BEGIN_EVENT_TABLE(MyFrame, wxFrame) 189 | EVT_MENU(Minimal_Quit, MyFrame::OnQuit) 190 | EVT_MENU(Minimal_About, MyFrame::OnAbout) 191 | EVT_MENU(ID_AGREGAR, MyFrame::OnAgregar) 192 | EVT_TIMER(TIMER_ID, MyFrame::OnTimer) 193 | EVT_MENU(ID_SIGUIENTE, MyFrame::OnSiguiente) 194 | EVT_MENU(ID_ANTERIOR, MyFrame::OnAnterior) 195 | //EVT_MENU(ID_AGREGAR, MyFrame::OnAbout) //Agregar eventos de menu 196 | END_EVENT_TABLE() 197 | 198 | // Create a new application object: this macro will allow wxWidgets to create 199 | // the application object during program execution (it's better than using a 200 | // static object for many reasons) and also implements the accessor function 201 | // wxGetApp() which will return the reference of the right type (i.e. MyApp and 202 | // not wxApp) 203 | IMPLEMENT_APP(MyApp) 204 | bool MyApp::OnInit() 205 | { 206 | // call the base class initialization method, currently it only parses a 207 | // few common command-line options but it could be do more in the future 208 | if ( !wxApp::OnInit() ) 209 | return false; 210 | SetAppName(wxT("DivAgenda")); 211 | SetVendorName(wxT("Adrian Arroyo Calle")); 212 | 213 | // create the main application window 214 | MyFrame *frame = new MyFrame(wxT("DivAgenda")); 215 | 216 | // and show it (the frames, unlike simple controls, are not shown when 217 | // created initially) 218 | frame->Show(true); 219 | 220 | char* linea[2048]; 221 | char* caracter; 222 | char CARACTER; 223 | string MEDIA; 224 | int estado=0; 225 | int limpiar=0; 226 | int p=0; 227 | int r=0; 228 | char *entorno=getenv("HOME"); 229 | char buffer[500]; 230 | strcpy (buffer,entorno); 231 | strcpy(entornoFinal, buffer); 232 | char lugar[]="/.divel/Datos/Correos.dat"; 233 | strcat(entornoFinal,lugar); 234 | string datosGenerales[4]; 235 | //entornoLectura=entornoString+"/.divel/Datos/Correos.dat"; 236 | ifstream registro(entornoFinal,ifstream::in); 237 | if(!registro){wxMessageBox(wxT("Error al abrir el archivo de registro: WARNING 201\nSe procedera a la creacion de otro"),wxT("WARNING 201"),wxICON_WARNING|wxOK); 238 | system("mkdir -p $HOME/.divel/Datos/"); 239 | ofstream registroNuevo; registroNuevo.open(entornoFinal,ofstream::out); 240 | if(!registroNuevo){wxMessageBox(wxT("Ha ocurrido un error al crear el archivo Correos.dat, intentelo manualmente"));} 241 | registroNuevo.close();}else{ 242 | //registro.seekg (0, ios::beg); 243 | while(limpiar<512){ 244 | LINEB[limpiar].clear();limpiar++; 245 | } 246 | while(!registro.eof()) 247 | { 248 | CARACTER=registro.get(); 249 | if(CARACTER==' ') 250 | {LINEB[estado]=MEDIA;estado++;MEDIA.clear();}else 251 | if(CARACTER=='\n'){LINEB[estado]=MEDIA;estado++;MEDIA.clear();} 252 | else {MEDIA=MEDIA+CARACTER;} 253 | // caracter=fgetc(registro); 254 | // if(caracter=' '){estado++;}else 255 | // if(caracter='\n'){estado=0;}else 256 | // {strcat(linea,caracter); datosGenerales[estado]="%s",linea;} 257 | } 258 | } 259 | 260 | registro.close(); 261 | for(int i=0; LINEB!=NULL && i < 800; i++) 262 | { 263 | LINEA[i]=wxString::FromUTF8(LINEB[i].c_str()); 264 | } 265 | // success: wxApp::OnRun() will be called which will enter the main message 266 | // loop and the application will run. If we returned false here, the 267 | // application would exit immediately. 268 | return true; 269 | } 270 | MyFrame::MyFrame(const wxString& title) 271 | : wxFrame(NULL, wxID_ANY, title) 272 | { 273 | // set the frame icon 274 | SetIcon(wxICON(sample)); 275 | SetSize(600,600); 276 | #if wxUSE_MENUS 277 | // create a menu bar 278 | wxMenu *fileMenu = new wxMenu; 279 | wxMenu* ver=new wxMenu; 280 | 281 | // the "About" item should be in the help menu 282 | wxMenu *helpMenu = new wxMenu; 283 | helpMenu->Append(Minimal_About, wxT("A&cerca\tF1"), wxT("Información sobre este programa")); 284 | 285 | fileMenu->Append(ID_AGREGAR, wxT("A&gregar"),wxT("Agregar un nuevo registro")); 286 | //fileMenu->Append(ID_ELIMINAR, "&Eliminar","Eliminar un registro"); 287 | ver->Append(ID_ANTERIOR, wxT("An&terior"),wxT("Ir una pagina atras")); 288 | ver->Append(ID_SIGUIENTE, wxT("&Siguiente"),wxT("Ir una pagina adelante")); 289 | fileMenu->Append(Minimal_Quit, wxT("&Salir\tAlt-X"), wxT("Cierra DivAgenda")); 290 | 291 | // now append the freshly created menu to the menu bar... 292 | wxMenuBar *menuBar = new wxMenuBar(); 293 | menuBar->Append(fileMenu, wxT("&Archivo")); 294 | menuBar->Append(ver, wxT("&Ver")); 295 | menuBar->Append(helpMenu, wxT("A&yuda")); 296 | 297 | 298 | // ... and attach this menu bar to the frame 299 | SetMenuBar(menuBar); 300 | wxPanel* panel=new wxPanel(this); 301 | wxStaticText* nombre=new wxStaticText(panel, ID_CALC, wxT("Nombre"), wxPoint(20,20)); //Sumar 100 302 | wxStaticText* apellido=new wxStaticText(panel, ID_NET, wxT("Apellidos"), wxPoint(120,20)); 303 | wxStaticText* email=new wxStaticText(panel, ID_NET, wxT("E-mail"), wxPoint(220,20)); //poner un evento a mailto:// 304 | wxStaticText* red=new wxStaticText(panel, ID_NET, wxT("Red Social"), wxPoint(370,20)); 305 | 306 | wxTimer* timer; 307 | timer=new wxTimer(this, TIMER_ID); 308 | timer->Start(500, true); 309 | 310 | wxButton* agregar=new wxButton(panel, ID_AGREGAR, wxT("Agregar"), wxPoint(470,20)); 311 | //wxButton* eliminar=new wxButton(panel, ID_ELIMINAR, wxT("Eliminar"), wxPoint(470,120)); 312 | wxButton* anterior=new wxButton(panel, ID_ANTERIOR, wxT("Anterior"), wxPoint(470, 320)); 313 | wxButton* siguiente=new wxButton(panel, ID_SIGUIENTE, wxT("Siguiente"), wxPoint(470, 420)); 314 | //Boton de Detalles y enviar correo 315 | primero=new wxRadioButton(panel, ID_PRIMERO, wxT("(VACIO)"), wxPoint(20,50),wxSize(-1,-1),wxRB_GROUP); 316 | segundo=new wxRadioButton(panel, ID_SEGUNDO, wxT("(VACIO)"), wxPoint(20,80)); 317 | tercero=new wxRadioButton(panel, ID_TERCERO, wxT("(VACIO)"), wxPoint(20,110)); 318 | cuarto=new wxRadioButton(panel, ID_CUARTO, wxT("(VACIO)"), wxPoint(20,140)); 319 | cinco=new wxRadioButton(panel, ID_QUINTO, wxT("(VACIO)"), wxPoint(20,170)); 320 | seis=new wxRadioButton(panel, ID_SEXTO, wxT("(VACIO)"), wxPoint(20,200)); 321 | siete=new wxRadioButton(panel, ID_SEPTIMO, wxT("(VACIO)"), wxPoint(20,230)); 322 | ocho=new wxRadioButton(panel, ID_OCTAVO, wxT("(VACIO)"), wxPoint(20,260)); 323 | nueve=new wxRadioButton(panel, ID_NOVENO, wxT("(VACIO)"), wxPoint(20,290)); 324 | diez=new wxRadioButton(panel, ID_DECIMO, wxT("(VACIO)"), wxPoint(20,320)); 325 | once=new wxRadioButton(panel, ID_UNDECIMO, wxT("(VACIO)"), wxPoint(20,350)); 326 | doce=new wxRadioButton(panel, ID_DUODECIMO, wxT("(VACIO)"), wxPoint(20,380)); 327 | trece=new wxRadioButton(panel, ID_DECIMOTERCERO, wxT("(VACIO)"), wxPoint(20,410)); 328 | catorce=new wxRadioButton(panel, ID_DECIMOCUARTO, wxT("(VACIO)"), wxPoint(20,440)); 329 | quince=new wxRadioButton(panel, ID_DECIMOQUINTO, wxT("(VACIO)"), wxPoint(20,470)); 330 | 331 | 332 | //StaticText 333 | primeroApellido=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(120,50)); 334 | primeroEmail=new wxStaticText(panel, ID_EXECUTE, wxT("(VACIO)"), wxPoint(220,50)); 335 | primeroRed=new wxStaticText(panel, ID_COMPRIMIR, wxT("(VACIO)"), wxPoint(370, 50)); 336 | segundoApellido=new wxStaticText(panel, ID_PLAY, wxT("(VACIO)"), wxPoint(120,80)); 337 | segundoEmail=new wxStaticText(panel, ID_APPS, wxT("(VACIO)"), wxPoint(220,80)); 338 | segundoRed=new wxStaticText(panel, ID_WINUNIX, wxT("(VACIO)"), wxPoint(370, 80)); 339 | terceroApellido=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(120,110)); //120, 220 y 370. Sumar 30 340 | terceroEmail=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(220,110)); 341 | terceroRed=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(370,110)); 342 | cuartoApellido=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(120,140)); 343 | cuartoEmail=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(220,140)); 344 | cuartoRed=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(370,140)); 345 | cincoApellido=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(120,170)); 346 | cincoEmail=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(220,170)); 347 | cincoRed=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(370,170)); 348 | seisApellido=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(120,200)); 349 | seisEmail=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(220,200)); 350 | seisRed=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(370,200)); 351 | sieteApellido=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(120,230)); 352 | sieteEmail=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(220,230)); 353 | sieteRed=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(370,230)); 354 | ochoApellido=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(120,260)); 355 | ochoEmail=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(220,260)); 356 | ochoRed=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(370,260)); 357 | nueveApellido=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(120,290)); 358 | nueveEmail=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(220,290)); 359 | nueveRed=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(370,290)); 360 | diezApellido=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(120,320)); 361 | diezEmail=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(220,320)); 362 | diezRed=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(370,320)); 363 | onceApellido=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(120,350)); 364 | onceEmail=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(220,350)); 365 | onceRed=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(370,350)); 366 | doceApellido=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(120,380)); 367 | doceEmail=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(220,380)); 368 | doceRed=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(370,380)); 369 | treceApellido=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(120,410)); 370 | treceEmail=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(220,410)); 371 | treceRed=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(370,410)); 372 | catorceApellido=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(120,440)); 373 | catorceEmail=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(220,440)); 374 | catorceRed=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(370,440)); 375 | quinceApellido=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(120,470)); 376 | quinceEmail=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(220,470)); 377 | quinceRed=new wxStaticText(panel, ID_WRITE, wxT("(VACIO)"), wxPoint(370,470)); 378 | 379 | //Connect(TIMER_ID,wxEVT_TIMER, wxCommandEventHandler(MyFrame::OnTimer)); 380 | Connect(ID_AGREGAR, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MyFrame::OnAgregar)); 381 | Connect(ID_SIGUIENTE, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MyFrame::OnSiguiente)); 382 | Connect(ID_ANTERIOR, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MyFrame::OnAnterior)); 383 | 384 | 385 | #endif // wxUSE_MENUS 386 | 387 | #if wxUSE_STATUSBAR 388 | // create a status bar just for fun (by default with 1 pane only) 389 | CreateStatusBar(2); 390 | SetStatusText(wxT("DivAgenda 1.1")); 391 | #endif // wxUSE_STATUSBAR 392 | 393 | } 394 | void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) 395 | { 396 | // true is to force the frame to close 397 | Close(true); 398 | } 399 | 400 | void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) 401 | { 402 | wxMessageBox(wxString::Format 403 | ( 404 | wxT("DivAgenda\n") 405 | wxT("\n") 406 | wxT("Organiza tus contactos desde aqui\n") 407 | wxT("\n") 408 | wxT("Para mas productos visite:\n http://github.com/AdrianArroyoCalle/divwork") 409 | ), 410 | wxT("Acerca de DivAgenda"), 411 | wxOK | wxICON_INFORMATION, 412 | this); 413 | primero->SetLabel(LINEA[lectura]);lectura++; 414 | primeroApellido->SetLabel(LINEA[lectura]);lectura++; 415 | primeroEmail->SetLabel(LINEA[lectura]);lectura++; 416 | primeroRed->SetLabel(LINEA[lectura]);lectura++; 417 | segundo->SetLabel(LINEA[lectura]);lectura++; 418 | segundoApellido->SetLabel(LINEA[lectura]);lectura++; 419 | segundoEmail->SetLabel(LINEA[lectura]);lectura++; 420 | segundoRed->SetLabel(LINEA[lectura]);lectura++; 421 | tercero->SetLabel(LINEA[lectura]);lectura++; 422 | terceroApellido->SetLabel(LINEA[lectura]);lectura++; 423 | terceroEmail->SetLabel(LINEA[lectura]);lectura++; 424 | terceroRed->SetLabel(LINEA[lectura]);lectura++; 425 | cuarto->SetLabel(LINEA[lectura]);lectura++; 426 | cuartoApellido->SetLabel(LINEA[lectura]);lectura++; 427 | cuartoEmail->SetLabel(LINEA[lectura]);lectura++; 428 | cuartoRed->SetLabel(LINEA[lectura]);lectura++; 429 | cinco->SetLabel(LINEA[lectura]);lectura++; 430 | cincoApellido->SetLabel(LINEA[lectura]);lectura++; 431 | cincoEmail->SetLabel(LINEA[lectura]);lectura++; 432 | cincoRed->SetLabel(LINEA[lectura]);lectura++; 433 | seis->SetLabel(LINEA[lectura]);lectura++; 434 | seisApellido->SetLabel(LINEA[lectura]);lectura++; 435 | seisEmail->SetLabel(LINEA[lectura]);lectura++; 436 | seisRed->SetLabel(LINEA[lectura]);lectura++; 437 | siete->SetLabel(LINEA[lectura]);lectura++; 438 | sieteApellido->SetLabel(LINEA[lectura]);lectura++; 439 | sieteEmail->SetLabel(LINEA[lectura]);lectura++; 440 | sieteRed->SetLabel(LINEA[lectura]);lectura++; 441 | ocho->SetLabel(LINEA[lectura]);lectura++; 442 | ochoApellido->SetLabel(LINEA[lectura]);lectura++; 443 | ochoEmail->SetLabel(LINEA[lectura]);lectura++; 444 | ochoRed->SetLabel(LINEA[lectura]);lectura++; 445 | nueve->SetLabel(LINEA[lectura]);lectura++; 446 | nueveApellido->SetLabel(LINEA[lectura]);lectura++; 447 | nueveEmail->SetLabel(LINEA[lectura]);lectura++; 448 | nueveRed->SetLabel(LINEA[lectura]);lectura++; 449 | diez->SetLabel(LINEA[lectura]);lectura++; 450 | diezApellido->SetLabel(LINEA[lectura]);lectura++; 451 | diezEmail->SetLabel(LINEA[lectura]);lectura++; 452 | diezRed->SetLabel(LINEA[lectura]);lectura++; 453 | once->SetLabel(LINEA[lectura]);lectura++; 454 | onceApellido->SetLabel(LINEA[lectura]);lectura++; 455 | onceEmail->SetLabel(LINEA[lectura]);lectura++; 456 | onceRed->SetLabel(LINEA[lectura]);lectura++; 457 | doce->SetLabel(LINEA[lectura]);lectura++; 458 | doceApellido->SetLabel(LINEA[lectura]);lectura++; 459 | doceEmail->SetLabel(LINEA[lectura]);lectura++; 460 | doceRed->SetLabel(LINEA[lectura]);lectura++; 461 | trece->SetLabel(LINEA[lectura]);lectura++; 462 | treceApellido->SetLabel(LINEA[lectura]);lectura++; 463 | treceEmail->SetLabel(LINEA[lectura]);lectura++; 464 | treceRed->SetLabel(LINEA[lectura]);lectura++; 465 | catorce->SetLabel(LINEA[lectura]);lectura++; 466 | catorceApellido->SetLabel(LINEA[lectura]);lectura++; 467 | catorceEmail->SetLabel(LINEA[lectura]);lectura++; 468 | catorceRed->SetLabel(LINEA[lectura]);lectura++; 469 | quince->SetLabel(LINEA[lectura]);lectura++; 470 | quinceApellido->SetLabel(LINEA[lectura]);lectura++; 471 | quinceEmail->SetLabel(LINEA[lectura]);lectura++; 472 | quinceRed->SetLabel(LINEA[lectura]);lectura++; 473 | } 474 | 475 | void MyFrame::OnTimer(wxTimerEvent& event) 476 | { 477 | primero->SetLabel(LINEA[lectura]);lectura++; 478 | primeroApellido->SetLabel(LINEA[lectura]);lectura++; 479 | primeroEmail->SetLabel(LINEA[lectura]);lectura++; 480 | primeroRed->SetLabel(LINEA[lectura]);lectura++; 481 | segundo->SetLabel(LINEA[lectura]);lectura++; 482 | segundoApellido->SetLabel(LINEA[lectura]);lectura++; 483 | segundoEmail->SetLabel(LINEA[lectura]);lectura++; 484 | segundoRed->SetLabel(LINEA[lectura]);lectura++; 485 | tercero->SetLabel(LINEA[lectura]);lectura++; 486 | terceroApellido->SetLabel(LINEA[lectura]);lectura++; 487 | terceroEmail->SetLabel(LINEA[lectura]);lectura++; 488 | terceroRed->SetLabel(LINEA[lectura]);lectura++; 489 | cuarto->SetLabel(LINEA[lectura]);lectura++; 490 | cuartoApellido->SetLabel(LINEA[lectura]);lectura++; 491 | cuartoEmail->SetLabel(LINEA[lectura]);lectura++; 492 | cuartoRed->SetLabel(LINEA[lectura]);lectura++; 493 | cinco->SetLabel(LINEA[lectura]);lectura++; 494 | cincoApellido->SetLabel(LINEA[lectura]);lectura++; 495 | cincoEmail->SetLabel(LINEA[lectura]);lectura++; 496 | cincoRed->SetLabel(LINEA[lectura]);lectura++; 497 | seis->SetLabel(LINEA[lectura]);lectura++; 498 | seisApellido->SetLabel(LINEA[lectura]);lectura++; 499 | seisEmail->SetLabel(LINEA[lectura]);lectura++; 500 | seisRed->SetLabel(LINEA[lectura]);lectura++; 501 | siete->SetLabel(LINEA[lectura]);lectura++; 502 | sieteApellido->SetLabel(LINEA[lectura]);lectura++; 503 | sieteEmail->SetLabel(LINEA[lectura]);lectura++; 504 | sieteRed->SetLabel(LINEA[lectura]);lectura++; 505 | ocho->SetLabel(LINEA[lectura]);lectura++; 506 | ochoApellido->SetLabel(LINEA[lectura]);lectura++; 507 | ochoEmail->SetLabel(LINEA[lectura]);lectura++; 508 | ochoRed->SetLabel(LINEA[lectura]);lectura++; 509 | nueve->SetLabel(LINEA[lectura]);lectura++; 510 | nueveApellido->SetLabel(LINEA[lectura]);lectura++; 511 | nueveEmail->SetLabel(LINEA[lectura]);lectura++; 512 | nueveRed->SetLabel(LINEA[lectura]);lectura++; 513 | diez->SetLabel(LINEA[lectura]);lectura++; 514 | diezApellido->SetLabel(LINEA[lectura]);lectura++; 515 | diezEmail->SetLabel(LINEA[lectura]);lectura++; 516 | diezRed->SetLabel(LINEA[lectura]);lectura++; 517 | once->SetLabel(LINEA[lectura]);lectura++; 518 | onceApellido->SetLabel(LINEA[lectura]);lectura++; 519 | onceEmail->SetLabel(LINEA[lectura]);lectura++; 520 | onceRed->SetLabel(LINEA[lectura]);lectura++; 521 | doce->SetLabel(LINEA[lectura]);lectura++; 522 | doceApellido->SetLabel(LINEA[lectura]);lectura++; 523 | doceEmail->SetLabel(LINEA[lectura]);lectura++; 524 | doceRed->SetLabel(LINEA[lectura]);lectura++; 525 | trece->SetLabel(LINEA[lectura]);lectura++; 526 | treceApellido->SetLabel(LINEA[lectura]);lectura++; 527 | treceEmail->SetLabel(LINEA[lectura]);lectura++; 528 | treceRed->SetLabel(LINEA[lectura]);lectura++; 529 | catorce->SetLabel(LINEA[lectura]);lectura++; 530 | catorceApellido->SetLabel(LINEA[lectura]);lectura++; 531 | catorceEmail->SetLabel(LINEA[lectura]);lectura++; 532 | catorceRed->SetLabel(LINEA[lectura]);lectura++; 533 | quince->SetLabel(LINEA[lectura]);lectura++; 534 | quinceApellido->SetLabel(LINEA[lectura]);lectura++; 535 | quinceEmail->SetLabel(LINEA[lectura]);lectura++; 536 | quinceRed->SetLabel(LINEA[lectura]);lectura++; 537 | pagina=1; 538 | } 539 | void MyFrame::OnAgregar(wxCommandEvent& event) 540 | { 541 | int agregarSatisfactorio=0; 542 | wxString nombreNuevo=wxT(""); 543 | wxString apellidoNuevo=wxT(""); 544 | wxString emailNuevo=wxT(""); 545 | wxString redNuevo=wxT(""); 546 | nombreNuevo=wxGetTextFromUser(wxT("Introduce el nombre del nuevo contacto"),wxT("Agregar contactos"),wxT("")); 547 | if(nombreNuevo!=wxT("")){ 548 | apellidoNuevo=wxGetTextFromUser(wxT("Introduce el apellido del nuevo contacto"),wxT("Agregar contactos"),wxT("")); 549 | if(apellidoNuevo!=wxT("")){ 550 | emailNuevo=wxGetTextFromUser(wxT("Introduce el e-mail del contacto"),wxT("Agregar contactos"),wxT("")); 551 | if(emailNuevo!=wxT("")){ 552 | redNuevo=wxGetTextFromUser(wxT("Introduce la red social ([F]Facebook, [T]Tuenti, [t]Twitter\n, [G+]Google+, [LI]LinkedIn,[...]Otras) y su nombre en la red.\nPor favor no uses espacios, usa '_' "),wxT("Agregar contactos"),wxT("")); 553 | if(redNuevo==wxT("")){wxMessageBox(wxT("Operacion cancelada"),wxT("Agregar contactos"),wxICON_WARNING|wxOK);}else{agregarSatisfactorio=1;} 554 | }else{wxMessageBox(wxT("Operacion cancelada"),wxT("Agregar contactos"),wxICON_WARNING|wxOK);} 555 | }else{wxMessageBox(wxT("Operacion cancelada"),wxT("Agregar contactos"),wxICON_WARNING|wxOK);} 556 | 557 | 558 | } 559 | else{wxMessageBox(wxT("Operacion cancelada"),wxT("Agregar contactos"),wxICON_WARNING|wxOK);} 560 | 561 | if(agregarSatisfactorio==1) 562 | { 563 | string nombreEscribir = string(nombreNuevo.mb_str()); 564 | string apellidoEscribir = string(apellidoNuevo.mb_str()); 565 | string emailEscribir = string(emailNuevo.mb_str()); 566 | string redEscribir = string(redNuevo.mb_str()); 567 | ofstream Escribir(entornoFinal,ios::app); 568 | Escribir << nombreEscribir << " " << apellidoEscribir << " " << emailEscribir << " " << redEscribir << "\n"; 569 | Escribir.close(); 570 | 571 | } 572 | 573 | 574 | 575 | } 576 | 577 | void MyFrame::OnSiguiente(wxCommandEvent& event) 578 | { 579 | if(pagina==12){wxMessageBox(wxT("Esta version de DivAgenda no acepta mas paginas, lo sentimos e intenta actualizar a la siguiente version"), wxT("Fin de programa"), wxICON_WARNING|wxOK);}else{ 580 | pagina++; 581 | switch(pagina){ 582 | case 1: lectura=60;break; 583 | case 2: lectura=120;break; 584 | case 3: lectura=180;break; 585 | case 4:lectura=240;break; 586 | case 5:lectura=300;break; 587 | case 6:lectura=360;break; 588 | case 7:lectura=420;break; 589 | case 8:lectura=480;break; 590 | case 9:lectura=540;break; 591 | case 10:lectura=600;break; 592 | case 11:lectura=660;break; 593 | case 12:lectura=730;break; 594 | } 595 | primero->SetLabel(LINEA[lectura]);lectura++; 596 | primeroApellido->SetLabel(LINEA[lectura]);lectura++; 597 | primeroEmail->SetLabel(LINEA[lectura]);lectura++; 598 | primeroRed->SetLabel(LINEA[lectura]);lectura++; 599 | segundo->SetLabel(LINEA[lectura]);lectura++; 600 | segundoApellido->SetLabel(LINEA[lectura]);lectura++; 601 | segundoEmail->SetLabel(LINEA[lectura]);lectura++; 602 | segundoRed->SetLabel(LINEA[lectura]);lectura++; 603 | tercero->SetLabel(LINEA[lectura]);lectura++; 604 | terceroApellido->SetLabel(LINEA[lectura]);lectura++; 605 | terceroEmail->SetLabel(LINEA[lectura]);lectura++; 606 | terceroRed->SetLabel(LINEA[lectura]);lectura++; 607 | cuarto->SetLabel(LINEA[lectura]);lectura++; 608 | cuartoApellido->SetLabel(LINEA[lectura]);lectura++; 609 | cuartoEmail->SetLabel(LINEA[lectura]);lectura++; 610 | cuartoRed->SetLabel(LINEA[lectura]);lectura++; 611 | cinco->SetLabel(LINEA[lectura]);lectura++; 612 | cincoApellido->SetLabel(LINEA[lectura]);lectura++; 613 | cincoEmail->SetLabel(LINEA[lectura]);lectura++; 614 | cincoRed->SetLabel(LINEA[lectura]);lectura++; 615 | seis->SetLabel(LINEA[lectura]);lectura++; 616 | seisApellido->SetLabel(LINEA[lectura]);lectura++; 617 | seisEmail->SetLabel(LINEA[lectura]);lectura++; 618 | seisRed->SetLabel(LINEA[lectura]);lectura++; 619 | siete->SetLabel(LINEA[lectura]);lectura++; 620 | sieteApellido->SetLabel(LINEA[lectura]);lectura++; 621 | sieteEmail->SetLabel(LINEA[lectura]);lectura++; 622 | sieteRed->SetLabel(LINEA[lectura]);lectura++; 623 | ocho->SetLabel(LINEA[lectura]);lectura++; 624 | ochoApellido->SetLabel(LINEA[lectura]);lectura++; 625 | ochoEmail->SetLabel(LINEA[lectura]);lectura++; 626 | ochoRed->SetLabel(LINEA[lectura]);lectura++; 627 | nueve->SetLabel(LINEA[lectura]);lectura++; 628 | nueveApellido->SetLabel(LINEA[lectura]);lectura++; 629 | nueveEmail->SetLabel(LINEA[lectura]);lectura++; 630 | nueveRed->SetLabel(LINEA[lectura]);lectura++; 631 | diez->SetLabel(LINEA[lectura]);lectura++; 632 | diezApellido->SetLabel(LINEA[lectura]);lectura++; 633 | diezEmail->SetLabel(LINEA[lectura]);lectura++; 634 | diezRed->SetLabel(LINEA[lectura]);lectura++; 635 | once->SetLabel(LINEA[lectura]);lectura++; 636 | onceApellido->SetLabel(LINEA[lectura]);lectura++; 637 | onceEmail->SetLabel(LINEA[lectura]);lectura++; 638 | onceRed->SetLabel(LINEA[lectura]);lectura++; 639 | doce->SetLabel(LINEA[lectura]);lectura++; 640 | doceApellido->SetLabel(LINEA[lectura]);lectura++; 641 | doceEmail->SetLabel(LINEA[lectura]);lectura++; 642 | doceRed->SetLabel(LINEA[lectura]);lectura++; 643 | trece->SetLabel(LINEA[lectura]);lectura++; 644 | treceApellido->SetLabel(LINEA[lectura]);lectura++; 645 | treceEmail->SetLabel(LINEA[lectura]);lectura++; 646 | treceRed->SetLabel(LINEA[lectura]);lectura++; 647 | catorce->SetLabel(LINEA[lectura]);lectura++; 648 | catorceApellido->SetLabel(LINEA[lectura]);lectura++; 649 | catorceEmail->SetLabel(LINEA[lectura]);lectura++; 650 | catorceRed->SetLabel(LINEA[lectura]);lectura++; 651 | quince->SetLabel(LINEA[lectura]);lectura++; 652 | quinceApellido->SetLabel(LINEA[lectura]);lectura++; 653 | quinceEmail->SetLabel(LINEA[lectura]);lectura++; 654 | quinceRed->SetLabel(LINEA[lectura]);lectura++;} 655 | } 656 | 657 | void MyFrame::OnAnterior(wxCommandEvent& event) 658 | { 659 | if(pagina==1){wxMessageBox(wxT("Esta version de DivAgenda no acepta mas paginas, lo sentimos e intenta actualizar a la siguiente version"), wxT("Inicio de programa"), wxICON_WARNING|wxOK);}else{ 660 | pagina--; 661 | switch(pagina){ 662 | case 1: lectura=0;break; 663 | case 2: lectura=60;break; 664 | case 3: lectura=120;break; 665 | case 4:lectura=180;break; 666 | case 5:lectura=240;break; 667 | case 6:lectura=300;break; 668 | case 7:lectura=360;break; 669 | case 8:lectura=420;break; 670 | case 9:lectura=480;break; 671 | case 10:lectura=540;break; 672 | case 11:lectura=600;break; 673 | case 12:lectura=660;break; 674 | } 675 | primero->SetLabel(LINEA[lectura]);lectura++; 676 | primeroApellido->SetLabel(LINEA[lectura]);lectura++; 677 | primeroEmail->SetLabel(LINEA[lectura]);lectura++; 678 | primeroRed->SetLabel(LINEA[lectura]);lectura++; 679 | segundo->SetLabel(LINEA[lectura]);lectura++; 680 | segundoApellido->SetLabel(LINEA[lectura]);lectura++; 681 | segundoEmail->SetLabel(LINEA[lectura]);lectura++; 682 | segundoRed->SetLabel(LINEA[lectura]);lectura++; 683 | tercero->SetLabel(LINEA[lectura]);lectura++; 684 | terceroApellido->SetLabel(LINEA[lectura]);lectura++; 685 | terceroEmail->SetLabel(LINEA[lectura]);lectura++; 686 | terceroRed->SetLabel(LINEA[lectura]);lectura++; 687 | cuarto->SetLabel(LINEA[lectura]);lectura++; 688 | cuartoApellido->SetLabel(LINEA[lectura]);lectura++; 689 | cuartoEmail->SetLabel(LINEA[lectura]);lectura++; 690 | cuartoRed->SetLabel(LINEA[lectura]);lectura++; 691 | cinco->SetLabel(LINEA[lectura]);lectura++; 692 | cincoApellido->SetLabel(LINEA[lectura]);lectura++; 693 | cincoEmail->SetLabel(LINEA[lectura]);lectura++; 694 | cincoRed->SetLabel(LINEA[lectura]);lectura++; 695 | seis->SetLabel(LINEA[lectura]);lectura++; 696 | seisApellido->SetLabel(LINEA[lectura]);lectura++; 697 | seisEmail->SetLabel(LINEA[lectura]);lectura++; 698 | seisRed->SetLabel(LINEA[lectura]);lectura++; 699 | siete->SetLabel(LINEA[lectura]);lectura++; 700 | sieteApellido->SetLabel(LINEA[lectura]);lectura++; 701 | sieteEmail->SetLabel(LINEA[lectura]);lectura++; 702 | sieteRed->SetLabel(LINEA[lectura]);lectura++; 703 | ocho->SetLabel(LINEA[lectura]);lectura++; 704 | ochoApellido->SetLabel(LINEA[lectura]);lectura++; 705 | ochoEmail->SetLabel(LINEA[lectura]);lectura++; 706 | ochoRed->SetLabel(LINEA[lectura]);lectura++; 707 | nueve->SetLabel(LINEA[lectura]);lectura++; 708 | nueveApellido->SetLabel(LINEA[lectura]);lectura++; 709 | nueveEmail->SetLabel(LINEA[lectura]);lectura++; 710 | nueveRed->SetLabel(LINEA[lectura]);lectura++; 711 | diez->SetLabel(LINEA[lectura]);lectura++; 712 | diezApellido->SetLabel(LINEA[lectura]);lectura++; 713 | diezEmail->SetLabel(LINEA[lectura]);lectura++; 714 | diezRed->SetLabel(LINEA[lectura]);lectura++; 715 | once->SetLabel(LINEA[lectura]);lectura++; 716 | onceApellido->SetLabel(LINEA[lectura]);lectura++; 717 | onceEmail->SetLabel(LINEA[lectura]);lectura++; 718 | onceRed->SetLabel(LINEA[lectura]);lectura++; 719 | doce->SetLabel(LINEA[lectura]);lectura++; 720 | doceApellido->SetLabel(LINEA[lectura]);lectura++; 721 | doceEmail->SetLabel(LINEA[lectura]);lectura++; 722 | doceRed->SetLabel(LINEA[lectura]);lectura++; 723 | trece->SetLabel(LINEA[lectura]);lectura++; 724 | treceApellido->SetLabel(LINEA[lectura]);lectura++; 725 | treceEmail->SetLabel(LINEA[lectura]);lectura++; 726 | treceRed->SetLabel(LINEA[lectura]);lectura++; 727 | catorce->SetLabel(LINEA[lectura]);lectura++; 728 | catorceApellido->SetLabel(LINEA[lectura]);lectura++; 729 | catorceEmail->SetLabel(LINEA[lectura]);lectura++; 730 | catorceRed->SetLabel(LINEA[lectura]);lectura++; 731 | quince->SetLabel(LINEA[lectura]);lectura++; 732 | quinceApellido->SetLabel(LINEA[lectura]);lectura++; 733 | quinceEmail->SetLabel(LINEA[lectura]);lectura++; 734 | quinceRed->SetLabel(LINEA[lectura]);lectura++;} 735 | } 736 | //int MyApp::OnRun() 737 | //{ 738 | // 739 | //} 740 | 741 | --------------------------------------------------------------------------------