2
Answers

Google protocol buffers serialization

Photo of Jayant Satkar

Jayant Satkar

8y
227
1
 ---Protofile
 
syntax = "proto2";
package Atos.ReaderCommunicator;
option csharp_namespace = "Atos.ReaderCommunicator";
message DataPacket
{
required uint32 readerId=1;
optional uint32 ack=2;// 0xAA
required uint32 cmdType=3;
optional uint32 configType=4;
repeated UploadUsers uploadusers=5;
repeated DownloadSwipes downloadSwipes=6;
optional string extraData=7;
optional uint32 subCmdType=8;
repeated Configuration cfg=9;
repeated ScsConfiguration scsCfg=10;
}
 
I have compiled this file and got class. But No idea how to use it.
 

Answers (2)

1
Photo of Sam Hobbs
NA 28.7k 1.3m 13y
Look for articles in this web site.

Look at the samples in the MSDN.

Generate a Windows Forms application and put a DataGridView in the form. Then look at the Designer.cs file for the form; you will have a useful sample.
0
Photo of Priya Linge
NA 5k 708.3k 13y
Hi,

Follwing way we can create DataGridView dynamicaly,

 string query = "select * from Customer";
            sqlConnection.Open();
            sqlCommand = new SqlCommand(query, sqlConnection);
            da = new SqlDataAdapter(sqlCommand);
            ds = new DataSet();
            da.Fill(ds);
            DataGridView myDataGrid = new DataGridView();
            myDataGrid.DataSource = ds.Tables[0];
            myDataGrid.Show();
            panel1.Controls.Add(myDataGrid);

Hope this will help you.

Thanks.