There are several ways to create a recent file list. I did not found an official way, so i made my own:
1) I will save recent files in a separate file RecentFiles_Filename inside user app data. During software i will use the files inside a string array named as RecentFiles_List. I will work with 5 recent files.
Public Const RecentFiles_MaxConst = 5
Private RecentFiles_List(RecentFiles_MaxConst) As String
Private RecentFiles_Filename As String = Application.UserAppDataPath & "\Recent_Files_List.txt"
2) During startup inside Private Sub Form_Open_Shown
'Read recent files from file. save it to array
Try
Me.RecentFiles_List = IO.File.ReadAllLines(Me.RecentFiles_Filename)
Catch ex As Exception
If Form1.DebugMode Then
MessageBox.Show(ex.Message, "Read Recent File List:", MessageBoxButtons.OK, MessageBoxIcon.Asterisk)
End If
End Try
'It does not matter how much inside file, we cut the list at 5 entrys!
If Me.RecentFiles_List.Length > Form_Open.RecentFiles_MaxConst Then
Array.Resize(Me.RecentFiles_List, Form_Open.RecentFiles_MaxConst)
End If
'Recent Files. Show Array
Me.Show_RecentFiles()
3) During closing Form_Open_FormClosing
'Close: Save Recent File Array to list
Try
IO.File.WriteAllLines(Me.RecentFiles_Filename, Me.RecentFiles_List)
Catch ex As Exception
MessageBox.Show(ex.Message, "Write Recent File List:", MessageBoxButtons.OK)
End Try
4) During opening a file i need this:
Me.Update_RecentFiles(myFile)
5) And this are the main subs:
Private Sub Show_RecentFiles()
'....................................................
'Show Recent Files. from array into listbox
'....................................................
Me.ListBox1.Items.Clear()
For i As Integer = 0 To RecentFiles_MaxConst - 1
If String.IsNullOrEmpty(Me.RecentFiles_List(i)) = False Then
Me.ListBox1.Items.Add(Me.RecentFiles_List(i))
End If
Next
End Sub
Private Sub Update_RecentFiles(ByVal myFile As String)
'....................................................
'Update Recent File List. Parameter1: Dateiname akt Datei
'....................................................
'Check ob File bereits in Recent List. Falls JA: Exit!
For i As Integer = 0 To RecentFiles_MaxConst - 1
If myFile = RecentFiles_List(i) Then
Exit Sub
End If
Next
'Recent List um 1 verschieben. Neue Datei einfügen
RecentFiles_List(4) = RecentFiles_List(3)
RecentFiles_List(3) = RecentFiles_List(2)
RecentFiles_List(2) = RecentFiles_List(1)
RecentFiles_List(1) = RecentFiles_List(0)
RecentFiles_List(0) = myFile
End Sub
We use this inside our stock and management software:
http://www.terminal-systems.de/wws-lite-win.htm
Dienstag, 28. Mai 2013
Dienstag, 4. Oktober 2011
TRM920 changes up to OTP57V
Sometime it is time to say goodbye... This point reached for the more then 10 years old linux / DOS panel PC TRM920 just right now.
Because of the awful desaster and earthquake in japan, the manufacturer stopped the production of the CFL backlighted LCD version 5.7" with QVGA display in 320x240 resolution.
Of course there are many other display types in the world - but the disappearing of a main part as the display - it is a good idea to create a new system. We started with this in the beginning of last year - and are finished yet! The new part - and let us say: Hello and welcome is the panel PC system OTP57V!
A brandnew display with highest brightness, VGA resolution 640x480 pixel (still in 5.7") together with a touch screen for modern and innovative user interfaces. All together with a powerful x86 32bit embedded CPU (LOW power, fanless!) and with linux (2.6.) and Java 6 (J2SE with swing support) preinstalled. Perfectly fitting in 19" racks and with much more features (e.g. serial, CF, CAN, USB support) then the TRM920 never contained!
See a complete technical description at the website of AE SYTEME www.terminal-systems - directly here: OTP57V.
Because of the awful desaster and earthquake in japan, the manufacturer stopped the production of the CFL backlighted LCD version 5.7" with QVGA display in 320x240 resolution.
Of course there are many other display types in the world - but the disappearing of a main part as the display - it is a good idea to create a new system. We started with this in the beginning of last year - and are finished yet! The new part - and let us say: Hello and welcome is the panel PC system OTP57V!
A brandnew display with highest brightness, VGA resolution 640x480 pixel (still in 5.7") together with a touch screen for modern and innovative user interfaces. All together with a powerful x86 32bit embedded CPU (LOW power, fanless!) and with linux (2.6.) and Java 6 (J2SE with swing support) preinstalled. Perfectly fitting in 19" racks and with much more features (e.g. serial, CF, CAN, USB support) then the TRM920 never contained!
See a complete technical description at the website of AE SYTEME www.terminal-systems - directly here: OTP57V.
Donnerstag, 15. September 2011
Embedded linux meets java - touch panel PC OTP57V
Embedded linux meets Java. This combination offers a more powerful range for user customized applications. To bring this in the automation environment: AE SYSTEMS now offering the new operator touch panel PC OTP57V with:
- A complete x86 based 32bit PC comptabile hardware as industrial all in one PC
- Bright 5.7" display with TFT color and VGA resolution in 640x480
- Integrated touch screen as easy useable pointing device
- Several interfaces e.g. COM ports, USB, onboard CAN controller, ethernet LAN networking interface
Seee technical details directly at webpage: http://www.terminal-systems.de/english/hardware-otp57v-en.htm
Montag, 31. Januar 2011
Embedded Linux Terminal do it yourself kit
Get a small pictured information how to build a linux embedded PC terminal yourself. With the parts from TRM416 starter kit. See pictures at facebook:
http://www.facebook.com/album.php?aid=40547&l=83f7275489&id=180297438657400
or refer technical information of the system at our website.
http://www.terminal-systems.de/english/hardware-trm-en.htm
Donnerstag, 27. Januar 2011
Embedded Design: Free choice of the operating system
Linux, Java and Windows - three possible solutions for operating system in embedded business. Our free programmable keyboard based terminals supports linux. Some touch systems supports Java or Windows. And a small userless data logging system works with linux. These are only some possibilities to bring the best technology base for the favourite application to the user.
We tryed to make it clear - a small product design table will show the difference. See at the end of our hardware page:
www.terminal-systems.de/english/products-en.htm
Freitag, 29. Oktober 2010
Programming Industrial Terminals - Linux and more
Getting more information about programming: It is important to understand using linux in industrial, automation and data capturing environment offers full freedom in designing individual applications.
Use a modern programming language e.g. C / C++. Use a graphical toolkit e.g. SDL / FLTK for getting modern graphical design. Use the webserver for web access. FTP / telnet for file transfer and easy remote access. And of course the TCP IP communication for all the things you want to share between linux system and your local network / internet / intranet.
Even for the people who are not "natural born" linux programmers: they can also use the systems. A special programming toolkit allows the creating of individual applications WITHOUT programming knowledge. The solution is a simple XML software interpreter - which interprete a special XML file as programm during realtime - and runs the XML file as programm. For decoding such an XML file we are offering a special windows software - the XML TRM CODE GENERATOR which includs a lot of libs e.g. for network access, barcode, digital IN / OUT, SQL clients and more....
See a chart about application design directly at our website: http://www.terminal-systems.de/english/appldesign1-en.htm
Dienstag, 19. Oktober 2010
Linux Automation Starter Kit
For programming linux in industrial and automation environment applications:
our new Starter Kit TRM416 / TRM816 contains a:
our new Starter Kit TRM416 / TRM816 contains a:
- linux based terminal system for rough and industrial use (e.g. with IP65 water- and dust protected keyboard)
- Various linux samples for creating own applications
- A TRM CoLinux SDK - a programmers software development kit linux based on Windows (see CoLinux information here)
- An additiv programmers toolkit based on XML - create individual applications wihthout extensive linux programming (see information here)
- Libs e.g. for networking, barcode / RFID / proximity readers, SQL clients (for Microsoft and mySQL databases)
- samples and much more features for an easy getting starting with own applications and experiences.
Refer our special webpage for details: http://www.terminal-systems.de/english/s-kit1-en.htm
Abonnieren
Posts (Atom)