I have now studied LINQ (Language Integrated Query) in the ASP project. It is more flexible than normal query language, because I can make queries in the code level. I created our resident database with MS Access and I had difficulties to create complicated queries for reports. This should work
I have tried to check the "Chart Channel" geodesy part. At this point it is overwhelming to me. Unfortunately I never studied geodesy profoundly and I never knew, what the code is exactly doing. So get a new study project. Typically things are clearing up and I don't need to know all. Just persistent work.
Wednesday, December 16, 2015
Sunday, December 13, 2015
Pinging
I haven't been lazy this weekend. I am still fighting with threads. It appears to be very fundamental and new to the old Visual Basic - programmer like me. Some progress anyway.
The code below reads Eddie's ping (sonar) sensors and update the form text controls.
Text controls updates happen in the different thread. I had a lot of googling to make this happen. The other option I have check is the Backgroundworker-class.
Things are going slowly now, but I know based on my experience, all will accelerate later.
I have also worked with ASP-study and the VB6 "Charts Channel" with Artinsoft tool. Unfortunately it's free version allows only 10000 lines. So I have to divide the code. The "Charts Channel" is about 23000 lines. Naturally I can remove some code. Artinsoft tool isn't the perfect solution, but it gives some foundation how to do the conversion.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO.Ports;
namespace SimpleEddie
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
serialPort1.PortName = "COM3";
serialPort1.BaudRate = 115200;
serialPort1.DataBits = 8;
serialPort1.Parity = Parity.None;
serialPort1.StopBits = StopBits.One;
serialPort1.DataReceived += new SerialDataReceivedEventHandler(port_DataReceived);
serialPort1.Open();
string msg = "PING \r";
serialPort1.Write(msg);
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void port_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
string data = serialPort1.ReadExisting();
if (data != "")
{
string data1 = data.Substring(0, 3);
string data2 = data.Substring(4, 3);
this.Invoke((MethodInvoker)delegate {
LeftPing.Text = data1; // runs on UI thread
RightPing.Text = data2;
});
}
}
}
}
The code below reads Eddie's ping (sonar) sensors and update the form text controls.
Text controls updates happen in the different thread. I had a lot of googling to make this happen. The other option I have check is the Backgroundworker-class.
Things are going slowly now, but I know based on my experience, all will accelerate later.
I have also worked with ASP-study and the VB6 "Charts Channel" with Artinsoft tool. Unfortunately it's free version allows only 10000 lines. So I have to divide the code. The "Charts Channel" is about 23000 lines. Naturally I can remove some code. Artinsoft tool isn't the perfect solution, but it gives some foundation how to do the conversion.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO.Ports;
namespace SimpleEddie
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
serialPort1.PortName = "COM3";
serialPort1.BaudRate = 115200;
serialPort1.DataBits = 8;
serialPort1.Parity = Parity.None;
serialPort1.StopBits = StopBits.One;
serialPort1.DataReceived += new SerialDataReceivedEventHandler(port_DataReceived);
serialPort1.Open();
string msg = "PING \r";
serialPort1.Write(msg);
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void port_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
string data = serialPort1.ReadExisting();
if (data != "")
{
string data1 = data.Substring(0, 3);
string data2 = data.Substring(4, 3);
this.Invoke((MethodInvoker)delegate {
LeftPing.Text = data1; // runs on UI thread
RightPing.Text = data2;
});
}
}
}
}
Tuesday, December 8, 2015
Upgraded Plans and the Goal
My ASP.NET project is still in learning mode. I have basically reread the things I have known earlier. Just now I am studying database controls that I never used with my old database application, the Open Door Mission Master Database. I used an existing application that I modified. I am going to the new area now.
I have designed a simple resident database for my organization St. Francis Charities based on Microsoft Access. The goal is turn that to the Internet based ASP.NET/SQL Server application. Then I will but that to the cloud using Microsoft Azure.
I have also studied the VB6 "Charts Channel" software. I am feeling more comfortable with it. It needs only perseverance to convert that to .NET. I can clean some unnecessary parts of it to make conversion simpler. VB6 and the Object Oriented .NET are different and I cannot estimate the exact conversion time just now. My optimistic schedule is three months.
Eddie is the way to learn C# and the real Object Oriented Program design.
Three things are now going on and they support the goal to make a telepresence, position and navigation software for Eddie robot. The estimated time to do it is six months. It is a kind of graduation work after what I have learned during past forty years. I pray and hope I will get a chance to make it happen.
I have designed a simple resident database for my organization St. Francis Charities based on Microsoft Access. The goal is turn that to the Internet based ASP.NET/SQL Server application. Then I will but that to the cloud using Microsoft Azure.
I have also studied the VB6 "Charts Channel" software. I am feeling more comfortable with it. It needs only perseverance to convert that to .NET. I can clean some unnecessary parts of it to make conversion simpler. VB6 and the Object Oriented .NET are different and I cannot estimate the exact conversion time just now. My optimistic schedule is three months.
Eddie is the way to learn C# and the real Object Oriented Program design.
Three things are now going on and they support the goal to make a telepresence, position and navigation software for Eddie robot. The estimated time to do it is six months. It is a kind of graduation work after what I have learned during past forty years. I pray and hope I will get a chance to make it happen.
Sunday, December 6, 2015
Troubles
Eddie caused lot of troubles this weekend and then I found that battery level was too low! It was a shame and also a relief, because I thought that the control board is faulty again. Then the charger unit was broke and I built a temporary one using a LCD monitor power source. These were the engineering incidents.
I built a new serial port application. Now the serial interface is as a control in a form. That's way it used to be in old VB6. Then I got a problem when I tried to update fields on the form. I got error messages that controls cannot be updated from the different thread. I never had that kind of issue with VB6. Now I have to worry about threads. Threads are naturally basic stuff with multitasking, but I miss the old VB6. Anyway, after Googling I found a workaround. Basically a new thread must be created.
I was studying also ASP.NET databases. The new SQL Server Express 2014 has a new graphical interface for creating queries like MS Access has. In the old SQL Server 2008 the only way is you have type queries with the query language.
The battle continues.
I was studying also ASP.NET databases. The new SQL Server Express 2014 has a new graphical interface for creating queries like MS Access has. In the old SQL Server 2008 the only way is you have type queries with the query language.
The battle continues.
Thursday, December 3, 2015
WPF
I started to code my small robot control software, but it wasn't so easy I thought. I have learned to update form fields straight from the program module, but it won't work easy way. The reason is Windows Presentation Foundation (WPF). I have to possibly go back to "school" and study more or find a workaround. Perhaps back to normal Windows forms.
The good news is I got the old Visual Basic 6 based "Charts Channel" program work under Windows XP. I miss the old times when all was easier...
I have finally start to study Internet databases with ASP.NET.
The good news is I got the old Visual Basic 6 based "Charts Channel" program work under Windows XP. I miss the old times when all was easier...
I have finally start to study Internet databases with ASP.NET.
Monday, November 30, 2015
ASP.NET 2
I am reading the book Wrox: Beginning ASP.NET 4.5.1: in C# and VB. Third of the book is now accomplished. I made some shortcuts, because I am interested in databases in the latter part of this book. The book itself is very good. The book is using Visual Studio 2013. I am using it, although Visual Studio 2015 is available. There should not be any mismatches.
I designed and coded SQL databases using Client/Server model. Currently all is going to the cloud and ASP.NET is the answer, if Microsoft technology is used. ASP,NET is trickier to program than the Client/Server. I excepted it was easier, but I have now to adjust. I have seen many online database applications based on ASP.NET.
I will get Eddie back tomorrow!
I designed and coded SQL databases using Client/Server model. Currently all is going to the cloud and ASP.NET is the answer, if Microsoft technology is used. ASP,NET is trickier to program than the Client/Server. I excepted it was easier, but I have now to adjust. I have seen many online database applications based on ASP.NET.
I will get Eddie back tomorrow!
Friday, November 27, 2015
ASP.NET 1
I am also studying ASP.NET. The target is to create database to the Azure (MS Cloud) and possibly website that is connected to Eddie
Subscribe to:
Posts (Atom)
