本文整理汇总了C#中data类的典型用法代码示例。如果您正苦于以下问题:C# data类的具体用法?C# data怎么用?C# data使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
data类属于命名空间,在下文中一共展示了data类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: EstimateAdvice
protected virtual void EstimateAdvice(application.analysis.workData data,
application.analysis.analysisResult advices,
decimal initCapAmt, decimal priceWeight, decimal feePerc, byte buy2SellInterval,
data.tmpDS.tradeEstimateDataTable toTbl)
{
application.analysis.EstimateAdvice(data,advices, initCapAmt, priceWeight, feePerc, buy2SellInterval, toTbl);
}
开发者ID:oghenez,项目名称:trade-software,代码行数:7,代码来源:baseAdviceEstimate.cs
示例2: Node
public Node(Node parent, Node left, Node right, data)
{
this.parent = parent;
this.left = left;
this.right = right;
this.data = data
}
开发者ID:jayflo,项目名称:grinding-boars,代码行数:7,代码来源:commonancestor.cs
示例3: SendToPhp
private int SendToPhp()
{
try
{
data DataObj = new data();
DataObj.df_text1 = sendText1;
DataObj.df_text2 = sendText2;
string JSONString = JsonConvert.SerializeObject(DataObj, Formatting.None);
string url = "http://pj3100.somee.com/cryptLogin.php";
HttpWebRequest newRequest = (HttpWebRequest)WebRequest.Create(url);
newRequest.Method = "POST";
string postData = JSONString;
byte[] pdata = Encoding.UTF8.GetBytes(postData);
newRequest.ContentType = "application/x-www-form-urlencoded";
newRequest.ContentLength = pdata.Length;
Stream myStream = newRequest.GetRequestStream();
myStream.Write(pdata, 0, pdata.Length);
WebResponse myResponse = newRequest.GetResponse();
Stream responseStream = myResponse.GetResponseStream();
StreamReader streamReader = new StreamReader(responseStream);
string result = streamReader.ReadToEnd();
streamReader.Close();
responseStream.Close();
myStream.Close();
if (result.Equals("1"))
{
return 1;
}
else if(result.Equals("2"))
{
return 2;
}
else
{
return 0;
}
}
catch (WebException ex)
{
string _exception = ex.ToString();
Toast error = Toast.MakeText(this, _exception, ToastLength.Long);
error.Show();
Console.WriteLine("--->" + _exception);
return 0;
}
}
开发者ID:NicoD-NITH,项目名称:pj3100-gruppe6,代码行数:60,代码来源:MainActivity.cs
示例4: ImportICB_AddToDb
//Add to database
private void ImportICB_AddToDb(data.importDS.icbCodeDataTable tbl, string fldName, bool haveDefitionFld,
data.baseDS.sysCodeDataTable sysCodeTbl,string category,string codeGroupFldName)
{
data.baseDS.sysCodeRow sysCodeRow;
common.myKeyValueItem item;
for (int idx = 0; idx < tbl.Count; idx++)
{
if (tbl[idx].RowState == DataRowState.Deleted) continue;
item = libs.SplitKeyValue(tbl[idx][fldName].ToString()," ");
if (item == null)
{
common.fileFuncs.WriteLog(tbl[idx][fldName].ToString() + " not found.");
continue;
}
if (sysCodeTbl.FindBycategorycode(category, item.Key) == null)
{
sysCodeRow = sysCodeTbl.NewsysCodeRow();
commonClass.AppLibs.InitData(sysCodeRow);
sysCodeRow.category = category;
sysCodeRow.code = item.Key;
sysCodeRow.description1 = item.Value;
sysCodeRow.tag1 = fldName;
if (codeGroupFldName != null) sysCodeRow.inGroup = tbl[idx][codeGroupFldName].ToString();
if (haveDefitionFld && !tbl[idx].IsdefinitionNull()) sysCodeRow.notes = tbl[idx].definition;
sysCodeTbl.AddsysCodeRow(sysCodeRow);
}
tbl[idx][fldName] = item.Key;
}
}
开发者ID:oghenez,项目名称:trade-software,代码行数:30,代码来源:importIcbCode.cs
示例5: EstimateAdvice
protected virtual void EstimateAdvice(Data data,
Analysis.AnalysisResult advices,
Analysis.EstimateOptions options,
data.tmpDS.tradeEstimateDataTable toTbl)
{
Analysis.EstimateAdvice(data,advices, options, toTbl);
}
开发者ID:oghenez,项目名称:trade-software,代码行数:7,代码来源:baseEstimateAdvice.cs
示例6: pictureBox2_Click
private void pictureBox2_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(textBox1.Text))
{
textBox1.Clear();
MessageBox.Show("Nama harus diisi", "WARNING!!!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
else
{
data dat = new data(textBox1.Text);
db.OpenConn();
try
{
string sql = string.Concat("INSERT INTO Users " + "([nama]) VALUES " + "('"+textBox1.Text+"')");
db.execQuery(sql);
//MessageBox.Show("Nama Add Sukses");
Test tst = new Test();
this.Close();
tst.Show();
data.cektestbuttonabout = false;
data.cektestbuttoninfo = false;
}
catch (Exception)
{
//MessageBox.Show("Data tidak dimasukkan");
}
db.CloseConn();
}
}
开发者ID:godofknife,项目名称:SPB,代码行数:30,代码来源:input.cs
示例7: end
public static void end()
{
// smaller circle
if (state == 2) {
Debug.Log("virk");
state++;
timestampEnd = getMillis();
countEnd = PathTracer.countPixels(Color.white); // slow function creates a delay! Easy solution DONE: calls function when mouse moves out of each inner circle.
dataList[stage] = new data();
dataList[stage].millis = timestampEnd - timestampBeg;
dataList[stage].accuracy = (countStart - countEnd) * 100.0f / countStart ;
dataList[stage].count = countEnd;
Debug.Log("Ending");
Debug.Log("Time: " + (dataList[stage].millis / 1000.0f));
Debug.Log("Accuracy: " + dataList[stage].accuracy);
timeDisplay = dataList[stage].millis / 1000.0f;
PathTracer.displayScore();
Infotoggle.showInfoButton();
Timer.timerFrozen = true;
if(GradiantLamp.lampIsOn==false)
GradiantLamp.skammekrog = true;
}
}
开发者ID:Bitja,项目名称:MPS,代码行数:25,代码来源:Handler.cs
示例8: LoadData
protected override void LoadData(data.tmpDS.stockCodeDataTable toTbl, string[] portfolioCodes)
{
DateTime startTime = DateTime.Now;
LoadStockList(toTbl,portfolioCodes);
UpdateRealTime(toTbl, portfolioCodes);
this.ShowMessage(common.dateTimeLibs.TimeSpan2String(DateTime.Now.Subtract(startTime)));
}
开发者ID:oghenez,项目名称:trade-software,代码行数:7,代码来源:portfolioWatch.cs
示例9: calcHamma
public static double calcHamma(data raw)
{
double angleGrad = 0;
double buf = (Math.Pow(raw.c, 2) + Math.Pow(raw.a, 2) - Math.Pow(raw.b, 2)) / (2 * raw.a * raw.c);
angleGrad = ToGrad(Math.Acos(buf));
return angleGrad;
}
开发者ID:paVVin,项目名称:MiKPO,代码行数:7,代码来源:Program.cs
示例10: GetDataList
/* IEnumerator WaitForRequest(WWW www){
yield return www;
if (www.error == null) {
Debug.Log(www.text);
} else {
Debug.Log("WWW Error: "+ www.error);
}
}
*/
public IEnumerator GetDataList()
{
if (_GameItems == null) {
_GameItems = new List<data> ();
}
if (_GameItems.Count > 0) {
_GameItems.Clear ();
}
WWW getScore = new WWW (display);
yield return getScore;
dataList.AddRange (Regex.Split (getScore.text, ";"));
if (getScore.error != null) {
Debug.Log ("There was an error getting the Leaderboard...");
} else {
for (int i=0; i <= (dataList.Count-1)-3; i+=3) {
data itm = new data();
itm.id = dataList[i].ToString();
itm.name = dataList[i+1].ToString();
itm.score = int.Parse(dataList[i+2].ToString());
_GameItems.Add (itm);
Debug.Log(itm.id + "; " + itm.name + "; " + itm.score);
}
}
}
开发者ID:narut123456,项目名称:Unity-Clever-Game,代码行数:34,代码来源:PHP.cs
示例11: SendToPhp
private bool SendToPhp()
{
try
{
data DataObj = new data();
DataObj.navn = sendText;
string JSONString = JsonConvert.SerializeObject(DataObj, Formatting.None);
string url = "http://pj3100.somee.com/getUserInfo.php";
HttpWebRequest newRequest = (HttpWebRequest)WebRequest.Create(url);
newRequest.Method = "POST";
string postData = JSONString;
byte[] pdata = Encoding.UTF8.GetBytes(postData);
newRequest.ContentType = "application/x-www-form-urlencoded";
newRequest.ContentLength = pdata.Length;
Stream myStream = newRequest.GetRequestStream();
myStream.Write(pdata, 0, pdata.Length);
WebResponse myResponse = newRequest.GetResponse();
Stream responseStream = myResponse.GetResponseStream();
StreamReader streamReader = new StreamReader(responseStream);
string result = streamReader.ReadToEnd();
user = JsonConvert.DeserializeObject<List<User>>(result);
streamReader.Close();
responseStream.Close();
myStream.Close();
if(user != null)
{
return true;
}
else
{
return false;
}
}
catch (WebException ex)
{
string _exception = ex.ToString();
Toast error = Toast.MakeText(this, _exception, ToastLength.Long);
error.Show();
Console.WriteLine("--->" + _exception);
return false;
}
}
开发者ID:NicoD-NITH,项目名称:pj3100-gruppe6,代码行数:59,代码来源:profilSide.cs
示例12: DeletePortfolioData
private void DeletePortfolioData(data.baseDS.portfolioDetailDataTable dataTbl, string portfolioCode,string code)
{
for (int idx = 0; idx < dataTbl.Count; idx++)
{
if (dataTbl[idx].RowState== DataRowState.Deleted) continue;
if ( (dataTbl[idx].portfolio==portfolioCode) && (dataTbl[idx].code==code) )
dataTbl[idx].Delete();
}
}
开发者ID:oghenez,项目名称:trade-software,代码行数:9,代码来源:addToWatchList_StockOnly.cs
示例13: CreateResponse
private data CreateResponse(List<Sentiment> data)
{
data r = new data();
foreach (Sentiment s in data)
{
r.score.Add(s.score.ToString());
r.date.Add(FromUnixTime(s.timestamp).ToString("dd-MM-yyyy"));
}
return r;
}
开发者ID:hjrnz1,项目名称:NewsData,代码行数:10,代码来源:DataController.cs
示例14: SetKoma
public void SetKoma(data data)
{
//(long)koma["posx"],(long)koma["posy"],koma["owner"].ToString(),num,(bool)koma["promote"]
Debug.Log ("koma"+data.koma["owner"]);
this.Posx = (long)data.koma["posx"];
this.Posy = (long)data.koma["posy"];
this.num = data.num.ToString();
this.owner = data.koma["owner"].ToString();
this.nari = (bool)data.koma["promote"];
}
开发者ID:yota2013,项目名称:Japanease_chass,代码行数:10,代码来源:Koma.cs
示例15: ImportOHLCV_CSV
public static bool ImportOHLCV_CSV(string csvFileName,string stockExchangeForNewCode,
data.baseDS.priceDataDataTable priceDataTbl,
libs.OnUpdatePriceData onUpdateDataFunc)
{
return libs.ImportOHLCV_CSV(csvFileName, ',', common.dateTimeLibs.DateTimeFormats.YYMMDD,
stockExchangeForNewCode,libs.CultureInfoVN,
priceDataTbl, DoImportRow, onUpdateDataFunc, null);
}
开发者ID:oghenez,项目名称:trade-software,代码行数:10,代码来源:stock.cs
示例16: Etiqueta
public Etiqueta(data.Externo.EtiquetasUsuario et, SolidColorBrush color, VentanaDocumentos _parent)
{
InitializeComponent();
Parent = _parent;
lblEtiqueta.Content = et.Etiqueta;
Fondo.Fill = color;
datosEtiqueta = et;
this.Loaded += new RoutedEventHandler(Etiqueta_Loaded);
}
开发者ID:mialejandriastartup,项目名称:mialejandria.mifaro,代码行数:11,代码来源:Etiqueta.xaml.cs
示例17: PreviewControl
//-------------------------------------------------------------------
//-------------------------------------------------------------------
// メソッド
//-------------------------------------------------------------------
/// @brief コンストラクタ
public PreviewControl(int bound_width, int bound_height,
int index_in_layout_parameter_binding_source,
data.LayoutParameter layout_parameter)
{
InitializeComponent();
// メンバの設定
layout_parameter_ = layout_parameter;
IndexInLayoutParameterBindingSource = index_in_layout_parameter_binding_source;
movable_and_resizable_ = new MovableAndResizable(this, bound_width, bound_height);
}
开发者ID:progre,项目名称:SCFF-DirectShow-Filter,代码行数:16,代码来源:PreviewControl.cs
示例18: _getBytes
private byte[] _getBytes(data _data)
{
int size = Marshal.SizeOf(_data);
byte[] arr = new byte[size];
IntPtr ptr = Marshal.AllocHGlobal(size);
Marshal.StructureToPtr(_data, ptr, true);
Marshal.Copy(ptr, arr, 0, size);
Marshal.FreeHGlobal(ptr);
return arr;
}
开发者ID:steevvoh,项目名称:ProjectResearch,代码行数:11,代码来源:Form1.cs
示例19: ShowNew
public bool ShowNew(data.baseDS.tradeAlertRow alertRow)
{
this.Refresh();
qtyEd.Value = 0; subTotalEd.Value = 0; feeAmtEd.Value = 0; totalAmtEd.Value = 0;
portfolioCb.myValue = alertRow.portfolio;
codeEd.Text = alertRow.stockCode.Trim();
transTypeCb.myValue = (AppTypes.TradeActions)alertRow.tradeAction;
statusCb.myValue = AppTypes.CommonStatus.New;
SetFocus();
ShowDialog();
return true;
}
开发者ID:oghenez,项目名称:trade-software,代码行数:12,代码来源:transactionFromAlert.cs
示例20: CreateReservationState
public data.ReservationState CreateReservationState(data.ReservationState newReservationState)
{
var isAlreadyPresent = _ReservationTypes.Collection.FindOne(Query.EQ("name", newReservationState.Name));
if (isAlreadyPresent != null)
return isAlreadyPresent;
var result = _ReservationTypes.Collection.Insert(newReservationState);
if (result.Ok)
return newReservationState;
return null;
}
开发者ID:damienpuig,项目名称:Driveat-Csharp,代码行数:13,代码来源:ReservationStateService.cs
注:本文中的data类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论