Click here to Skip to main content
15,891,136 members
Home / Discussions / C#
   

C#

 
GeneralRe: Threads Pin
P.T.R.K20-Jan-10 17:14
P.T.R.K20-Jan-10 17:14 
GeneralRe: Threads Pin
Abhinav S20-Jan-10 17:38
Abhinav S20-Jan-10 17:38 
GeneralRe: Threads Pin
Harvey Saayman20-Jan-10 19:35
Harvey Saayman20-Jan-10 19:35 
GeneralRe: Threads Pin
Luc Pattyn21-Jan-10 0:47
sitebuilderLuc Pattyn21-Jan-10 0:47 
GeneralRe: Threads Pin
Harvey Saayman21-Jan-10 0:51
Harvey Saayman21-Jan-10 0:51 
GeneralRe: Threads Pin
Matty2221-Jan-10 11:35
Matty2221-Jan-10 11:35 
AnswerRe: Threads Pin
Harvey Saayman20-Jan-10 19:40
Harvey Saayman20-Jan-10 19:40 
QuestionHow can I copy a multidimensional List Pin
leekangjae20-Jan-10 15:23
leekangjae20-Jan-10 15:23 
How can I copy a multidimensional List ?

public class DSensingDataCollection
{
private string _DAreaID;
private string _DModel1;
private string _DModel2;
private string _DModel3;
private string _DDeviceID;
private string _DDeviceType;
private bool _DIsNow;
private int _DResult;
private int _DSeq;
private int _DSensorCount;
private List<DSensingData> _DSensingData;

public string DAreaID
{
get { return _DAreaID; }
set { _DAreaID = value; }
}

public string DModel1
{
get { return _DModel1; }
set { _DModel1 = value; }
}

public string DModel2
{
get { return _DModel2; }
set { _DModel2 = value; }
}

public string DModel3
{
get { return _DModel3; }
set { _DModel3 = value; }
}

public string DDeviceID
{
get { return _DDeviceID; }
set { _DDeviceID = value; }
}

public string DDeviceType
{
get { return _DDeviceType; }
set { _DDeviceType = value; }
}

public bool DIsNow
{
get { return _DIsNow; }
set { _DIsNow = value; }
}

public int DResult
{
get { return _DResult; }
set { _DResult = value; }
}

public int DSeq
{
get { return _DSeq; }
set { _DSeq = value; }
}

public int DSensorCount
{
get { return _DSensorCount; }
set { _DSensorCount = value; }
}

public List<DSensingData> DSensingData
{
get { return _DSensingData; }
set { _DSensingData = value; }
}

public DSensingDataCollection()
{
this.DAreaID = "";
this.DModel1 = "";
this.DModel2 = "";
this.DModel3 = "";
this.DDeviceID = "";
this.DDeviceType = "";
this.DIsNow = true;
this.DResult = 0;
this.DSeq = 0;
this.DSensorCount = 0;
this.DSensingData = new List<dsensingdata>();
}
}

public class DSensingData
{
private string _DSensorTypeID;
private string _DMinValue;
private string _DMaxValue;
private int _DSlot;
private float _DValue;
private float _DDelta;

public string DSensorTypeID
{
get { return _DSensorTypeID; }
set { _DSensorTypeID = value; }
}

public string DMinValue
{
get { return _DMinValue; }
set { _DMinValue = value; }
}

public string DMaxValue
{
get { return _DMaxValue; }
set { _DMaxValue = value; }
}

public int DSlot
{
get { return _DSlot; }
set { _DSlot = value; }
}

public float DValue
{
get { return _DValue; }
set { this._DValue = value; }
}

public float DDelta
{
get { return _DDelta; }
set { this._DDelta = value; }
}

public DSensingData()
{
this._DSensorTypeID = "";
this._DMinValue = "";
this._DMaxValue = "";
this._DSlot = 0;
this._DValue = 0;
this._DDelta = 0;
}

public DSensingData(string _DSensorTypeID, string _DMinValue, string _DMaxValue, int _DSlot, float _DValue, float _DDelta)
{
this._DSensorTypeID = _DSensorTypeID;
this._DMinValue = _DMinValue;
this._DMaxValue = _DMaxValue;
this._DSlot = _DSlot;
this._DValue = _DValue;
this._DDelta = _DDelta;
}
}


public class DDeviceData
{
private string _DeviceID;
private DBufferData _DBufferData;

public string DeviceID
{
get { return _DeviceID; }
set { _DeviceID = value; }
}

public DBufferData DBufferData
{
get { return _DBufferData; }
set { _DBufferData = value; }
}

public DDeviceData()
{
this._DeviceID = "";
this._DBufferData = new DBufferData();
}

public DDeviceData(string param)
{
this._DBufferData = new DBufferData();

if (uHeader.gDevice.ContainsKey(param) == false)
{
this._DBufferData = new DBufferData();
uHeader.gDevice.Add(param, this._DBufferData);
}
else
{
IDictionaryEnumerator items = uHeader.gDevice.GetEnumerator();

while (items.MoveNext())
{
if (items.Key.ToString().Equals(param))
{
this._DBufferData = (DBufferData)items.Value;
}
}


this.DBufferData.DSensingDataCol3.Clear();
-- First and second array to array


this.DBufferData.DSensingDataCol2.Clear();
-- 0 the first array to array


this._DBufferData.DSensingDataCol1.Clear();
}

DSensingDataCollection input1 = new DSensingDataCollection();
input1.DAreaID = "1234";
input1.DDeviceID = "1234";
input1.DDeviceType = "edv";
input1.DIsNow = true;
input1.DModel1 = "fm001";
input1.DModel2 = "fm002";
input1.DModel3 = "fm003";
input1.DResult = 0;
input1.DSensorCount = 8;
input1.DSeq = 3;

input1.DSensingData.AddRange(new DSensingData[]{
new DSensingData("edv","34.1", "45.1", 0, 12.9f, 10.8f)});

this.DBufferData.DSensingDataCol1.Add(input1);

DSensingDataCollection input2 = new DSensingDataCollection();
input2.DAreaID = "2234";
input2.DDeviceID = "2234";
input2.DDeviceType = "edv";
input2.DIsNow = true;
input2.DModel1 = "fm001";
input2.DModel2 = "fm002";
input2.DModel3 = "fm003";
input2.DResult = 0;
input2.DSensorCount = 8;
input2.DSeq = 3;

input2.DSensingData.AddRange(new DSensingData[]{
new DSensingData("edv","11.1", "12.1", 0, 3.5f, 4.2f)});

this.DBufferData.DSensingDataCol1.Add(input2);
}
}

public class DBufferData
{
private List<DSensingDataCollection> _DSensingDataCol1;
private List<DSensingDataCollection> _DSensingDataCol2;
private List<DSensingDataCollection> _DSensingDataCol3;

public List<DSensingDataCollection> DSensingDataCol1
{
get { return _DSensingDataCol1; }
set { _DSensingDataCol1 = value; }
}

public List<DSensingDataCollection> DSensingDataCol2
{
get { return _DSensingDataCol2; }
set { _DSensingDataCol2 = value; }
}

public List<DSensingDataCollection> DSensingDataCol3
{
get { return _DSensingDataCol3; }
set { _DSensingDataCol3 = value; }
}

public DBufferData()
{
this._DSensingDataCol1 = new List<DSensingDataCollection>();
this._DSensingDataCol2 = new List<DSensingDataCollection>();
this._DSensingDataCol3 = new List<DSensingDataCollection>();
}
}

class Program
{
static void Main(string[] args)
{
string deviceid = "53410101";

DDeviceData ar = new DDeviceData(deviceid);


DDeviceData br = new DDeviceData(deviceid);
}
}
AnswerRe: How can I copy a multidimensional List Pin
Not Active20-Jan-10 15:39
mentorNot Active20-Jan-10 15:39 
GeneralRe: How can I copy a multidimensional List Pin
leekangjae20-Jan-10 17:41
leekangjae20-Jan-10 17:41 
AnswerRe: How can I copy a multidimensional List Pin
AspDotNetDev20-Jan-10 16:25
protectorAspDotNetDev20-Jan-10 16:25 
GeneralRe: How can I copy a multidimensional List Pin
Luc Pattyn20-Jan-10 16:51
sitebuilderLuc Pattyn20-Jan-10 16:51 
GeneralRe: How can I copy a multidimensional List Pin
AspDotNetDev20-Jan-10 17:08
protectorAspDotNetDev20-Jan-10 17:08 
GeneralRe: How can I copy a multidimensional List Pin
AspDotNetDev20-Jan-10 17:10
protectorAspDotNetDev20-Jan-10 17:10 
GeneralRe: How can I copy a multidimensional List Pin
AspDotNetDev20-Jan-10 17:15
protectorAspDotNetDev20-Jan-10 17:15 
GeneralRe: How can I copy a multidimensional List Pin
Luc Pattyn20-Jan-10 17:47
sitebuilderLuc Pattyn20-Jan-10 17:47 
QuestionSimulate keypress Pin
Matt Cavanagh20-Jan-10 14:12
Matt Cavanagh20-Jan-10 14:12 
AnswerRe: Simulate keypress Pin
Bekjong20-Jan-10 16:07
Bekjong20-Jan-10 16:07 
QuestionProblem with AutoResetEvent Array and WaitHandle.WaitAll() Pin
FJJCENTU20-Jan-10 13:27
FJJCENTU20-Jan-10 13:27 
AnswerRe: Problem with AutoResetEvent Array and WaitHandle.WaitAll() Pin
Bekjong20-Jan-10 15:50
Bekjong20-Jan-10 15:50 
AnswerRe: Problem with AutoResetEvent Array and WaitHandle.WaitAll() Pin
Giorgi Dalakishvili20-Jan-10 19:17
mentorGiorgi Dalakishvili20-Jan-10 19:17 
QuestionManaged and Unmanaged code Pin
3bood.ghzawi20-Jan-10 13:03
3bood.ghzawi20-Jan-10 13:03 
AnswerRe: Managed and Unmanaged code Pin
Bekjong20-Jan-10 15:53
Bekjong20-Jan-10 15:53 
AnswerRe: Managed and Unmanaged code Pin
Abhinav S20-Jan-10 17:33
Abhinav S20-Jan-10 17:33 
QuestionDisplay highlighted data from Listbox in Textboxes Pin
CarlMartin1020-Jan-10 13:02
CarlMartin1020-Jan-10 13:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.