text stringlengths 13 6.01M |
|---|
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System.Collections.Concurrent;
using System.Linq;
using System.Management.Automation;
using System.Threading.Tasks;
using Microsoft.PowerShell.EditorServices.Utility;
namespace Microsoft.PowerShell.EditorServices.Services.PowerShellContext
{
/// <summary>
/// Provides utility methods for working with PowerShell commands.
/// </summary>
public static class CommandHelpers
{
private static readonly ConcurrentDictionary<string, bool> NounExclusionList =
new ConcurrentDictionary<string, bool>();
static CommandHelpers()
{
NounExclusionList.TryAdd("Module", true);
NounExclusionList.TryAdd("Script", true);
NounExclusionList.TryAdd("Package", true);
NounExclusionList.TryAdd("PackageProvider", true);
NounExclusionList.TryAdd("PackageSource", true);
NounExclusionList.TryAdd("InstalledModule", true);
NounExclusionList.TryAdd("InstalledScript", true);
NounExclusionList.TryAdd("ScriptFileInfo", true);
NounExclusionList.TryAdd("PSRepository", true);
}
/// <summary>
/// Gets the CommandInfo instance for a command with a particular name.
/// </summary>
/// <param name="commandName">The name of the command.</param>
/// <param name="powerShellContext">The PowerShellContext to use for running Get-Command.</param>
/// <returns>A CommandInfo object with details about the specified command.</returns>
public static async Task<CommandInfo> GetCommandInfoAsync(
string commandName,
PowerShellContextService powerShellContext)
{
Validate.IsNotNull(nameof(commandName), commandName);
// Make sure the command's noun isn't blacklisted. This is
// currently necessary to make sure that Get-Command doesn't
// load PackageManagement or PowerShellGet because they cause
// a major slowdown in IntelliSense.
var commandParts = commandName.Split('-');
if (commandParts.Length == 2 && NounExclusionList.ContainsKey(commandParts[1]))
{
return null;
}
PSCommand command = new PSCommand();
command.AddCommand(@"Microsoft.PowerShell.Core\Get-Command");
command.AddArgument(commandName);
command.AddParameter("ErrorAction", "Ignore");
return
(await powerShellContext
.ExecuteCommandAsync<PSObject>(command, false, false))
.Select(o => o.BaseObject)
.OfType<CommandInfo>()
.FirstOrDefault();
}
/// <summary>
/// Gets the command's "Synopsis" documentation section.
/// </summary>
/// <param name="commandInfo">The CommandInfo instance for the command.</param>
/// <param name="powerShellContext">The PowerShellContext to use for getting command documentation.</param>
/// <returns></returns>
public static async Task<string> GetCommandSynopsisAsync(
CommandInfo commandInfo,
PowerShellContextService powerShellContext)
{
string synopsisString = string.Empty;
if (commandInfo != null &&
(commandInfo.CommandType == CommandTypes.Cmdlet ||
commandInfo.CommandType == CommandTypes.Function ||
commandInfo.CommandType == CommandTypes.Filter))
{
PSCommand command = new PSCommand();
command.AddCommand(@"Microsoft.PowerShell.Core\Get-Help");
command.AddArgument(commandInfo);
command.AddParameter("ErrorAction", "Ignore");
var results = await powerShellContext.ExecuteCommandAsync<PSObject>(command, false, false);
PSObject helpObject = results.FirstOrDefault();
if (helpObject != null)
{
// Extract the synopsis string from the object
synopsisString =
(string)helpObject.Properties["synopsis"].Value ??
string.Empty;
// Ignore the placeholder value for this field
if (string.Equals(synopsisString, "SHORT DESCRIPTION", System.StringComparison.CurrentCultureIgnoreCase))
{
synopsisString = string.Empty;
}
}
}
return synopsisString;
}
}
}
|
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.Data.SqlClient;
namespace C1ILDGen
{
public partial class frmViewUpdateInstIndex : Form
{
SqlTransaction sqlTransanction = null;
WatcherSqlClient sqlClient = null;
List<KeyValuePair<string, string>> hashLineNr = new List<KeyValuePair<string, string>>();
List<KeyValuePair<string, string>> hashMakeDetails = new List<KeyValuePair<string, string>>();
HashSet<DataGridViewCell> changedCells = new HashSet<DataGridViewCell>();
private TreeViewCancelEventHandler checkForCheckedChildren;
public frmViewUpdateInstIndex()
{
InitializeComponent();
checkForCheckedChildren = new TreeViewCancelEventHandler(CheckForCheckedChildrenHandler);
}
private void btnGetTagData_Click(object sender, EventArgs e)
{
frmWait frmShowWait = new frmWait();
frmShowWait.StartPosition = FormStartPosition.CenterScreen;
frmShowWait.Show();
frmShowWait.Refresh();
btnClearDG_Click(this, e);
changedCells.Clear();
if (cboExtractList.Text == "Instrument Index")
{
GenerateInstIndexData();
}
else if (cboExtractList.Text == "I/O List")
{
GenerateIOListData();
}
else if (cboExtractList.Text == "JB Schedule List")
{
GenerateJBSchtData();
}
frmShowWait.Hide();
}
private void btnClearDG_Click(object sender, EventArgs e)
{
dgTags.Rows.Clear();
dgTags.Columns.Clear();
cboLineNr.Visible = false;
cboMake.Visible = false;
cboLineNr.Items.Clear();
btnExpToExcel.Enabled = false;
}
private void GenerateTViewInstIndexData(string PIDList)
{
string strQueryTag = string.Empty;
string strQueryLinrNr = string.Empty;
sqlClient = new WatcherSqlClient(CConf.GetString("DBHost"), CConf.GetString("DBName"), CConf.GetBoolean("DBTrustedConnection"), CConf.GetString("DBLogin"), CConf.GetString("DBPassword"), CConf.GetString("DBConnectionString"));
sqlClient.OpenConnection();
if (PIDList == "All")
{
strQueryTag = "SELECT * FROM INSTRUMENT_TAG_DETAILS";
}
else
{
strQueryTag = "SELECT * FROM INSTRUMENT_TAG_DETAILS WHERE " + PIDList ;
}
DataSet dataSet = sqlClient.Query(strQueryTag, "TAG");
cboLineNr.Items.Clear();
cboLineNr.Text = "";
btnExpToExcel.Enabled = true;
dgTags.ColumnCount = 25;
dgTags.Columns[0].Name = "Tag Number";
dgTags.Columns[1].Name = "Loop Name";
dgTags.Columns[2].Name = "Instrument Description";
dgTags.Columns[3].Name = "Service Description";
dgTags.Columns[4].Name = "Line / Equipment Number";
dgTags.Columns[5].Name = "Make";
dgTags.Columns[6].Name = "Model Number";
dgTags.Columns[7].Name = "Inst Range Min";
dgTags.Columns[8].Name = "Inst Range Max";
dgTags.Columns[9].Name = "Calibration Min";
dgTags.Columns[10].Name = "Calibration Max";
dgTags.Columns[11].Name = "Unit";
dgTags.Columns[12].Name = "Alarm LL";
dgTags.Columns[13].Name = "Alarm L";
dgTags.Columns[14].Name = "Alarm H";
dgTags.Columns[15].Name = "Alarm HH";
dgTags.Columns[16].Name = "Setpoint";
dgTags.Columns[17].Name = "P & ID Number";
dgTags.Columns[18].Name = "Remarks";
dgTags.Columns[19].Name = "Rev. Number";
dgTags.Columns[20].Name = "P&&P Hookup Number";
dgTags.Columns[21].Name = "Wiring Drawing Number";
dgTags.Columns[22].Name = "Installation Drawing Number";
dgTags.Columns[23].Name = "Functional Scheme Number";
dgTags.Columns[24].Name = "Logic Diagram Number";
if (dataSet != null && dataSet.Tables.Count > 0 && dataSet.Tables[0].Rows.Count > 0)
{
for (int i = 0; i < dataSet.Tables[0].Rows.Count; i++)
{
dgTags.Rows.Add(dataSet.Tables[0].Rows[i][0].ToString().Trim(), dataSet.Tables[0].Rows[i][1].ToString().Trim(),
dataSet.Tables[0].Rows[i][2].ToString().Trim(), dataSet.Tables[0].Rows[i][3].ToString().Trim(), dataSet.Tables[0].Rows[i][4].ToString().Trim(),
dataSet.Tables[0].Rows[i][5].ToString().Trim(), dataSet.Tables[0].Rows[i][6].ToString().Trim(), dataSet.Tables[0].Rows[i][7].ToString().Trim(),
dataSet.Tables[0].Rows[i][8].ToString().Trim(), dataSet.Tables[0].Rows[i][9].ToString().Trim(), dataSet.Tables[0].Rows[i][10].ToString().Trim(),
dataSet.Tables[0].Rows[i][11].ToString().Trim(), dataSet.Tables[0].Rows[i][12].ToString().Trim(), dataSet.Tables[0].Rows[i][13].ToString().Trim(),
dataSet.Tables[0].Rows[i][14].ToString().Trim(), dataSet.Tables[0].Rows[i][15].ToString().Trim(), dataSet.Tables[0].Rows[i][16].ToString().Trim(),
dataSet.Tables[0].Rows[i][17].ToString().Trim(), dataSet.Tables[0].Rows[i][18].ToString().Trim(), dataSet.Tables[0].Rows[i][19].ToString().Trim(),
dataSet.Tables[0].Rows[i][20].ToString().Trim(), dataSet.Tables[0].Rows[i][21].ToString().Trim(), dataSet.Tables[0].Rows[i][22].ToString().Trim(),
dataSet.Tables[0].Rows[i][23].ToString().Trim(), dataSet.Tables[0].Rows[i][24].ToString().Trim());
}
}
}
private void GenerateInstIndexData()
{
string strQueryTag = string.Empty;
string strQueryLinrNr = string.Empty;
sqlClient = new WatcherSqlClient(CConf.GetString("DBHost"), CConf.GetString("DBName"), CConf.GetBoolean("DBTrustedConnection"), CConf.GetString("DBLogin"), CConf.GetString("DBPassword"), CConf.GetString("DBConnectionString"));
sqlClient.OpenConnection();
if (cboPIDList.Text == "All")
{
strQueryTag = "SELECT * FROM INSTRUMENT_TAG_DETAILS";
}
else
{
strQueryTag = "SELECT * FROM INSTRUMENT_TAG_DETAILS WHERE PIDNumber='" + cboPIDList.Text + "'";
}
DataSet dataSet = sqlClient.Query(strQueryTag, "TAG");
cboLineNr.Items.Clear();
cboLineNr.Text = "";
btnExpToExcel.Enabled = true;
dgTags.ColumnCount = 25;
dgTags.Columns[0].Name = "Tag Number";
dgTags.Columns[1].Name = "Loop Name";
dgTags.Columns[2].Name = "Instrument Description";
dgTags.Columns[3].Name = "Service Description";
dgTags.Columns[4].Name = "Line / Equipment Number";
dgTags.Columns[5].Name = "Make";
dgTags.Columns[6].Name = "Model Number";
dgTags.Columns[7].Name = "Inst Range Min";
dgTags.Columns[8].Name = "Inst Range Max";
dgTags.Columns[9].Name = "Calibration Min";
dgTags.Columns[10].Name = "Calibration Max";
dgTags.Columns[11].Name = "Unit";
dgTags.Columns[12].Name = "Alarm LL";
dgTags.Columns[13].Name = "Alarm L";
dgTags.Columns[14].Name = "Alarm H";
dgTags.Columns[15].Name = "Alarm HH";
dgTags.Columns[16].Name = "Setpoint";
dgTags.Columns[17].Name = "P & ID Number";
dgTags.Columns[18].Name = "Remarks";
dgTags.Columns[19].Name = "Rev. Number";
dgTags.Columns[20].Name = "P&&P Hookup Number";
dgTags.Columns[21].Name = "Wiring Drawing Number";
dgTags.Columns[22].Name = "Installation Drawing Number";
dgTags.Columns[23].Name = "Functional Scheme Number";
dgTags.Columns[24].Name = "Logic Diagram Number";
if (dataSet != null && dataSet.Tables.Count > 0 && dataSet.Tables[0].Rows.Count > 0)
{
for (int i = 0; i < dataSet.Tables[0].Rows.Count; i++)
{
dgTags.Rows.Add(dataSet.Tables[0].Rows[i][0].ToString().Trim(), dataSet.Tables[0].Rows[i][1].ToString().Trim(),
dataSet.Tables[0].Rows[i][2].ToString().Trim(), dataSet.Tables[0].Rows[i][3].ToString().Trim(), dataSet.Tables[0].Rows[i][4].ToString().Trim(),
dataSet.Tables[0].Rows[i][5].ToString().Trim(), dataSet.Tables[0].Rows[i][6].ToString().Trim(), dataSet.Tables[0].Rows[i][7].ToString().Trim(),
dataSet.Tables[0].Rows[i][8].ToString().Trim(), dataSet.Tables[0].Rows[i][9].ToString().Trim(), dataSet.Tables[0].Rows[i][10].ToString().Trim(),
dataSet.Tables[0].Rows[i][11].ToString().Trim(), dataSet.Tables[0].Rows[i][12].ToString().Trim(), dataSet.Tables[0].Rows[i][13].ToString().Trim(),
dataSet.Tables[0].Rows[i][14].ToString().Trim(), dataSet.Tables[0].Rows[i][15].ToString().Trim(), dataSet.Tables[0].Rows[i][16].ToString().Trim(),
dataSet.Tables[0].Rows[i][17].ToString().Trim(), dataSet.Tables[0].Rows[i][18].ToString().Trim(), dataSet.Tables[0].Rows[i][19].ToString().Trim(),
dataSet.Tables[0].Rows[i][20].ToString().Trim(), dataSet.Tables[0].Rows[i][21].ToString().Trim(), dataSet.Tables[0].Rows[i][22].ToString().Trim(),
dataSet.Tables[0].Rows[i][23].ToString().Trim(), dataSet.Tables[0].Rows[i][24].ToString().Trim());
}
}
}
private void GenerateIOListData()
{
string strQueryTag = string.Empty;
string strQueryLinrNr = string.Empty;
sqlClient = new WatcherSqlClient(CConf.GetString("DBHost"), CConf.GetString("DBName"), CConf.GetBoolean("DBTrustedConnection"), CConf.GetString("DBLogin"), CConf.GetString("DBPassword"), CConf.GetString("DBConnectionString"));
sqlClient.OpenConnection();
if (cboPIDList.Text == "All")
{
strQueryTag = "SELECT * FROM INSTRUMENT_TAG_DETAILS";
}
else
{
strQueryTag = "SELECT * FROM INSTRUMENT_TAG_DETAILS WHERE PIDNumber='" + cboPIDList.Text + "'";
}
DataSet dataSet = sqlClient.Query(strQueryTag, "TAG");
DataSet dataSetLineNr;
if (cboPIDList.Text == "All")
{
dataSetLineNr = sqlClient.Query("SELECT * FROM LINE_SERVICE_DESCRIPTION", "LSD");
}
else
{
dataSetLineNr = sqlClient.Query("SELECT * FROM LINE_SERVICE_DESCRIPTION WHERE PID='" + cboPIDList.Text.Substring(0, cboPIDList.Text.Length - 4) + "'", "LSD");
}
cboLineNr.Items.Clear();
cboLineNr.Text = "";
btnExpToExcel.Enabled = true;
dgTags.ColumnCount = 14;
dgTags.Columns[0].Name = "Tag Number"; //Colum Sequence in DB 0,1,2,3,17,9,10,11,16,25,26,27,28,19
dgTags.Columns[1].Name = "Loop Name";
dgTags.Columns[2].Name = "Instrument Description";
dgTags.Columns[3].Name = "Service Description";
dgTags.Columns[4].Name = "P&ID Number";
dgTags.Columns[5].Name = "Calibration Min";
dgTags.Columns[6].Name = "Calibration Max";
dgTags.Columns[7].Name = "Unit";
dgTags.Columns[8].Name = "Set Point";
dgTags.Columns[9].Name = "I/O Type";
dgTags.Columns[10].Name = "Signal";
dgTags.Columns[11].Name = "System";
dgTags.Columns[12].Name = "Remarks";
dgTags.Columns[13].Name = "Rev. Number";
if (dataSet != null && dataSet.Tables.Count > 0 && dataSet.Tables[0].Rows.Count > 0)
{
for (int i = 0; i < dataSet.Tables[0].Rows.Count; i++)
{
dgTags.Rows.Add(dataSet.Tables[0].Rows[i][0].ToString().Trim(), dataSet.Tables[0].Rows[i][1].ToString().Trim(),
dataSet.Tables[0].Rows[i][2].ToString().Trim(), dataSet.Tables[0].Rows[i][3].ToString().Trim(), dataSet.Tables[0].Rows[i][17].ToString().Trim(),
dataSet.Tables[0].Rows[i][9].ToString().Trim(), dataSet.Tables[0].Rows[i][10].ToString().Trim(), dataSet.Tables[0].Rows[i][11].ToString().Trim(),
dataSet.Tables[0].Rows[i][16].ToString().Trim(), dataSet.Tables[0].Rows[i][25].ToString().Trim(), dataSet.Tables[0].Rows[i][26].ToString().Trim(),
dataSet.Tables[0].Rows[i][27].ToString().Trim(), dataSet.Tables[0].Rows[i][28].ToString().Trim(), dataSet.Tables[0].Rows[i][29].ToString().Trim());
}
if (dataSetLineNr != null && dataSetLineNr.Tables.Count > 0 && dataSetLineNr.Tables[0].Rows.Count > 0)
{
for (int i = 0; i < dataSetLineNr.Tables[0].Rows.Count; i++)
{
hashLineNr.Add(new KeyValuePair<string, string>(dataSetLineNr.Tables[0].Rows[i][1].ToString(), dataSetLineNr.Tables[0].Rows[i][2].ToString()));
cboLineNr.Items.Add(dataSetLineNr.Tables[0].Rows[i][1].ToString());
}
}
}
}
private void GenerateJBSchtData()
{
string strQueryTag = string.Empty;
string strQueryLinrNr = string.Empty;
sqlClient = new WatcherSqlClient(CConf.GetString("DBHost"), CConf.GetString("DBName"), CConf.GetBoolean("DBTrustedConnection"), CConf.GetString("DBLogin"), CConf.GetString("DBPassword"), CConf.GetString("DBConnectionString"));
sqlClient.OpenConnection();
if (cboPIDList.Text == "All")
{
strQueryTag = "SELECT * FROM JB_LAYOUT_DETAILS";
}
else
{
strQueryTag = "SELECT * FROM JB_LAYOUT_DETAILS WHERE JBLayoutNumber='" + cboPIDList.Text + "'";
}
DataSet dataSet = sqlClient.Query(strQueryTag, "JBS");
//DataSet dataSetLineNr;
//if (cboPIDList.Text == "All")
//{
// dataSetLineNr = sqlClient.Query("SELECT * FROM LINE_SERVICE_DESCRIPTION", "LSD");
//}
//else
//{
// dataSetLineNr = sqlClient.Query("SELECT * FROM LINE_SERVICE_DESCRIPTION WHERE PID='" + cboPIDList.Text.Substring(0, cboPIDList.Text.Length - 4) + "'", "LSD");
//}
cboLineNr.Items.Clear();
cboLineNr.Text = "";
btnExpToExcel.Enabled = true;
dgTags.ColumnCount = 3;
dgTags.Columns[0].Name = "ID"; //Colum Sequence in DB 0,1,2,3,17,9,10,11,16,25,26,27,28,19
dgTags.Columns[1].Name = "JB Detail";
dgTags.Columns[2].Name = "JB Layout Detail";
if (dataSet != null && dataSet.Tables.Count > 0 && dataSet.Tables[0].Rows.Count > 0)
{
for (int i = 0; i < dataSet.Tables[0].Rows.Count; i++)
{
dgTags.Rows.Add(dataSet.Tables[0].Rows[i][0].ToString().Trim(), dataSet.Tables[0].Rows[i][1].ToString().Trim(),
dataSet.Tables[0].Rows[i][2].ToString().Trim());
}
//if (dataSetLineNr != null && dataSetLineNr.Tables.Count > 0 && dataSetLineNr.Tables[0].Rows.Count > 0)
//{
// for (int i = 0; i < dataSetLineNr.Tables[0].Rows.Count; i++)
// {
// hashLineNr.Add(new KeyValuePair<string, string>(dataSetLineNr.Tables[0].Rows[i][1].ToString(), dataSetLineNr.Tables[0].Rows[i][2].ToString()));
// cboLineNr.Items.Add(dataSetLineNr.Tables[0].Rows[i][1].ToString());
// }
//}
}
}
private void FillPID()
{
cboPIDList.Items.Clear();
cboPIDList.Items.Add("All");
sqlClient = new WatcherSqlClient(CConf.GetString("DBHost"), CConf.GetString("DBName"), CConf.GetBoolean("DBTrustedConnection"), CConf.GetString("DBLogin"), CConf.GetString("DBPassword"), CConf.GetString("DBConnectionString"));
sqlClient.OpenConnection();
DataSet dataSetPID = sqlClient.Query("Select distinct(FILE_NAME) FROM TAG", "TAG");
if (dataSetPID != null && dataSetPID.Tables.Count > 0 && dataSetPID.Tables[0].Rows.Count > 0)
{
for (int i = 0; i < dataSetPID.Tables[0].Rows.Count; i++)
{
cboPIDList.Items.Add(dataSetPID.Tables[0].Rows[i][0].ToString().Substring(0, dataSetPID.Tables[0].Rows[i][0].ToString().IndexOf(".")));
}
}
cboPIDList.SelectedIndex = 0;
TreeNode parentNode = null;
parentNode = tviewList.Nodes.Add("PID");
PopulateTreeView(1, parentNode);
}
private void PopulateTreeView(int parentId, TreeNode parentNode)
{
sqlClient = new WatcherSqlClient(CConf.GetString("DBHost"), CConf.GetString("DBName"), CConf.GetBoolean("DBTrustedConnection"), CConf.GetString("DBLogin"), CConf.GetString("DBPassword"), CConf.GetString("DBConnectionString"));
sqlClient.OpenConnection();
DataSet dataSetPID = sqlClient.Query("Select distinct(FILE_NAME) FROM TAG", "TAG");
TreeNode childNode;
if (dataSetPID != null && dataSetPID.Tables.Count > 0 && dataSetPID.Tables[0].Rows.Count > 0)
{
for (int i = 0; i < dataSetPID.Tables[0].Rows.Count; i++)
{
if (parentNode == null)
childNode = tviewList.Nodes.Add(dataSetPID.Tables[0].Rows[i][0].ToString().Substring(0, dataSetPID.Tables[0].Rows[i][0].ToString().IndexOf(".")));
else
childNode = parentNode.Nodes.Add(dataSetPID.Tables[0].Rows[i][0].ToString().Substring(0, dataSetPID.Tables[0].Rows[i][0].ToString().IndexOf(".")));
//PopulateTreeView(Convert.ToInt32(dr["MNUSUBMENU"].ToString()), childNode);
//cboPIDList.Items.Add(dataSetPID.Tables[0].Rows[i][0].ToString().Substring(0, dataSetPID.Tables[0].Rows[i][0].ToString().IndexOf(".")));
}
}
//foreach (DataRow dr in dtchildc.Rows)
//{
// if (parentNode == null)
// childNode = treeView1.Nodes.Add(dr["FRM_NAME"].ToString());
// else
// childNode = parentNode.Nodes.Add(dr["FRM_NAME"].ToString());
// PopulateTreeView(Convert.ToInt32(dr["MNUSUBMENU"].ToString()), childNode);
//}
}
private void frmViewUpdateInstIndex_Load(object sender, EventArgs e)
{
FillPID();
if (gbInstIndex.Text.Contains("Update"))
btnExpToExcel.Visible = false;
}
bool executeSQL(WatcherSqlClient sqlClient, string strSQL)
{
if (sqlClient == null)
return false;
sqlClient.Query(strSQL, sqlTransanction);
return (sqlClient.ErrorMessage == null);
}
private void btnCloseInstIdx_Click(object sender, EventArgs e)
{
this.Hide();
}
private void cboLineNr_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
dgTags[dgTags.CurrentCell.ColumnIndex,
dgTags.CurrentRow.Index].Value = cboLineNr.Text.Trim();
dgTags[dgTags.CurrentCell.ColumnIndex - 1,
dgTags.CurrentRow.Index].Value = cboLineNr.ValueMember.Trim();
string key = cboLineNr.Text;
List<string> values = (from hashLineNr in hashLineNr where hashLineNr.Key == key select hashLineNr.Value).ToList();
dgTags[dgTags.CurrentCell.ColumnIndex - 1, dgTags.CurrentRow.Index].Value = values[0].ToString().Trim();
SendKeys.Send("{TAB}");
}
catch
{
}
}
private void cboMake_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
dgTags[dgTags.CurrentCell.ColumnIndex,
dgTags.CurrentRow.Index].Value = cboMake.Text.Trim();
//dgTags[dgTags.CurrentCell.ColumnIndex - 1,
// dgTags.CurrentRow.Index].Value = cboLineNr.ValueMember;
string key = cboMake.Text;
List<string> values = (from hashMakeDetails in hashMakeDetails where hashMakeDetails.Key == key.Trim() select hashMakeDetails.Value).ToList();
dgTags[dgTags.CurrentCell.ColumnIndex + 1, dgTags.CurrentRow.Index].Value = values[0].ToString().Trim();
SendKeys.Send("{TAB}");
}
catch
{
}
}
private void GetMakeDetails(string InstrumentType)
{
cboMake.Items.Clear();
cboMake.Text = "";
DataSet dataSetMakeList = sqlClient.Query("SELECT Make,DefaultModelNr FROM VENDOR_LIST WHERE InstrumentType='" + InstrumentType + "'", "LSD");
if (dataSetMakeList != null && dataSetMakeList.Tables.Count > 0 && dataSetMakeList.Tables[0].Rows.Count > 0)
{
for (int i = 0; i < dataSetMakeList.Tables[0].Rows.Count; i++)
{
hashMakeDetails.Add(new KeyValuePair<string, string>(dataSetMakeList.Tables[0].Rows[i][0].ToString().Trim(), dataSetMakeList.Tables[0].Rows[i][1].ToString().Trim()));
cboMake.Items.Add(dataSetMakeList.Tables[0].Rows[i][0].ToString());
}
}
}
private void GetLineNrDetails(string PID)
{
cboLineNr.Items.Clear();
cboLineNr.Text = "";
DataSet dataSetLineNr = sqlClient.Query("SELECT * FROM LINE_SERVICE_DESCRIPTION WHERE PID='" + PID + "'", "LSD");
if (dataSetLineNr != null && dataSetLineNr.Tables.Count > 0 && dataSetLineNr.Tables[0].Rows.Count > 0)
{
for (int i = 0; i < dataSetLineNr.Tables[0].Rows.Count; i++)
{
hashLineNr.Add(new KeyValuePair<string, string>(dataSetLineNr.Tables[0].Rows[i][1].ToString(), dataSetLineNr.Tables[0].Rows[i][2].ToString()));
cboLineNr.Items.Add(dataSetLineNr.Tables[0].Rows[i][1].ToString());
}
}
}
private void dgTags_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (ActiveControl.Name == "dgTags")
{
// SHOW THE COMBOBOX WHEN FOCUS IS ON A CELL CORRESPONDING TO THE "QUALIFICATION" COLUMN.
if (dgTags.Columns
[dgTags.CurrentCell.ColumnIndex].Name == "Line / Equipment Number")
{
cboMake.Visible = false;
GetLineNrDetails(dgTags[17, dgTags.CurrentRow.Index].Value.ToString());
dgTags.CurrentCell =
dgTags.Rows[dgTags.CurrentRow.Index]
.Cells[dgTags.CurrentCell.ColumnIndex];
// SHOW COMBOBOX.
Show_Combobox(dgTags.CurrentRow.Index,
dgTags.CurrentCell.ColumnIndex);
SendKeys.Send("{F4}"); // DROP DOWN THE LIST.
}
else if (dgTags.Columns
[dgTags.CurrentCell.ColumnIndex].Name == "Make")
{
cboLineNr.Visible = false;
GetMakeDetails(dgTags[2, dgTags.CurrentRow.Index].Value.ToString());
dgTags.CurrentCell =
dgTags.Rows[dgTags.CurrentRow.Index]
.Cells[dgTags.CurrentCell.ColumnIndex];
// SHOW COMBOBOX.
Show_MakeCombobox(dgTags.CurrentRow.Index,
dgTags.CurrentCell.ColumnIndex);
SendKeys.Send("{F4}"); // DROP DOWN THE LIST.
}
else
{
cboLineNr.Visible = false;
cboMake.Visible = false;
}
}
else
{
SendKeys.Send("{TAB}");
}
}
private void Show_Combobox(int iRowIndex, int iColumnIndex)
{
// DESCRIPTION: SHOW THE COMBO BOX IN THE SELECTED CELL OF THE GRID.
// PARAMETERS: iRowIndex - THE ROW ID OF THE GRID.
// iColumnIndex - THE COLUMN ID OF THE GRID.
int x = 0;
int y = 0;
int Width = 0;
int height = 0;
// GET THE ACTIVE CELL'S DIMENTIONS TO BIND THE COMBOBOX WITH IT.
Rectangle rect = default(Rectangle);
rect = dgTags.GetCellDisplayRectangle(iColumnIndex, iRowIndex, false);
x = rect.X + dgTags.Left;
y = rect.Y + dgTags.Top;
Width = rect.Width;
height = rect.Height;
cboLineNr.SetBounds(x, y, Width, height);
cboLineNr.Visible = true;
cboLineNr.Focus();
}
private void Show_MakeCombobox(int iRowIndex, int iColumnIndex)
{
// DESCRIPTION: SHOW THE COMBO BOX IN THE SELECTED CELL OF THE GRID.
// PARAMETERS: iRowIndex - THE ROW ID OF THE GRID.
// iColumnIndex - THE COLUMN ID OF THE GRID.
int x = 0;
int y = 0;
int Width = 0;
int height = 0;
// GET THE ACTIVE CELL'S DIMENTIONS TO BIND THE COMBOBOX WITH IT.
Rectangle rect = default(Rectangle);
rect = dgTags.GetCellDisplayRectangle(iColumnIndex, iRowIndex, false);
x = rect.X + dgTags.Left;
y = rect.Y + dgTags.Top;
Width = rect.Width;
height = rect.Height;
cboMake.SetBounds(x, y, Width, height);
cboMake.Visible = true;
cboMake.Focus();
}
protected override bool ProcessCmdKey(ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData)
{
if (keyData == Keys.Enter || keyData == Keys.Tab)
{
// ON ENTER KEY, GO TO THE NEXT CELL.
// WHEN THE CURSOR REACHES THE LAST COLUMN, CARRY IT ON TO THE NEXT ROW.
if (ActiveControl.Name == "dgTags")
{
// SHOW THE COMBOBOX WHEN FOCUS IS ON A CELL CORRESPONDING TO THE "QUALIFICATION" COLUMN.
if (dgTags.Columns
[dgTags.CurrentCell.ColumnIndex].Name == "Service Description")
{
dgTags.CurrentCell =
dgTags.Rows[dgTags.CurrentRow.Index]
.Cells[dgTags.CurrentCell.ColumnIndex + 1];
// SHOW COMBOBOX.
Show_Combobox(dgTags.CurrentRow.Index,
dgTags.CurrentCell.ColumnIndex);
SendKeys.Send("{F4}"); // DROP DOWN THE LIST.
return true;
}
else if (dgTags.Columns
[dgTags.CurrentCell.ColumnIndex].Name == "Line / Equipment Number")
{
GetMakeDetails(dgTags[2, dgTags.CurrentRow.Index].Value.ToString());
dgTags.CurrentCell =
dgTags.Rows[dgTags.CurrentRow.Index]
.Cells[dgTags.CurrentCell.ColumnIndex + 1];
// SHOW COMBOBOX.
Show_MakeCombobox(dgTags.CurrentRow.Index,
dgTags.CurrentCell.ColumnIndex);
SendKeys.Send("{F4}"); // DROP DOWN THE LIST.
return true;
}
else
{
// CHECK IF ITS THE LAST COLUMN.
if (dgTags.CurrentCell.ColumnIndex ==
dgTags.ColumnCount - 1)
{
// GO TO THE FIRST COLUMN, NEXT ROW.
dgTags.CurrentCell =
dgTags.Rows[dgTags.CurrentCell.RowIndex + 1]
.Cells[0];
}
else
{
// NEXT COLUMN.
dgTags.CurrentCell =
dgTags.Rows[dgTags.CurrentRow.Index]
.Cells[dgTags.CurrentCell.ColumnIndex + 1];
}
return true;
}
}
else if (ActiveControl.Name == "cboLineNr")
{
// HIDE THE COMBOBOX AND ASSIGN COMBO'S VALUE TO THE CELL.
cboLineNr.Visible = false;
dgTags.Focus();
// ONCE THE COMBO IS SET AS INVISIBLE, SET FOCUS BACK TO THE GRID. (IMPORTANT)
dgTags[dgTags.CurrentCell.ColumnIndex,
dgTags.CurrentRow.Index].Value = cboLineNr.Text;
dgTags.CurrentCell =
dgTags.Rows[dgTags.CurrentRow.Index]
.Cells[dgTags.CurrentCell.ColumnIndex + 1];
}
else if (ActiveControl.Name == "cboMake")
{
// HIDE THE COMBOBOX AND ASSIGN COMBO'S VALUE TO THE CELL.
cboMake.Visible = false;
dgTags.Focus();
// ONCE THE COMBO IS SET AS INVISIBLE, SET FOCUS BACK TO THE GRID. (IMPORTANT)
dgTags[dgTags.CurrentCell.ColumnIndex,
dgTags.CurrentRow.Index].Value = cboMake.Text;
dgTags.CurrentCell =
dgTags.Rows[dgTags.CurrentRow.Index]
.Cells[dgTags.CurrentCell.ColumnIndex + 1];
}
else
{
SendKeys.Send("{TAB}");
}
return true;
}
else if (keyData == Keys.Escape) // PRESS ESCAPE TO HIDE THE COMBOBOX.
{
if (ActiveControl.Name == "cboLineNr")
{
cboLineNr.Text = "";
cboLineNr.Visible = false;
dgTags.CurrentCell =
dgTags.Rows[dgTags.CurrentCell.RowIndex]
.Cells[dgTags.CurrentCell.ColumnIndex];
dgTags.Focus();
}
if (ActiveControl.Name == "cboMake")
{
cboMake.Text = "";
cboMake.Visible = false;
dgTags.CurrentCell =
dgTags.Rows[dgTags.CurrentCell.RowIndex]
.Cells[dgTags.CurrentCell.ColumnIndex];
dgTags.Focus();
}
return true;
}
else
{
return base.ProcessCmdKey(ref msg, keyData);
}
}
private void btnUpdate_Click(object sender, EventArgs e)
{
frmILDGenMain frmMain = new frmILDGenMain();
if (cboExtractList.Text == "Instrument Index")
{
UpdateInstrumentIndex();
frmMain.UpdateStatusBarText("Instrument Index Data Updated Successfully.");
//frmMain.StatStripLbl1.Text = "Instrument Index Data Updated Successfully.";
}
else if (cboExtractList.Text == "I/O List")
{
UpdateIOList();
frmMain.StatStripLbl1.Text = "I/O List Data Updated Successfully.";
}
frmMain.Refresh();
}
private void UpdateInstrumentIndex()
{
try
{
int rNum = -1;
foreach (DataGridViewCell cell in changedCells)
{
if(rNum != cell.RowIndex)
{
rNum = cell.RowIndex;
//dgTags.Rows[rNum].Cells[19].Value = Convert.ToInt16(dgTags.Rows[rNum].Cells[19].Value) + 1;
string strSQL = string.Empty;
strSQL = "UPDATE INSTRUMENT_TAG_DETAILS SET LoopName='" + dgTags.Rows[rNum].Cells[1].Value
+ "',InstrumentDescription='" + dgTags.Rows[rNum].Cells[2].Value
+ "',ServiceDescription='" + dgTags.Rows[rNum].Cells[3].Value
+ "',LineEquipmentNumber='" + dgTags.Rows[rNum].Cells[4].Value.ToString().Replace("'", "''")
+ "',Make='" + dgTags.Rows[rNum].Cells[5].Value
+ "',ModelNumber='" + dgTags.Rows[rNum].Cells[6].Value
+ "',InstRangeMin='" + dgTags.Rows[rNum].Cells[7].Value
+ "',InstRangeMax='" + dgTags.Rows[rNum].Cells[8].Value
+ "',CalibrationMin='" + dgTags.Rows[rNum].Cells[9].Value
+ "',CalibrationMax='" + dgTags.Rows[rNum].Cells[10].Value
+ "',Unit='" + dgTags.Rows[rNum].Cells[11].Value
+ "',AlarmLL='" + dgTags.Rows[rNum].Cells[12].Value
+ "',AlarmL='" + dgTags.Rows[rNum].Cells[13].Value
+ "',AlarmH='" + dgTags.Rows[rNum].Cells[14].Value
+ "',AlarmHH='" + dgTags.Rows[rNum].Cells[15].Value
+ "',Setpoint='" + dgTags.Rows[rNum].Cells[16].Value
+ "',PIDNumber='" + dgTags.Rows[rNum].Cells[17].Value
+ "',IndexRemarks='" + dgTags.Rows[rNum].Cells[18].Value
+ "',IIRevNumber='" + dgTags.Rows[rNum].Cells[19].Value
+ "',PPHookupNumber='" + dgTags.Rows[rNum].Cells[20].Value
+ "',WiringDrawingNumber='" + dgTags.Rows[rNum].Cells[21].Value
+ "',InstallationDrawingNumber='" + dgTags.Rows[rNum].Cells[22].Value
+ "',FunctionalSchemeNumber='" + dgTags.Rows[rNum].Cells[23].Value
+ "',LogicDiagramNumber='" + dgTags.Rows[rNum].Cells[24].Value
+ "',IIRowModified='Yes' WHERE TagNumber ='" + dgTags.Rows[rNum].Cells[0].Value + "'";
executeSQL(sqlClient, strSQL);
}
}
}
catch
{
}
}
private void UpdateIOList()
{
try
{
int rNum = -1;
foreach (DataGridViewCell cell in changedCells)
{
if (rNum != cell.RowIndex)
{
rNum = cell.RowIndex;
string strSQL = string.Empty;
strSQL = "UPDATE INSTRUMENT_TAG_DETAILS SET LoopName='" + dgTags.Rows[rNum].Cells[1].Value
+ "',InstrumentDescription='" + dgTags.Rows[rNum].Cells[2].Value
+ "',ServiceDescription='" + dgTags.Rows[rNum].Cells[3].Value
+ "',PIDNumber='" + dgTags.Rows[rNum].Cells[4].Value
+ "',CalibrationMin='" + dgTags.Rows[rNum].Cells[5].Value
+ "',CalibrationMax='" + dgTags.Rows[rNum].Cells[6].Value
+ "',Unit='" + dgTags.Rows[rNum].Cells[7].Value
+ "',Setpoint='" + dgTags.Rows[rNum].Cells[8].Value
+ "',IOType='" + dgTags.Rows[rNum].Cells[9].Value
+ "',Signal='" + dgTags.Rows[rNum].Cells[10].Value
+ "',System='" + dgTags.Rows[rNum].Cells[11].Value
+ "',IORemarks='" + dgTags.Rows[rNum].Cells[12].Value
+ "',IORevNumber='" + dgTags.Rows[rNum].Cells[13].Value
+ "',IORowModified='Yes' WHERE TagNumber ='" + dgTags.Rows[rNum].Cells[0].Value + "'";
executeSQL(sqlClient, strSQL);
}
}
}
catch
{
}
}
private void btnExpToExcel_Click(object sender, EventArgs e)
{
frmWait frmShowWait = new frmWait();
frmShowWait.StartPosition = FormStartPosition.CenterScreen;
frmShowWait.Show();
frmShowWait.Refresh();
string datestr = DateTime.Now.ToShortDateString() + "_" + DateTime.Now.ToLongTimeString();
datestr = datestr.Replace('/', '_');
datestr = datestr.Replace(':', '_');
string sourcePath = "";
string destinationPath = "";
if (cboExtractList.Text == "Instrument Index")
{
sourcePath = @"D:\C1_IIndex_Template_New.xls";
destinationPath = @"D:\C1IDG_Reports\C1_IIndex_" + datestr + ".xls";
UpdateInstrumentTagDetailsLog();
}
else if (cboExtractList.Text == "I/O List")
{
sourcePath = @"D:\C1_IIndex_Template_New.xls";
destinationPath = @"D:\C1IDG_Reports\C1_IIndex_" + datestr + ".xls";
UpdateInstrumentTagDetailsLog();
}
else if (cboExtractList.Text == "JB Schedule List")
{
sourcePath = @"C:\CEONE\C-IN\TestFiles\JB Schedule Template.xlsx";
destinationPath = @"D:\C1IDG_Reports\CIN_JBS_" + datestr + ".xls";
}
frmILDGenMain frmMain = new frmILDGenMain();
try
{
if (dgTags.Rows.Count > 0)
{
Microsoft.Office.Interop.Excel.Application xlApp;
Microsoft.Office.Interop.Excel.Workbook xlWorkBook;
Microsoft.Office.Interop.Excel.Worksheet xlWorkSheet;
object misValue = System.Reflection.Missing.Value;
xlApp = new Microsoft.Office.Interop.Excel.Application();
xlWorkBook = xlApp.Workbooks.Add(sourcePath);
System.IO.Directory.CreateDirectory("D:\\C1IDG_Reports");
int currentSheet = 1;
int totSheets = dgTags.Rows.Count / 5;
for (int i=1; i<=totSheets; i++)
{
xlWorkSheet = (Microsoft.Office.Interop.Excel.Worksheet)xlWorkBook.Worksheets.get_Item(currentSheet);
xlWorkSheet.Copy(Type.Missing, xlWorkBook.Sheets[i]); // copy
if (cboExtractList.Text == "Instrument Index")
{
xlWorkBook.Sheets[i + 1].Name = "Instrument Index " + i.ToString(); //rename
}
else if (cboExtractList.Text == "I/O List")
{
xlWorkBook.Sheets[i + 1].Name = "I/O List " + i.ToString();
}
else if (cboExtractList.Text == "JB Schedule List")
{
xlWorkBook.Sheets[i + 1].Name = "JBS List " + i.ToString();
}
}
int rowNo = 0;
int sCounter = 5;
for(int sNo=1; sNo <= totSheets+1; sNo++)
{
int RowMax = rowNo + sCounter;
xlWorkSheet = (Microsoft.Office.Interop.Excel.Worksheet)xlWorkBook.Worksheets.get_Item(sNo);
for (int i = 1; i < dgTags.Columns.Count + 1; i++)
{
xlWorkSheet.Cells[1, i] = dgTags.Columns[i - 1].HeaderText;
}
for (int i = 0; i < sCounter; i++)
{
for (int j = 0; j < dgTags.Columns.Count-1; j++)
{
xlWorkSheet.Cells[i + 2, j + 1] = dgTags.Rows[rowNo].Cells[j].Value.ToString();
}
rowNo++;
if (rowNo == dgTags.Rows.Count-1) break;
}
}
if (System.IO.File.Exists(destinationPath))
{
System.IO.File.Create(destinationPath);
}
xlWorkSheet = (Microsoft.Office.Interop.Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
xlWorkBook.SaveAs(destinationPath, Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue, Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);
xlWorkBook.Close(true, misValue, misValue);
xlApp.Quit();
frmMain.StatStripLbl1.Text = "Writing Data to Excel Completed.";
}
else
{
frmMain.StatStripLbl1.Text = "Data not available for export.";
}
frmShowWait.Hide();
}
catch
{
frmShowWait.Hide();
frmMain.StatStripLbl1.Text = "Error occured in writing to the file. Please check the file on D drive.";
}
}
private void UpdateInstrumentTagDetailsLog()
{
try
{
string strSQL = string.Empty;
//First insert modified rows into Log table with updated rev number and timestamp
if (cboExtractList.Text == "Instrument Index")
{
strSQL = "INSERT INTO INSTRUMENT_TAG_DETAILS_LOG (TagNumber,LoopName,InstrumentDescription,ServiceDescription,LineEquipmentNumber,"
+ "Make,ModelNumber,InstRangeMin,InstRangeMax,CalibrationMin,CalibrationMax,Unit,AlarmLL,AlarmL,AlarmH,AlarmHH,Setpoint,PIDNumber,"
+ "IndexRemarks,IIRevNumber,PPHookupNumber,WiringDrawingNumber,InstallationDrawingNumber,FunctionalSchemeNumber,LogicDiagramNumber,IIRowModified,IIRevTimeStamp,UserID,ProjectID) "
+ "SELECT TagNumber, LoopName, InstrumentDescription, ServiceDescription, LineEquipmentNumber, "
+ "Make,ModelNumber,InstRangeMin,InstRangeMax,CalibrationMin,CalibrationMax,Unit,AlarmLL,AlarmL,AlarmH,AlarmHH,Setpoint,PIDNumber,"
+ "IndexRemarks,[IIRevNumber] + 1 as IIRevNumber,PPHookupNumber,WiringDrawingNumber,InstallationDrawingNumber,FunctionalSchemeNumber,LogicDiagramNumber,IIRowModified,'" + DateTime.Now.ToShortDateString() + "' as IIRevTimeStamp,UserID,ProjectID "
+ "FROM INSTRUMENT_TAG_DETAILS WHERE IIRowModified = 'Yes'";
executeSQL(sqlClient, strSQL);
strSQL = "UPDATE INSTRUMENT_TAG_DETAILS SET IIRevNumber=ISNULL(IIRevNumber, 0) + 1, IIRowModified='No' WHERE IIRowModified='Yes'";
executeSQL(sqlClient, strSQL);
}
else
{
strSQL = "INSERT INTO INSTRUMENT_TAG_DETAILS_LOG (TagNumber,LoopName,InstrumentDescription,ServiceDescription,LineEquipmentNumber,"
+ "Make,ModelNumber,InstRangeMin,InstRangeMax,CalibrationMin,CalibrationMax,Unit,AlarmLL,AlarmL,AlarmH,AlarmHH,Setpoint,PIDNumber,"
+ "IndexRemarks,IIRevNumber,PPHookupNumber,WiringDrawingNumber,InstallationDrawingNumber,FunctionalSchemeNumber,LogicDiagramNumber,IOType,Signal,System,IORemarks,IORevNumber,IORowModified,IORevTimeStamp,UserID,ProjectID) "
+ "SELECT TagNumber, LoopName, InstrumentDescription, ServiceDescription, LineEquipmentNumber, "
+ "Make,ModelNumber,InstRangeMin,InstRangeMax,CalibrationMin,CalibrationMax,Unit,AlarmLL,AlarmL,AlarmH,AlarmHH,Setpoint,PIDNumber,"
+ "IndexRemarks,IIRevNumber,PPHookupNumber,WiringDrawingNumber,InstallationDrawingNumber,FunctionalSchemeNumber,LogicDiagramNumber,IOType,Signal,System,IORemarks,[IORevNumber] + 1 as IIRevNumber,IORowModified,'" + DateTime.Now.ToShortDateString() + "' as IIRevTimeStamp,UserID,ProjectID "
+ "FROM INSTRUMENT_TAG_DETAILS WHERE IORowModified = 'Yes'";
executeSQL(sqlClient, strSQL);
strSQL = "UPDATE INSTRUMENT_TAG_DETAILS SET IORevNumber=ISNULL(IORevNumber, 0) + 1, IORowModified='No' WHERE IORowModified='Yes'";
executeSQL(sqlClient, strSQL);
}
}
catch
{
}
}
private void dgTags_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
DataGridView dgv = sender as DataGridView;
if (!changedCells.Contains(dgv[e.ColumnIndex, e.RowIndex]))
{
changedCells.Add(dgv[e.ColumnIndex, e.RowIndex]);
}
}
private void tviewList_DrawNode(object sender, DrawTreeNodeEventArgs e)
{
//if (e.Node.Parent == null)
//{
// int d = (int)(0.2 * e.Bounds.Height);
// Rectangle rect = new Rectangle(d + tviewList.Margin.Left, d + e.Bounds.Top, e.Bounds.Height - d * 2, e.Bounds.Height - d * 2);
// e.Graphics.FillRectangle(new SolidBrush(Color.FromKnownColor(KnownColor.Control)), rect);
// e.Graphics.DrawRectangle(Pens.Silver, rect);
// StringFormat sf = new StringFormat() { LineAlignment = StringAlignment.Center, Alignment = StringAlignment.Center };
// e.Graphics.DrawString(e.Node.IsExpanded ? "-" : "+", tviewList.Font, new SolidBrush(Color.Blue), rect, sf);
// //Draw the dotted line connecting the expanding/collapsing button and the node Text
// using (Pen dotted = new Pen(Color.Black) { DashStyle = System.Drawing.Drawing2D.DashStyle.Dot })
// {
// e.Graphics.DrawLine(dotted, new Point(rect.Right + 1, rect.Top + rect.Height / 2), new Point(rect.Right + 4, rect.Top + rect.Height / 2));
// }
// //Draw text
// sf.Alignment = StringAlignment.Near;
// Rectangle textRect = new Rectangle(e.Bounds.Left + rect.Right + 4, e.Bounds.Top, e.Bounds.Width - rect.Right - 4, e.Bounds.Height);
// if (e.Node.IsSelected)
// {
// SizeF textSize = e.Graphics.MeasureString(e.Node.Text, tviewList.Font);
// e.Graphics.FillRectangle(new SolidBrush(SystemColors.Highlight), new RectangleF(textRect.Left, textRect.Top, textSize.Width, textRect.Height));
// }
// e.Graphics.DrawString(e.Node.Text, tviewList.Font, new SolidBrush(tviewList.ForeColor), textRect, sf);
//}
//else e.DrawDefault = true;
}
private void tviewList_AfterSelect(object sender, TreeViewEventArgs e)
{
//foreach (TreeNode node in tviewList.Nodes)
//{
// if (node.IsSelected)
// {
// MessageBox.Show(node.Text + "is selected tviewList_AfterSelect");
// }
// CheckForChildren(node);
//}
}
private void CheckForChildren(TreeNode node)
{
// check whether each parent node has child nodes
if (node.Nodes.Count > 0)
{
// iterate through child nodes in the collection
foreach (TreeNode node1 in node.Nodes)
{
if (node1.IsSelected)
{
MessageBox.Show(node1.Text + "is selected CheckForChildren");
}
// Do recursive call
CheckForChildren(node1);
}
}
}
private void tviewList_AfterCheck(object sender, TreeViewEventArgs e)
{
if (e.Action != TreeViewAction.Unknown)
{
CheckAllChildNodes(e.Node, e.Node.Checked);
//if (e.Node.Nodes.Count > 0)
//{
// /* Calls the CheckAllChildNodes method, passing in the current
// Checked value of the TreeNode whose checked state changed. */
// this.CheckAllChildNodes(e.Node, e.Node.Checked);
//}
}
// Disable redrawing of treeView1 to prevent flickering
// while changes are made.
tviewList.BeginUpdate();
// Collapse all nodes of treeView1.
tviewList.CollapseAll();
// Add the checkForCheckedChildren event handler to the BeforeExpand event.
tviewList.BeforeExpand += checkForCheckedChildren;
// Expand all nodes of treeView1. Nodes without checked children are
// prevented from expanding by the checkForCheckedChildren event handler.
tviewList.ExpandAll();
// Remove the checkForCheckedChildren event handler from the BeforeExpand
// event so manual node expansion will work correctly.
tviewList.BeforeExpand -= checkForCheckedChildren;
// Enable redrawing of treeView1.
tviewList.EndUpdate();
}
// Updates all child tree nodes recursively.
private void CheckAllChildNodes(TreeNode treeNode, bool nodeChecked)
{
foreach (TreeNode node in treeNode.Nodes)
{
node.Checked = nodeChecked;
if (node.Nodes.Count > 0)
{
// If the current node has child nodes, call the CheckAllChildsNodes method recursively.
this.CheckAllChildNodes(node, nodeChecked);
}
}
GetCheckedNodesText(tviewList.Nodes);
}
// Prevent expansion of a node that does not have any checked child nodes.
private void CheckForCheckedChildrenHandler(object sender, TreeViewCancelEventArgs e)
{
if (!HasCheckedChildNodes(e.Node)) e.Cancel = true;
}
// Returns a value indicating whether the specified
// TreeNode has checked child nodes.
private bool HasCheckedChildNodes(TreeNode node)
{
if (node.Nodes.Count == 0) return false;
foreach (TreeNode childNode in node.Nodes)
{
if (childNode.Checked) return true;
// Recursively check the children of the current child node.
if (HasCheckedChildNodes(childNode)) return true;
}
return false;
}
public void GetCheckedNodesText(TreeNodeCollection nodes)
{
string PIDListQuery = null;
bool bNodesSelected = false;
foreach (System.Windows.Forms.TreeNode aNode in nodes)
{
//edit
if (aNode.Checked)
{
if(aNode.Text == "PID")
{
bNodesSelected = true;
}
else
{
//WHERE PIDNumber='5288-BUH-39-00-30-021' or PIDNumber='PID_5288-BUH-835-30-21'
if(PIDListQuery == null)
PIDListQuery = " PIDNumber='" + aNode.Text + "'";
else
PIDListQuery = PIDListQuery + " or PIDNumber='" + aNode.Text + "'";
bNodesSelected = true;
}
}
//MessageBox.Show(aNode.Text);
if (aNode.Nodes.Count != 0)
GetCheckedNodesText(aNode.Nodes);
}
if(bNodesSelected == true && PIDListQuery != null)
{
dgTags.Rows.Clear();
dgTags.Columns.Clear();
cboLineNr.Visible = false;
cboMake.Visible = false;
cboLineNr.Items.Clear();
btnExpToExcel.Enabled = false;
changedCells.Clear();
GenerateTViewInstIndexData(PIDListQuery);
bNodesSelected = false;
}
else if (bNodesSelected == false)
{
dgTags.Rows.Clear();
dgTags.Columns.Clear();
cboLineNr.Visible = false;
cboMake.Visible = false;
cboLineNr.Items.Clear();
btnExpToExcel.Enabled = false;
changedCells.Clear();
}
}
private void gbInstIndex_Enter(object sender, EventArgs e)
{
}
}
}
|
using Athena.Import.Extractors;
using FluentAssertions;
using NUnit.Framework;
namespace AthenaTests {
public class IsbnExtractorTests {
[Test]
public void Extract_ShouldReturnIsbn() {
// Arrange
var text = "978-83-7469-105-5";
// Act
var isbn = IsbnExtractor.Extract(text);
// Assert
isbn.Should().Be(text);
}
[Test]
public void Extract_Spaces_ShouldReturnIsbn() {
// Arrange
var expectedIsbn = "978-83-7469-105-5";
var text = $" {expectedIsbn} ";
// Act
var isbn = IsbnExtractor.Extract(text);
// Assert
isbn.Should().Be(expectedIsbn);
}
[Test]
public void Extract_EmptyText_ShouldReturnNull() {
// Arrange
var text = string.Empty;
// Act
var isbn = IsbnExtractor.Extract(text);
// Assert
isbn.Should().BeNull();
}
[Test]
public void Extract_Null_ShouldReturnNull() {
// Arrange
string text = null;
// Act
var isbn = IsbnExtractor.Extract(text);
// Assert
isbn.Should().BeNull();
}
[Test]
public void Extract_Pause_ShouldReturnNull() {
// Arrange
string text = "-";
// Act
var isbn = IsbnExtractor.Extract(text);
// Assert
isbn.Should().BeNull();
}
[Test]
public void Extract_PauseAndApostrophe_ShouldReturnNull() {
// Arrange
string text = "'-";
// Act
var isbn = IsbnExtractor.Extract(text);
// Assert
isbn.Should().BeNull();
}
}
} |
using System.Collections.Generic;
namespace StoreDB.Models
{
public class Product
{
public int ProductId { get; set; }
public string Name { get; set; }
public decimal Price { get; set; }
public string Description { get; set; }
public List<ProductStock> ProductStocks { get; set; }
public List<OrderItem> ProductOrders { get; set; }
}
} |
using System;
namespace BagOLoot
{
public class MenuBuilder
{
public int ShowMainMenu()
{
Console.WriteLine ("WELCOME TO THE BAG O' LOOT SYSTEM");
Console.WriteLine ("*********************************");
Console.WriteLine ("1. Add a child");
Console.WriteLine("2. Assign toy to a child");
Console.WriteLine("3. Revoke toy from child");
Console.WriteLine("4. Review child's toy list");
Console.WriteLine("5. Child toy delivery complete");
Console.WriteLine("6. Yuletime Delivery Report");
Console.Write ("> ");
ConsoleKeyInfo enteredKey = Console.ReadKey();
Console.WriteLine("");
return int.Parse(enteredKey.KeyChar.ToString());
}
}
} |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CursorManager : MonoBehaviour
{
public static CursorManager cursorInstance;
public Texture2D gameCursor;
public Texture2D basicCursor;
private Texture2D cursorTexture;
private int cursorSizeX = 38;
private int cursorSizeY = 38;
private void Awake()
{
//Nos aseguramos de que solo haya 1 CursorManager
if (cursorInstance == null)
{
cursorInstance = this;
}
else if (cursorInstance != this)
{
Destroy(gameObject);
}
DontDestroyOnLoad(gameObject);
}
// Start is called before the first frame update
void Start()
{
Cursor.visible = false;
cursorTexture = basicCursor;
}
private void OnGUI()
{
GUI.DrawTexture(new Rect(Event.current.mousePosition.x - cursorSizeX/5f,
Event.current.mousePosition.y,
cursorSizeX, cursorSizeY), cursorTexture);
}
public void SetCursor(Texture2D texture)
{
Cursor.visible = false;
cursorTexture = texture;
}
}
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Pitstop
{
public class LUD_NonDialogueManager : MonoBehaviour
{
public float timePassedLockedWhenOffended = 3f;
public int stepsInUIOffendedProgression = 20;
}
}
|
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Xml;
using Divelements.Navisight;
using JasonJimenez.ClassicReport.Common;
namespace JasonJimenez.ClassicReport
{
/// <summary>
/// A banded report writer.
/// </summary>
public partial class ReportDesigner : UserControl
{
NavigationButton hilitedButton = null;
bool isAltPressed;
bool isReportContext = false;
/// <summary>
///
/// </summary>
public ReportDesigner()
{
InitializeComponent();
}
/// <summary>
/// Return the layout of the report in XML format.
/// </summary>
/// <returns></returns>
public string GetSchema()
{
return designPanel.ToXml();
}
/// <summary>
/// Create a new report.
/// </summary>
public void NewReport()
{
_fileName = "";
designPanel.Clear();
ShowGroups();
ShowAttributes();
}
/// <summary>
/// Edit an existing report.
/// </summary>
public void OpenReport()
{
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
string path = openFileDialog.FileName;
OpenReport(path);
}
}
string _fileName = "";
public string FileName
{
get {return _fileName;}
}
public void OpenReport(string fileName)
{
_fileName = fileName;
designPanel.OpenReport(fileName);
ShowGroups();
ShowAttributes();
}
public void OpenSchema(string schema)
{
designPanel.OpenSchema(schema);
ShowGroups();
ShowAttributes();
}
/// <summary>
/// Persist the report to disk.
/// </summary>
public void SaveAs()
{
if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
string path = saveFileDialog.FileName;
Save(path);
}
}
public void Save()
{
if (_fileName == "")
SaveAs();
else
Save(_fileName);
}
public void Save(string fileName)
{
XmlDocument doc = new XmlDocument();
doc.LoadXml(designPanel.ToXml());
doc.Save(fileName);
}
private void ShowGroups()
{
groupListBox.Items.Clear();
foreach (Group group in designPanel.ReportSchema.Groups)
{
groupListBox.Items.Add(group);
}
}
private void toolboxBar_MouseDown(object sender, MouseEventArgs e)
{
if (hilitedButton != null)
{
toolboxBar.DoDragDrop(hilitedButton.Text, DragDropEffects.Copy);
}
}
private void toolboxBar_MouseMove(object sender, MouseEventArgs e)
{
hilitedButton = toolboxBar.GetButtonAt(new Point(e.X, e.Y));
}
private void designPanel_KeyDown(object sender, KeyEventArgs e)
{
isAltPressed = e.Alt;
}
private void designPanel_KeyUp(object sender, KeyEventArgs e)
{
isAltPressed = false;
}
private void designPanel_Click(object sender, EventArgs e)
{
string lastControl = designPanel.LastControl();
if (isAltPressed && lastControl!="")
{
designPanel.InsertControl(lastControl);
}
}
private void designPanel_ClipBoardChanged(object sender, ReportDesignerEventArgs e)
{
pasteToolStripButton.Enabled = e.Count > 0;
}
private void designPanel_SelectionChanged(object sender, ReportDesignerEventArgs e)
{
bool flag = e.Count > 0;
cutToolStripButton.Enabled = flag;
copyToolStripButton.Enabled = flag;
if (e.Count > 0)
{
this.propertyGrid.SelectedObjects = e.Widget;
}
//else if (e.Count == 1)
//{
// this.propertyGrid.SelectedObject = e.Widget;
//}
else
{
this.propertyGrid.SelectedObject = null;
}
isReportContext = false;
}
private void cutToolStripButton_Click(object sender, EventArgs e)
{
designPanel.CutWidgets();
}
private void propertyGrid_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
{
if (!isReportContext)
{
this.designPanel.SetValue(e.ChangedItem.Label, e.ChangedItem.Value);
}
this.designPanel.Invalidate();
ShowGroups();
}
private void copyToolStripButton_Click(object sender, EventArgs e)
{
designPanel.CopyWidgets();
}
private void pasteToolStripButton_Click(object sender, EventArgs e)
{
designPanel.PasteWidgets();
}
private void groupListBox_SelectedIndexChanged(object sender, EventArgs e)
{
ShowGroupProperty();
}
private void addGroupToolStripButton_Click(object sender, EventArgs e)
{
int count = designPanel.ReportSchema.Groups.Count;
Group group = new Group("Group"+count.ToString());
designPanel.AddGroup(group);
//designPanel.Invalidate();
ShowGroups();
}
private void delgroupToolStripButton_Click(object sender, EventArgs e)
{
Group group = groupListBox.SelectedItem as Group;
if (group != null)
{
this.propertyGrid.SelectedObject = null;
designPanel.RemoveGroup(group);
//designPanel.Invalidate();
ShowGroups();
}
}
private void layoutToolStripMenuItem_Click(object sender, EventArgs e)
{
ShowAttributes();
}
void ShowAttributes()
{
propertyGrid.SelectedObject = designPanel.ReportSchema;
isReportContext = true;
}
void ShowGroupProperty()
{
propertyGrid.SelectedObject = groupListBox.SelectedItem;
isReportContext = true;
}
private void layoutToolStripButton_Click(object sender, EventArgs e)
{
ShowAttributes();
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace ECommerce.Tools
{
public interface ILoginService
{
bool IsConnected { get; }
bool LoginConnection(string email, string password);
bool TestConnection();
void LogOut();
int GetUserProfil();
}
}
|
#region Copyright Syncfusion Inc. 2001-2015.
// Copyright Syncfusion Inc. 2001-2015. All rights reserved.
// Use of this code is subject to the terms of our license.
// A copy of the current license can be obtained at any time by e-mailing
// licensing@syncfusion.com. Any infringement will be prosecuted under
// applicable laws.
#endregion
using XamarinIOInvoice.WinPhone.Resources;
namespace XamarinIOInvoice.WinPhone
{
/// <summary>
/// Provides access to string resources.
/// </summary>
public class LocalizedStrings
{
private static AppResources _localizedResources = new AppResources();
public AppResources LocalizedResources { get { return _localizedResources; } }
}
}
|
//
// Copyright 2013, 2016 Carbonfrost Systems, Inc. (http://carbonfrost.com)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Reflection;
using Carbonfrost.Commons.PropertyTrees;
using Carbonfrost.Commons.PropertyTrees.Schema;
using Carbonfrost.Commons.Spec;
using Prototypes;
namespace Carbonfrost.UnitTests.PropertyTrees.Schema {
public class AddAttributeTests {
sealed class HelperBuilderCollection {}
[Fact]
public void addon_method_implicit_collection() {
string name = AddAttribute.TrimImplicitAdd("AddNew", typeof(PropertyNodeCollection));
Assert.Equal("propertyNode", name);
}
[Fact]
public void addon_method_implicit_builder_collection() {
string name = AddAttribute.TrimImplicitAdd("AddNew", typeof(HelperBuilderCollection));
Assert.Equal("helper", name);
}
[Theory]
[InlineData(typeof(List<string>), "String")]
[InlineData(typeof(Collection<string>), "String")]
[InlineData(typeof(IEnumerable<string>), "String")]
public void GetNaturalName_should_consider_generic_arguments(Type type, string expected) {
string name = AddAttribute.GetNaturalName(type);
Assert.Equal(expected, name);
}
[Theory]
[InlineData(typeof(PropertyNodeCollection), "PropertyNode")]
public void GetNaturalName_should_consider_derived_argument_types(Type type, string expected) {
string name = AddAttribute.GetNaturalName(type);
Assert.Equal(expected, name);
}
[Theory]
[InlineData(typeof(S<Alpha>), "s")]
public void ComputeName_Natural_should_use_return_type(Type type, string expected) {
var method = type.GetTypeInfo().GetMethod("AddNew");
string name = ((IRoleAttribute) AddAttribute.Natural).ComputeName(method);
Assert.Equal(expected, name, StringComparer.OrdinalIgnoreCase);
Assert.Contains(expected, PropertyTreeDefinition.FromType(type).EnumerateOperators().Select(t => t.Name));
}
class S<T> {
[Add]
public T AddNew(string s, string[] aliases) {
throw new NotImplementedException();
}
}
// TODO Support Dictionary<,> natural name - entry
}
}
|
using System;
namespace MonoGame.Extended.Collections
{
/// <summary>
/// Arguments class for collections wanting to hand over an item in an event
/// </summary>
public class ItemEventArgs<T> : EventArgs
{
/// <summary>Initializes a new event arguments supplier</summary>
/// <param name="item">Item to be supplied to the event handler</param>
public ItemEventArgs(T item)
{
Item = item;
}
/// <summary>Obtains the collection item the event arguments are carrying</summary>
public T Item { get; }
}
} |
using UnityEngine;
using System.Collections;
using UnityEngine.Networking;
public class HidingManager : UnityEngine.Networking.NetworkBehaviour {
public GameObject currentHidingPlace;
private bool hiding = false;
private bool hidingInArea = false;
private SpriteFollowPlayer playerSpriteManager;
private Renderer minimapSpriteRenderer;
private ParticleEmitter seekerParticleEmitter;
private bool emitParticlesWhenSeekerFound = false;
void Start() {
// We actually need the renderer for the sprite
// Actually get a reference to SpriteFollowPlayer and make that do the work
playerSpriteManager = GetComponent<SpriteFollowPlayer>();
minimapSpriteRenderer = transform.Find("Minimap Icon").GetComponent<Renderer>();
seekerParticleEmitter = transform.Find("Echo'd Particle Emitter").GetComponent<ParticleEmitter>();
}
[Command]
public void CmdHideInObject(GameObject hidingPlace) {
// stores a reference to the object and uses that
RpcHideInObject(hidingPlace);
}
[Command]
public void CmdHideInArea() {
// doesn't store a reference to the object - maybe stores location instead?
// grass and water shouldn't move
RpcHideInArea();
}
[ClientRpc]
private void RpcHideInObject(GameObject hidingPlace) {
Animator anim = hidingPlace.GetComponentInChildren<Animator>();
if (anim) {
anim.Play("get in");
}
hidingPlace.GetComponent<interactInRange>().HideOutline();
currentHidingPlace = hidingPlace;
hide();
}
[ClientRpc]
private void RpcHideInArea() {
hidingInArea = true;
hide();
}
private void hide() {
// This makes the player invisible
// Should also make it so the other player can't run into them
playerSpriteManager.MakeSpriteInvisible();
minimapSpriteRenderer.enabled = false;
hiding = true;
}
public void CheckHidingPlace(GameObject hidingPlace) {
// If they're hiding in an area, this is only called if the hunter is close enough
// Should the hunter be responsible for that?
if (hidingInArea) {
CmdStopHiding();
}
if (!currentHidingPlace) {
return;
}
// Check if the Seeker is hiding in the same hiding place the Hunter is currently checking
// If they are the same, kick the Seeker out of their hiding place
if (currentHidingPlace.GetInstanceID() == hidingPlace.GetInstanceID()) {
CmdStopHiding();
}
}
[Command]
public void CmdStopHiding() {
RpcStopHiding();
}
[ClientRpc]
private void RpcStopHiding() {
// This is only set when the Hunter uses their echo ability at the moment
if (emitParticlesWhenSeekerFound) {
if (seekerParticleEmitter) {
seekerParticleEmitter.Emit();
}
}
if (currentHidingPlace) {
Transform basketSprite = currentHidingPlace.transform.Find("Basket Sprite");
if (basketSprite) {
Animator anim = basketSprite.gameObject.GetComponent<Animator>();
if (anim) {
// If we're playing the animation, don't show the player or let them move right away
anim.Play("get out");
return;
}
}
currentHidingPlace.GetComponent<interactInRange>().ShowOutline();
}
CmdFinishedAnimation();
}
[Command]
public void CmdFinishedAnimation() {
RpcResetHidingVars();
}
[ClientRpc]
private void RpcResetHidingVars() {
hiding = false;
hidingInArea = false;
currentHidingPlace = null;
emitParticlesWhenSeekerFound = false;
playerSpriteManager.MakeSpriteVisible();
minimapSpriteRenderer.enabled = true;
}
public void EmitParticlesOnNextFind() {
emitParticlesWhenSeekerFound = true;
}
public bool IsHiding() {
return hiding;
}
public bool IsHidingStationary() {
return hiding && !hidingInArea;
}
public bool IsHidingMovable() {
return hiding && hidingInArea;
}
}
|
using Selenite.Browsers;
using Selenite.Enums;
using Selenite.Models;
using Xunit.Extensions;
namespace Selenite.Tests.Browsers
{
public class PhantomJs : BrowserBase
{
public override DriverType DriverType
{
get { return DriverType.PhantomJs; }
}
#if PHANTOMJS
[Theory, BrowserData]
#else
[Theory(Skip = "Not built for PhantomJs")]
#endif
public void ExecuteTests(Test test)
{
ExecuteTest(test);
}
}
} |
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;
using Homero.Core;
using System.IO;
using System.Xml.Serialization;
namespace Homero
{
/// <summary>
/// This is the main type for your game
/// </summary>
public class Game1 : Microsoft.Xna.Framework.Game
{
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
private Texture2D springfield;
private Texture2D homero;
private Texture2D duff;
private Viewport pantalla;
//Escenas
private EscenaJuego ej;
private EscenaIntro ei;
private EscenaInstrucciones eIns;
private EscenaScore es;
private EscenaSave esa;
private Escena escenaActiva;
//Fuentes
private SpriteFont fuenteNormal, fuenteSeleccionada;
///Audio
private AudioComponent audioComponent;
//TECLADO
KeyboardState oldKeyboardState;
//Score
private string nombreArchivo = "Homero.txt";
public List<Score> listaScore = new List<Score>();
public Game1()
{
graphics = new GraphicsDeviceManager(this);
graphics.PreferredBackBufferHeight = 334;
graphics.PreferredBackBufferWidth = 800;
Content.RootDirectory = "Content";
LeerArchivo();
}
public void LeerArchivo()
{
TextReader tr = new StreamReader(nombreArchivo);
string linea = tr.ReadLine();
listaScore.Sort(new ComparaScore());
while (linea != null)
{
Console.WriteLine("LeerArchivo");
string[] arr = linea.Split(':');
listaScore.Add(new Score(arr[0], int.Parse(arr[1])));
linea = tr.ReadLine();
}
tr.Close();
}
public void EscribeArchivo()
{
TextWriter tw = new StreamWriter(nombreArchivo);
listaScore.Sort(new ComparaScore());
for(int i=0; i< listaScore.Count; i++)
{
tw.WriteLine(((Score)listaScore[i]).Nombre +":"+((Score)listaScore[i]).Puntos);
}
tw.Close();
}
/// <summary>
/// Allows the game to perform any initialization it needs to before starting to run.
/// This is where it can query for any required services and load any non-graphic
/// related content. Calling base.Initialize will enumerate through any components
/// and initialize them as well.
/// </summary>
protected override void Initialize()
{
//audioEngine = new AudioEngine("simpsons.xgs");
//waveBank = new WaveBank(audioEngine,"Wave Bank.xwb");
//soundBank = new SoundBank(audioEngine,"Sound Bank.xsb");
base.Initialize();
}
/// <summary>
/// LoadContent will be called once per game and is the place to load
/// all of your content.
/// </summary>
protected override void LoadContent()
{
// Create a new SpriteBatch, which can be used to draw textures.
spriteBatch = new SpriteBatch(GraphicsDevice);
Services.AddService(typeof(SpriteBatch), spriteBatch);
//pantalla
pantalla = graphics.GraphicsDevice.Viewport;
//Fuentes
fuenteNormal = Content.Load<SpriteFont>("SimpsonNormal");
fuenteSeleccionada = Content.Load<SpriteFont>("SimpsonSeleccionadaF");
//Texturas
springfield = Content.Load<Texture2D>("Springfield");
homero = Content.Load<Texture2D>("homer");
duff = Content.Load<Texture2D>("duffBeer");
Texture2D imgFondo = Content.Load<Texture2D>("fondoIntro");
Texture2D imgSimpsons = Content.Load<Texture2D>("losSimpsons");
Texture2D imgInstrucciones = Content.Load<Texture2D>("instrucciones");
Texture2D cloud1 = Content.Load<Texture2D>("cloud2");
Texture2D cloud2 = Content.Load<Texture2D>("cloud2");
//Audio
audioComponent = new AudioComponent(this);
Services.AddService(typeof(AudioComponent), audioComponent);
audioComponent.Initialize(); //DUDA
Components.Add(audioComponent);
//Escenas
ej = new EscenaJuego(this, homero, duff, springfield, fuenteNormal);
ei = new EscenaIntro(this, ref fuenteNormal, ref fuenteSeleccionada, ref imgFondo, ref imgSimpsons,
ref cloud1, ref cloud2);
eIns= new EscenaInstrucciones(this, ref imgInstrucciones);
es = new EscenaScore(this, fuenteNormal, ref imgFondo);
esa = new EscenaSave(this, fuenteSeleccionada, imgFondo);
//Agregar a componentes
Components.Add(ej);
Components.Add(ei);
Components.Add(eIns);
Components.Add(es);
Components.Add(esa);
//ej.Show();
ei.Show();
escenaActiva = ei;
}
/// <summary>
/// UnloadContent will be called once per game and is the place to unload
/// all content.
/// </summary>
protected override void UnloadContent()
{
// TODO: Unload any non ContentManager content here
}
/// <summary>
/// Allows the game to run logic such as updating the world,
/// checking for collisions, gathering input, and playing audio.
/// </summary>
/// <param name="gameTime">Provides a snapshot of timing values.</param>
protected override void Update(GameTime gameTime)
{
// Allows the game to exit
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
this.Exit();
ManejarEscenas();
//ej.Jugar();
base.Update(gameTime);
}
public void ManejarEscenas()
{
if (escenaActiva == ej)
{
IsMouseVisible = false;
if (ChecaTecla(Keys.Escape))
{
MostrarEscena(ei);
audioComponent.PlayCue("ohhh");
}
else
{
if (ChecaEnter())
{
ej.Pausado = !ej.Pausado;
}
ej.Jugar();
if (ej.Terminado)
{
esa.Score = ej.Score;
MostrarEscena(esa);
}
}
}
if (escenaActiva == ei)
{
IsMouseVisible = false;
ManejaEscenaIntro();
}
if (escenaActiva == eIns)
{
IsMouseVisible = false;
if (ChecaEnter())
{
MostrarEscena(ei);
}
}
if (escenaActiva == es)
{
es.ListaScore = listaScore;
IsMouseVisible = false;
if (ChecaEnter())
{
MostrarEscena(ei);
}
}
if (escenaActiva == esa)
{
IsMouseVisible = false;
ManejaEcenaSave();
}
}
public void ManejaEscenaIntro()
{
if (ChecaEnter())
{
audioComponent.PlayCue("wooho");
switch (ei.SelectedMenuIndex)
{
case 0:
//Jugar
MostrarEscena(ej);
break;
case 1:
MostrarEscena(eIns);
break;
case 2:
Console.Write("es");
MostrarEscena(es);
break;
case 3:
Exit();
break;
}
}
}
public void ManejaEcenaSave()
{
KeyboardState keyboardState = Keyboard.GetState();
EscuchaTeclado();
if (ChecaEnter())
{
listaScore.Add(new Score(esa.Nombre, esa.Score));
EscribeArchivo();
Console.WriteLine("Saving...");
MostrarEscena(ei);
Console.WriteLine("Saved...");
}
oldKeyboardState = keyboardState;
}
public void EscuchaTeclado()
{
//KeyboardState keyboardState = Keyboard.GetState();
if (ChecaTecla(Keys.Up))
{
Console.Write("Up");
esa.cambiarNombre(1);
}
if (ChecaTecla(Keys.Down))
{
Console.Write("down");
esa.cambiarNombre(2);
}
if (ChecaTecla(Keys.Right))
{
Console.Write("right");
esa.cambiarNombre(4);
}
if (ChecaTecla(Keys.Left))
{
Console.Write("left");
esa.cambiarNombre(3);
}
//oldKeyboardState = keyboardState;
}
public bool ChecaEnter()
{
KeyboardState keyboardState = Keyboard.GetState();
bool resultado = (oldKeyboardState.IsKeyDown(Keys.Enter) && keyboardState.IsKeyUp(Keys.Enter));
oldKeyboardState = keyboardState;
return resultado;
}
public bool ChecaTecla(Keys key)
{
KeyboardState keyboardState = Keyboard.GetState();
bool resultado = (oldKeyboardState.IsKeyDown(key) && keyboardState.IsKeyUp(key));
//oldKeyboardState = keyboardState;
return resultado;
}
protected void MostrarEscena(Escena scene)
{
escenaActiva.Hide();
escenaActiva = scene;
escenaActiva.Show();
}
/// <summary>
/// This is called when the game should draw itself.
/// </summary>
/// <param name="gameTime">Provides a snapshot of timing values.</param>
protected override void Draw(GameTime gameTime)
{
//GraphicsDevice.Clear(Color.CornflowerBlue);
spriteBatch.Begin();
base.Draw(gameTime);
spriteBatch.End();
//base.Draw(gameTime);
}
/*
public void escuchaTeclado()
{
KeyboardState teclado = Keyboard.GetState();
if (teclado.IsKeyDown(Keys.Left) && pos_homero.X > 0)
{
pos_homero.X -= velocidad;
}
if (teclado.IsKeyDown(Keys.Right) && pos_homero.X +homero.Width <pantalla.Width)
{
pos_homero.X += velocidad;
}
}
private void agregarEsferas()
{
Random semilla = new Random();
if (semilla.NextDouble() < aleatorio)
{
//agrego cheve
int x = (int)(semilla.NextDouble() * (pantalla.Width - duff.Width));
Vector2 v = new Vector2(x, -duff.Height);
lista.Add(v);
}
}
protected void actualizaEsfereas()
{
for (int i = 0; i < lista.Count; i++)
{
Vector2 v = lista[i];
v.Y += velocidadEsferas;
if (v.Y >= pantalla.Height - duff.Height)
{
lista.RemoveAt(i);
i--;
score -= 5;
soundBank.PlayCue("doh");
continue;
}
lista[i] = v;
}
}
protected void checaColision(){
Rectangle rHomero= new Rectangle((int)pos_homero.X, (int)pos_homero.Y, homero.Width,homero.Height);
for (int i = 0; i < lista.Count; i++)
{
Vector2 vCheve = lista[i];
Rectangle rCheve = new Rectangle((int)vCheve.X, (int)vCheve.Y, duff.Width, duff.Height);
if (rHomero.Intersects(rCheve))
{
score += 10;
lista.RemoveAt(i);
i--;
soundBank.PlayCue("inh2o");
}
}
}
*/
}
}
|
namespace Triton.Game.Abstraction
{
using ns27;
using System;
using System.Runtime.CompilerServices;
using Triton.Game.Mapping;
public class HistoryItem
{
[CompilerGenerated]
private Triton.Game.Abstraction.Actor actor_0;
[CompilerGenerated]
private bool bool_0;
[CompilerGenerated]
private bool bool_1;
[CompilerGenerated]
private Triton.Game.Abstraction.Entity entity_0;
[CompilerGenerated]
private Triton.Game.Mapping.HistoryItem historyItem_0;
[CompilerGenerated]
private int int_0;
internal HistoryItem(Triton.Game.Mapping.HistoryItem backingObject)
{
this.HistoryItem_0 = backingObject;
this.Dead = this.HistoryItem_0.dead;
this.DamageAmount = this.HistoryItem_0.m_splatAmount;
this.Entity = Class274.Class274_0.method_2(this.HistoryItem_0.GetEntity());
this.IsFatigue = this.HistoryItem_0.isFatigue;
this.MainCardActor = Class274.Class274_0.method_4(this.HistoryItem_0.m_mainCardActor);
}
public int DamageAmount
{
[CompilerGenerated]
get
{
return this.int_0;
}
[CompilerGenerated]
private set
{
this.int_0 = value;
}
}
public bool Dead
{
[CompilerGenerated]
get
{
return this.bool_0;
}
[CompilerGenerated]
private set
{
this.bool_0 = value;
}
}
public Triton.Game.Abstraction.Entity Entity
{
[CompilerGenerated]
get
{
return this.entity_0;
}
[CompilerGenerated]
private set
{
this.entity_0 = value;
}
}
internal Triton.Game.Mapping.HistoryItem HistoryItem_0
{
[CompilerGenerated]
get
{
return this.historyItem_0;
}
[CompilerGenerated]
set
{
this.historyItem_0 = value;
}
}
public bool IsFatigue
{
[CompilerGenerated]
get
{
return this.bool_1;
}
[CompilerGenerated]
private set
{
this.bool_1 = value;
}
}
public Triton.Game.Abstraction.Actor MainCardActor
{
[CompilerGenerated]
get
{
return this.actor_0;
}
[CompilerGenerated]
private set
{
this.actor_0 = value;
}
}
}
}
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MouseOneTouch
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
DoubleBuffered = true;
MyRectangle rect = new MyRectangle(new Rectangle(108, 40, 50, 50));
rect.ForMove += (s, e) => { Refresh(); };
Paint += (s, e) => { rect.Draw(e.Graphics); };
MouseClick += (s, e) =>
{
if (rect.ContainsPoint(e.X, e.Y))
rect.Move();
};
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using CRUD_SQLite.Clases;
using SQLite;
namespace CRUD_SQLite
{
/// <summary>
/// Lógica de interacción para MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
List<Clases.Canciones> canciones;
public MainWindow()
{
InitializeComponent();
canciones = new List<Clases.Canciones>();
lbContenido.Visibility = Visibility.Hidden;
LeerBaseDatos();
Inicio();
}
private void GvMusic_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
}
private void BtnNuevo_Click(object sender, RoutedEventArgs e)
{
Añadir();
}
private void BtnEditar_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show("Este botón se encuentra inhabiliado actualmente.");
}
private void BtnEliminar_Click(object sender, RoutedEventArgs e)
{
Eliminar();
}
private void BtnView_Click(object sender, RoutedEventArgs e)
{
wbVideo.Visibility = Visibility.Visible;
}
private void BtnEdit_Click(object sender, RoutedEventArgs e)
{
wbVideo.Visibility = Visibility.Hidden;
Inicio();
}
private void BtnSalir_Click(object sender, RoutedEventArgs e)
{
this.Close();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
}
private void CbMostrar_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
}
private void CbAddToLista_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
}
void LeerBaseDatos()
{
using (SQLite.SQLiteConnection conn =
new SQLite.SQLiteConnection(App.databasePath))
{
conn.CreateTable<Clases.Canciones>();
canciones = (conn.Table<Clases.Canciones>().ToList()).OrderByDescending(s => s.Id).ToList();
}
if (canciones != null)
{
lvMusic.ItemsSource = canciones;
}
if (lvMusic.Items.Count <=0)
{
lbContenido.Visibility = Visibility.Visible;
}
}
void Inicio()
{
spBotones.Visibility = Visibility.Visible;
spDelete.Visibility = Visibility.Hidden;
spAdd.Visibility = Visibility.Hidden;
}
void Añadir()
{
spBotones.Visibility = Visibility.Hidden;
spDelete.Visibility = Visibility.Hidden;
spAdd.Visibility = Visibility.Visible;
}
void Eliminar()
{
spBotones.Visibility = Visibility.Hidden;
spDelete.Visibility = Visibility.Visible;
spAdd.Visibility = Visibility.Hidden;
}
private void lvMusic_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
}
private void BtnAddNew_Click(object sender, RoutedEventArgs e)
{
Canciones songs = new Canciones()
{
Nombre = tbTitulo.Text.Trim(),
Artista = tbArtista.Text.Trim(),
Genero = cbAddGeneros.Text.Trim(),
Lista = cbAddToLista.Text.Trim(),
Link = tbLink.Text.Trim()
};
using (SQLiteConnection conexion = new SQLiteConnection(App.databasePath))
{
conexion.CreateTable<Canciones>();
conexion.Insert(songs);
}
Añadido add = new Añadido();
add.Added.Visibility = Visibility.Visible;
add.Added.Visibility = Visibility.Hidden;
add.Title = "Añadiendo";
add.Show();
Close();
this.Hide();
}
private void BtnDelete_Click(object sender, RoutedEventArgs e)
{
using (SQLiteConnection conexion = new SQLiteConnection(App.databasePath))
{
string sentenciaSQL = "delete from Canciones where Nombre = '" + tbCancionDelete.Text + "'";
conexion.Execute(sentenciaSQL);
}
Añadido add = new Añadido();
add.Added.Visibility = Visibility.Hidden;
add.Added.Visibility = Visibility.Visible;
add.Title = "Eliminando.";
add.Show();
Close();
this.Hide();
}
}
}
|
using System;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
using W3ChampionsStatisticService.ReadModelBase;
namespace W3ChampionsStatisticService.Clans
{
public class ClanMembership : IIdentifiable, IVersionable
{
public string BattleTag { get; set; }
public string ClanId { get; set; }
public string PendingInviteFromClan { get; set; }
public string ClanName { get; set; }
public DateTimeOffset LastUpdated { get; set; }
[JsonIgnore]
public string Id => BattleTag;
public void JoinClan(Clan clan)
{
if (ClanId != null) throw new ValidationException("User Allready in clan");
if (clan.ClanId != PendingInviteFromClan) throw new ValidationException("Invite to another clan still pending");
ClanId = clan.ClanId;
PendingInviteFromClan = null;
ClanName = clan.ClanName;
}
public static ClanMembership Create(string battleTag)
{
return new ClanMembership
{
BattleTag = battleTag
};
}
public void Invite(Clan clan)
{
if (PendingInviteFromClan != null) throw new ValidationException("Player already invited to different clan");
if (ClanId != null) throw new ValidationException("Player already part of a different clan");
PendingInviteFromClan = clan.ClanId;
ClanName = clan.ClanName;
}
public void LeaveClan()
{
ClanId = null;
ClanName = null;
}
public void RevokeInvite()
{
PendingInviteFromClan = null;
ClanName = null;
}
}
} |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class audioDemo : MonoBehaviour
{
AudioSource playback;
public AudioClip atsuku, lostWoods, songStorms, woodsSlowed;
// Start is called before the first frame update
void Start()
{
playback = GetComponent<AudioSource>();
}
public void atsukuDemo()
{
playback.clip = atsuku;
playback.Play();
}
public void lostWoodsDemo()
{
playback.clip = lostWoods;
playback.Play();
}
public void songStorm()
{
playback.clip = songStorms;
playback.Play();
}
public void lostSlowed()
{
playback.clip = lostWoods;
playback.pitch = 0.67f;
playback.Play();
}
public void stopDemo()
{
playback.Stop();
playback.pitch = 1f;
}
}
|
namespace _7.FoodShortage
{
using _7.FoodShortage.Models;
using System;
using System.Collections.Generic;
using System.Linq;
public class Startup
{
public static void Main(string[] args)
{
var inhabitans = new List<IIhabitant>();
var numbersOfIhabitant = int.Parse(Console.ReadLine());
for (int i = 0; i < numbersOfIhabitant; i++)
{
var information = Console.ReadLine().Split(' ');
if (information.Length == 4)
{
inhabitans.Add(new Citizen(information[0], int.Parse(information[1]), information[2], information[3]));
}
else if (information.Length == 3)
{
inhabitans.Add(new Rebel(information[0], int.Parse(information[1]), information[2]));
}
}
string inputLine;
var sum = 0;
while (!(inputLine = Console.ReadLine()).Equals("End"))
{
var name = inhabitans.FirstOrDefault(x => x.Name == inputLine);
if (name != null)
{
sum += name.BuyFood();
}
}
Console.WriteLine(sum);
}
}
} |
using Godot;
using System;
using static Lib;
public class HealArrow : Arrow
{
public override void _Ready()
{
base._Ready();
damage = H_ARROW_DAMAGE;
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
namespace TaxiApp.Models
{
public class Order
{
public int OrderID { get; set; }
[Display(Name = "Дата заявка")]
public DateTime DateID { get; set; }
[Display(Name = "IP")]
public string UserIP { get; set; }
[Display(Name = "Имя заказчика")]
[Required]
[StringLength(32, MinimumLength = 2, ErrorMessage = "Не допустимая длинна поля")]
public string UserName { get; set; }
[Display(Name = "Телефон")]
[Required]
[StringLength(32, MinimumLength = 6, ErrorMessage = "Не допустимая длинна")]
public string UserTel { get; set; }
[Display(Name = "Время подачи")]
[DataType(DataType.DateTime)]
public DateTime UserTime { get; set; }
[Display(Name = "Откуда")]
[Required]
public string Address1 { get; set; }
[Display(Name = "Куда")]
[Required]
public string Address2 { get; set; }
[Display(Name = "Дополнительно")]
public string Dop { get; set; }
[Display(Name = "Цена")]
public int? Price { get; set; }
[Display(Name = "Водитель")]
public int? DriverID { get; set; }
public Driver Driver { get; set; }
[Display(Name = "Статус")]
public int OrderStatusID { get; set; }
public OrderStatus OrderStatus { get; set; }
}
} |
using System;
public partial class SROptions
{
[AttributeUsage(AttributeTargets.Property)]
public sealed class NumberRangeAttribute : Attribute
{
public readonly double Max;
public readonly double Min;
public NumberRangeAttribute(double min, double max)
{
Min = min;
Max = max;
}
}
[AttributeUsage(AttributeTargets.Property)]
public sealed class IncrementAttribute : Attribute
{
public readonly double Increment;
public IncrementAttribute(double increment)
{
Increment = increment;
}
}
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Method)]
public sealed class SortAttribute : Attribute
{
public readonly int SortPriority;
public SortAttribute(int priority)
{
SortPriority = priority;
}
}
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Method)]
public sealed class DisplayNameAttribute : Attribute
{
public readonly string Name;
public DisplayNameAttribute(string name)
{
Name = name;
}
}
}
#if NETFX_CORE
namespace System.ComponentModel
{
[AttributeUsage(AttributeTargets.All)]
public sealed class CategoryAttribute : Attribute
{
public readonly string Category;
public CategoryAttribute(string category)
{
Category = category;
}
}
}
#endif
|
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Net;
using UnityEngine.SceneManagement;
using System.IO;
//2018-12-01 宋柏慧
//---------------------------------------------------------
//这个脚本的功能为 排序并显示得分
//从而达到排行榜的效果
//---------------------------------------------------------
public class Sort : MonoBehaviour
{
public GameObject L0;
public GameObject[] newIndexs;
public GameObject Panel;
public Text indexText;
int count;//用来把取的数赋值于此
public static int[] save = new int[10];
int Num;
string saveIntStr;
//插入排序
// Use this for initialization
void Start()
{
//获取上一场景存储的数据
count = PlayerPrefs.GetInt("count");
indexText.text = "Your score:" + count.ToString();
var countlist = ReadFile();
countlist.Sort();
countlist.Reverse();
//获取存储的排行榜中的数据
for (int i = 0; i < 10; i++)
{
string saveIntStrS = saveIntStr + i.ToString();
save[i] = (int)countlist[i];
}
//把当前数据存储
for (int j = 0; j < 10; j++)
{
string saveIntStrI = saveIntStr + j.ToString();
PlayerPrefs.SetInt(saveIntStrI, save[j]);
//PlayerPrefs.SetInt(saveIntStrI, 0);
}
//将数据显示到场景UI中
for (int i = 0; i < newIndexs.Length; i++)
{
string saveIntStrO = saveIntStr + i.ToString();
newIndexs[i] = Instantiate(L0, transform.position, transform.rotation) as GameObject;
newIndexs[i].transform.SetParent(Panel.transform);
newIndexs[i].GetComponent<Text>().text = "\t \t \t \t \t" + PlayerPrefs.GetInt(saveIntStrO).ToString() + "\t \t ";
}
}
//删除接口 (未被调用)
public void DeleteFile()
{
PlayerPrefs.DeleteAll();
}
public void reStart()
{
SceneManager.LoadScene("MainGame");
}
public static ArrayList ReadFile()
{
ArrayList str = new ArrayList();
StreamReader file = new StreamReader("../count.txt");
string line;
while ((line = file.ReadLine()) != null)
{
str.Add(Convert.ToInt32(line));
}
file.Close();
return str;
}
}
|
using RestauranteHotel.Domain.Contracts;
using RestauranteHotel.Domain.Entity;
using RestauranteHotel.Infrastructure.Data.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RestauranteHotel.Infrastructure.Data.Repositories
{
public class ProductoCompuestoRepository : GenericRepository<ProductoCompuesto>, IProductoCompuestoRepository
{
public ProductoCompuestoRepository(IDbContext context) : base(context)
{
}
}
} |
/* Task 3. Implement a ParticleRepeller class. A ParticleRepeller is a Particle, which pushes other particles away from it
* (i.e. accelerates them in a direction, opposite of the direction in which the repeller is).
* The repeller has an effect only on particles within a certain radius (see Euclidean distance)
* The euclidean distance is calculated inside the AdvancedParticleOperator class */
using System;
namespace ParticleSystem
{
public class ParticleRepulsor : Particle
{
private int range;
public ParticleRepulsor(MatrixCoords position, MatrixCoords speed, int range)
:base(position, speed)
{
this.Range = range;
}
public int Range
{
get
{
return this.range;
}
protected set
{
if (value < 0)
{
throw new ArgumentException("Invalid range argument passed: must be equal to or bigger than 0.");
}
this.range = value;
}
}
}
}
|
namespace MooshakPP.Models.Entities
{
public enum result
{
none = 0,
compError,
runError,
memError,
wrongAnswer,
Accepted
}
public class Submission
{
public int ID { get; set; }
public string userID{ get; set; }
public int milestoneID { get; set; }
public result status { get; set; }
public int passCount { get; set; }
public string fileURL { get; set; }
}
} |
// Author:
// Evan Thomas Olds
//
// Creation Date:
// December 10, 2016
using System;
using System.IO;
using System.IO.Compression;
using ETOF;
using ETOF.IO;
namespace ETOF.IO
{
#if ETOF_PUBLIC
public
#else
internal
#endif
static class FileSystemExts
{
/// <summary>
/// Treats this file as a zip file and extracts it to the specified target directory. This file and
/// the target directory do NOT need to be in the same file system.
/// If this file is not a valid zip archive, or any error occurs, then false is returned.
/// </summary>
public static bool ExtractZip(this FSFile zipFile, FSDir targetDir,
ZipExtractionOptions options)
{
// First open the FSFile for reading
Stream fsFileStream = zipFile.OpenReadOnly();
// Create a zip archive (for reading) from the stream
ZipArchive zipA = null;
try
{
zipA = new ZipArchive(fsFileStream, ZipArchiveMode.Read);
}
catch (Exception)
{
fsFileStream.Dispose();
return false;
}
// Call the utility function to do the actual extraction
ExtractZip(zipA, targetDir, options);
// Clean up and return
zipA.Dispose();
fsFileStream.Dispose();
return true;
}
private static ZipExtractionStats ExtractZip(ZipArchive zipA, FSDir targetDirectory, ZipExtractionOptions options)
{
// Keep track of the number of entries encountered and extracted
ZipExtractionStats stats = new ZipExtractionStats();
// Loop through entries and extract
foreach (ZipArchiveEntry entry in zipA.Entries)
{
stats.NumEntriesSeen++;
bool skipThisEntry = false;
FSDir targetDir = targetDirectory;
// Split the full name on '/'
string[] pieces = entry.FullName.Split('/');
int i;
for (i = 0; i < pieces.Length - 1; i++)
{
targetDir = targetDir.CreateDir(pieces[i]);
if (null == targetDir)
{
skipThisEntry = true;
break;
}
}
// Skip this entry if need be
if (skipThisEntry) { continue; }
// At this point pieces[i] is the file we need to create in targetDir
if (targetDir.GetFile(pieces[i]) != null && !options.Overwrite)
{
// We can't overwrite the file
continue;
}
FSFile fileForEntry = targetDir.CreateFile(pieces[i]);
if (null == fileForEntry) { continue; }
// Open the zip entry stream for reading and the FSFile for writing. Notice that despite
// the possibility of failure to open the source stream from the zip file entry, we've
// already created the FSFile in the target directory. This is intentional. If we fail
// to extract a file, then a 0-byte placeholder is desired (for now, may change later).
Stream src = entry.Open();
if (src == null) { continue; }
Stream dst = fileForEntry.OpenReadWrite();
if (dst == null)
{
src.Dispose();
continue;
}
// Copy the contents
byte[] buf = new byte[8192];
while (true)
{
int bytesRead = src.Read(buf, 0, buf.Length);
if (bytesRead <= 0) { break; }
dst.Write(buf, 0, bytesRead);
}
// Clean up and increment number of files extracted
src.Dispose();
dst.Dispose();
stats.NumEntriesExtracted++;
}
return stats;
}
}
public class ZipExtractionOptions
{
public readonly bool Overwrite;
public ZipExtractionOptions(bool overwrite)
{
Overwrite = overwrite;
}
}
public struct ZipExtractionStats
{
public int NumEntriesSeen;
public int NumEntriesExtracted;
}
} |
using CadastroDePedidos.Entities.Enums;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
namespace CadastroDePedidos.Entities
{
class Order
{
public DateTime Moment { get; set; }
public OrderStatus Status { get; set; }
public List<OrderItem> Items { get; set; }
public Client Client { get; set; }
public Order()
{
Items = new List<OrderItem>();
}
public Order(DateTime moment, OrderStatus status, Client client) : this()
{
Moment = moment;
Status = status;
Client = client;
}
public void AddItem(OrderItem orderItem)
{
Items.Add(orderItem);
}
public void RemoveItem(OrderItem orderItem)
{
Items.Remove(orderItem);
}
public double Total()
{
double valueTotal = 0.0;
foreach (var item in Items)
{
valueTotal += item.SubTotal();
}
return valueTotal;
}
public override string ToString()
{
StringBuilder builder = new StringBuilder();
builder.Append("Order moment: ");
builder.AppendLine(Moment.ToString("dd/MM/yyyy HH:mm:ss"));
builder.Append("Order status: ");
builder.AppendLine(Status.ToString());
builder.Append("Client: ");
builder.Append(Client.Name);
builder.Append(" (");
builder.Append(Client.BirthDate.ToString("dd/MM/yyyy"));
builder.Append(") - ");
builder.AppendLine(Client.Email);
builder.AppendLine("Order items:");
foreach(var item in Items)
{
builder.AppendLine(item.ToString());
}
builder.Append("Total price: $");
builder.Append(Total().ToString("F2", CultureInfo.InvariantCulture));
return builder.ToString();
}
}
}
|
namespace JekossTest.Models
{
public class CurrentUserModel
{
public int Id { get; set; }
public string Email { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public int? RoleId { get; set; }
}
} |
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage;
namespace Microsoft.EntityFrameworkCore.Metadata
{
/// <summary>
/// Represents property mapping to a column-like object.
/// </summary>
public interface IColumnMappingBase : IAnnotatable
{
/// <summary>
/// Gets the mapped property.
/// </summary>
IProperty Property { get; }
/// <summary>
/// Gets the target column-like object.
/// </summary>
IColumnBase Column { get; }
/// <summary>
/// Gets the type mapping for the column-like object.
/// </summary>
RelationalTypeMapping TypeMapping { get; }
/// <summary>
/// Gets the containing table mapping.
/// </summary>
ITableMappingBase TableMapping { get; }
}
}
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//General Fail con for Circuit 6
public class c6failend : MonoBehaviour
{
public GameManager gManager;
public void OnTriggerEnter(Collider other)
{
gManager.FailLevel();
}
}
|
using MetroFramework;
using MetroFramework.Forms;
using PDV.CONTROLER.Funcoes;
using PDV.DAO.DB.Utils;
using PDV.DAO.Entidades.Financeiro;
using PDV.VIEW.App_Context;
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace PDV.VIEW.Forms.Cadastro.Financeiro.Modulo
{
public partial class FCAFIN_TransferenciaBancaria : DevExpress.XtraEditors.XtraForm
{
private string NOME_TELA = "CADASTRO DE TRANSFERÊNCIA BANCÁRIA";
private List<ContaBancaria> ContasOrigem = null;
private List<ContaBancaria> ContasDestino = null;
private List<Natureza> NaturezasOrigem = null;
private List<Natureza> NaturezasDestino = null;
public FCAFIN_TransferenciaBancaria()
{
InitializeComponent();
ContasOrigem = FuncoesContaBancaria.GetContasBancarias();
ovCMB_ContaOrigem.DataSource = ContasOrigem;
ovCMB_ContaOrigem.DisplayMember = "nome";
ovCMB_ContaOrigem.ValueMember = "idcontabancaria";
ovCMB_ContaOrigem.SelectedItem = null;
ContasDestino = FuncoesContaBancaria.GetContasBancarias();
ovCMB_ContaDestino.DataSource = ContasDestino;
ovCMB_ContaDestino.DisplayMember = "nome";
ovCMB_ContaDestino.ValueMember = "idcontabancaria";
ovCMB_ContaDestino.SelectedItem = null;
NaturezasOrigem = FuncoesNatureza.GetNaturezasPorTipo(1);
ovCMB_NaturezaOrigem.DataSource = NaturezasOrigem;
ovCMB_NaturezaOrigem.DisplayMember = "descricao";
ovCMB_NaturezaOrigem.ValueMember = "idnatureza";
ovCMB_NaturezaOrigem.SelectedItem = null;
NaturezasDestino = FuncoesNatureza.GetNaturezasPorTipo(0);
ovCMB_NaturezaDestino.DataSource = NaturezasDestino;
ovCMB_NaturezaDestino.DisplayMember = "descricao";
ovCMB_NaturezaDestino.ValueMember = "idnatureza";
ovCMB_NaturezaDestino.SelectedItem = null;
ovTXT_Valor.AplicaAlteracoes();
}
private void metroButton3_Click(object sender, EventArgs e)
{
Close();
}
private void metroButton6_Click(object sender, EventArgs e)
{
try
{
PDVControlador.BeginTransaction();
Validar();
decimal? IDNaturezaOrigem = null;
if (ovCMB_NaturezaOrigem.SelectedItem != null)
IDNaturezaOrigem = (ovCMB_NaturezaOrigem.SelectedItem as Natureza).IDNatureza;
decimal? IDNaturezaDestino = null;
if (ovCMB_NaturezaDestino.SelectedItem != null)
IDNaturezaDestino = (ovCMB_NaturezaDestino.SelectedItem as Natureza).IDNatureza;
if (!FuncoesMovimentoBancario.Salvar(new MovimentoBancario()
{
IDMovimentoBancario = Sequence.GetNextID("MOVIMENTOBANCARIO", "IDMOVIMENTOBANCARIO"),
IDContaBancaria = (ovCMB_ContaOrigem.SelectedItem as ContaBancaria).IDContaBancaria,
IDNatureza = IDNaturezaOrigem,
Historico = ovTXT_Historico.Text,
Conciliacao = null,
Sequencia = 1,
DataMovimento = ovTXT_Movimento.Value,
Documento = ovTXT_Documento.Text,
Tipo = 0,
Valor = ovTXT_Valor.Value,
}, DAO.Enum.TipoOperacao.INSERT))
throw new Exception("Não foi possível salvar a Transferência Bancária.");
if (!FuncoesMovimentoBancario.Salvar(new MovimentoBancario()
{
IDMovimentoBancario = Sequence.GetNextID("MOVIMENTOBANCARIO", "IDMOVIMENTOBANCARIO"),
IDContaBancaria = (ovCMB_ContaDestino.SelectedItem as ContaBancaria).IDContaBancaria,
IDNatureza = IDNaturezaDestino,
Historico = ovTXT_Historico.Text,
Conciliacao = null,
Sequencia = 1,
DataMovimento = ovTXT_Movimento.Value,
Documento = ovTXT_Documento.Text,
Tipo = 1,
Valor = ovTXT_Valor.Value
}, DAO.Enum.TipoOperacao.INSERT))
throw new Exception("Não foi possível salvar a Transferência Bancária.");
PDVControlador.Commit();
MessageBox.Show(this, "Transferência salva com sucesso.", NOME_TELA);
Close();
}
catch (Exception Ex)
{
PDVControlador.Rollback();
MessageBox.Show(this, Ex.Message, NOME_TELA);
}
}
private void Validar()
{
if (ovCMB_ContaOrigem.SelectedItem == null)
throw new Exception("Selecione a Conta de Origem.");
if (ovCMB_ContaDestino.SelectedItem == null)
throw new Exception("Selecione a Conta de Destino.");
}
private void FCAFIN_TransferenciaBancaria_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
switch (e.KeyCode)
{
case Keys.Escape:
this.Close();
break;
}
}
}
}
|
//using MarsQA_1.Specflow_Pages.Helper;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using System;
using System.Collections.Generic;
using System.Text;
using MarsQA_1.Helper;
namespace MarsQA_1.Helper
{
public class Driver
{
//Initialize the browser
public static IWebDriver driver;
public void Initialize()
{
//Defining the browser
driver = new ChromeDriver();
driver.Navigate().GoToUrl("http://192.168.99.100:5000");
//Maximise the window
driver.Manage().Window.Maximize();
}
}
}
// //Close the browser
// public void Close()
// {
// driver.Quit();
// }
// }
//}
|
using JabberPoint.Data;
using JabberPoint.Domain;
using JabberPoint.Domain.Themes;
using JabberPoint.Domain.Content;
using JabberPoint.Domain.Content.Behaviours;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JabberPoint.Business
{
public static class SlideshowManager
{
public static ISlideshow LoadDefaultXml()
=> LoadXmlFromFile("./slideshow.xml");
public static ISlideshow LoadXmlFromFile(string inputUrl)
=> LoadSlides(inputUrl, GetWpfContent);
public static void SetFooter(ISlideshow slideshow)
{
slideshow.Footers.Clear();
var theme = Themes.GetSingleton();
foreach (var footer in theme.GetFooterData())
{
ISlideSection footerSection = new SlideSection(slideshow);
foreach(var footerdata in footer.Value)
footerSection.Contents.Add(footerSection.Contents.Count, new TextContentFactory(footerdata.Text, footerdata.Level).GetContent(slideshow));
slideshow.Footers.Add(footer.Key,footerSection);
}
}
private static ISlideshow LoadSlides(string inputUrl,Func<slideshowSlideContent, ISlideSection, IContent> factoryLoader)
{
JabberPoint.Data.slideshow data;
JabberPoint.Domain.Slideshow slideshow;
SlideshowXmlLoader loader = new SlideshowXmlLoader(inputUrl);
data = loader.RootObject;
slideshow = new Slideshow();
foreach (var dataslide in data.slides)
{
ISlideSection slide = new SlideSection(slideshow);
slideshow.Slides.Add(slide);
foreach (var datacontent in dataslide.contents)
{
slide.Contents.Add(slide.Contents.Count, factoryLoader(datacontent,slide));
}
}
SetMetaData(slideshow, data.metainfos);
return slideshow;
}
private static IContent GetWpfContent(slideshowSlideContent contentData, ISlideSection parent)
{
IContentFactory factory;
switch (contentData.type)
{
case "text":
factory = new TextContentFactory(contentData.text.value, contentData.level.value);
break;
case "image":
case "media":
factory = new ImageContentFactory(contentData.reference.value);
break;
case "list":
default:
factory = null;
break;
}
return factory.GetContent(parent);
}
private static void SetMetaData(ISlideshow slideshow, slideshowMetainfo[] metainfo)
{
slideshow.MetaData["PageCount"] = slideshow.Slides.Count.ToString();
foreach (var meta in metainfo)
{
slideshow.MetaData[meta.key] = meta.value;
}
slideshow.MetaData["CurrentViewer"] = Environment.UserName;
}
}
}
|
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using AutoMapper;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using SchoolDiary.Data;
using SchoolDiary.Data.Entities;
using SchoolDiary.Models;
namespace SchoolDiary.Controllers
{
[ApiController]
[Route("[controller]")]
public class SubjectsController : ControllerBase
{
private readonly SchoolDiaryDbContext _dataContext;
private readonly IMapper _mapper;
public SubjectsController(SchoolDiaryDbContext dataContext, IMapper mapper)
{
_dataContext = dataContext;
_mapper = mapper;
}
[HttpGet]
public async Task<IEnumerable<SubjectMinDto>> GetAllAsync(CancellationToken cancellationToken = default)
{
var subjects = await _dataContext.Subjects.ToListAsync(cancellationToken);
return subjects.Select(subject => _mapper.Map<SubjectMinDto>(subject));
}
[HttpGet("{id}")]
public async Task<SubjectDto> GetAsync(int id, CancellationToken cancellationToken = default)
{
return _mapper.Map<SubjectDto>(
await _dataContext.Subjects.SingleAsync(subject => subject.Id == id, cancellationToken)
);
}
[HttpPut("{id}")]
public async Task PutAsync(int id, SubjectDto subjectDto, CancellationToken cancellationToken = default)
{
var subjectToUpdate =
await _dataContext.Subjects.SingleAsync(subject => subject.Id == id, cancellationToken);
subjectToUpdate.Name = subjectDto.Name;
subjectToUpdate.Description = subjectDto.Description;
await _dataContext.SaveChangesAsync(cancellationToken);
}
[HttpPost]
public async Task PostAsync(SubjectDto subjectDto, CancellationToken cancellationToken = default)
{
var subject = new Subject
{
Name = subjectDto.Name,
Description = subjectDto.Description
};
await _dataContext.Subjects.AddAsync(subject, cancellationToken);
await _dataContext.SaveChangesAsync(cancellationToken);
}
[HttpDelete("{id}")]
public async Task DeleteAsync(int id, CancellationToken cancellationToken = default)
{
_dataContext.Subjects.Remove(
await _dataContext.Subjects.SingleAsync(subject => subject.Id == id, cancellationToken)
);
await _dataContext.SaveChangesAsync(cancellationToken);
}
}
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ParallelClass
{
public enum ExamplesEnumeration
{
Invoke,
InvokeWithOptions,
For,
ForEach,
ParallelLinq
}
}
|
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Diagnostics;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal;
using Microsoft.EntityFrameworkCore.TestUtilities;
using Microsoft.Extensions.DependencyInjection;
using Xunit;
namespace Microsoft.EntityFrameworkCore
{
public abstract class SaveChangesInterceptionSqlServerTestBase : SaveChangesInterceptionTestBase
{
protected SaveChangesInterceptionSqlServerTestBase(InterceptionSqlServerFixtureBase fixture)
: base(fixture)
{
}
public abstract class InterceptionSqlServerFixtureBase : InterceptionFixtureBase
{
protected override ITestStoreFactory TestStoreFactory
=> SqlServerTestStoreFactory.Instance;
protected override IServiceCollection InjectInterceptors(
IServiceCollection serviceCollection,
IEnumerable<IInterceptor> injectedInterceptors)
=> base.InjectInterceptors(serviceCollection.AddEntityFrameworkSqlServer(), injectedInterceptors);
}
public class SaveChangesInterceptionSqlServerTest
: SaveChangesInterceptionSqlServerTestBase, IClassFixture<SaveChangesInterceptionSqlServerTest.InterceptionSqlServerFixture>
{
public SaveChangesInterceptionSqlServerTest(InterceptionSqlServerFixture fixture)
: base(fixture)
{
}
public class InterceptionSqlServerFixture : InterceptionSqlServerFixtureBase
{
protected override string StoreName
=> "SaveChangesInterception";
protected override bool ShouldSubscribeToDiagnosticListener
=> false;
public override DbContextOptionsBuilder AddOptions(DbContextOptionsBuilder builder)
{
new SqlServerDbContextOptionsBuilder(base.AddOptions(builder))
.ExecutionStrategy(d => new SqlServerExecutionStrategy(d));
return builder;
}
}
}
public class SaveChangesInterceptionWithDiagnosticsSqlServerTest
: SaveChangesInterceptionSqlServerTestBase,
IClassFixture<SaveChangesInterceptionWithDiagnosticsSqlServerTest.InterceptionSqlServerFixture>
{
public SaveChangesInterceptionWithDiagnosticsSqlServerTest(InterceptionSqlServerFixture fixture)
: base(fixture)
{
}
public class InterceptionSqlServerFixture : InterceptionSqlServerFixtureBase
{
protected override string StoreName
=> "SaveChangesInterceptionWithDiagnostics";
protected override bool ShouldSubscribeToDiagnosticListener
=> true;
public override DbContextOptionsBuilder AddOptions(DbContextOptionsBuilder builder)
{
new SqlServerDbContextOptionsBuilder(base.AddOptions(builder))
.ExecutionStrategy(d => new SqlServerExecutionStrategy(d));
return builder;
}
}
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace MvvmTest.HtmlAgility
{
public static class Common
{
/// <summary>
///
/// </summary>
/// <returns></returns>
public static string Substring(string oldStr)
{
int length = 35;
if (oldStr.Length > length)
return oldStr.Substring(0, length) + "...";
return oldStr;
}
}
} |
using System;
public class DamageArgs : EventArgs
{
public IncomeDamageInfo Income;
public OutDamageInfo Output;
public IOwner Owner { get { return Income.Owner; } }
public object Source { get { return Income.Source; } }
}
|
using System;
using System.Xml.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using MaybeSharp;
using System.Linq;
using MaybeSharp.Extensions;
using Xunit;
namespace MaybeSharp.NetFx.Tests
{
public class SerializationTests
{
[Fact]
public void Maybe_Serialize_Binary_NonEmpty()
{
var value = new Maybe<int?>(5);
var formatter = new BinaryFormatter();
using (var ms = new System.IO.MemoryStream())
{
formatter.Serialize(ms, value);
ms.Seek(0, System.IO.SeekOrigin.Begin);
var deserialisedValue = (Maybe<int?>)formatter.Deserialize(ms);
Assert.Equal(value, deserialisedValue);
Assert.Equal(value.Value, deserialisedValue.Value);
}
}
[Fact]
public void Maybe_Serialize_Binary_Empty()
{
var value = Maybe<int?>.Nothing;
var formatter = new BinaryFormatter();
using (var ms = new System.IO.MemoryStream())
{
formatter.Serialize(ms, value);
ms.Seek(0, System.IO.SeekOrigin.Begin);
var deserialisedValue = (Maybe<int?>)formatter.Deserialize(ms);
Assert.Equal(value, deserialisedValue);
Assert.True(deserialisedValue.IsEmpty);
}
}
}
}
|
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using VER_CHK.Models.Articles;
using VER_CHK.Models.Users;
namespace VER_CHK.Helpers
{
public class AutoMapperProfile : Profile
{
public AutoMapperProfile()
{
CreateMap<User, UserModel>();
CreateMap<RegisterModel, User>();
CreateMap<UpdateModel, User>();
CreateMap<CreateModel, Article>();
}
}
}
|
using System;
namespace baekjoonEx.Unit01
{
public class Ex01
{
public static void Init()
{
Console.WriteLine("Hello World!");
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace EkspozitaPikturave.ViewModels
{
public class AdministrimiShportaBlerjeve
{
public string urlPiktura { get; set; }
public string titulliPiktures { get; set; }
public decimal cmimi { get; set; }
public string Blerja { get; set; }
}
}
|
using Clubber.Data;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;
namespace Clubber.Models
{
public class ClubEdit
{
public int ClubId { get; set; }
[Required]
public Guid OwnerId { get; set; }
[Required]
public string Title { get; set; }
[Required]
public DayOfWeek MeetingDay { get; set; }
[Required]
[DataType(DataType.Time)]
[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:H:mm}")]
public DateTime MeetingTime { get; set; }
[ForeignKey("Sponsor")]
public int SponsorId { get; set; }
public virtual Sponsor Sponsor { get; set; }
[Required]
[Display(Name = "Club Category")]
public Club_Category ClubType { get; set; }
}
} |
namespace MiHomeLibrary.Communication.Commands
{
internal class DiscoverGatewayCmd : ICommand
{
public string SerializeCommand()
{
return "{\"cmd\":\"get_id_list\"}";
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ObjectTracker
{
class Program
{
static void Main(string[] args)
{
using (MainWindow w = new MainWindow())
w.Run();
}
}
}
|
using System;
using System.Collections.Generic;
namespace HotFix_Project
{
class DEventDelegateData
{
private int m_eventType = 0;
/// <summary>
/// 不免每次判断是否重合都要new一个,造成gc
/// </summary>
public List<Delegate> m_listExist = new List<Delegate>();
// private Delegate m_handler = null;
private List<Delegate> m_addList = new List<Delegate>();
private List<Delegate> m_deleteList = new List<Delegate>();
private bool m_isExcute = false;
private bool m_dirty = false;
public DEventDelegateData(int evnetType)
{
m_eventType = evnetType;
}
public bool AddHandler(Delegate handler)
{
if (m_listExist.Contains(handler))
{
//DLogger.EditorFatal("repeate add handler");
return false;
}
if (m_isExcute)
{
m_dirty = true;
m_addList.Add(handler);
}
else
{
m_listExist.Add(handler);
}
return true;
}
public void RmvHandler(Delegate hander)
{
if (m_isExcute)
{
m_dirty = true;
m_deleteList.Add(hander);
}
else
{
if (!m_listExist.Remove(hander))
{
//DLogger.EditorFatal("delete handle failed, not exist, EvntId: {0}", StringId.HashToString(m_eventType));
}
}
}
private void CheckModify()
{
m_isExcute = false;
if (m_dirty)
{
for (int i = 0; i < m_addList.Count; i++)
{
m_listExist.Add(m_addList[i]);
}
m_addList.Clear();
for (int i = 0; i < m_deleteList.Count; i++)
{
m_listExist.Remove(m_deleteList[i]);
}
m_deleteList.Clear();
}
}
public void AddHandleByInteface(object interObj)
{
}
public void Callback()
{
m_isExcute = true;
for (var i = 0; i < m_listExist.Count; i++)
{
var d = m_listExist[i];
Action action = d as Action;
if (action != null)
{
action();
}
}
CheckModify();
}
public void Callback<T>(T arg1)
{
m_isExcute = true;
for (var i = 0; i < m_listExist.Count; i++)
{
var d = m_listExist[i];
var action = d as Action<T>;
if (action != null)
{
action(arg1);
}
}
CheckModify();
}
public void Callback<T, U>(T arg1, U arg2)
{
m_isExcute = true;
for (var i = 0; i < m_listExist.Count; i++)
{
var d = m_listExist[i];
var action = d as Action<T, U>;
if (action != null)
{
action(arg1, arg2);
}
}
CheckModify();
}
public void Callback<T, U, V>(T arg1, U arg2, V arg3)
{
m_isExcute = true;
for (var i = 0; i < m_listExist.Count; i++)
{
var d = m_listExist[i];
var action = d as Action<T, U, V>;
if (action != null)
{
action(arg1, arg2, arg3);
}
}
CheckModify();
}
public void Callback<T, U, V, W>(T arg1, U arg2, V arg3, W arg4)
{
m_isExcute = true;
for (var i = 0; i < m_listExist.Count; i++)
{
var d = m_listExist[i];
var action = d as Action<T, U, V, W>;
if (action != null)
{
action(arg1, arg2, arg3, arg4);
}
}
CheckModify();
}
}
/// <summary>
/// 封装消息的底层分发和注册
/// </summary>
class EventDispatcher
{
static Dictionary<int, DEventDelegateData> m_eventTable = new Dictionary<int, DEventDelegateData>();
#region 事件管理接口
public bool AddListener(int eventType, Delegate handler)
{
DEventDelegateData data;
if (!m_eventTable.TryGetValue(eventType, out data))
{
data = new DEventDelegateData(eventType);
m_eventTable.Add(eventType, data);
}
return data.AddHandler(handler);
}
public void RemoveListener(int eventType, Delegate handler)
{
DEventDelegateData data;
if (m_eventTable.TryGetValue(eventType, out data))
{
data.RmvHandler(handler);
}
}
#endregion
#region 事件分发接口
public void Send(int eventType)
{
DEventDelegateData d;
if (m_eventTable.TryGetValue(eventType, out d))
{
d.Callback();
}
}
public void Send<T>(int eventType, T arg1)
{
DEventDelegateData d;
if (m_eventTable.TryGetValue(eventType, out d))
{
d.Callback(arg1);
}
}
public void Send<T, U>(int eventType, T arg1, U arg2)
{
DEventDelegateData d;
if (m_eventTable.TryGetValue(eventType, out d))
{
d.Callback(arg1, arg2);
}
}
public void Send<T, U, V>(int eventType, T arg1, U arg2, V arg3)
{
DEventDelegateData d;
if (m_eventTable.TryGetValue(eventType, out d))
{
d.Callback(arg1, arg2, arg3);
}
}
public void Send<T, U, V, W>(int eventType, T arg1, U arg2, V arg3, W arg4)
{
DEventDelegateData d;
if (m_eventTable.TryGetValue(eventType, out d))
{
d.Callback(arg1, arg2, arg3, arg4);
}
}
#endregion
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.OleDb;
namespace Proje
{
class UrunOnay:Client
{
private int urunno;
public int UrunNo { get { return urunno; } set { this.urunno = value; } }
OleDbConnection baglanti;
OleDbCommand komut;
public void Onayver()
{
//Kullanıcının satmak istediği ürünlere onay ver.
DateTime zaman = DateTime.Now;
string format = "yyyy-MM-dd HH:mm:ss";
string zamanim = zaman.ToString(format);
//veritabanında tarihin gözükmesini istediğim şekilde ayarladım
baglanti = new OleDbConnection("Provider=Microsoft.ACE.Oledb.12.0;Data Source=C:/Users/marsl/OneDrive/Masaüstü/Dönem Projesi/YazılımProje.accdb");
komut = new OleDbCommand();
komut.Connection = baglanti;
baglanti.Open();
komut.CommandText = "update Urunler set AdminOnay='Evet', SatisTarih='" + zamanim + "' where UrunNo=" + urunno + "";
komut.ExecuteNonQuery();
baglanti.Close();
}
public void Sil()
{
//Kullanıcının satmak istediği ürünleri sil
baglanti = new OleDbConnection("Provider=Microsoft.ACE.Oledb.12.0;Data Source=C:/Users/marsl/OneDrive/Masaüstü/Dönem Projesi/YazılımProje.accdb");
komut = new OleDbCommand();
komut.Connection = baglanti;
baglanti.Open();
komut.CommandText = "delete from Urunler where UrunNo=" + urunno + " AND AdminOnay='Hayır'";
komut.ExecuteNonQuery();
baglanti.Close();
}
}
}
|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
public sealed partial class MainTerrainSettings {
}
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Aga.Controls.Tree;
using System.IO;
using System.Reflection;
namespace DBManager
{
public partial class frmGeneratePHP : BlueForm
{
public class TBLStructure
{
public string fieldName { get; set; }
public string fieldType { get; set; }
public string fieldSize { get; set; }
public bool fieldPK { get; set; }
public bool fieldFK { get; set; }
public string tableFK { get; set; }
public TBLStructure(string _fieldname, string _fieldType, string _fieldSize, bool _PK, bool _FK, string _TBL)
{
fieldName = _fieldname;
fieldType = _fieldType;
fieldSize = _fieldSize;
fieldPK = _PK;
fieldFK = _FK;
tableFK = _TBL;
}
}
TreeModel TRmodel = new TreeModel();
public frmGeneratePHP(List<treeItem> items, string tablename)//TreeNodeAdv item)
{
InitializeComponent();
Node table = (Node)new treeItem(tablename, "", "", false, false, "", 0, imageList1);
foreach (treeItem item in items)
{
table.Nodes.Add(new treeItem(item.nodeText, item.fieldType, item.fieldSize, item.allowNull, item.nodeCheck, item.fieldTypeInternal, item.imageIndex, item.imageList));//, ImageList imgList
//item);
}
TRmodel.Nodes.Add(table);
TR.Model = TRmodel;
//Node table = null;
//var ea = item.Tree.AllNodes.FirstOrDefault();
//table = new Node();
//table = (Node)(ea.Tag as treeItem);
//foreach (var ea in item.Children)
//{
// //table = new Node();
// //table = (Node)(ea.Tag as treeItem);
// TRmodel.Nodes.Add((Node)(ea.Tag as treeItem));
//}
//TR.Model = TRmodel;
}
private void frmGeneratePHP_Load(object sender, EventArgs e)
{
//Node table = null;
//var ea = iftem.Tree.AllNodes.FirstOrDefault();
//table = new Node();
//table = (Node)(ea.Tag as treeItem);
//TRmodel.Nodes.Add(table);
//TR.Model=TRmodel;
}
private void btnExport_Click(object sender, EventArgs e)
{
if (txtFolder.Text.Trim().Length == 0)
{
General.Mes("please type a folder");
return;
}
//create export folder
string exportDIR = Application.StartupPath + "\\" + txtFolder.Text + "\\";
if (Directory.Exists(exportDIR))
{
General.Mes("Folder already exists!");
return;
}
else
Directory.CreateDirectory(exportDIR);
List<TBLStructure> cols = new List<TBLStructure>();
treeItem itemTR;
//grab all fields to our list of
foreach (var nodeR in TR.Root.Children)
foreach (var node in nodeR.Children)
{
itemTR = (node.Tag as treeItem);
cols.Add(new TBLStructure(itemTR.nodeText, itemTR.fieldType, itemTR.fieldSize, itemTR.imageIndex == 2, itemTR.imageIndex == 1, (nodeR.Tag as treeItem).nodeText));
}
//page_template***********
string pageTemplate = ReadASCIIfromResources("DBManager.ResourcesPHPexport.page_template.txt");
string pageTemplateAppender = "";
//modal element
string modalElementTemplate = ReadASCIIfromResources("DBManager.ResourcesPHPexport.page_template_modal_element.txt");
string modalElementTemplateAppender = "";
//modal elements Edit button get from DB to modal
string modalElementEDITtemplate = " $('[name={{field}}]').val(data.{{field}});\r\n";
string modalElementEDITtemplateAppender = "";
//table element
string tableColTemplate = " <th tabindex=\"0\" rowspan=\"1\" colspan=\"1\">{{field}}</th>\r\n";
string tableColTemplateAppender = "";
//validator Declaration***********
string validateDeclareAppender = "";
string validateErrMessagesTemplateAppender = "";
//validator String Declare
string validateDeclareStringTemplate = " {{field}} : {\r\n required : true,\r\n minlength : 1,\r\n maxlength : {{size}}\r\n },\r\n";
//validator String Error Messages
string validateErrMessagesStringTemplate = " {{field}} : 'Please enter a value up to {{size}} characters',\r\n";
//validator Decimal Declare
string validateDeclareDecimalTemplate = " {{field}} : {\r\n required : true,\r\n currency : true\r\n },\r\n";
//validator Decimal Error Messages
string validateErrMessagesDecimalTemplate = " {{field}} : 'Please enter a decimal value',\r\n";
//page_pagination template***********
string pagePaginationTemplate = ReadASCIIfromResources("DBManager.ResourcesPHPexport.table_pagination.txt");
string pagePaginationTemplateAppender = "";
//page_pagination table item
string pagePaginationColTemplate = " <td>{{{{field}}}}</td>\r\n";
string pagePaginationColTemplateAppender = "";
//page_pagination while
string pagePaginationWhileTemplateOnlyFirstField = " $rowTBL = str_replace('{{{{field}}}}', $row['{{field}}'], $RowTemplate);\r\n";
string pagePaginationWhileTemplate = " $rowTBL = str_replace('{{{{field}}}}', $row['{{field}}'], $rowTBL);\r\n";
string pagePaginationWhileTemplateAppender = "";
//table_save template***********
string tableSaveTemplate = ReadASCIIfromResources("DBManager.ResourcesPHPexport.page_save_template.txt");
string tableSaveTemplateAppender = "";
string ID="";
string secondField = "";
string insFields = "";
string qmarks="";
string updFields="";
string post2vars="";
string paramFields = "";
string paramFieldsType = "";
//table_fetch template***********
string tableFetchTemplate = ReadASCIIfromResources("DBManager.ResourcesPHPexport.page_fetch_template.txt");
string tableFetchTemplateAppender = "";
//table_delete template***********
string tableDeleteTemplate = ReadASCIIfromResources("DBManager.ResourcesPHPexport.page_delete_template.txt");
string tableDeleteTemplateAppender = "";
//table_export template***********
string tableExportTemplate = ReadASCIIfromResources("DBManager.ResourcesPHPexport.page_export_template.txt");
string tableExportTemplateAppender = "";
bool isFirst = true;
foreach (TBLStructure item in cols)
{
if (item.fieldPK)
ID= item.fieldName;
//for TABLE.php
modalElementTemplateAppender += modalElementTemplate.Replace("{{field}}",item.fieldName);
tableColTemplateAppender += tableColTemplate.Replace("{{field}}", item.fieldName);
modalElementEDITtemplateAppender += modalElementEDITtemplate.Replace("{{field}}", item.fieldName);
//for TABLE_pagination.php
pagePaginationColTemplateAppender += pagePaginationColTemplate.Replace("{{field}}", item.fieldName);
if (isFirst)
{
pagePaginationWhileTemplateAppender += pagePaginationWhileTemplateOnlyFirstField.Replace("{{field}}", item.fieldName);
isFirst = false;
}
else
{
pagePaginationWhileTemplateAppender += pagePaginationWhileTemplate.Replace("{{field}}", item.fieldName);
if (secondField.Length==0)
secondField = item.fieldName;
}
//table_save.php
insFields+=" " + item.fieldName + ",\r\n";
qmarks += "?,";
updFields += " " + item.fieldName + " = ?,\r\n";
post2vars += " $" + item.fieldName + " = $_POST['" + item.fieldName + "'];\r\n";
paramFields += " $" + item.fieldName + ",";
paramFieldsType += (item.fieldType == "decimal" ? "d" : "s");
if (item.fieldType == "decimal")
{
validateDeclareAppender += validateDeclareDecimalTemplate.Replace("{{field}}", item.fieldName);
validateErrMessagesTemplateAppender += validateErrMessagesDecimalTemplate.Replace("{{field}}", item.fieldName);
}
else
{
validateDeclareAppender += validateDeclareStringTemplate.Replace("{{field}}", item.fieldName).Replace("{{size}}",item.fieldSize);
validateErrMessagesTemplateAppender += validateErrMessagesStringTemplate.Replace("{{field}}", item.fieldName).Replace("{{size}}", item.fieldSize);
}
}
//replace validation delcaration
pageTemplateAppender = pageTemplate.Replace("{{validationDECLARATION}}", validateDeclareAppender);
//replace validation Error messages
pageTemplateAppender = pageTemplateAppender.Replace("{{validationErrMessages}}", validateErrMessagesTemplateAppender);
//replace EDIT elements (fill modal form with data from server)
pageTemplateAppender = pageTemplateAppender.Replace("{{elementsEDIT}}", modalElementEDITtemplateAppender);
//replace modal elements
pageTemplateAppender = pageTemplateAppender.Replace("{{modalElements}}", modalElementTemplateAppender);
//replace table cols
pageTemplateAppender = pageTemplateAppender.Replace("{{tableCOLS}}", tableColTemplateAppender);
var tblName = TR.Root.Children.FirstOrDefault();
string tableName = (tblName.Tag as treeItem).nodeText;
pageTemplateAppender = pageTemplateAppender.Replace("{{Ufield}}", tableName.ToUpper())
.Replace("{{Lfield}}", tableName.ToLower())
.Replace("{{Cfield}}",General.UppercaseFirst(tableName.ToLower().Substring(0,tableName.Length-1)));
//table.php - export page
File.WriteAllText(exportDIR + tableName.ToLower() + ".php", pageTemplateAppender, Encoding.ASCII);
//table_pagination.php
pagePaginationTemplateAppender = pagePaginationTemplate.Replace("{{table}}", tableName)
.Replace("{{Ctable}}", General.UppercaseFirst(tableName.ToLower()))
.Replace("{{tableCol}}", pagePaginationColTemplateAppender)
.Replace("{{while}}", pagePaginationWhileTemplateAppender);
File.WriteAllText(exportDIR + tableName.ToLower() + "_pagination.php", pagePaginationTemplateAppender, Encoding.ASCII);
//table_save.php
tableSaveTemplateAppender = tableSaveTemplate.Replace("{{2ndfield}}", secondField)
.Replace("{{Utable}}", tableName.ToUpper())
.Replace("{{table}}", tableName)
.Replace("{{insFields}}", insFields.Substring(0,insFields.Length -3))
.Replace("{{qmarks}}", qmarks.Substring(0, qmarks.Length - 3))
.Replace("{{updFields}}", updFields.Substring(0,updFields.Length-3) + " ")
.Replace("{{id}}", ID)
.Replace("{{post2vars}}", post2vars)
.Replace("{{parameterFields}}", paramFields.Substring(0,paramFields.Length-1))
.Replace("{{parameterFieldsType}}", paramFieldsType);
File.WriteAllText(exportDIR + tableName.ToLower() + "_save.php", tableSaveTemplateAppender, Encoding.ASCII);
//table_fetch.php
tableFetchTemplateAppender = tableFetchTemplate.Replace("{{Utable}}", tableName.ToUpper())
.Replace("{{table}}", tableName)
.Replace("{{id}}", ID);
File.WriteAllText(exportDIR + tableName.ToLower() + "_fetch.php", tableFetchTemplateAppender, Encoding.ASCII);
//table_delete.php
tableDeleteTemplateAppender = tableDeleteTemplate.Replace("{{Utable}}", tableName.ToUpper())
.Replace("{{table}}", tableName)
.Replace("{{id}}", ID);
File.WriteAllText(exportDIR + tableName.ToLower() + "_delete.php", tableDeleteTemplateAppender, Encoding.ASCII);
//table_export.php
tableExportTemplateAppender = tableExportTemplate.Replace("{{Utable}}", tableName.ToUpper())
.Replace("{{table}}", tableName);
File.WriteAllText(exportDIR + tableName.ToLower() + "_export.php", tableExportTemplateAppender, Encoding.ASCII);
//config.php - mysql
File.WriteAllText(exportDIR + "config.php", ReadASCIIfromResources("DBManager.ResourcesPHPexport.config.txt"), Encoding.ASCII);
//EXCEL export REQ files
File.WriteAllText(exportDIR + "ExcelWriterXML.php", ReadASCIIfromResources("DBManager.ResourcesPHPexport.ExcelWriterXML.txt"), Encoding.ASCII);
File.WriteAllText(exportDIR + "ExcelWriterXML_Sheet.php", ReadASCIIfromResources("DBManager.ResourcesPHPexport.ExcelWriterXML_Sheet.txt"), Encoding.ASCII);
File.WriteAllText(exportDIR + "ExcelWriterXML_Style.php", ReadASCIIfromResources("DBManager.ResourcesPHPexport.ExcelWriterXML_Style.txt"), Encoding.ASCII);
//login+authorization
File.WriteAllText(exportDIR + "admin.php", ReadASCIIfromResources("DBManager.ResourcesPHPexport.auth_admin.txt"), Encoding.ASCII);
File.WriteAllText(exportDIR + "login.php", ReadASCIIfromResources("DBManager.ResourcesPHPexport.auth_login.txt"), Encoding.ASCII);
File.WriteAllText(exportDIR + "portal.php", ReadASCIIfromResources("DBManager.ResourcesPHPexport.portal_template.txt").Replace("{{Ltable}}",tableName.ToLower()), Encoding.ASCII);
//bootstrap+jquery
Directory.CreateDirectory(exportDIR + "js");
Directory.CreateDirectory(exportDIR + "css");
File.WriteAllText(exportDIR + "css\\bootstrap.min.css", ReadASCIIfromResources("DBManager.ResourcesPHPexport.bootstrap.min.css"), Encoding.ASCII);
File.WriteAllText(exportDIR + "css\\signin.css", ReadASCIIfromResources("DBManager.ResourcesPHPexport.signin.css"), Encoding.ASCII);
File.WriteAllText(exportDIR + "js\\bootstrap.min.js", ReadASCIIfromResources("DBManager.ResourcesPHPexport.bootstrap.min.js"), Encoding.ASCII);
File.WriteAllText(exportDIR + "js\\jquery-1.10.2.min.js", ReadASCIIfromResources("DBManager.ResourcesPHPexport.jquery-1.10.2.min.js"), Encoding.ASCII);
File.WriteAllText(exportDIR + "js\\jquery.validate.min.js", ReadASCIIfromResources("DBManager.ResourcesPHPexport.jquery.validate.min.js"), Encoding.ASCII);
}
private string ReadASCIIfromResources(string filename)
{
byte[] Buffer;
using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(filename))
{
Buffer = new byte[stream.Length];
stream.Read(Buffer, 0, Buffer.Length);
}
return Encoding.ASCII.GetString(Buffer);
}
}
}
|
using System;
using DungeonCrawler.Combat;
using DungeonCrawler.Components;
using DungeonCrawler.Components.States.Character;
using DungeonCrawler.Components.States.Character.Enemy;
using DungeonCrawler.Components.Traits;
using DungeonCrawler.Extensions;
using Godot;
namespace DungeonCrawler.Characters.NonPlayable
{
public class EnemyCharacter : Character
{
// Editable variables
[Export] public bool IsAggressive = true;
// Public properties
public Vector2 StartPosition = Vector2.Zero;
// Protected components
protected SoftCollision SoftCollision;
protected DetectionZone DetectionZone;
protected Node2D Target;
public override void _Ready()
{
base._Ready();
SoftCollision = this.GetChildNodeOrNull<SoftCollision>();
DetectionZone = this.GetChildNode<DetectionZone>();
DetectionZone.Connect(nameof(DetectionZone.TargetSpotted), this, nameof(OnTargetSpotted));
// DetectionZone.Connect(nameof(DetectionZone.TargetLost), this, nameof(OnTargetLost));
PushState(new IdleState(this));
StartPosition = Position;
HpIndicator.UpdateHealthIndication();
}
public override void ReceiveDamage(int damageAmount, Vector2 knockbackPower)
{
Stats.Hp -= damageAmount;
if (Stats.Hp <= 0)
{
PushState(new DeathState(this));
return;
}
InvincibilityComponent.StartInvincibility();
PushState(new KnockbackState(this, knockbackPower));
}
public override void Die()
{
CharacterHurtBox.Disable();
CharacterHitBox.Disable();
CollisionShape2D.SetDeferred("disabled", true);
SoftCollision.CollisionShape2D.SetDeferred("disabled", true);
AnimationPlayer.Play("Death");
}
public override void StartInvincibility()
{
CharacterHurtBox.Disable();
BlinkAnimationPlayer.Play("Blink");
AnimationPlayer.Play("Hit");
}
public override void EndInvincibility()
{
CharacterHurtBox.Enable();
BlinkAnimationPlayer.ToEnd();
BlinkAnimationPlayer.Stop();
}
public Node2D GetTarget() => Target;
public void OnTargetSpotted(Node2D target)
{
if (IsAggressive == false)
return;
Target = target;
}
public void OnTargetLost(Node2D target)
{
if (target != Target)
return;
Target = null;
}
}
} |
namespace CarWash.ClassLibrary.Enums
{
/// <summary>
/// Types of notification channels the user can choose from.
/// </summary>
public enum NotificationChannel
{
/// <summary>
/// Notification channel not yet set.
/// </summary>
NotSet,
/// <summary>
/// Notifications are disabled.
/// </summary>
Disabled,
/// <summary>
/// Email channel is choosen for notifications.
/// </summary>
Email,
/// <summary>
/// Push channel is choosen for notifications.
/// </summary>
Push
}
}
|
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;
namespace ArrayLoop
{
public partial class ArrayLoop : Form
{
public ArrayLoop()
{
InitializeComponent();
}
private void ReturnNames()
{
string[] names = { "Beyonce (f)", "David Bowie (m)", "Elvis Costello (m)",
"Madonna (f)", "Elton John (m)", "Charles Aznavour (m)"};
foreach (string n in names)
{
lstNames.Items.Add(n);
}
}
private void Calculate()
{
int males = 0;
int females = 0;
foreach (string name in lstNames.Items)
{
if (name.Contains("(m)"))
{
males++;
}
if (name.Contains("(f)"))
{
females++;
}
}
males.ToString();
females.ToString();
string countResult = "There are " + males + " male singers" +
" and " + females + " female singers";
richTxtResult.Text = countResult;
}
private void ArrayLoop_Load(object sender, EventArgs e)
{
ReturnNames();
}
private void btnCount_Click(object sender, EventArgs e)
{
Calculate();
}
}
}
|
using System;
using SLua;
using System.Collections.Generic;
[UnityEngine.Scripting.Preserve]
public class Lua_LTDescr : LuaObject {
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int constructor(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr o;
o=new LTDescr();
pushValue(l,true);
pushValue(l,o);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int reset(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
self.reset();
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setMoveX(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setMoveX();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setMoveY(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setMoveY();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setMoveZ(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setMoveZ();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setMoveLocalX(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setMoveLocalX();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setMoveLocalY(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setMoveLocalY();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setMoveLocalZ(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setMoveLocalZ();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setMoveCurved(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setMoveCurved();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setMoveCurvedLocal(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setMoveCurvedLocal();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setMoveSpline(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setMoveSpline();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setMoveSplineLocal(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setMoveSplineLocal();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setScaleX(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setScaleX();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setScaleY(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setScaleY();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setScaleZ(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setScaleZ();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setRotateX(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setRotateX();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setRotateY(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setRotateY();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setRotateZ(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setRotateZ();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setRotateAround(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setRotateAround();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setRotateAroundLocal(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setRotateAroundLocal();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setAlpha(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setAlpha();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setTextAlpha(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setTextAlpha();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setAlphaVertex(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setAlphaVertex();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setColor(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setColor();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setCallbackColor(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setCallbackColor();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setTextColor(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setTextColor();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setCanvasAlpha(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setCanvasAlpha();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setCanvasGroupAlpha(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setCanvasGroupAlpha();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setCanvasColor(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setCanvasColor();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setCanvasMoveX(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setCanvasMoveX();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setCanvasMoveY(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setCanvasMoveY();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setCanvasMoveZ(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setCanvasMoveZ();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setCanvasRotateAround(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setCanvasRotateAround();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setCanvasRotateAroundLocal(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setCanvasRotateAroundLocal();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setCanvasPlaySprite(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setCanvasPlaySprite();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setCanvasMove(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setCanvasMove();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setCanvasScale(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setCanvasScale();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setCanvasSizeDelta(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setCanvasSizeDelta();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setCallback(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setCallback();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setValue3(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setValue3();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setMove(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setMove();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setMoveLocal(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setMoveLocal();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setMoveToTransform(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setMoveToTransform();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setRotate(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setRotate();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setRotateLocal(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setRotateLocal();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setScale(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
int argc = LuaDLL.lua_gettop(l);
if(argc==1){
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setScale();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
else if(argc==2){
LTDescr self=(LTDescr)checkSelf(l);
System.Single a1;
checkType(l,2,out a1);
var ret=self.setScale(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
pushValue(l,false);
LuaDLL.lua_pushstring(l,"No matched override function setScale to call");
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setGUIMove(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setGUIMove();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setGUIMoveMargin(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setGUIMoveMargin();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setGUIScale(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setGUIScale();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setGUIAlpha(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setGUIAlpha();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setGUIRotate(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setGUIRotate();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setDelayedSound(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setDelayedSound();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int updateNow(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.updateNow();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int updateInternal(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.updateInternal();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int callOnCompletes(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
self.callOnCompletes();
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setFromColor(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
UnityEngine.Color a1;
checkType(l,2,out a1);
var ret=self.setFromColor(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int pause(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.pause();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int resume(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.resume();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setAxis(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
UnityEngine.Vector3 a1;
checkType(l,2,out a1);
var ret=self.setAxis(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setDelay(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Single a1;
checkType(l,2,out a1);
var ret=self.setDelay(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEase(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
int argc = LuaDLL.lua_gettop(l);
if(matchType(l,argc,2,typeof(LeanTweenType))){
LTDescr self=(LTDescr)checkSelf(l);
LeanTweenType a1;
a1 = (LeanTweenType)LuaDLL.luaL_checkinteger(l, 2);
var ret=self.setEase(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
else if(matchType(l,argc,2,typeof(UnityEngine.AnimationCurve))){
LTDescr self=(LTDescr)checkSelf(l);
UnityEngine.AnimationCurve a1;
checkType(l,2,out a1);
var ret=self.setEase(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
pushValue(l,false);
LuaDLL.lua_pushstring(l,"No matched override function setEase to call");
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseLinear(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseLinear();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseSpring(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseSpring();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseInQuad(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseInQuad();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseOutQuad(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseOutQuad();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseInOutQuad(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseInOutQuad();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseInCubic(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseInCubic();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseOutCubic(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseOutCubic();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseInOutCubic(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseInOutCubic();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseInQuart(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseInQuart();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseOutQuart(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseOutQuart();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseInOutQuart(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseInOutQuart();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseInQuint(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseInQuint();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseOutQuint(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseOutQuint();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseInOutQuint(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseInOutQuint();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseInSine(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseInSine();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseOutSine(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseOutSine();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseInOutSine(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseInOutSine();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseInExpo(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseInExpo();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseOutExpo(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseOutExpo();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseInOutExpo(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseInOutExpo();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseInCirc(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseInCirc();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseOutCirc(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseOutCirc();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseInOutCirc(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseInOutCirc();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseInBounce(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseInBounce();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseOutBounce(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseOutBounce();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseInOutBounce(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseInOutBounce();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseInBack(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseInBack();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseOutBack(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseOutBack();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseInOutBack(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseInOutBack();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseInElastic(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseInElastic();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseOutElastic(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseOutElastic();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseInOutElastic(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseInOutElastic();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEasePunch(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEasePunch();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setEaseShake(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setEaseShake();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setOvershoot(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Single a1;
checkType(l,2,out a1);
var ret=self.setOvershoot(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setPeriod(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Single a1;
checkType(l,2,out a1);
var ret=self.setPeriod(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setTo(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
int argc = LuaDLL.lua_gettop(l);
if(matchType(l,argc,2,typeof(UnityEngine.Vector3))){
LTDescr self=(LTDescr)checkSelf(l);
UnityEngine.Vector3 a1;
checkType(l,2,out a1);
var ret=self.setTo(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
else if(matchType(l,argc,2,typeof(UnityEngine.Transform))){
LTDescr self=(LTDescr)checkSelf(l);
UnityEngine.Transform a1;
checkType(l,2,out a1);
var ret=self.setTo(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
pushValue(l,false);
LuaDLL.lua_pushstring(l,"No matched override function setTo to call");
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setFrom(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
int argc = LuaDLL.lua_gettop(l);
if(matchType(l,argc,2,typeof(UnityEngine.Vector3))){
LTDescr self=(LTDescr)checkSelf(l);
UnityEngine.Vector3 a1;
checkType(l,2,out a1);
var ret=self.setFrom(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
else if(matchType(l,argc,2,typeof(float))){
LTDescr self=(LTDescr)checkSelf(l);
System.Single a1;
checkType(l,2,out a1);
var ret=self.setFrom(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
pushValue(l,false);
LuaDLL.lua_pushstring(l,"No matched override function setFrom to call");
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setDiff(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
UnityEngine.Vector3 a1;
checkType(l,2,out a1);
var ret=self.setDiff(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setHasInitialized(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean a1;
checkType(l,2,out a1);
var ret=self.setHasInitialized(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setId(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.UInt32 a1;
checkType(l,2,out a1);
var ret=self.setId(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setTime(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Single a1;
checkType(l,2,out a1);
var ret=self.setTime(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setSpeed(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Single a1;
checkType(l,2,out a1);
var ret=self.setSpeed(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setRepeat(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Int32 a1;
checkType(l,2,out a1);
var ret=self.setRepeat(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setLoopType(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
LeanTweenType a1;
a1 = (LeanTweenType)LuaDLL.luaL_checkinteger(l, 2);
var ret=self.setLoopType(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setUseEstimatedTime(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean a1;
checkType(l,2,out a1);
var ret=self.setUseEstimatedTime(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setIgnoreTimeScale(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean a1;
checkType(l,2,out a1);
var ret=self.setIgnoreTimeScale(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setUseFrames(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean a1;
checkType(l,2,out a1);
var ret=self.setUseFrames(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setUseManualTime(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean a1;
checkType(l,2,out a1);
var ret=self.setUseManualTime(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setLoopCount(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Int32 a1;
checkType(l,2,out a1);
var ret=self.setLoopCount(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setLoopOnce(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setLoopOnce();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setLoopClamp(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
int argc = LuaDLL.lua_gettop(l);
if(argc==1){
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setLoopClamp();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
else if(argc==2){
LTDescr self=(LTDescr)checkSelf(l);
System.Int32 a1;
checkType(l,2,out a1);
var ret=self.setLoopClamp(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
pushValue(l,false);
LuaDLL.lua_pushstring(l,"No matched override function setLoopClamp to call");
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setLoopPingPong(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
int argc = LuaDLL.lua_gettop(l);
if(argc==1){
LTDescr self=(LTDescr)checkSelf(l);
var ret=self.setLoopPingPong();
pushValue(l,true);
pushValue(l,ret);
return 2;
}
else if(argc==2){
LTDescr self=(LTDescr)checkSelf(l);
System.Int32 a1;
checkType(l,2,out a1);
var ret=self.setLoopPingPong(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
pushValue(l,false);
LuaDLL.lua_pushstring(l,"No matched override function setLoopPingPong to call");
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setOnComplete(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
int argc = LuaDLL.lua_gettop(l);
if(matchType(l,argc,2,typeof(System.Action))){
LTDescr self=(LTDescr)checkSelf(l);
System.Action a1;
checkDelegate(l,2,out a1);
var ret=self.setOnComplete(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
else if(matchType(l,argc,2,typeof(System.Action<object>))){
LTDescr self=(LTDescr)checkSelf(l);
System.Action<System.Object> a1;
checkDelegate(l,2,out a1);
var ret=self.setOnComplete(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
else if(argc==3){
LTDescr self=(LTDescr)checkSelf(l);
System.Action<System.Object> a1;
checkDelegate(l,2,out a1);
System.Object a2;
checkType(l,3,out a2);
var ret=self.setOnComplete(a1,a2);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
pushValue(l,false);
LuaDLL.lua_pushstring(l,"No matched override function setOnComplete to call");
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setOnCompleteParam(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Object a1;
checkType(l,2,out a1);
var ret=self.setOnCompleteParam(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setOnUpdate(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
int argc = LuaDLL.lua_gettop(l);
if(matchType(l,argc,2,typeof(System.Action<System.Single>))){
LTDescr self=(LTDescr)checkSelf(l);
System.Action<System.Single> a1;
checkDelegate(l,2,out a1);
var ret=self.setOnUpdate(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
else if(matchType(l,argc,2,typeof(System.Action<UnityEngine.Color>))){
LTDescr self=(LTDescr)checkSelf(l);
System.Action<UnityEngine.Color> a1;
checkDelegate(l,2,out a1);
var ret=self.setOnUpdate(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
else if(matchType(l,argc,2,typeof(System.Action<UnityEngine.Color,object>))){
LTDescr self=(LTDescr)checkSelf(l);
System.Action<UnityEngine.Color,System.Object> a1;
checkDelegate(l,2,out a1);
var ret=self.setOnUpdate(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
else if(matchType(l,argc,2,typeof(System.Action<System.Single,object>),typeof(System.Object))){
LTDescr self=(LTDescr)checkSelf(l);
System.Action<System.Single,System.Object> a1;
checkDelegate(l,2,out a1);
System.Object a2;
checkType(l,3,out a2);
var ret=self.setOnUpdate(a1,a2);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
else if(matchType(l,argc,2,typeof(System.Action<UnityEngine.Vector3,object>),typeof(System.Object))){
LTDescr self=(LTDescr)checkSelf(l);
System.Action<UnityEngine.Vector3,System.Object> a1;
checkDelegate(l,2,out a1);
System.Object a2;
checkType(l,3,out a2);
var ret=self.setOnUpdate(a1,a2);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
else if(matchType(l,argc,2,typeof(System.Action<UnityEngine.Vector2>),typeof(System.Object))){
LTDescr self=(LTDescr)checkSelf(l);
System.Action<UnityEngine.Vector2> a1;
checkDelegate(l,2,out a1);
System.Object a2;
checkType(l,3,out a2);
var ret=self.setOnUpdate(a1,a2);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
else if(matchType(l,argc,2,typeof(System.Action<UnityEngine.Vector3>),typeof(System.Object))){
LTDescr self=(LTDescr)checkSelf(l);
System.Action<UnityEngine.Vector3> a1;
checkDelegate(l,2,out a1);
System.Object a2;
checkType(l,3,out a2);
var ret=self.setOnUpdate(a1,a2);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
pushValue(l,false);
LuaDLL.lua_pushstring(l,"No matched override function setOnUpdate to call");
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setOnUpdateRatio(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Action<System.Single,System.Single> a1;
checkDelegate(l,2,out a1);
var ret=self.setOnUpdateRatio(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setOnUpdateObject(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Action<System.Single,System.Object> a1;
checkDelegate(l,2,out a1);
var ret=self.setOnUpdateObject(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setOnUpdateVector2(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Action<UnityEngine.Vector2> a1;
checkDelegate(l,2,out a1);
var ret=self.setOnUpdateVector2(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setOnUpdateVector3(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Action<UnityEngine.Vector3> a1;
checkDelegate(l,2,out a1);
var ret=self.setOnUpdateVector3(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setOnUpdateColor(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
int argc = LuaDLL.lua_gettop(l);
if(matchType(l,argc,2,typeof(System.Action<UnityEngine.Color>))){
LTDescr self=(LTDescr)checkSelf(l);
System.Action<UnityEngine.Color> a1;
checkDelegate(l,2,out a1);
var ret=self.setOnUpdateColor(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
else if(matchType(l,argc,2,typeof(System.Action<UnityEngine.Color,object>))){
LTDescr self=(LTDescr)checkSelf(l);
System.Action<UnityEngine.Color,System.Object> a1;
checkDelegate(l,2,out a1);
var ret=self.setOnUpdateColor(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
pushValue(l,false);
LuaDLL.lua_pushstring(l,"No matched override function setOnUpdateColor to call");
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setOnUpdateParam(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Object a1;
checkType(l,2,out a1);
var ret=self.setOnUpdateParam(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setOrientToPath(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean a1;
checkType(l,2,out a1);
var ret=self.setOrientToPath(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setOrientToPath2d(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean a1;
checkType(l,2,out a1);
var ret=self.setOrientToPath2d(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setRect(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
int argc = LuaDLL.lua_gettop(l);
if(matchType(l,argc,2,typeof(LTRect))){
LTDescr self=(LTDescr)checkSelf(l);
LTRect a1;
checkType(l,2,out a1);
var ret=self.setRect(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
else if(matchType(l,argc,2,typeof(UnityEngine.Rect))){
LTDescr self=(LTDescr)checkSelf(l);
UnityEngine.Rect a1;
checkValueType(l,2,out a1);
var ret=self.setRect(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
else if(matchType(l,argc,2,typeof(UnityEngine.RectTransform))){
LTDescr self=(LTDescr)checkSelf(l);
UnityEngine.RectTransform a1;
checkType(l,2,out a1);
var ret=self.setRect(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
pushValue(l,false);
LuaDLL.lua_pushstring(l,"No matched override function setRect to call");
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setPath(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
LTBezierPath a1;
checkType(l,2,out a1);
var ret=self.setPath(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setPoint(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
UnityEngine.Vector3 a1;
checkType(l,2,out a1);
var ret=self.setPoint(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setDestroyOnComplete(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean a1;
checkType(l,2,out a1);
var ret=self.setDestroyOnComplete(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setAudio(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Object a1;
checkType(l,2,out a1);
var ret=self.setAudio(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setOnCompleteOnRepeat(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean a1;
checkType(l,2,out a1);
var ret=self.setOnCompleteOnRepeat(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setOnCompleteOnStart(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean a1;
checkType(l,2,out a1);
var ret=self.setOnCompleteOnStart(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setSprites(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
UnityEngine.Sprite[] a1;
checkArray(l,2,out a1);
var ret=self.setSprites(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setFrameRate(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Single a1;
checkType(l,2,out a1);
var ret=self.setFrameRate(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setOnStart(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Action a1;
checkDelegate(l,2,out a1);
var ret=self.setOnStart(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setDirection(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Single a1;
checkType(l,2,out a1);
var ret=self.setDirection(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int setRecursive(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean a1;
checkType(l,2,out a1);
var ret=self.setRecursive(a1);
pushValue(l,true);
pushValue(l,ret);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_toggle(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.toggle);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_toggle(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean v;
checkType(l,2,out v);
self.toggle=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_useEstimatedTime(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.useEstimatedTime);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_useEstimatedTime(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean v;
checkType(l,2,out v);
self.useEstimatedTime=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_useFrames(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.useFrames);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_useFrames(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean v;
checkType(l,2,out v);
self.useFrames=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_useManualTime(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.useManualTime);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_useManualTime(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean v;
checkType(l,2,out v);
self.useManualTime=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_usesNormalDt(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.usesNormalDt);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_usesNormalDt(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean v;
checkType(l,2,out v);
self.usesNormalDt=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_hasInitiliazed(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.hasInitiliazed);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_hasInitiliazed(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean v;
checkType(l,2,out v);
self.hasInitiliazed=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_hasExtraOnCompletes(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.hasExtraOnCompletes);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_hasExtraOnCompletes(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean v;
checkType(l,2,out v);
self.hasExtraOnCompletes=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_hasPhysics(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.hasPhysics);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_hasPhysics(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean v;
checkType(l,2,out v);
self.hasPhysics=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_onCompleteOnRepeat(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.onCompleteOnRepeat);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_onCompleteOnRepeat(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean v;
checkType(l,2,out v);
self.onCompleteOnRepeat=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_onCompleteOnStart(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.onCompleteOnStart);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_onCompleteOnStart(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean v;
checkType(l,2,out v);
self.onCompleteOnStart=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_useRecursion(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.useRecursion);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_useRecursion(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean v;
checkType(l,2,out v);
self.useRecursion=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_ratioPassed(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.ratioPassed);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_ratioPassed(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Single v;
checkType(l,2,out v);
self.ratioPassed=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_passed(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.passed);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_passed(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Single v;
checkType(l,2,out v);
self.passed=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_delay(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.delay);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_delay(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Single v;
checkType(l,2,out v);
self.delay=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_time(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.time);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_time(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Single v;
checkType(l,2,out v);
self.time=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_speed(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.speed);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_speed(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Single v;
checkType(l,2,out v);
self.speed=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_lastVal(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.lastVal);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_lastVal(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Single v;
checkType(l,2,out v);
self.lastVal=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_loopCount(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.loopCount);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_loopCount(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Int32 v;
checkType(l,2,out v);
self.loopCount=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_counter(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.counter);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_counter(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.UInt32 v;
checkType(l,2,out v);
self.counter=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_direction(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.direction);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_direction(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Single v;
checkType(l,2,out v);
self.direction=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_directionLast(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.directionLast);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_directionLast(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Single v;
checkType(l,2,out v);
self.directionLast=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_overshoot(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.overshoot);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_overshoot(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Single v;
checkType(l,2,out v);
self.overshoot=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_period(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.period);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_period(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Single v;
checkType(l,2,out v);
self.period=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_scale(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.scale);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_scale(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Single v;
checkType(l,2,out v);
self.scale=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_destroyOnComplete(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.destroyOnComplete);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_destroyOnComplete(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean v;
checkType(l,2,out v);
self.destroyOnComplete=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_trans(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.trans);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_trans(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
UnityEngine.Transform v;
checkType(l,2,out v);
self.trans=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_ltRect(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.ltRect);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_ltRect(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
LTRect v;
checkType(l,2,out v);
self.ltRect=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_type(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushEnum(l,(int)self.type);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_type(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
TweenAction v;
v = (TweenAction)LuaDLL.luaL_checkinteger(l, 2);
self.type=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_tweenType(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushEnum(l,(int)self.tweenType);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_tweenType(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
LeanTweenType v;
v = (LeanTweenType)LuaDLL.luaL_checkinteger(l, 2);
self.tweenType=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_loopType(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushEnum(l,(int)self.loopType);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_loopType(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
LeanTweenType v;
v = (LeanTweenType)LuaDLL.luaL_checkinteger(l, 2);
self.loopType=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_hasUpdateCallback(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.hasUpdateCallback);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_hasUpdateCallback(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
System.Boolean v;
checkType(l,2,out v);
self.hasUpdateCallback=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_easeMethod(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
LTDescr.EaseTypeDelegate v;
int op=checkDelegate(l,2,out v);
if(op==0) self.easeMethod=v;
else if(op==1) self.easeMethod+=v;
else if(op==2) self.easeMethod-=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_spriteRen(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.spriteRen);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_spriteRen(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
UnityEngine.SpriteRenderer v;
checkType(l,2,out v);
self.spriteRen=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_rectTransform(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.rectTransform);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_rectTransform(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
UnityEngine.RectTransform v;
checkType(l,2,out v);
self.rectTransform=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_uiText(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.uiText);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_uiText(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
UnityEngine.UI.Text v;
checkType(l,2,out v);
self.uiText=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_uiImage(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.uiImage);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_uiImage(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
UnityEngine.UI.Image v;
checkType(l,2,out v);
self.uiImage=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_sprites(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.sprites);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_sprites(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
UnityEngine.Sprite[] v;
checkArray(l,2,out v);
self.sprites=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get__optional(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self._optional);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set__optional(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
LTDescrOptional v;
checkType(l,2,out v);
self._optional=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_val(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
pushValue(l,true);
pushValue(l,LTDescr.val);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_val(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
System.Single v;
checkType(l,2,out v);
LTDescr.val=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_dt(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
pushValue(l,true);
pushValue(l,LTDescr.dt);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_dt(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
System.Single v;
checkType(l,2,out v);
LTDescr.dt=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_newVect(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
pushValue(l,true);
pushValue(l,LTDescr.newVect);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_newVect(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
UnityEngine.Vector3 v;
checkType(l,2,out v);
LTDescr.newVect=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_from(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.from);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_from(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
UnityEngine.Vector3 v;
checkType(l,2,out v);
self.from=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_to(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.to);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_to(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
UnityEngine.Vector3 v;
checkType(l,2,out v);
self.to=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_easeInternal(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
LTDescr.ActionMethodDelegate v;
int op=checkDelegate(l,2,out v);
if(op==0) self.easeInternal=v;
else if(op==1) self.easeInternal+=v;
else if(op==2) self.easeInternal-=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_initInternal(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
LTDescr.ActionMethodDelegate v;
int op=checkDelegate(l,2,out v);
if(op==0) self.initInternal=v;
else if(op==1) self.initInternal+=v;
else if(op==2) self.initInternal-=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_uniqueId(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.uniqueId);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_id(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.id);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int get_optional(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
pushValue(l,true);
pushValue(l,self.optional);
return 2;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[SLua.MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
[UnityEngine.Scripting.Preserve]
static public int set_optional(IntPtr l) {
try {
#if DEBUG
var method = System.Reflection.MethodBase.GetCurrentMethod();
string methodName = GetMethodName(method);
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.BeginSample(methodName);
#else
Profiler.BeginSample(methodName);
#endif
#endif
LTDescr self=(LTDescr)checkSelf(l);
LTDescrOptional v;
checkType(l,2,out v);
self.optional=v;
pushValue(l,true);
return 1;
}
catch(Exception e) {
return error(l,e);
}
#if DEBUG
finally {
#if UNITY_5_5_OR_NEWER
UnityEngine.Profiling.Profiler.EndSample();
#else
Profiler.EndSample();
#endif
}
#endif
}
[UnityEngine.Scripting.Preserve]
static public void reg(IntPtr l) {
getTypeTable(l,"LTDescr");
addMember(l,reset);
addMember(l,setMoveX);
addMember(l,setMoveY);
addMember(l,setMoveZ);
addMember(l,setMoveLocalX);
addMember(l,setMoveLocalY);
addMember(l,setMoveLocalZ);
addMember(l,setMoveCurved);
addMember(l,setMoveCurvedLocal);
addMember(l,setMoveSpline);
addMember(l,setMoveSplineLocal);
addMember(l,setScaleX);
addMember(l,setScaleY);
addMember(l,setScaleZ);
addMember(l,setRotateX);
addMember(l,setRotateY);
addMember(l,setRotateZ);
addMember(l,setRotateAround);
addMember(l,setRotateAroundLocal);
addMember(l,setAlpha);
addMember(l,setTextAlpha);
addMember(l,setAlphaVertex);
addMember(l,setColor);
addMember(l,setCallbackColor);
addMember(l,setTextColor);
addMember(l,setCanvasAlpha);
addMember(l,setCanvasGroupAlpha);
addMember(l,setCanvasColor);
addMember(l,setCanvasMoveX);
addMember(l,setCanvasMoveY);
addMember(l,setCanvasMoveZ);
addMember(l,setCanvasRotateAround);
addMember(l,setCanvasRotateAroundLocal);
addMember(l,setCanvasPlaySprite);
addMember(l,setCanvasMove);
addMember(l,setCanvasScale);
addMember(l,setCanvasSizeDelta);
addMember(l,setCallback);
addMember(l,setValue3);
addMember(l,setMove);
addMember(l,setMoveLocal);
addMember(l,setMoveToTransform);
addMember(l,setRotate);
addMember(l,setRotateLocal);
addMember(l,setScale);
addMember(l,setGUIMove);
addMember(l,setGUIMoveMargin);
addMember(l,setGUIScale);
addMember(l,setGUIAlpha);
addMember(l,setGUIRotate);
addMember(l,setDelayedSound);
addMember(l,updateNow);
addMember(l,updateInternal);
addMember(l,callOnCompletes);
addMember(l,setFromColor);
addMember(l,pause);
addMember(l,resume);
addMember(l,setAxis);
addMember(l,setDelay);
addMember(l,setEase);
addMember(l,setEaseLinear);
addMember(l,setEaseSpring);
addMember(l,setEaseInQuad);
addMember(l,setEaseOutQuad);
addMember(l,setEaseInOutQuad);
addMember(l,setEaseInCubic);
addMember(l,setEaseOutCubic);
addMember(l,setEaseInOutCubic);
addMember(l,setEaseInQuart);
addMember(l,setEaseOutQuart);
addMember(l,setEaseInOutQuart);
addMember(l,setEaseInQuint);
addMember(l,setEaseOutQuint);
addMember(l,setEaseInOutQuint);
addMember(l,setEaseInSine);
addMember(l,setEaseOutSine);
addMember(l,setEaseInOutSine);
addMember(l,setEaseInExpo);
addMember(l,setEaseOutExpo);
addMember(l,setEaseInOutExpo);
addMember(l,setEaseInCirc);
addMember(l,setEaseOutCirc);
addMember(l,setEaseInOutCirc);
addMember(l,setEaseInBounce);
addMember(l,setEaseOutBounce);
addMember(l,setEaseInOutBounce);
addMember(l,setEaseInBack);
addMember(l,setEaseOutBack);
addMember(l,setEaseInOutBack);
addMember(l,setEaseInElastic);
addMember(l,setEaseOutElastic);
addMember(l,setEaseInOutElastic);
addMember(l,setEasePunch);
addMember(l,setEaseShake);
addMember(l,setOvershoot);
addMember(l,setPeriod);
addMember(l,setTo);
addMember(l,setFrom);
addMember(l,setDiff);
addMember(l,setHasInitialized);
addMember(l,setId);
addMember(l,setTime);
addMember(l,setSpeed);
addMember(l,setRepeat);
addMember(l,setLoopType);
addMember(l,setUseEstimatedTime);
addMember(l,setIgnoreTimeScale);
addMember(l,setUseFrames);
addMember(l,setUseManualTime);
addMember(l,setLoopCount);
addMember(l,setLoopOnce);
addMember(l,setLoopClamp);
addMember(l,setLoopPingPong);
addMember(l,setOnComplete);
addMember(l,setOnCompleteParam);
addMember(l,setOnUpdate);
addMember(l,setOnUpdateRatio);
addMember(l,setOnUpdateObject);
addMember(l,setOnUpdateVector2);
addMember(l,setOnUpdateVector3);
addMember(l,setOnUpdateColor);
addMember(l,setOnUpdateParam);
addMember(l,setOrientToPath);
addMember(l,setOrientToPath2d);
addMember(l,setRect);
addMember(l,setPath);
addMember(l,setPoint);
addMember(l,setDestroyOnComplete);
addMember(l,setAudio);
addMember(l,setOnCompleteOnRepeat);
addMember(l,setOnCompleteOnStart);
addMember(l,setSprites);
addMember(l,setFrameRate);
addMember(l,setOnStart);
addMember(l,setDirection);
addMember(l,setRecursive);
addMember(l,"toggle",get_toggle,set_toggle,true);
addMember(l,"useEstimatedTime",get_useEstimatedTime,set_useEstimatedTime,true);
addMember(l,"useFrames",get_useFrames,set_useFrames,true);
addMember(l,"useManualTime",get_useManualTime,set_useManualTime,true);
addMember(l,"usesNormalDt",get_usesNormalDt,set_usesNormalDt,true);
addMember(l,"hasInitiliazed",get_hasInitiliazed,set_hasInitiliazed,true);
addMember(l,"hasExtraOnCompletes",get_hasExtraOnCompletes,set_hasExtraOnCompletes,true);
addMember(l,"hasPhysics",get_hasPhysics,set_hasPhysics,true);
addMember(l,"onCompleteOnRepeat",get_onCompleteOnRepeat,set_onCompleteOnRepeat,true);
addMember(l,"onCompleteOnStart",get_onCompleteOnStart,set_onCompleteOnStart,true);
addMember(l,"useRecursion",get_useRecursion,set_useRecursion,true);
addMember(l,"ratioPassed",get_ratioPassed,set_ratioPassed,true);
addMember(l,"passed",get_passed,set_passed,true);
addMember(l,"delay",get_delay,set_delay,true);
addMember(l,"time",get_time,set_time,true);
addMember(l,"speed",get_speed,set_speed,true);
addMember(l,"lastVal",get_lastVal,set_lastVal,true);
addMember(l,"loopCount",get_loopCount,set_loopCount,true);
addMember(l,"counter",get_counter,set_counter,true);
addMember(l,"direction",get_direction,set_direction,true);
addMember(l,"directionLast",get_directionLast,set_directionLast,true);
addMember(l,"overshoot",get_overshoot,set_overshoot,true);
addMember(l,"period",get_period,set_period,true);
addMember(l,"scale",get_scale,set_scale,true);
addMember(l,"destroyOnComplete",get_destroyOnComplete,set_destroyOnComplete,true);
addMember(l,"trans",get_trans,set_trans,true);
addMember(l,"ltRect",get_ltRect,set_ltRect,true);
addMember(l,"type",get_type,set_type,true);
addMember(l,"tweenType",get_tweenType,set_tweenType,true);
addMember(l,"loopType",get_loopType,set_loopType,true);
addMember(l,"hasUpdateCallback",get_hasUpdateCallback,set_hasUpdateCallback,true);
addMember(l,"easeMethod",null,set_easeMethod,true);
addMember(l,"spriteRen",get_spriteRen,set_spriteRen,true);
addMember(l,"rectTransform",get_rectTransform,set_rectTransform,true);
addMember(l,"uiText",get_uiText,set_uiText,true);
addMember(l,"uiImage",get_uiImage,set_uiImage,true);
addMember(l,"sprites",get_sprites,set_sprites,true);
addMember(l,"_optional",get__optional,set__optional,true);
addMember(l,"val",get_val,set_val,false);
addMember(l,"dt",get_dt,set_dt,false);
addMember(l,"newVect",get_newVect,set_newVect,false);
addMember(l,"from",get_from,set_from,true);
addMember(l,"to",get_to,set_to,true);
addMember(l,"easeInternal",null,set_easeInternal,true);
addMember(l,"initInternal",null,set_initInternal,true);
addMember(l,"uniqueId",get_uniqueId,null,true);
addMember(l,"id",get_id,null,true);
addMember(l,"optional",get_optional,set_optional,true);
createTypeMetatable(l,constructor, typeof(LTDescr));
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Leads.Models;
using System.Configuration;
using Newtonsoft.Json.Linq;
using System.Net;
using System.IO;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data;
using System.Collections;
using System.Text;
using System.Web.Script.Serialization;
using System.Xml.Linq;
using System.Diagnostics;
using System.Net.Mail;
namespace Leads.Controllers
{
public class SiteLookupController : Controller
{
private SelectSiteforMasterLookup_Result sm = new SelectSiteforMasterLookup_Result();
public ActionResult SiteLookup()
{
ViewBag.Message = "Directions:";
return View();
}
public JsonResult SelectSiteforMasterLookup()
{
//JsonResult.maxJsonLength = int.MaxValue;
try
{
string puser = System.Web.HttpContext.Current.Session["sessionLoginName"].ToString();
using (Cust_SilcoEntities db = new Cust_SilcoEntities())
{
if (System.Web.HttpContext.Current.Session["title"].ToString().Contains("Technician") &&
System.Web.HttpContext.Current.Session["department"].ToString().Contains("Fire Extinguisher") )
{
List<SelectSiteforMasterLookup_Result> sitelkup = Leads.Models.Helper.SelectSiteforMasterLookup<SelectSiteforMasterLookup_Result>(puser);
var jsonResult = Json(new
{
sEcho = 1,
iTotalRecords = sitelkup.Count(),
iTotalDisplayRecords = sitelkup.Count(),
aaData = sitelkup
}, JsonRequestBehavior.AllowGet);
jsonResult.MaxJsonLength = int.MaxValue;
return jsonResult;
}
else
if (System.Web.HttpContext.Current.Session["title"].ToString().Contains("Technician") &&
System.Web.HttpContext.Current.Session["department"].ToString().Contains("Kitchen"))
{
List<SelectSiteforMasterLookupKitchen_Result> sitelkup = Leads.Models.Helper.SelectSiteforMasterLookupKitchen<SelectSiteforMasterLookupKitchen_Result>(puser);
var jsonResult = Json(new
{
sEcho = 1,
iTotalRecords = sitelkup.Count(),
iTotalDisplayRecords = sitelkup.Count(),
aaData = sitelkup
}, JsonRequestBehavior.AllowGet);
jsonResult.MaxJsonLength = int.MaxValue;
return jsonResult;
}
else
if (System.Web.HttpContext.Current.Session["title"].ToString().Contains("Fire Salesperson") ||
System.Web.HttpContext.Current.Session["title"].ToString().Contains("Kitchen Salesperson") ||
System.Web.HttpContext.Current.Session["title"].ToString().Contains("Restaurant Salesperson") ||
System.Web.HttpContext.Current.Session["title"].ToString().Contains("Designer") ||
System.Web.HttpContext.Current.Session["title"].ToString().Contains("Security Salesperson") ||
System.Web.HttpContext.Current.Session["title"].ToString().Contains("Service Manager"))
{
List<SelectSiteforMasterLookupServManager_Result> sitelkup = Leads.Models.Helper.SelectSiteforMasterLookupServManager<SelectSiteforMasterLookupServManager_Result>(puser);
var jsonResult = Json(new
{
sEcho = 1,
iTotalRecords = sitelkup.Count(),
iTotalDisplayRecords = sitelkup.Count(),
aaData = sitelkup
}, JsonRequestBehavior.AllowGet);
jsonResult.MaxJsonLength = int.MaxValue;
return jsonResult;
}
else
// if (System.Web.HttpContext.Current.Session["title"].ToString().Contains("President") ||
// System.Web.HttpContext.Current.Session["title"].ToString().Contains("General Manager") ||
// System.Web.HttpContext.Current.Session["sessionLoginName"].ToString().Contains("dboone"))
{
List<SelectSiteforMasterLookupGeneralManager_Result> sitelkup = Leads.Models.Helper.SelectSiteforMasterLookupGeneralManager<SelectSiteforMasterLookupGeneralManager_Result>(puser);
var jsonResult = Json(new
{
sEcho = 1,
iTotalRecords = sitelkup.Count(),
iTotalDisplayRecords = sitelkup.Count(),
aaData = sitelkup
}, JsonRequestBehavior.AllowGet);
jsonResult.MaxJsonLength = int.MaxValue;
return jsonResult;
}
}
}
catch (Exception ex)
{
Response.StatusCode = (int)HttpStatusCode.BadRequest;
List<string> errors = new List<string>();
errors.Add("Session Time Out-No connecttion to controller. Close the browser and Log In Again");
return Json(new { success = false, responseText = "Session Time Out-No connecttion to controller. Close the browser and Log In Again" }, JsonRequestBehavior.AllowGet);
}
}
public ActionResult SiteLookupDetails(int siteid, int customerid)
{
var dtlinfo = Helper.SelectSiteDtlsforMasterLookup<SelectSiteDtlsforMasterLookup_Result>(siteid, customerid);
var inspinfo = Helper.SelectSiteDtlsforMasterLookupInsp<SelectSiteDtlsforMasterLookupInsp_Result>(siteid, customerid);
var rmrinfo = Helper.SelectSiteDtlsforMasterLookupRMR<SelectSiteDtlsforMasterLookupRMR_Result>(siteid, customerid);
var cntinfo = Helper.SelectSiteDtlsforMasterLookupContact<SelectSiteDtlsforMasterLookupContact_Result>(siteid, customerid);
var invinfo = Helper.SelectSiteDtlsforMasterLookupInv<SelectSiteDtlsforMasterLookupInv_Result>(siteid, customerid);
var sitedtl = new SiteDetail();
sitedtl.dtls = dtlinfo;
sitedtl.insps = inspinfo;
sitedtl.rmrs = rmrinfo;
sitedtl.contacts = cntinfo;
sitedtl.invs = invinfo;
ViewData.Model = sitedtl;
var account = System.Web.HttpContext.Current.Session["sessionLoginName"].ToString();
var updlog = Leads.Models.Helper.UpdateSiteLog<UpdateSiteLog_Result>(account, siteid, customerid);
// var ytdByDept = Leads.Models.Helper.GetYTDLeadsByDept<GetYTDLeadsByDept_Result>();
// List<GetYTDLeadsByDept_Result> lytd = ytdByDept.ToList();
return View();
}
public ActionResult MapIt()
{
//ViewBag.Message = "Directions:";
//// Set security for the Site Lookup Page
//// Only Technicians for Kitchens and Fire Extinguishers
//// Only General Managers, Presidents , Service Manager,
//try
//{
string puser = System.Web.HttpContext.Current.Session["sessionLoginName"].ToString();
// MapIt vm = new MapIt();
// var viewModel = new SelectSiteforMasterLookup_Result();
// List < SelectSiteforMasterLookup_Result > sitelkup = Leads.Models.Helper.SelectSiteforMasterLookup<SelectSiteforMasterLookup_Result>(puser).ToList();
// var sitelkup = Leads.Models.Helper.SelectSiteforMasterLookup<SelectSiteforMasterLookup_Result>(puser).ToList();
using (Cust_SilcoEntities db = new Cust_SilcoEntities())
{
if (System.Web.HttpContext.Current.Session["title"].ToString().Contains("Technician") &&
System.Web.HttpContext.Current.Session["department"].ToString().Contains("Fire Extinguisher"))
{
List<SelectSiteforMasterLookup_Result> sitelkup = Helper.SelectSiteforMasterLookup<SelectSiteforMasterLookup_Result>(puser);
var mp = new MapItViewModel();
mp.sites = sitelkup;
ViewData.Model = mp;
return View();
}
else
if (System.Web.HttpContext.Current.Session["title"].ToString().Contains("Technician") &&
System.Web.HttpContext.Current.Session["department"].ToString().Contains("Kitchen"))
{
List<SelectSiteforMasterLookupKitchen_Result> sitelkupkit = Helper.SelectSiteforMasterLookupKitchen<SelectSiteforMasterLookupKitchen_Result>(puser);
var mp = new MapItViewModelKit();
mp.sites = sitelkupkit;
ViewData.Model = mp;
return View();
}
else
if (System.Web.HttpContext.Current.Session["title"].ToString().Contains("Fire Salesperson") ||
System.Web.HttpContext.Current.Session["title"].ToString().Contains("Restaurant Salesperson") ||
System.Web.HttpContext.Current.Session["title"].ToString().Contains("Kitchen Salesperson") ||
System.Web.HttpContext.Current.Session["title"].ToString().Contains("Security Salesperson") ||
System.Web.HttpContext.Current.Session["title"].ToString().Contains("Service Manager"))
{
List<SelectSiteforMasterLookupServManager_Result> sitelkupsv = Helper.SelectSiteforMasterLookupServManager<SelectSiteforMasterLookupServManager_Result>(puser);
var mp = new MapItViewModelSV();
mp.sites = sitelkupsv;
ViewData.Model = mp;
return View();
}
else
// if (System.Web.HttpContext.Current.Session["title"].ToString().Contains("President") ||
// System.Web.HttpContext.Current.Session["title"].ToString().Contains("General Manager") ||
// System.Web.HttpContext.Current.Session["sessionLoginName"].ToString().Contains("dboone"))
{
List<SelectSiteforMasterLookupGeneralManager_Result> sitelkupgm = Leads.Models.Helper.SelectSiteforMasterLookupGeneralManager<SelectSiteforMasterLookupGeneralManager_Result>(puser);
var mp = new MapItViewModelGM();
mp.sites = sitelkupgm;
ViewData.Model = mp;
return View();
}
}
}
}
} |
using Mis_Recetas.Controlador;
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;
namespace Mis_Recetas.Vista
{
public partial class FormModificarReceta : Form
{
public FormModificarReceta()
{
InitializeComponent();
}
CmdModificarReceta com = new CmdModificarReceta();
private void FormModificarReceta_Load(object sender, EventArgs e)
{
actulizarDataGrid();
cargarComboMedicos();
cargarComboEstados();
dgvRecetas.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
dgvRecetas.Columns[0].Width = 40;
dgvRecetas.Columns[1].Width = 140;
dgvRecetas.Columns[2].Width = 90;
dgvRecetas.Columns[3].Width = 130;
dgvRecetas.Columns[4].Width = 120;
dgvRecetas.Columns[0].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
dgvRecetas.Columns[1].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
dgvRecetas.Columns[2].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
dgvRecetas.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
dgvRecetas.Columns[4].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
dgvRecetas.Columns[0].ReadOnly = true;
dgvRecetas.Columns[1].ReadOnly = true;
dgvRecetas.Columns[2].ReadOnly = true;
dgvRecetas.Columns[3].ReadOnly = true;
dgvRecetas.Columns[4].ReadOnly = true;
dgvRecetas.RowHeadersVisible = false;
dgvRecetas.RowsDefaultCellStyle.SelectionBackColor = System.Drawing.Color.FromArgb(22, 110, 150);
dgvRecetas.RowsDefaultCellStyle.SelectionForeColor = System.Drawing.Color.Black;
}
//Actualiza el datagridview con consulta en la DB
DataSet resultados = new DataSet();
DataView filtro;
private void actulizarDataGrid()
{
resultados.Reset();
com.ListarRecetas(ref resultados, "recetas");
filtro = ((DataTable)resultados.Tables["recetas"]).DefaultView;
dgvRecetas.DataSource = filtro;
}
private void cargarComboMedicos()
{
cboMedico.DataSource = com.CargarComboMedico();
cboMedico.DisplayMember = "Medico";
cboMedico.ValueMember = "Id_Medico";
}
private void cargarComboEstados()
{
com.CargarComboEstado(cboEstado);
cboEstado.DisplayMember = "Descripcion";
cboEstado.ValueMember = "Id_Estado";
}
private void btnCancelar_Click(object sender, EventArgs e)
{
this.Close();
}
private void filtroNombreDataGrid()
{
string salida_datos = "";
if (txtNombre.Text != "")
{
if (txtDni.Text != "")
salida_datos = "(Paciente LIKE '%" + txtNombre.Text + "%' AND DNI LIKE '%" + Convert.ToInt32(txtDni.Text) + "%')";
else
salida_datos = "(Paciente LIKE '%" + txtNombre.Text + "%')";
}
else
{
if (txtDni.Text != "")
salida_datos = "(DNI LIKE '%" + Convert.ToInt32(txtDni.Text) + "%')";
else
filtro.RowFilter = string.Empty;
}
filtro.RowFilter = salida_datos;
}
private void txtNombre_KeyUp(object sender, KeyEventArgs e)
{
filtroNombreDataGrid();
}
private void txtDni_KeyUp(object sender, KeyEventArgs e)
{
filtroNombreDataGrid();
}
private void txtDni_KeyPress(object sender, KeyPressEventArgs e)
{
if (Char.IsDigit(e.KeyChar))
e.Handled = false;
else
if (Char.IsControl(e.KeyChar)) //permitir teclas de control como retroceso
e.Handled = false;
else
e.Handled = true; //el resto de teclas pulsadas se desactivan
}
private void txtNroReceta_KeyPress(object sender, KeyPressEventArgs e)
{
if (Char.IsDigit(e.KeyChar))
e.Handled = false;
else
if (Char.IsControl(e.KeyChar)) //permitir teclas de control como retroceso
e.Handled = false;
else
e.Handled = true; //el resto de teclas pulsadas se desactivan
}
private void txtNombre_KeyPress(object sender, KeyPressEventArgs e)
{
if (Char.IsLetter(e.KeyChar))
e.Handled = false;
else if (Char.IsControl(e.KeyChar)) //permitir teclas de control como retroceso
e.Handled = false;
else
e.Handled = true; //el resto de teclas pulsadas se desactivan
}
private void txtNroReceta_KeyUp(object sender, KeyEventArgs e)
{
if (txtNroReceta.Text != "")
{
com.BuscarRecetasPorNumero(dgvRecetas, Convert.ToInt32(txtNroReceta.Text));
}
else
{
actulizarDataGrid();
}
}
private void btnModificarEstado_Click(object sender, EventArgs e)
{
int seleccion = dgvRecetas.CurrentRow.Index + 1;
//Consulto si es igual a 0, y envio un mensaje para su correccion
if (seleccion == 0)
{
MessageBox.Show("Seleccione un registro para modifcar!");
}
//En caso de que se seleccione una fila, se ejecuta el metodo.
else
{
//Obtengo el valor de lo campos y lo casteo a una variable.
int estado = (int)cboEstado.SelectedIndex + 1;
int id = Convert.ToInt32(dgvRecetas.CurrentRow.Cells[0].Value);
//Llamo a los metodos y les paso las variables previamente casteadas.
com.ModificarEstadoReceta(id, estado);
actulizarDataGrid();
limpiarCampos();
}
}
private void btnModificarMedico_Click(object sender, EventArgs e)
{
int seleccion = dgvRecetas.CurrentRow.Index + 1;
//Consulto si es igual a 0, y envio un mensaje para su correccion
if (seleccion == 0)
{
MessageBox.Show("Seleccione un registro para modifcar!");
}
//En caso de que se seleccione una fila, se ejecuta el metodo.
else
{
//Obtengo el valor de lo campos y lo casteo a una variable.
int medico = (int)cboMedico.SelectedIndex + 1;
int id = Convert.ToInt32(dgvRecetas.CurrentRow.Cells[0].Value);
//Llamo a los metodos y les paso las variables previamente casteadas.
com.ModificarMedicoReceta(id, medico);
actulizarDataGrid();
limpiarCampos();
}
}
private void limpiarCampos()
{
txtDni.Clear();
txtNroReceta.Clear();
txtNombre.Clear();
}
}
}
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LibeeController : MonoBehaviour
{
Animator m_StateMachine;
BounceArc m_BounceArc;
Rigidbody m_Body;
public Vector3 bounceTarget;
public int EnemyLayerID, GroundLayerID, PlayerLayerID;
public bool bouncing;
[SerializeField] float hitForce;
public float shotDistance;
public Vector3 shotDirection;
private void Awake()
{
m_Body = GetComponent<Rigidbody>();
m_StateMachine = GetComponent<Animator>();
m_BounceArc = GetComponent<BounceArc>();
}
private void OnCollisionEnter(Collision collision)
{
if (collision.gameObject.layer == GroundLayerID || collision.gameObject.layer == PlayerLayerID)
{
m_Body.isKinematic = false;
ResetTriggers();
if (collision.gameObject.layer == PlayerLayerID)
{
m_StateMachine.SetTrigger("isPickedUp");
}
if (collision.gameObject.layer == GroundLayerID)
{
m_StateMachine.SetTrigger("isIdle");
}
}
}
private void OnTriggerEnter(Collider other)
{
if (other.gameObject.layer == EnemyLayerID)
{
if (!bouncing)
{
Rigidbody enemyRB = other.gameObject.GetComponentInParent<Rigidbody>();
if (other.gameObject.tag == "Weakpoint")
{
other.gameObject.GetComponentInParent<Health>().TakeDamage(2);
}
else if (other.gameObject.tag == "HurtBox")
{
other.gameObject.GetComponentInParent<Health>().TakeDamage(1);
}
bounceTarget = other.ClosestPointOnBounds(transform.position);
ResetTriggers();
m_StateMachine.SetTrigger("isBouncing");
Knockback(enemyRB);
if (other.gameObject.GetComponentInParent<Health>().currentHealth <= 0)
{
other.gameObject.GetComponentInParent<Health>().DestroyObject();
}
}
}
}
void Knockback(Rigidbody givenBody)
{
Vector3 direction = givenBody.transform.position - transform.position;
givenBody.AddForce(direction.normalized * hitForce, ForceMode.Impulse);
}
public void ResetTriggers()
{
m_StateMachine.ResetTrigger("isDead");
m_StateMachine.ResetTrigger("isIdle");
m_StateMachine.ResetTrigger("isBouncing");
m_StateMachine.ResetTrigger("isPickedUp");
m_StateMachine.ResetTrigger("isShot");
}
public IEnumerator BulletTravel(Vector3 end, float shotForce, AnimationCurve fallCurve, Transform AimPoint)
{
float time = 0;
Vector3 start = transform.position;
while (time <= shotForce)
{
float percent = time / shotForce;
time += Time.deltaTime;
end.y = Mathf.Lerp(start.y, AimPoint.position.y, fallCurve.Evaluate(percent));
m_Body.position = Vector3.Lerp(start, end, percent);
yield return null;
}
}
}
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LevelTester : MonoBehaviour
{
[SerializeField] DialogueView _dialogueView = null;
[SerializeField] DialogueData _dialogue01 = null;
[SerializeField] DialogueData _dialogue02 = null;
[SerializeField] DialogueData _dialogue03 = null;
bool toggleUI = true;
void Update()
{
if (Input.GetKeyDown(KeyCode.Q))
{
if (toggleUI)
{
_dialogueView.Display(_dialogue01);
toggleUI = false;
}
else
{
_dialogueView.CloseDisplay();
toggleUI = true;
}
}
if (Input.GetKeyDown(KeyCode.W))
{
if (toggleUI)
{
_dialogueView.Display(_dialogue02);
toggleUI = false;
}
else
{
_dialogueView.CloseDisplay();
toggleUI = true;
}
}
if (Input.GetKeyDown(KeyCode.E))
{
if (toggleUI)
{
_dialogueView.Display(_dialogue03);
toggleUI = false;
}
else
{
_dialogueView.CloseDisplay();
toggleUI = true;
}
}
}
}
|
// -----------------------------------------------------------------------
// <copyright file="FixedSizeArrayAttribute.cs" company="Microsoft Corporation">
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root
// for license information.
// </copyright>
// -----------------------------------------------------------------------
using System;
namespace Mlos.SettingsSystem.Attributes
{
/// <summary>
/// An attribute class to mark a C# data structure field as a fixed size array.
/// </summary>
/// <remarks>
/// This makes it possible to specify how to generate the code for a fixed size buffer of non-primitive types.
/// </remarks>
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
public class FixedSizeArrayAttribute : ScalarSettingAttribute
{
/// <summary>
/// Gets the fixed size length of an array field.
/// </summary>
public uint Length { get; }
/// <summary>
/// Initializes a new instance of the <see cref="FixedSizeArrayAttribute"/> class.
/// Constructor.
/// </summary>
/// <param name="length"></param>
public FixedSizeArrayAttribute(uint length)
{
Length = length;
}
}
}
|
namespace TipsAndTricksLibrary.Tests.Parsing
{
using System;
using System.Collections.Generic;
using System.Globalization;
using JetBrains.Annotations;
using TipsAndTricksLibrary.Parsing;
using Xunit;
public class StringExtensionsTests
{
[UsedImplicitly]
public static IEnumerable<object[]> ParseDateTimeTestsData;
[UsedImplicitly]
public static IEnumerable<object[]> ParseBoolTestsData;
[UsedImplicitly]
public static IEnumerable<object[]> ParseIntTestsData;
[UsedImplicitly]
public static IEnumerable<object[]> ParseLongTestsData;
[UsedImplicitly]
public static IEnumerable<object[]> ParseDoubleTestsData;
[UsedImplicitly]
public static IEnumerable<object[]> ParseDecimalTestsData;
static StringExtensionsTests()
{
ParseDateTimeTestsData = new[]
{
new object[]
{
" 17.07.2016 15:04 ", null,
new ParsingResult<DateTime>(new DateTime(2016, 07, 17, 15, 04, 00), true)
},
new object[] {null, null, new ParsingResult<DateTime>(null, false)},
new object[] {" ", null, new ParsingResult<DateTime>(null, false)},
new object[] {"17.07.2016", null, new ParsingResult<DateTime>(null, true)},
new object[] {"17.07.2016 15:04", "ddMMyyyy", new ParsingResult<DateTime>(null, true)},
new object[]
{
"20160717", "yyyyMMdd", new ParsingResult<DateTime>(new DateTime(2016, 07, 17), true)
}
};
ParseBoolTestsData = new[]
{
new object[] {"true", new ParsingResult<bool>(true, true)},
new object[] {"false", new ParsingResult<bool>(false, true)},
new object[] {"d", new ParsingResult<bool>(null, true)},
new object[] {"", new ParsingResult<bool>(null, false)},
new object[] {null, new ParsingResult<bool>(null, false)}
};
ParseIntTestsData = new[]
{
new object[] {"1", new ParsingResult<int>(1, true)},
new object[] {"d", new ParsingResult<int>(null, true)},
new object[] {"", new ParsingResult<int>(null, false)},
new object[] {null, new ParsingResult<int>(null, false)}
};
ParseLongTestsData = new[]
{
new object[] {"1", new ParsingResult<long>(1, true)},
new object[] {"d", new ParsingResult<long>(null, true)},
new object[] {"", new ParsingResult<long>(null, false)},
new object[] {null, new ParsingResult<long>(null, false)}
};
ParseDoubleTestsData = new[]
{
new object[] {"1", null, new ParsingResult<double>(1, true)},
new object[] {"1.5", null, new ParsingResult<double>(1.5d, true)},
new object[]
{
"1,5", new NumberFormatInfo {CurrencyDecimalSeparator = ","},
new ParsingResult<double>(1.5d, true)
},
new object[] {"d", null, new ParsingResult<double>(null, true)},
new object[] {"", null, new ParsingResult<double>(null, false)},
new object[] {null, null, new ParsingResult<double>(null, false)}
};
ParseDecimalTestsData = new[]
{
new object[] {"1", null, new ParsingResult<decimal>(1, true)},
new object[] {"1.5", null, new ParsingResult<decimal>(1.5m, true)},
new object[]
{
"1,5", new NumberFormatInfo {CurrencyDecimalSeparator = ","},
new ParsingResult<decimal>(1.5m, true)
},
new object[] {"d", null, new ParsingResult<decimal>(null, true)},
new object[] {"", null, new ParsingResult<decimal>(null, false)},
new object[] {null, null, new ParsingResult<decimal>(null, false)}
};
}
[Theory]
[MemberData(nameof(ParseDateTimeTestsData))]
public void ShouldParseDateTime(string input, string format, ParsingResult<DateTime> expectedResult)
{
// When
var actualResult = input.ParseDateTime(format);
//Then
Assert.Equal(expectedResult, actualResult);
Assert.Equal(expectedResult.SourceHasValue, actualResult.SourceHasValue);
}
[Theory]
[MemberData(nameof(ParseBoolTestsData))]
public void ShouldParseBool(string input, ParsingResult<bool> expectedResult)
{
// When
var actualResult = input.ParseBool();
// Then
Assert.Equal(expectedResult, actualResult);
Assert.Equal(expectedResult.SourceHasValue, actualResult.SourceHasValue);
}
[Theory]
[MemberData(nameof(ParseIntTestsData))]
public void ShouldParseInt(string input, ParsingResult<int> expectedResult)
{
// When
var actualResult = input.ParseInt();
// Then
Assert.Equal(expectedResult, actualResult);
Assert.Equal(expectedResult.SourceHasValue, actualResult.SourceHasValue);
}
[Theory]
[MemberData(nameof(ParseLongTestsData))]
public void ShouldParseLong(string input, ParsingResult<long> expectedResult)
{
// When
var actualResult = input.ParseLong();
// Then
Assert.Equal(expectedResult, actualResult);
Assert.Equal(expectedResult.SourceHasValue, actualResult.SourceHasValue);
}
[Theory]
[MemberData(nameof(ParseDoubleTestsData))]
public void ShouldParseDouble(string input, IFormatProvider formatProvider, ParsingResult<double> expectedResult)
{
// When
var actualResult = input.ParseDouble(formatProvider);
// Then
Assert.Equal(expectedResult, actualResult);
Assert.Equal(expectedResult.SourceHasValue, actualResult.SourceHasValue);
}
[Theory]
[MemberData(nameof(ParseDecimalTestsData))]
public void ShouldParseDecimal(string input, IFormatProvider formatProvider, ParsingResult<decimal> expectedResult)
{
// When
var actualResult = input.ParseDecimal(formatProvider);
// Then
Assert.Equal(expectedResult, actualResult);
Assert.Equal(expectedResult.SourceHasValue, actualResult.SourceHasValue);
}
}
} |
using System;
using System.Collections.Generic;
using System.Text;
using RestSharp;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using SchedulerLibrary.Entities;
using Microsoft.Extensions.Configuration;
using SchedulerLibrary.Interfaces;
namespace SchedulerLibrary.REST
{
public class FogbugzRequest
{
private static FogbugzRequest Instance;
public string FogBugzAPIURL { get; set; }
public string Token { get; set; }
public enum Operation
{
Logon=0,
New=1,
ListFogBugzUsers=2,
ListProjects=3
}
IConfiguration config;
public string[] Operations { get; set; }
public RestClient Client { get; set; }
private FogbugzRequest()
{
this.Client = new RestClient();
config = new ConfigurationBuilder()
.AddJsonFile("appConfig.json", true, true)
.Build();
this.Client.BaseUrl = new Uri(config["fogbugz_url"]);
}
public static FogbugzRequest GetInstance()
{
if(Instance==null)
{
Instance = new FogbugzRequest();
Instance.Token = Instance.FogBugzLogin(Instance.config["fb_username"], Instance.config["fb_pwd"]);
}
return Instance;
}
private string FogBugzLogin(string username,string password)
{
var request = new RestRequest("logon", Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddJsonBody(new { email = username, password = password });
var response = Client.Execute(request);
JObject res= JsonConvert.DeserializeObject<JObject>(response.Content);
var token = (string)res.SelectToken("data.token");
return token;
}
public List<iFogBugz> getFogBugzItems(FogBugzPostObject o,int counter=0)
{
int errors = 0;
int callCounter = counter;
List<iFogBugz> fbUsers = new List<iFogBugz>();
try
{
var response = MakeRequest(o);
errors = CheckErrors(response);
if (errors == 0)
{
fbUsers = ParseResponse(response,(Operation) o.Operation);
}
else
{
if (callCounter < 3)
{
++callCounter;
Instance.Token = Instance.FogBugzLogin(Instance.config["fb_username"], Instance.config["fb_pwd"]);
fbUsers = getFogBugzItems(o,callCounter);
}
else
throw new Exception(string.Format("Some Error Occured Making the {0} Request.",o.Command));
//Write Code to Log this Error.
}
}
catch(Exception ex)
{
throw ex;
}
return fbUsers;
}
public int CreateNewCase(FogBugzTickets t)
{
int ticketId = 0;
var response= MakeRequest(new FogBugzPostObject { Operation = 1, payload = new {token=this.Token,sTitle=t.TicketTitle,sEvent=t.TicketContent,sProject=t.TicketProject,ixPersonAssignedTo=t.PersonAssignedTo,ixFixFor=t.MileStone } });
JObject res = JsonConvert.DeserializeObject<JObject>(response.Content);
ticketId=(int)res.SelectToken("data.case.ixBug");
return ticketId;
}
private int CheckErrors(IRestResponse response)
{
int errorCount = 0;
JObject res = JsonConvert.DeserializeObject<JObject>(response.Content);
var errors= res.SelectToken("errors");
foreach(JObject j in errors)
{
errorCount++;
}
return errorCount;
}
private IRestResponse MakeRequest(FogBugzPostObject o)
{
IRestResponse res=null;
var request = new RestRequest(o.Command, Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddJsonBody(o.payload);
res = Client.Execute(request);
//On Successfull Call Make sure to Log this Request as well.
return res;
}
public List<iFogBugz> ParseResponse(IRestResponse response, Operation operation)
{
List<iFogBugz> fbItems = new List<iFogBugz>();
JObject res = JsonConvert.DeserializeObject<JObject>(response.Content);
switch (operation)
{
case Operation.ListFogBugzUsers:
var peopleList = res.SelectToken("data.people");
foreach (JObject o in peopleList)
{
fbItems.Add(new FogBugzUsers()
{
PersonId = (int)o.SelectToken("ixPerson"),
FullName = (string)o.SelectToken("sFullName"),
Email = (string)o.SelectToken("sEmail"),
IsAdministrator = (bool)o.SelectToken("fAdministrator"),
IsNotified = (bool)o.SelectToken("fNotify")
});
}
break;
case Operation.ListProjects:
var projectList = res.SelectToken("data.projects");
foreach (JObject o in projectList)
{
fbItems.Add(new FogBugzProjects()
{
ProjectId = (int)o.SelectToken("ixProject"),
ProjectName = (string)o.SelectToken("sProject"),
OwnerId = (int)o.SelectToken("ixPersonOwner"),
OwnerName = (string)o.SelectToken("sPersonOwner"),
IsDeleted = (bool)o.SelectToken("fDeleted")
});
}
break;
}
return fbItems;
}
}
}
//data.case.ixBug |
using ImmedisHCM.Services.Models.Core;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace ImmedisHCM.Services.Core
{
public interface INomenclatureService
{
Task<List<CountryServiceModel>> GetCountries();
Task<List<CountryServiceModel>> GetCountriesWithCities();
Task<CountryServiceModel> GetCountry(Guid id);
Task<List<CityServiceModel>> GetCitiesByCountryId(Guid countryId);
Task<List<CityServiceModel>> GetCities();
Task<CityServiceModel> GetCity(Guid id);
Task<List<CurrencyServiceModel>> GetCurrencies();
Task<List<CurrencyServiceModel>> GetCurrenciesWithSalaries();
Task<CurrencyServiceModel> GetCurrency(int id);
Task<List<SalaryTypeServiceModel>> GetSalaryTypes();
Task<SalaryTypeServiceModel> GetSalaryType(int id);
Task<List<SalaryTypeServiceModel>> GetSalaryTypesWithSalaries();
}
}
|
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SFP.Persistencia.Dao;
using SFP.Persistencia.Model;
using PROJECT.SERV.Model.ADM;
namespace PROJECT.SERV.Dao.ADM
{
public class TCP_ADM_AREAHISTDao : BaseDao
{
public TCP_ADM_AREAHISTDao(DbConnection cn, DbTransaction transaction, String dataAdapter) : base(cn, transaction, dataAdapter)
{
}
public Object dmlAgregar(TCP_ADM_AREAHIST oDatos)
{
String sSQL = " INSERT INTO TCP_ADM_AREAHIST( atpclave, anlclave, araclave, arhreporta, arhsiglas, arhdescripcion, arhclaveua, arhfecfin, arhfecini) VALUES ( :P0, :P1, :P2, :P3, :P4, :P5, :P6, :P7, :P8) ";
return EjecutaDML(sSQL, oDatos.atpclave, oDatos.anlclave, oDatos.araclave, oDatos.arhreporta, oDatos.arhsiglas, oDatos.arhdescripcion, oDatos.arhclaveua, oDatos.arhfecfin, oDatos.arhfecini);
}
public int dmlImportar(List<TCP_ADM_AREAHIST> lstDatos)
{
int iTotReg = 0;
String sSQL = " INSERT INTO TCP_ADM_AREAHIST( atpclave, anlclave, araclave, arhreporta, arhsiglas, arhdescripcion, arhclaveua, arhfecfin, arhfecini) VALUES ( :P0, :P1, :P2, :P3, :P4, :P5, :P6, :P7, :P8) ";
foreach (TCP_ADM_AREAHIST oDatos in lstDatos)
{
EjecutaDML(sSQL, oDatos.atpclave, oDatos.anlclave, oDatos.araclave, oDatos.arhreporta, oDatos.arhsiglas, oDatos.arhdescripcion, oDatos.arhclaveua, oDatos.arhfecfin, oDatos.arhfecini);
iTotReg++;
}
return iTotReg;
}
public int dmlEditar(TCP_ADM_AREAHIST oDatos)
{
String sSQL = " UPDATE TCP_ADM_AREAHIST SET atpclave = :P0, anlclave = :P1, arhreporta = :P2, arhsiglas = :P3, arhdescripcion = :P4, arhclaveua = :P5 WHERE araclave = :P6 AND arhfecfin = :P7 AND arhfecini = :P8 ";
return (int)EjecutaDML(sSQL, oDatos.atpclave, oDatos.anlclave, oDatos.arhreporta, oDatos.arhsiglas, oDatos.arhdescripcion, oDatos.arhclaveua, oDatos.araclave, oDatos.arhfecfin, oDatos.arhfecini);
}
public int dmlBorrar(TCP_ADM_AREAHIST oDatos)
{
String sSQL = " DELETE FROM TCP_ADM_AREAHIST WHERE araclave = :P0 AND arhfecfin = :P1 AND arhfecini = :P2 ";
return (int)EjecutaDML(sSQL, oDatos.araclave, oDatos.arhfecfin, oDatos.arhfecini);
}
public List<TCP_ADM_AREAHIST> dmlSelectTabla()
{
String sSQL = " SELECT * FROM TCP_ADM_AREAHIST ";
return CrearListaMDL<TCP_ADM_AREAHIST>(ConsultaDML(sSQL) as DataTable);
}
public List<ComboMdl> dmlSelectCombo()
{
throw new NotImplementedException();
}
public Dictionary<int, string> dmlSelectDiccionario()
{
throw new NotImplementedException();
}
public TCP_ADM_AREAHIST dmlSelectID(TCP_ADM_AREAHIST oDatos)
{
String sSQL = " SELECT * FROM TCP_ADM_AREAHIST WHERE araclave = :P0 AND arhfecfin = :P1 AND arhfecini = :P2 ";
return CrearListaMDL<TCP_ADM_AREAHIST>(ConsultaDML(sSQL, oDatos.araclave, oDatos.arhfecfin, oDatos.arhfecini) as DataTable)[0];
}
public object dmlCRUD(Dictionary<string, object> dicParam)
{
int iOper = (int)dicParam[CMD_OPERACION];
if (iOper == OPE_INSERTAR)
return dmlAgregar(dicParam[CMD_ENTIDAD] as TCP_ADM_AREAHIST);
else if (iOper == OPE_EDITAR)
return dmlEditar(dicParam[CMD_ENTIDAD] as TCP_ADM_AREAHIST);
else if (iOper == OPE_BORRAR)
return dmlBorrar(dicParam[CMD_ENTIDAD] as TCP_ADM_AREAHIST);
else
return 0;
}
/*INICIO*/
public List<TCP_ADM_AREAHIST> dmlSelectComboFecActual(DateTime dtFecha)
{
String sqlQuery = "Select * " +
" FROM TCP_ADM_AREAHIST where '" + dtFecha.ToString("d") + "' between arhFecIni AND arhFecFin ORDER BY anlClave ";
return CrearListaMDL<TCP_ADM_AREAHIST>(ConsultaDML(sqlQuery, dtFecha.ToString("d")) as DataTable);
}
public List<TCP_ADM_AREAHIST> dmlSelectAreaHijos(string data)
{
String sqlQuery = "Select * " +
" FROM TCP_ADM_AREAHIST where arhreporta = " + data.Split('|')[1] + " and '" + data.Split('|')[0] + "' between arhFecIni AND arhFecFin ORDER BY anlClave ";
return CrearListaMDL<TCP_ADM_AREAHIST>(ConsultaDML(sqlQuery, data.Split('|')[0]) as DataTable);
}
public TCP_ADM_AREAHIST dmlSelectAreaActual(int araClave)
{
String sqlQuery = " Select * FROM TCP_ADM_AREAHIST where araclave = :P0 " +
" and :P1 between arhFecIni AND arhFecFin ORDER BY arhDESCRIPCION";
return CrearMDL<TCP_ADM_AREAHIST>(ConsultaDML(sqlQuery, araClave, DateTime.Now));
}
public List<TCP_ADM_AREAHIST> dmlSelectAreasPeriodo(DateTime ttFecha)
{
String sSQL = " SELECT AraClave, arhReporta, arhClaveUA FROM TCP_ADM_AREAHIST WHERE Convert(datetime,'" + ttFecha.ToString("yyyyMMdd") + "',112) between ArhFecIni AND ArhFecFin";
return CrearListaMDL<TCP_ADM_AREAHIST>(ConsultaDML(sSQL) as DataTable);
}
public DataTable dmlSelectGrid(BasePagMdl baseMdl)
{
String sqlQuery = "WITH Resultado AS( select COUNT(*) OVER() RESULT_COUNT, rownum recid, a.* from ( " +
"SELECT * FROM TCP_ADM_AREAHIST ) a ) SELECT* from Resultado WHERE recid between :P0 and :P1 ";
return (DataTable)ConsultaDML(sqlQuery, baseMdl.LimInf, baseMdl.LimSup);
}
/*FIN*/
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
namespace Scribble
{
/// <summary>
/// Write a program to return list of words (from the given list of words) that can be formed from the list of given characters.
/// This is like Scribble game. Say for example the given characters are ('a' , 'c' , 't' } and list the words are {'cat', 'act',
/// 'ac', 'stop' , 'cac'}. The program should return only the words that can be formed from given letters. Here the output should
/// be {'cat', 'act', 'ac'}.
///
/// http://www.careercup.com/question?id=6486723970203648
///
/// Google
/// </summary>
class Program
{
static void Main(string[] args)
{
// Testing permutations
Debug.Assert(
new HashSet<string>(GenerateAllPermutations(new HashSet<string>() { "a", "b", "c" })).SetEquals(
new HashSet<string> { "a", "b", "c", "ab", "ac", "ba", "bc", "ca", "cb", "abc", "acb", "bac", "bca", "cab", "cba" }));
// Testing scribble
Debug.Assert(
new HashSet<string>(Scribble(new HashSet<string>() { "a", "c", "t" }, new HashSet<string>() { "cat", "act", "ac", "stop", "cac" })).SetEquals(
new HashSet<string>() { "cat", "act", "ac" }));
}
static HashSet<string> GenerateAllPermutations(HashSet<string> alphabets)
{
if (alphabets.Count == 1)
{
return alphabets;
}
HashSet<string> result = new HashSet<string>();
foreach (string c in alphabets)
{
HashSet<string> newAlphabet = new HashSet<string>(alphabets);
newAlphabet.Remove(c);
foreach (string s in GenerateAllPermutations(newAlphabet))
{
result.Add(s);
result.Add(c + s);
}
}
return result;
}
static IEnumerable<string> Scribble(HashSet<string> alphabets, HashSet<string> dict)
{
foreach (var word in GenerateAllPermutations(alphabets))
{
if (dict.Contains(word))
{
yield return word;
}
}
}
}
}
|
using MobileLabProject.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
namespace MobileLabProject.ViewModels
{
public class WordViewModel : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
WordListViewModel lvm;
public Word Word { get; private set; }
public WordViewModel()
{
Word = new Word();
}
public WordListViewModel ListViewModel
{
get { return lvm; }
set
{
if (lvm != value)
{
lvm = value;
OnProperyChange("ListViewModel");
}
}
}
public int Id
{
get { return Word.Id; }
set
{
if (Word.Id != value)
{
Word.Id = value;
OnProperyChange("Id");
}
}
}
public string RussianWord
{
get { return Word.RussianWord; }
set
{
if (Word.RussianWord != value)
{
Word.RussianWord = value;
OnProperyChange("RussianWord");
}
}
}
public string EnglishWord
{
get { return Word.EnglishWord; }
set
{
if (Word.EnglishWord != value)
{
Word.EnglishWord = value;
OnProperyChange("EnglishWord");
}
}
}
public bool IsValid
{
get
{
return ((!string.IsNullOrEmpty(RussianWord.Trim()) ||
!string.IsNullOrEmpty(EnglishWord.Trim())));
}
}
private void OnProperyChange(string propName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propName));
}
}
}
}
|
namespace System.Numerics
{
public static class ComplexExtensions
{
// This is a shortcut for z->z^2+c
public static Complex SquareAndAdd(this Complex me, Complex c)
{
//(a + bi)(a + bi) + (c+di) =(a^2 - b^2 + c) + (2ab + d)i;
double r = (me.Real * me.Real) - (me.Imaginary * me.Imaginary) + c.Real;
double i = (2.0 * me.Real * me.Imaginary) + c.Imaginary;
return new Complex(r,i);
}
public static double GetSquaredModulus(this Complex me)
{
double x = me.Real;
double y = me.Imaginary;
return (x * x + y * y);
}
}
}
|
using MvcDemo3.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Umbraco.Web.Mvc;
namespace MvcDemo3.Controllers
{
public class ContactUsSurfaceController : SurfaceController
{
public ActionResult Index(ContactUsModel model)
{
return RedirectToCurrentUmbracoPage();
}
}
} |
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text.Json;
using System.Threading;
using LogsSearchServer.Packer;
using NetCom;
using NetCom.Extensions;
using NetCom.Helpers;
using NetComModels;
using NetComModels.ErrorMessages;
using NetComModels.Messages;
using Serilog;
namespace LogsSearchServer.Handlers
{
public class SendFileMsgHandler : MsgHandler
{
public SendFileMsgHandler(string pathToLogs, CancellationToken token)
: base(pathToLogs,token, MsgType.GetFile)
{
}
private static void SendFile(string filePath, IPEndPoint endPoint)
{
Socket client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
client.Connect(endPoint);
Log.Debug("Sending {0} to the host.", filePath);
client.SendFile(filePath);
client.Shutdown(SocketShutdown.Both);
client.Close();
}
public override void SendAnswer(Package package)
{
var pairNet = new TwoEndPoints(NetHelper.GetLocalIpAddress(), GlobalProperties.ServerMsgPort, package.SourceEndPoint);
var getFileMsg = package.Deserialize<GetFileMsg>();
if (File.Exists(getFileMsg.FilePath) == false)
{
UdpMessage.Send(pairNet, new ErrorMsg($"Не удалось найти файл: {getFileMsg.FilePath}"));
}
else
{
TempDir readTempDir = TempDir.CreateFromFullPath(getFileMsg.FilePath);
FilesPacker filesPacker = new FilesPacker(readTempDir);
filesPacker.Create();
UdpMessage.Send(pairNet, new SendFileMsg(filesPacker.ZipPath, (new FileInfo(filesPacker.ZipPath)).Length));
Thread.Sleep(1000);
SendFile(filesPacker.ZipPath, new IPEndPoint(package.SourceEndPoint.Address, getFileMsg.DestPort));
}
}
}
} |
using App.Entity;
using App.Logic;
using App.Utilities.Access;
using App_Market.Forms;
using System.IO;
using System.Linq;
using System.Reflection;
namespace App.Utilities
{
public class InstallClass
{
/// <summary>
/// Initializes a new instance of the <see cref="InstallClass"/> class.
/// </summary>
public InstallClass()
{
ContextVariables.Source = $"{Directory.GetCurrentDirectory()}\\Data";
if (!Directory.Exists(ContextVariables.Source))
{
Directory.CreateDirectory(ContextVariables.Source);
}
ContextVariables.Source = $"Data Source ={ContextVariables.Source}\\DataBase.db";
if (!File.Exists(ContextVariables.Source))
{
InstallDataBase();
}
}
/// <summary>
/// Installs the data base.
/// </summary>
public void InstallDataBase()
{
new RolLC().CreateTable();
new PathLC().CreateTable();
new UserLC().CreateTable();
new ProductLC().CreateTable();
new ProviderLC().CreateTable();
new MeasurementUnitLC().CreateTable();
new NoteLC().CreateTable();
new InventoryLC().CreateTable();
new ConsolidatedAccountingLC().CreateTable();
new PermissionLC().CreateTable();
System.Collections.Generic.List<System.Type> paths = Assembly.GetExecutingAssembly().GetTypes().Where(t => t.IsClass && !t.Name.StartsWith("<>c") && t.FullName.StartsWith("App_Market.Forms")).ToList();
PathLC logic = new PathLC();
paths.ForEach(t => logic.Insert(new PathBE { Name = t.Name, Path = t.Namespace, Label = t.Name.Replace("Form", "") }));
while (ContextVariables.CurrentRol == null)
{
ContextVariables.CurrentRol = new RolLC().SelectAll().FirstOrDefault();
}
PermissionLC lst = new PermissionLC();
logic.SelectAll().ForEach(p => lst.Insert(new PermissionBE
{
Name = ContextVariables.CurrentRol.Name + "_" + p.Name,
RolId = ContextVariables.CurrentRol.ID,
PathId = p.ID,
Description = string.Format("Permiso a control {0} del menú para el rol {1}.", p.Name, ContextVariables.CurrentRol.Name)
}));
new FormUser().ShowDialog();
new FormLogin().ShowDialog();
}
}
}
|
// Copyright 2021 Google LLC. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using System;
namespace NtApiDotNet.Net.Firewall
{
/// <summary>
/// Class to prepresent a key manager.
/// </summary>
public sealed class IPsecKeyManager
{
/// <summary>
/// The manager's key.
/// </summary>
public Guid Key { get; }
/// <summary>
/// The manager's name.
/// </summary>
public string Name { get; }
/// <summary>
/// The manager's description.
/// </summary>
public string Description { get; }
/// <summary>
/// The manager's flags.
/// </summary>
public IPsecKeyManagerFlags Flags { get; }
/// <summary>
/// The manager's dictation timeout hint.
/// </summary>
public int KeyDictationTimeoutHint { get; }
internal IPsecKeyManager(IPSEC_KEY_MANAGER0 key_manager)
{
Key = key_manager.keyManagerKey;
Name = key_manager.displayData.name ?? string.Empty;
Description = key_manager.displayData.description ?? string.Empty;
Flags = key_manager.flags;
KeyDictationTimeoutHint = key_manager.keyDictationTimeoutHint;
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Task4
{
public static class BinarySearch
{
public static int Search<T>(this T[] mass, int begin, int end, T target, IComparer<T> comparator)
{
if (mass == null) throw new ArgumentNullException(nameof(mass));
return SearchBinary(mass, begin, end, target, comparator.Compare);
}
public static int Search<T>(this T[] mass, int begin, int end, T target, Comparison<T> compare)
{
if (mass == null) throw new ArgumentNullException(nameof(mass));
return SearchBinary(mass, begin, end, target, compare);
}
private static int SearchBinary<T>(T[] mass, int begin, int end, T target, Comparison<T> compare)
{
if (begin > end)
{
return -1;
}
int result;
int center = begin + (end - begin) / 2;
if (compare(mass[center],target)==0)
{
result = Search(mass, begin, center - 1, target, compare);
if (result == -1)
{
return center;
}
return result;
}
else
{
if (compare(mass[center],target)> 0)
{
return Search(mass, begin, center - 1, target, compare);
}
else
{
return Search(mass, center + 1, end, target, compare);
}
}
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace FloraGotchiAppV2
{
public class Planter
{
public Planter(string name, int type)
{
Name = name;
Type = type;
}
public Planter(int id, string name, int type, DateTime dateAdded, Plant plant = null)
{
Id = id;
Name = name;
Type = type;
DateAdded = dateAdded;
Plant = plant;
}
public int Id { get; private set; }
public string Name { get; private set; }
public int Type { get; private set; }
public Plant Plant { get; private set; }
public DateTime DateAdded { get; private set; }
public Situation CurrentSituation { get; private set; }
public void RefreshSituation(Situation situation)
{
CurrentSituation = situation;
}
public void ChangePlant(Plant plant)
{
Plant = plant;
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace BrighterFutures.ViewModels
{
public class SettingsVm : BaseViewModel
{
}
}
|
using Espades.Domain.Entities;
using Espades.Infrastructure.Mappings.BaseMappings;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace Espades.Infrastructure.Mappings
{
public class DespesaConfiguration : BaseEntityConfiguration<Despesa>
{
public DespesaConfiguration(EntityTypeBuilder<Despesa> entityBuilder)
: base("Despesa", entityBuilder)
{
entityBuilder.Property(t => t.Descricao)
.HasMaxLength(100)
.IsRequired();
entityBuilder.Property(t => t.Data_Despesa)
.IsRequired();
entityBuilder.Property(t => t.Valor)
.IsRequired();
entityBuilder.Property(t => t.Local)
.HasMaxLength(50);
}
}
}
|
using System;
namespace LibraryA
{
public class Alpha
{
/*1: private Func<string, object> hook;
public void Hook(Func<string, object> hook)
{
this.hook = hook;
}*/
public string Api()
{
//1:hook("a");
return "A";
}
//2:
public string Api2()
{
return "B";
}
}
}
|
using KRF.Core.FunctionalContracts;
using KRF.Core.Repository.MISC;
using KRF.Core.Entities.MISC;
namespace KRF.Persistence.RepositoryImplementation
{
public class ZipCodeRepository:IZipCodeRepository
{
private readonly IZipCode zipCode_;
/// <summary>
/// Constructor
/// </summary>
public ZipCodeRepository()
{
zipCode_ = ObjectFactory.GetInstance<IZipCode>();
}
/// <summary>
/// Get City and State
/// </summary>
/// <param name="zipCode"></param>
/// <returns></returns>
public CityAndState GetCityAndState(string zipCode)
{
return zipCode_.GetCityAndState(zipCode);
}
}
}
|
using System;
using System.Collections.Generic;
namespace Exerc_138.Entities
{
abstract class Contribuinte
{
public string Nome { get; set; }
public double RendAnual { get; set; }
public Contribuinte(string nome, double rendAnual)
{
Nome = nome;
RendAnual = rendAnual;
}
public abstract double Imposto();
}
}
|
using Assets.Scripts.Player;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Rum_OnClick : MonoBehaviour
{
public GameObject token_1;
public GameObject token_2;
private int Charges = 2;
private void OnMouseDown()
{
var component = GetComponent<Actionphase_CanClick>();
if (component != null && component.IsClickable)
{
if (Charges == 0) return;
PartyActions.HealAllPlayers(1);
Charges--;
if (Charges == 1) token_1.SetActive(true);
if (Charges == 0) token_2.SetActive(true);
}
}
}
|
namespace Sandlet.Site
{
using Microsoft.AspNetCore.Mvc.Razor;
/// <summary>
/// The base page.
/// </summary>
/// <typeparam name="TViewModel">The type of the view model.</typeparam>
public abstract class BasePage<TViewModel> : RazorPage<TViewModel>
{
/// <summary>
/// Gets or sets a value indicating whether this view should bind to its view model with Knockout.
/// </summary>
/// <remarks>
/// <c>true</c> by default.
/// </remarks>
public bool BindToViewModel
{
get => this.ViewBag.BindToViewModel ?? true;
set => this.ViewBag.BindToViewModel = value;
}
/// <summary>
/// Gets or sets the title.
/// </summary>
public string Title
{
get => this.ViewBag.Title;
set => this.ViewBag.Title = value;
}
}
} |
using System.Collections.Immutable;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
namespace Meziantou.Analyzer.Rules;
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public sealed class DeclareTypesInNamespacesAnalyzer : DiagnosticAnalyzer
{
private static readonly DiagnosticDescriptor s_rule = new(
RuleIdentifiers.DeclareTypesInNamespaces,
title: "Declare types in namespaces",
messageFormat: "Declare type '{0}' in a namespace",
RuleCategories.Design,
DiagnosticSeverity.Warning,
isEnabledByDefault: true,
description: "",
helpLinkUri: RuleIdentifiers.GetHelpUri(RuleIdentifiers.DeclareTypesInNamespaces));
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_rule);
public override void Initialize(AnalysisContext context)
{
context.EnableConcurrentExecution();
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None);
context.RegisterSymbolAction(AnalyzeSymbol, SymbolKind.NamedType);
}
private static void AnalyzeSymbol(SymbolAnalysisContext context)
{
var symbol = (INamedTypeSymbol)context.Symbol;
if (symbol.IsImplicitlyDeclared || symbol.IsImplicitClass || symbol.Name.Contains('$', System.StringComparison.Ordinal))
return;
if (symbol.IsTopLevelStatementsEntryPointType())
return;
if (symbol.ContainingType == null && (symbol.ContainingNamespace?.IsGlobalNamespace ?? true))
{
context.ReportDiagnostic(s_rule, symbol, symbol.Name);
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace LambdaExpression
{
class Program
{
//Declaration of Delegate ::= delegate <returnType> <delegateName> ([<argument>{,<argument>}]);
//<returnType> ::= <type>
delegate int DelegateDemo1(int i);
delegate string[] DelegateDemo2(int i);
delegate int DelegateDemo3(int i, int j, int k);
delegate void DelegateDemo4();
delegate void DelegateDemo5(int i);
delegate int DelegateDemo6();
delegate bool DelegateDemo7(int i, int j);
//จากตัวอย่างข้างบน DelegateDemo1 และ DelegateDemo2 จะกลายเป็น type ไว้ประกาศแบบตัวแปร
//โดยที่การประกาศ delegate ถือเป็น Type (ไม่ได้เป็นแค่่ Instance ของ Type) จึงไม่สามารถประกาศใน method ได้ (เหมือนเราไม่สามารถประกาศ class event struct enum ต่างๆใน method ได้)
static void Main(string[] args)
{
//Initialization of Delegate ::= <delegateName> = <inputParameters> => <code>;
//<delegateName> ::= ชื่อ Delegate ที่จะถูกใช้เหมือนเป็น <type> <type> หนึ่ง
//<inputParameters> ::= <argument> | (<argument>{,<argument>})
//<argument> ::= [<type>] ชื่อตัวแปร
//<type> ::= ชนิดของตัวแปร
//<code> ::= \{ code หลายๆบรรทัด \} | code บรรทัดเดียว
DelegateDemo1 demo1 = i => i * 2;
int resultInt=demo1(10);
//จากตัวอย่างข้างบน demo1 คือ instance หนึ่งของ Type DelegateDemo1 ที่เราได้ประกาศไปนอก method
//โดยจะมี input เป็น i โดยเอา i ไป *2 แล้ว return กลับมาผ่าน demo1
DelegateDemo2 demo2 = input =>
{
string data = input.ToString();
string[] output = new string[3] { data, data, data };
return output;
};
string[] resultStringArr = demo2(4);
//จากตัวอย่างข้างบน demo2 คือ instance หนึ่งของ Type DelegateDemo2 ที่เราได้ประกาศไปนอก method
//โดยจะมี input เป็นตัวแปรชื่อ input โดยจะเอา input ไปแปลงเป็น string[] แล้ว return กลับออกมา
//จะเห็นว่าสิ่งที่ return จะไม่เกี่ยวกับ input => code , ค่า return ไม่ได้กลับมายุ่งกับตัว input
//multiple inputs
DelegateDemo3 demo3 = (a, b, c) => a + b + c;
resultInt = demo3(100, 10, 1);
//explicitly typed input
demo3 = (int a, int b, int c) => a*2 + b*2 + c*2;
resultInt = demo3(100, 10, 1);
//void parameter void return
DelegateDemo4 demo4 = () => Console.WriteLine("This is Void Parameter and Void Return");
demo4();
//int parameter void return
DelegateDemo5 demo5 = (int i) => Console.WriteLine("This is Int32 Parameter and Void Return > Int32 parameter = " + i);
demo5(10);
//void parameter int return
DelegateDemo6 demo6 = () => 1234;
resultInt = demo6();
//void parameter int return alternate
demo6 = () => { return 5678; };
resultInt = demo6();
//bool return (Comparison)
DelegateDemo7 demo7 = (i, j) => i > j;
bool resultBool=demo7(1, 2);
resultBool = demo7(2, 1);
}
}
}
|
using System;
using UnityEngine;
[CustomLuaClass, AddComponentMenu("Custom/Follow Target")]
public class UIFollowTarget : MonoBehaviour
{
public Vector3 offset = Vector3.get_zero();
private Transform _target;
public Camera UI_Camera;
public Camera Game_Camera;
public bool alwaysShow = true;
private Transform _cacheCamera;
private Vector3 _targetPos;
private Vector3 _cameraPos;
private Vector3 _pos;
public Transform target
{
get
{
return this._target;
}
set
{
this._target = value;
this.CameraInit(true);
}
}
private void Awake()
{
this.CameraInit(true);
}
private void Start()
{
this.CameraInit(false);
}
public void CameraInit(bool needEnable = true)
{
if (this.target != null)
{
if (this.Game_Camera == null)
{
this.Game_Camera = NGUITools.FindCameraForLayer(this.target.get_gameObject().get_layer());
}
if (this.UI_Camera == null)
{
this.UI_Camera = NGUITools.FindCameraForLayer(base.get_gameObject().get_layer());
}
if (this.Game_Camera != null)
{
this._cacheCamera = this.Game_Camera.get_transform();
}
}
else
{
base.set_enabled(needEnable);
}
}
private void LateUpdate()
{
this.UpdatePos();
}
private void UpdatePos()
{
if (this._target != null && (this._targetPos != this._target.get_position() || (this._cacheCamera != null && this._cameraPos != this._cacheCamera.get_position())))
{
this._pos = this.Game_Camera.WorldToViewportPoint(this._target.get_position());
if (this.alwaysShow)
{
this._pos.y = Mathf.Clamp(this._pos.y, 0f, 1f);
}
base.get_transform().set_position(this.UI_Camera.ViewportToWorldPoint(this._pos));
this._pos = base.get_transform().get_localPosition();
this._pos.x = (float)Mathf.FloorToInt(this._pos.x);
this._pos.y = (float)Mathf.FloorToInt(this._pos.y);
this._pos.z = 0f;
base.get_transform().set_localPosition(new Vector3(this._pos.x + this.offset.x, this._pos.y + this.offset.y, this._pos.z + this.offset.z));
this._targetPos = this._target.get_position();
this._cameraPos = this._cacheCamera.get_position();
}
}
}
|
using LiteDB;
using System;
using System.Collections.Generic;
using System.Linq;
using TreeStore.Model;
namespace TreeStore.LiteDb
{
public class CategoryRepository : LiteDbRepositoryBase<Category>, ICategoryRepository
{
public const string CollectionName = "categories";
static CategoryRepository()
{
BsonMapper.Global.Entity<Category>()
.DbRef(c => c.Parent, "categories");
}
public CategoryRepository(LiteRepository db)
: base(db, collectionName: CollectionName)
{
db.Database
.GetCollection(CollectionName)
.EnsureIndex(
name: nameof(Category.UniqueName),
expression: $"$.{nameof(Category.UniqueName)}",
unique: true);
this.rootNode = new Lazy<Category>(() => this.FindRootCategory() ?? this.CreateRootCategory());
}
protected override ILiteCollection<Category> IncludeRelated(ILiteCollection<Category> from) => from.Include(c => c.Parent);
private ILiteQueryable<Category> QueryRelated() => this.LiteCollection().Query().Include(c => c.Parent);
#region There must be a persistent root
private readonly Lazy<Category> rootNode;
public Category Root() => this.rootNode.Value;
// todo: abandon completely loaded root tree
private Category FindRootCategory() => this.LiteRepository
.Query<Category>(CollectionName)
.Include(c => c.Parent)
.Where(c => c.Parent == null)
.FirstOrDefault();
private Category CreateRootCategory()
{
var rootCategory = new Category(string.Empty);
this.LiteCollection().Upsert(rootCategory);
return rootCategory;
}
#endregion There must be a persistent root
public override Category Upsert(Category category)
{
if (category.Parent is null)
throw new InvalidOperationException("Category must have parent.");
return base.Upsert(category);
}
public Category? FindByParentAndName(Category category, string name)
{
return this
.FindByParent(category)
// matched in result set, could be mathed to expression
.SingleOrDefault(c => c.Name.Equals(name, StringComparison.OrdinalIgnoreCase));
}
public IEnumerable<Category> FindByParent(Category category)
{
return this.QueryRelated()
.Where(c => c.Parent != null && c.Parent.Id == category.Id)
.ToArray();
}
}
} |
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
namespace Framework.Remote.Mobile
{
[DataContract(Name = "CxUniformContainer", Namespace = "http://schemas.datacontract.org/2004/07/FulcrumWeb")]
[KnownType(typeof(object[]))]
[KnownType(typeof(CxAssemblyContainer))]
[KnownType(typeof(byte[]))]
[KnownType(typeof(CxClientAssemblyMetadata))]
[KnownType(typeof(CxClientAttributeMetadata))]
// [KnownType(typeof(List<string>))]
[KnownType(typeof(CxClientClassMetadata))]
[KnownType(typeof(CxClientCommandMetadata))]
[KnownType(typeof(CxClientEntityMark))]
// [KnownType(typeof(List<object>))]
[KnownType(typeof(CxClientEntityMarks))]
[KnownType(typeof(List<CxClientEntityMark>))]
[KnownType(typeof(CxClientEntityMetadata))]
[KnownType(typeof(Dictionary<string, CxClientAttributeMetadata>))]
[KnownType(typeof(CxClientEntityMetadata[]))]
[KnownType(typeof(CxClientCommandMetadata[]))]
[KnownType(typeof(CxExceptionDetails))]
[KnownType(typeof(Dictionary<string, object>))]
[KnownType(typeof(List<CxClientParentEntity>))]
[KnownType(typeof(CxClientImageMetadata))]
[KnownType(typeof(CxClientMultilanguageItem))]
[KnownType(typeof(CxClientParentEntity))]
[KnownType(typeof(string[]))]
[KnownType(typeof(CxClientPortalMetadata))]
[KnownType(typeof(List<CxClientSectionMetadata>))]
[KnownType(typeof(List<CxClientRowSource>))]
[KnownType(typeof(List<CxClientAssemblyMetadata>))]
[KnownType(typeof(List<CxClientClassMetadata>))]
[KnownType(typeof(CxClientImageMetadata[]))]
[KnownType(typeof(List<CxLayoutElement>))]
[KnownType(typeof(Dictionary<string, byte[]>))]
[KnownType(typeof(List<CxClientMultilanguageItem>))]
[KnownType(typeof(List<CxLanguage>))]
[KnownType(typeof(CxSkin))]
[KnownType(typeof(List<CxSkin>))]
[KnownType(typeof(Dictionary<string, string>))]
[KnownType(typeof(CxClientRowSource))]
[KnownType(typeof(CxClientRowSourceItem))]
[KnownType(typeof(List<CxClientRowSourceItem>))]
[KnownType(typeof(CxClientSectionMetadata))]
[KnownType(typeof(CxClientTreeItemMetadata))]
[KnownType(typeof(List<CxClientTreeItemMetadata>))]
[KnownType(typeof(CxCommandParameters))]
[KnownType(typeof(List<Dictionary<string, object>>))]
[KnownType(typeof(CxDataItem))]
[KnownType(typeof(CxExportToCsvInfo))]
[KnownType(typeof(CxExpressionResult))]
[KnownType(typeof(Dictionary<string, CxClientRowSource>))]
[KnownType(typeof(CxFilterItem))]
// [KnownType(typeof(IList))]
[KnownType(typeof(CxLanguage))]
[KnownType(typeof(CxLayoutElement))]
[KnownType(typeof(List<CxLayoutElement>))]
[KnownType(typeof(CxModel))]
[KnownType(typeof(CxSortDescription[]))]
[KnownType(typeof(CxQueryParams))]
[KnownType(typeof(CxSettingsContainer))]
[KnownType(typeof(CxUploadData))]
[KnownType(typeof(CxUploadParams))]
[KnownType(typeof(CxUploadResponse))]
[KnownType(typeof(CxClientDashboardData))]
[KnownType(typeof(CxClientDashboardItem))]
[KnownType(typeof(CxClientDashboardItem[]))]
public class CxUniformContainer
{
/// <summary>
/// Gets or sets the inner dictionary.
/// </summary>
/// <value>The inner dictionary.</value>
[DataMember]
public Dictionary<string, object> InnerDictionary { get; set; }
public object this[string key]
{
get
{
if (InnerDictionary.ContainsKey(key))
return InnerDictionary[key];
else
return null;
}
set { InnerDictionary[key] = value; }
}
/// <summary>
/// Gets the list of keys available in the container.
/// </summary>
/// <value>The keys.</value>
public IList<string> Keys
{
get { return new List<string>(InnerDictionary.Keys); }
}
/// <summary>
/// Gets the list of values available within the container.
/// </summary>
/// <value>The values.</value>
public IList<object> Values
{
get { return new List<object>(InnerDictionary.Values); }
}
/// <summary>
/// Gets the first key.
/// </summary>
/// <value>The first key.</value>
public string FirstKey
{
get { return Keys.Count > 0 ? Keys[0] : null; }
}
/// <summary>
/// Gets the first value.
/// </summary>
/// <value>The first value.</value>
public object FirstValue
{
get { return FirstKey != null ? InnerDictionary[FirstKey] : null; }
}
public CxUniformContainer()
{
InnerDictionary = new Dictionary<string, object>();
}
public CxUniformContainer(string key, object value)
: this()
{
InnerDictionary[key] = value;
}
/// <summary>
/// Determines whether the container contains a value under the specified key.
/// </summary>
/// <param name="key">The key.</param>
/// <returns>
/// <c>true</c> if the specified key contains key; otherwise, <c>false</c>.
/// </returns>
public bool ContainsKey(string key)
{
return InnerDictionary.ContainsKey(key);
}
/// <summary>
/// Clears the data in the current container.
/// </summary>
public void Clear()
{
InnerDictionary.Clear();
}
}
}
|
using Umbraco.Core.Models;
namespace ModelsBuilderified.Models
{
public interface ILayout : INavigation, IAbout
{
string SiteName { get; }
string SiteUrl { get; }
string Byline { get; }
string Copyright { get; }
string DisplayTitle { get; }
}
} |
#region License
/***
* Copyright © 2018-2025, 张强 (943620963@qq.com).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* without warranties or conditions of any kind, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#endregion
using System.Collections.Generic;
namespace ZqUtils.Redis
{
/// <summary>
/// A class that contains redis connection pool informations.
/// </summary>
public class ConnectionPoolInformation
{
/// <summary>
/// Gets or sets the connection pool desiderated size.
/// </summary>
public int RequiredPoolSize { get; set; }
/// <summary>
/// Gets or sets the number of active connections in the connection pool.
/// </summary>
public int ActiveConnections { get; set; }
/// <summary>
/// Gets or sets the hash code of active connections in the connection pool.
/// </summary>
public List<int> ActiveConnectionHashCodes { get; set; }
/// <summary>
/// Gets or sets the number of invalid connections in the connection pool.
/// </summary>
public int InvalidConnections { get; set; }
/// <summary>
/// Gets or sets the hash code of invalid connections in the connection pool.
/// </summary>
public List<int> InvalidConnectionHashCodes { get; set; }
}
}
|
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace OSGeo.GDAL
{
internal class GdalConstPINVOKE
{
protected static GdalConstPINVOKE.SWIGExceptionHelper swigExceptionHelper;
protected static GdalConstPINVOKE.SWIGStringHelper swigStringHelper;
static GdalConstPINVOKE()
{
GdalConstPINVOKE.swigExceptionHelper = new GdalConstPINVOKE.SWIGExceptionHelper();
GdalConstPINVOKE.swigStringHelper = new GdalConstPINVOKE.SWIGStringHelper();
}
public GdalConstPINVOKE()
{
}
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CE_Debug_get", ExactSpelling=false)]
public static extern int CE_Debug_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CE_Failure_get", ExactSpelling=false)]
public static extern int CE_Failure_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CE_Fatal_get", ExactSpelling=false)]
public static extern int CE_Fatal_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CE_None_get", ExactSpelling=false)]
public static extern int CE_None_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CE_Warning_get", ExactSpelling=false)]
public static extern int CE_Warning_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CPLE_AppDefined_get", ExactSpelling=false)]
public static extern int CPLE_AppDefined_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CPLE_AssertionFailed_get", ExactSpelling=false)]
public static extern int CPLE_AssertionFailed_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CPLE_FileIO_get", ExactSpelling=false)]
public static extern int CPLE_FileIO_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CPLE_IllegalArg_get", ExactSpelling=false)]
public static extern int CPLE_IllegalArg_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CPLE_None_get", ExactSpelling=false)]
public static extern int CPLE_None_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CPLE_NotSupported_get", ExactSpelling=false)]
public static extern int CPLE_NotSupported_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CPLE_NoWriteAccess_get", ExactSpelling=false)]
public static extern int CPLE_NoWriteAccess_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CPLE_OpenFailed_get", ExactSpelling=false)]
public static extern int CPLE_OpenFailed_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CPLE_OutOfMemory_get", ExactSpelling=false)]
public static extern int CPLE_OutOfMemory_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CPLE_UserInterrupt_get", ExactSpelling=false)]
public static extern int CPLE_UserInterrupt_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CPLES_BackslashQuotable_get", ExactSpelling=false)]
public static extern int CPLES_BackslashQuotable_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CPLES_CSV_get", ExactSpelling=false)]
public static extern int CPLES_CSV_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CPLES_SQL_get", ExactSpelling=false)]
public static extern int CPLES_SQL_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CPLES_URL_get", ExactSpelling=false)]
public static extern int CPLES_URL_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CPLES_XML_get", ExactSpelling=false)]
public static extern int CPLES_XML_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CXT_Attribute_get", ExactSpelling=false)]
public static extern int CXT_Attribute_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CXT_Comment_get", ExactSpelling=false)]
public static extern int CXT_Comment_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CXT_Element_get", ExactSpelling=false)]
public static extern int CXT_Element_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CXT_Literal_get", ExactSpelling=false)]
public static extern int CXT_Literal_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_CXT_Text_get", ExactSpelling=false)]
public static extern int CXT_Text_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GA_ReadOnly_get", ExactSpelling=false)]
public static extern int GA_ReadOnly_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GA_Update_get", ExactSpelling=false)]
public static extern int GA_Update_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GARIO_COMPLETE_get", ExactSpelling=false)]
public static extern int GARIO_COMPLETE_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GARIO_ERROR_get", ExactSpelling=false)]
public static extern int GARIO_ERROR_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GARIO_PENDING_get", ExactSpelling=false)]
public static extern int GARIO_PENDING_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GARIO_UPDATE_get", ExactSpelling=false)]
public static extern int GARIO_UPDATE_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GCI_AlphaBand_get", ExactSpelling=false)]
public static extern int GCI_AlphaBand_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GCI_BlackBand_get", ExactSpelling=false)]
public static extern int GCI_BlackBand_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GCI_BlueBand_get", ExactSpelling=false)]
public static extern int GCI_BlueBand_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GCI_CyanBand_get", ExactSpelling=false)]
public static extern int GCI_CyanBand_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GCI_GrayIndex_get", ExactSpelling=false)]
public static extern int GCI_GrayIndex_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GCI_GreenBand_get", ExactSpelling=false)]
public static extern int GCI_GreenBand_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GCI_HueBand_get", ExactSpelling=false)]
public static extern int GCI_HueBand_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GCI_LightnessBand_get", ExactSpelling=false)]
public static extern int GCI_LightnessBand_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GCI_MagentaBand_get", ExactSpelling=false)]
public static extern int GCI_MagentaBand_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GCI_PaletteIndex_get", ExactSpelling=false)]
public static extern int GCI_PaletteIndex_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GCI_RedBand_get", ExactSpelling=false)]
public static extern int GCI_RedBand_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GCI_SaturationBand_get", ExactSpelling=false)]
public static extern int GCI_SaturationBand_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GCI_Undefined_get", ExactSpelling=false)]
public static extern int GCI_Undefined_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GCI_YCbCr_CbBand_get", ExactSpelling=false)]
public static extern int GCI_YCbCr_CbBand_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GCI_YCbCr_CrBand_get", ExactSpelling=false)]
public static extern int GCI_YCbCr_CrBand_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GCI_YCbCr_YBand_get", ExactSpelling=false)]
public static extern int GCI_YCbCr_YBand_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GCI_YellowBand_get", ExactSpelling=false)]
public static extern int GCI_YellowBand_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDAL_DCAP_CREATE_get", ExactSpelling=false)]
public static extern string GDAL_DCAP_CREATE_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDAL_DCAP_CREATECOPY_get", ExactSpelling=false)]
public static extern string GDAL_DCAP_CREATECOPY_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDAL_DCAP_VIRTUALIO_get", ExactSpelling=false)]
public static extern string GDAL_DCAP_VIRTUALIO_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDAL_DMD_CREATIONDATATYPES_get", ExactSpelling=false)]
public static extern string GDAL_DMD_CREATIONDATATYPES_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDAL_DMD_CREATIONOPTIONLIST_get", ExactSpelling=false)]
public static extern string GDAL_DMD_CREATIONOPTIONLIST_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDAL_DMD_EXTENSION_get", ExactSpelling=false)]
public static extern string GDAL_DMD_EXTENSION_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDAL_DMD_HELPTOPIC_get", ExactSpelling=false)]
public static extern string GDAL_DMD_HELPTOPIC_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDAL_DMD_LONGNAME_get", ExactSpelling=false)]
public static extern string GDAL_DMD_LONGNAME_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDAL_DMD_MIMETYPE_get", ExactSpelling=false)]
public static extern string GDAL_DMD_MIMETYPE_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDAL_DMD_SUBDATASETS_get", ExactSpelling=false)]
public static extern string GDAL_DMD_SUBDATASETS_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDT_Byte_get", ExactSpelling=false)]
public static extern int GDT_Byte_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDT_CFloat32_get", ExactSpelling=false)]
public static extern int GDT_CFloat32_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDT_CFloat64_get", ExactSpelling=false)]
public static extern int GDT_CFloat64_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDT_CInt16_get", ExactSpelling=false)]
public static extern int GDT_CInt16_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDT_CInt32_get", ExactSpelling=false)]
public static extern int GDT_CInt32_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDT_Float32_get", ExactSpelling=false)]
public static extern int GDT_Float32_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDT_Float64_get", ExactSpelling=false)]
public static extern int GDT_Float64_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDT_Int16_get", ExactSpelling=false)]
public static extern int GDT_Int16_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDT_Int32_get", ExactSpelling=false)]
public static extern int GDT_Int32_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDT_TypeCount_get", ExactSpelling=false)]
public static extern int GDT_TypeCount_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDT_UInt16_get", ExactSpelling=false)]
public static extern int GDT_UInt16_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDT_UInt32_get", ExactSpelling=false)]
public static extern int GDT_UInt32_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GDT_Unknown_get", ExactSpelling=false)]
public static extern int GDT_Unknown_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GF_Read_get", ExactSpelling=false)]
public static extern int GF_Read_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GF_Write_get", ExactSpelling=false)]
public static extern int GF_Write_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFT_Integer_get", ExactSpelling=false)]
public static extern int GFT_Integer_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFT_Real_get", ExactSpelling=false)]
public static extern int GFT_Real_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFT_String_get", ExactSpelling=false)]
public static extern int GFT_String_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFU_Alpha_get", ExactSpelling=false)]
public static extern int GFU_Alpha_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFU_AlphaMax_get", ExactSpelling=false)]
public static extern int GFU_AlphaMax_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFU_AlphaMin_get", ExactSpelling=false)]
public static extern int GFU_AlphaMin_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFU_Blue_get", ExactSpelling=false)]
public static extern int GFU_Blue_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFU_BlueMax_get", ExactSpelling=false)]
public static extern int GFU_BlueMax_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFU_BlueMin_get", ExactSpelling=false)]
public static extern int GFU_BlueMin_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFU_Generic_get", ExactSpelling=false)]
public static extern int GFU_Generic_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFU_Green_get", ExactSpelling=false)]
public static extern int GFU_Green_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFU_GreenMax_get", ExactSpelling=false)]
public static extern int GFU_GreenMax_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFU_GreenMin_get", ExactSpelling=false)]
public static extern int GFU_GreenMin_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFU_Max_get", ExactSpelling=false)]
public static extern int GFU_Max_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFU_MaxCount_get", ExactSpelling=false)]
public static extern int GFU_MaxCount_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFU_Min_get", ExactSpelling=false)]
public static extern int GFU_Min_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFU_MinMax_get", ExactSpelling=false)]
public static extern int GFU_MinMax_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFU_Name_get", ExactSpelling=false)]
public static extern int GFU_Name_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFU_PixelCount_get", ExactSpelling=false)]
public static extern int GFU_PixelCount_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFU_Red_get", ExactSpelling=false)]
public static extern int GFU_Red_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFU_RedMax_get", ExactSpelling=false)]
public static extern int GFU_RedMax_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GFU_RedMin_get", ExactSpelling=false)]
public static extern int GFU_RedMin_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GMF_ALL_VALID_get", ExactSpelling=false)]
public static extern int GMF_ALL_VALID_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GMF_ALPHA_get", ExactSpelling=false)]
public static extern int GMF_ALPHA_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GMF_NODATA_get", ExactSpelling=false)]
public static extern int GMF_NODATA_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GMF_PER_DATASET_get", ExactSpelling=false)]
public static extern int GMF_PER_DATASET_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GPI_CMYK_get", ExactSpelling=false)]
public static extern int GPI_CMYK_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GPI_Gray_get", ExactSpelling=false)]
public static extern int GPI_Gray_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GPI_HLS_get", ExactSpelling=false)]
public static extern int GPI_HLS_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GPI_RGB_get", ExactSpelling=false)]
public static extern int GPI_RGB_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GRA_Average_get", ExactSpelling=false)]
public static extern int GRA_Average_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GRA_Bilinear_get", ExactSpelling=false)]
public static extern int GRA_Bilinear_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GRA_Cubic_get", ExactSpelling=false)]
public static extern int GRA_Cubic_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GRA_CubicSpline_get", ExactSpelling=false)]
public static extern int GRA_CubicSpline_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GRA_Lanczos_get", ExactSpelling=false)]
public static extern int GRA_Lanczos_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GRA_Mode_get", ExactSpelling=false)]
public static extern int GRA_Mode_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GRA_NearestNeighbour_get", ExactSpelling=false)]
public static extern int GRA_NearestNeighbour_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GTO_BIT_get", ExactSpelling=false)]
public static extern int GTO_BIT_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GTO_BSQ_get", ExactSpelling=false)]
public static extern int GTO_BSQ_get();
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="CSharp_GTO_TIP_get", ExactSpelling=false)]
public static extern int GTO_TIP_get();
protected class SWIGExceptionHelper
{
private static GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate applicationDelegate;
private static GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate arithmeticDelegate;
private static GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate divideByZeroDelegate;
private static GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate indexOutOfRangeDelegate;
private static GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate invalidCastDelegate;
private static GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate invalidOperationDelegate;
private static GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate ioDelegate;
private static GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate nullReferenceDelegate;
private static GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate outOfMemoryDelegate;
private static GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate overflowDelegate;
private static GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate systemDelegate;
private static GdalConstPINVOKE.SWIGExceptionHelper.ExceptionArgumentDelegate argumentDelegate;
private static GdalConstPINVOKE.SWIGExceptionHelper.ExceptionArgumentDelegate argumentNullDelegate;
private static GdalConstPINVOKE.SWIGExceptionHelper.ExceptionArgumentDelegate argumentOutOfRangeDelegate;
static SWIGExceptionHelper()
{
GdalConstPINVOKE.SWIGExceptionHelper.applicationDelegate = new GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate(GdalConstPINVOKE.SWIGExceptionHelper.SetPendingApplicationException);
GdalConstPINVOKE.SWIGExceptionHelper.arithmeticDelegate = new GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate(GdalConstPINVOKE.SWIGExceptionHelper.SetPendingArithmeticException);
GdalConstPINVOKE.SWIGExceptionHelper.divideByZeroDelegate = new GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate(GdalConstPINVOKE.SWIGExceptionHelper.SetPendingDivideByZeroException);
GdalConstPINVOKE.SWIGExceptionHelper.indexOutOfRangeDelegate = new GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate(GdalConstPINVOKE.SWIGExceptionHelper.SetPendingIndexOutOfRangeException);
GdalConstPINVOKE.SWIGExceptionHelper.invalidCastDelegate = new GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate(GdalConstPINVOKE.SWIGExceptionHelper.SetPendingInvalidCastException);
GdalConstPINVOKE.SWIGExceptionHelper.invalidOperationDelegate = new GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate(GdalConstPINVOKE.SWIGExceptionHelper.SetPendingInvalidOperationException);
GdalConstPINVOKE.SWIGExceptionHelper.ioDelegate = new GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate(GdalConstPINVOKE.SWIGExceptionHelper.SetPendingIOException);
GdalConstPINVOKE.SWIGExceptionHelper.nullReferenceDelegate = new GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate(GdalConstPINVOKE.SWIGExceptionHelper.SetPendingNullReferenceException);
GdalConstPINVOKE.SWIGExceptionHelper.outOfMemoryDelegate = new GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate(GdalConstPINVOKE.SWIGExceptionHelper.SetPendingOutOfMemoryException);
GdalConstPINVOKE.SWIGExceptionHelper.overflowDelegate = new GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate(GdalConstPINVOKE.SWIGExceptionHelper.SetPendingOverflowException);
GdalConstPINVOKE.SWIGExceptionHelper.systemDelegate = new GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate(GdalConstPINVOKE.SWIGExceptionHelper.SetPendingSystemException);
GdalConstPINVOKE.SWIGExceptionHelper.argumentDelegate = new GdalConstPINVOKE.SWIGExceptionHelper.ExceptionArgumentDelegate(GdalConstPINVOKE.SWIGExceptionHelper.SetPendingArgumentException);
GdalConstPINVOKE.SWIGExceptionHelper.argumentNullDelegate = new GdalConstPINVOKE.SWIGExceptionHelper.ExceptionArgumentDelegate(GdalConstPINVOKE.SWIGExceptionHelper.SetPendingArgumentNullException);
GdalConstPINVOKE.SWIGExceptionHelper.argumentOutOfRangeDelegate = new GdalConstPINVOKE.SWIGExceptionHelper.ExceptionArgumentDelegate(GdalConstPINVOKE.SWIGExceptionHelper.SetPendingArgumentOutOfRangeException);
GdalConstPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_GdalConst(GdalConstPINVOKE.SWIGExceptionHelper.applicationDelegate, GdalConstPINVOKE.SWIGExceptionHelper.arithmeticDelegate, GdalConstPINVOKE.SWIGExceptionHelper.divideByZeroDelegate, GdalConstPINVOKE.SWIGExceptionHelper.indexOutOfRangeDelegate, GdalConstPINVOKE.SWIGExceptionHelper.invalidCastDelegate, GdalConstPINVOKE.SWIGExceptionHelper.invalidOperationDelegate, GdalConstPINVOKE.SWIGExceptionHelper.ioDelegate, GdalConstPINVOKE.SWIGExceptionHelper.nullReferenceDelegate, GdalConstPINVOKE.SWIGExceptionHelper.outOfMemoryDelegate, GdalConstPINVOKE.SWIGExceptionHelper.overflowDelegate, GdalConstPINVOKE.SWIGExceptionHelper.systemDelegate);
GdalConstPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacksArgument_GdalConst(GdalConstPINVOKE.SWIGExceptionHelper.argumentDelegate, GdalConstPINVOKE.SWIGExceptionHelper.argumentNullDelegate, GdalConstPINVOKE.SWIGExceptionHelper.argumentOutOfRangeDelegate);
}
public SWIGExceptionHelper()
{
}
private static void SetPendingApplicationException(string message)
{
GdalConstPINVOKE.SWIGPendingException.Set(new Exception(message, GdalConstPINVOKE.SWIGPendingException.Retrieve()));
}
private static void SetPendingArgumentException(string message, string paramName)
{
GdalConstPINVOKE.SWIGPendingException.Set(new ArgumentException(message, paramName, GdalConstPINVOKE.SWIGPendingException.Retrieve()));
}
private static void SetPendingArgumentNullException(string message, string paramName)
{
Exception exception = GdalConstPINVOKE.SWIGPendingException.Retrieve();
if (exception != null)
{
message = string.Concat(message, " Inner Exception: ", exception.Message);
}
GdalConstPINVOKE.SWIGPendingException.Set(new ArgumentNullException(paramName, message));
}
private static void SetPendingArgumentOutOfRangeException(string message, string paramName)
{
Exception exception = GdalConstPINVOKE.SWIGPendingException.Retrieve();
if (exception != null)
{
message = string.Concat(message, " Inner Exception: ", exception.Message);
}
GdalConstPINVOKE.SWIGPendingException.Set(new ArgumentOutOfRangeException(paramName, message));
}
private static void SetPendingArithmeticException(string message)
{
GdalConstPINVOKE.SWIGPendingException.Set(new ArithmeticException(message, GdalConstPINVOKE.SWIGPendingException.Retrieve()));
}
private static void SetPendingDivideByZeroException(string message)
{
GdalConstPINVOKE.SWIGPendingException.Set(new DivideByZeroException(message, GdalConstPINVOKE.SWIGPendingException.Retrieve()));
}
private static void SetPendingIndexOutOfRangeException(string message)
{
GdalConstPINVOKE.SWIGPendingException.Set(new IndexOutOfRangeException(message, GdalConstPINVOKE.SWIGPendingException.Retrieve()));
}
private static void SetPendingInvalidCastException(string message)
{
GdalConstPINVOKE.SWIGPendingException.Set(new InvalidCastException(message, GdalConstPINVOKE.SWIGPendingException.Retrieve()));
}
private static void SetPendingInvalidOperationException(string message)
{
GdalConstPINVOKE.SWIGPendingException.Set(new InvalidOperationException(message, GdalConstPINVOKE.SWIGPendingException.Retrieve()));
}
private static void SetPendingIOException(string message)
{
GdalConstPINVOKE.SWIGPendingException.Set(new IOException(message, GdalConstPINVOKE.SWIGPendingException.Retrieve()));
}
private static void SetPendingNullReferenceException(string message)
{
GdalConstPINVOKE.SWIGPendingException.Set(new NullReferenceException(message, GdalConstPINVOKE.SWIGPendingException.Retrieve()));
}
private static void SetPendingOutOfMemoryException(string message)
{
GdalConstPINVOKE.SWIGPendingException.Set(new OutOfMemoryException(message, GdalConstPINVOKE.SWIGPendingException.Retrieve()));
}
private static void SetPendingOverflowException(string message)
{
GdalConstPINVOKE.SWIGPendingException.Set(new OverflowException(message, GdalConstPINVOKE.SWIGPendingException.Retrieve()));
}
private static void SetPendingSystemException(string message)
{
GdalConstPINVOKE.SWIGPendingException.Set(new Exception(message, GdalConstPINVOKE.SWIGPendingException.Retrieve()));
}
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, ExactSpelling=false)]
public static extern void SWIGRegisterExceptionCallbacks_GdalConst(GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate applicationDelegate, GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate arithmeticDelegate, GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate divideByZeroDelegate, GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate indexOutOfRangeDelegate, GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate invalidCastDelegate, GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate invalidOperationDelegate, GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate ioDelegate, GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate nullReferenceDelegate, GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate outOfMemoryDelegate, GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate overflowDelegate, GdalConstPINVOKE.SWIGExceptionHelper.ExceptionDelegate systemExceptionDelegate);
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, EntryPoint="SWIGRegisterExceptionArgumentCallbacks_GdalConst", ExactSpelling=false)]
public static extern void SWIGRegisterExceptionCallbacksArgument_GdalConst(GdalConstPINVOKE.SWIGExceptionHelper.ExceptionArgumentDelegate argumentDelegate, GdalConstPINVOKE.SWIGExceptionHelper.ExceptionArgumentDelegate argumentNullDelegate, GdalConstPINVOKE.SWIGExceptionHelper.ExceptionArgumentDelegate argumentOutOfRangeDelegate);
public delegate void ExceptionArgumentDelegate(string message, string paramName);
public delegate void ExceptionDelegate(string message);
}
public class SWIGPendingException
{
[ThreadStatic]
private static Exception pendingException;
private static int numExceptionsPending;
public static bool Pending
{
get
{
bool flag = false;
if (GdalConstPINVOKE.SWIGPendingException.numExceptionsPending > 0 && GdalConstPINVOKE.SWIGPendingException.pendingException != null)
{
flag = true;
}
return flag;
}
}
static SWIGPendingException()
{
GdalConstPINVOKE.SWIGPendingException.pendingException = null;
GdalConstPINVOKE.SWIGPendingException.numExceptionsPending = 0;
}
public SWIGPendingException()
{
}
public static Exception Retrieve()
{
Exception exception = null;
if (GdalConstPINVOKE.SWIGPendingException.numExceptionsPending > 0)
{
if (GdalConstPINVOKE.SWIGPendingException.pendingException != null)
{
exception = GdalConstPINVOKE.SWIGPendingException.pendingException;
GdalConstPINVOKE.SWIGPendingException.pendingException = null;
lock (typeof(GdalConstPINVOKE))
{
GdalConstPINVOKE.SWIGPendingException.numExceptionsPending = GdalConstPINVOKE.SWIGPendingException.numExceptionsPending - 1;
}
}
}
return exception;
}
public static void Set(Exception e)
{
if (GdalConstPINVOKE.SWIGPendingException.pendingException != null)
{
throw new Exception(string.Concat("FATAL: An earlier pending exception from unmanaged code was missed and thus not thrown (", GdalConstPINVOKE.SWIGPendingException.pendingException.ToString(), ")"), e);
}
GdalConstPINVOKE.SWIGPendingException.pendingException = e;
lock (typeof(GdalConstPINVOKE))
{
GdalConstPINVOKE.SWIGPendingException.numExceptionsPending = GdalConstPINVOKE.SWIGPendingException.numExceptionsPending + 1;
}
}
}
protected class SWIGStringHelper
{
private static GdalConstPINVOKE.SWIGStringHelper.SWIGStringDelegate stringDelegate;
static SWIGStringHelper()
{
GdalConstPINVOKE.SWIGStringHelper.stringDelegate = new GdalConstPINVOKE.SWIGStringHelper.SWIGStringDelegate(GdalConstPINVOKE.SWIGStringHelper.CreateString);
GdalConstPINVOKE.SWIGStringHelper.SWIGRegisterStringCallback_GdalConst(GdalConstPINVOKE.SWIGStringHelper.stringDelegate);
}
public SWIGStringHelper()
{
}
private static string CreateString(string cString)
{
return cString;
}
[DllImport("gdalconst_wrap", CharSet=CharSet.Ansi, ExactSpelling=false)]
public static extern void SWIGRegisterStringCallback_GdalConst(GdalConstPINVOKE.SWIGStringHelper.SWIGStringDelegate stringDelegate);
public delegate string SWIGStringDelegate(string message);
}
}
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using BPiaoBao.AppServices.DataContracts.DomesticTicket;
using BPiaoBao.AppServices.DataContracts.DomesticTicket.DataObject;
using BPiaoBao.Common;
using BPiaoBao.Common.Enums;
using BPiaoBao.DomesticTicket.Domain.Models;
using BPiaoBao.DomesticTicket.Domain.Models.Deduction;
using BPiaoBao.DomesticTicket.Domain.Models.Orders;
using BPiaoBao.DomesticTicket.Domain.Models.PlatformPoint;
using BPiaoBao.DomesticTicket.Platform.Plugin;
using StructureMap;
namespace BPiaoBao.DomesticTicket.Domain.Services
{
/// <summary>
/// 查询航班服务
/// </summary>
public class QueryFlightService
{
DataBill dataBill = new DataBill();
CommLog log = new CommLog();
GetFlightBasicData test = new GetFlightBasicData();
/// <summary>
/// 获取航班数据
/// </summary>
/// <param name="avhList"></param>
/// <param name="PolicyList"></param>
/// <returns></returns>
public List<AVHData> MatchPolicy(string code, List<AVHData> avhList, TravelType travelType, List<PolicyCache> PolicyList)
{
DataBill dataBill = new DataBill();
try
{
//PolicyList = PolicyList.Where(p => p.PlatformCode == "系统").ToList();
if (avhList != null && PolicyList != null && avhList.Count > 0 && PolicyList.Count > 0)
{
//周六至周日
DayOfWeek[] WeekendTimes = new DayOfWeek[]
{
DayOfWeek.Saturday,
DayOfWeek.Sunday
};
//调整缓存政策
PolicyList = PolicyCacheSetting(PolicyList);
PolicyList = DeductionSetting(code, avhList, PolicyList);
List<string> codeList = ObjectFactory.GetAllInstances<IPlatform>().Select(p => p.Code).ToList();
for (int i = 0; i < avhList.Count; i++)
{
AVHData avhData = avhList[i];
DateTime flyDate = DateTime.Parse(avhData.QueryParam.FlyDate);
//循环IBE数据
for (int j = 0; j < avhData.IbeData.Count; j++)
{
//排除没有舱位的
if (avhData.IbeData[j].IBESeat == null || avhData.IbeData[j].IBESeat.Count() == 0)
{
continue;
}
//循环舱位 每个舱位可能对应多条政策 取最优的一条
List<IbeSeat> addRowList = new List<IbeSeat>();
for (int k = 0; k < avhData.IbeData[j].IBESeat.Count; k++)
{
avhData.IbeData[j].IBESeat[k].IbeSeatPrice = avhData.IbeData[j].IBESeat[k].SeatPrice;
if (avhData.DicYSeatPrice != null
&& avhData.DicYSeatPrice.ContainsKey(avhData.IbeData[j].CarrierCode)
)
{
if (avhData.IbeData[j].IBESeat[k].SeatPrice > 0)
{
avhData.IbeData[j].IBESeat[k].Commission = dataBill.GetCommission(avhData.IbeData[j].IBESeat[k].Policy, avhData.IbeData[j].IBESeat[k].SeatPrice, avhData.IbeData[j].IBESeat[k].ReturnMoney);
}
}
else
{
//没有Y舱直接过滤
continue;
}
//每个舱位可能对应多条政策 政策过滤
var result = PolicyList.Where(p => Filter(p, codeList, avhList, avhData, travelType, flyDate, WeekendTimes, j, k)).ToList();
#region 特价舱位匹配政策
//if (avhList.Count == 1)//暂时只适用单程
if (true)
{
//特价舱位 不通的特价类型的多条政策
List<PolicyCache> spPolicyList = result.Where(p => p.PolicySpecialType != EnumPolicySpecialType.Normal).OrderByDescending(p => p.Point).ToList();//.FirstOrDefault();
if (spPolicyList != null && spPolicyList.Count > 0)
{
//获取4种类型政策最优的特价
List<PolicyCache> spList = new List<PolicyCache>();
PolicyCache spDynamicSpecial = spPolicyList.Where(p => p.PolicySpecialType == EnumPolicySpecialType.DynamicSpecial).OrderByDescending(p => p.Point).FirstOrDefault();
if (spDynamicSpecial != null) spList.Add(spDynamicSpecial);
PolicyCache spFixedSpecial = spPolicyList.Where(p => p.PolicySpecialType == EnumPolicySpecialType.FixedSpecial).OrderByDescending(p => p.Point).FirstOrDefault();
if (spFixedSpecial != null) spList.Add(spFixedSpecial);
PolicyCache spDownSpecial = spPolicyList.Where(p => p.PolicySpecialType == EnumPolicySpecialType.DownSpecial).OrderByDescending(p => p.Point).FirstOrDefault();
if (spDownSpecial != null) spList.Add(spDownSpecial);
PolicyCache spDiscountOnDiscount = spPolicyList.Where(p => p.PolicySpecialType == EnumPolicySpecialType.DiscountOnDiscount).OrderByDescending(p => p.Point).FirstOrDefault();
if (spDiscountOnDiscount != null) spList.Add(spDiscountOnDiscount);
//循环克隆一份舱位
spList.ForEach(spPolicy =>
{
IbeSeat ibeSeat = avhData.IbeData[j].IBESeat[k].Clone() as IbeSeat;
if (ibeSeat != null)
{
ibeSeat.Policy = spPolicy.Point;
ibeSeat.PolicySpecialType = spPolicy.PolicySpecialType;
ibeSeat.SpecialPriceOrDiscount = spPolicy.SpecialPriceOrDiscount;
ibeSeat.PolicyRMK = spPolicy.Remark;
ibeSeat.PolicyId = spPolicy.PolicyId;
ibeSeat.PlatformCode = spPolicy.PlatformCode;
//处理特价
if (spPolicy.PolicySpecialType == EnumPolicySpecialType.FixedSpecial)
{
//固定特价不为0时 更改舱位价为固定特价
if (ibeSeat.SpecialPriceOrDiscount != 0)
ibeSeat.SeatPrice = ibeSeat.SpecialPriceOrDiscount;
}
else if (spPolicy.PolicySpecialType == EnumPolicySpecialType.DownSpecial)
{
//直降 直降不为0时 舱位价中减除直降的价格
if (ibeSeat.SpecialPriceOrDiscount != 0)
ibeSeat.SeatPrice -= ibeSeat.SpecialPriceOrDiscount;
}
else if (spPolicy.PolicySpecialType == EnumPolicySpecialType.DiscountOnDiscount)
{
//折上折 折扣不为0 在现有的舱位价上根据折扣再次计算
if (ibeSeat.SpecialPriceOrDiscount != 0)
{
decimal zk = ibeSeat.SpecialPriceOrDiscount / 100;
ibeSeat.SeatPrice *= zk;
//进到十位
ibeSeat.SeatPrice = dataBill.CeilAddTen((int)ibeSeat.SeatPrice);
}
}
//舱位价小于0时为0处理
if (ibeSeat.SeatPrice <= 0)
{
ibeSeat.SeatPrice = 0;
}
ibeSeat.Commission = dataBill.GetCommission(spPolicy.Point, ibeSeat.SeatPrice, ibeSeat.ReturnMoney);
//屏蔽非单程的非动态特价
//if (avhList.Count > 1 && ibeSeat.PolicySpecialType != EnumPolicySpecialType.DynamicSpecial)
// return;
//添加到集合
addRowList.Add(ibeSeat);
}
});
}
}
#endregion
//普通舱位
PolicyCache policy = result.Where(p => p.PolicySpecialType == EnumPolicySpecialType.Normal).OrderByDescending(p => p.Point).FirstOrDefault();
if (policy != null)
{
//排除异地政策为0的显示
if (policy.PolicySourceType == EnumPolicySourceType.Share && policy.OldPoint == 0) continue;
avhData.IbeData[j].IBESeat[k].Policy = policy.Point;
avhData.IbeData[j].IBESeat[k].PolicySpecialType = policy.PolicySpecialType;
avhData.IbeData[j].IBESeat[k].SpecialPriceOrDiscount = policy.SpecialPriceOrDiscount;
avhData.IbeData[j].IBESeat[k].PolicyRMK = policy.Remark;
avhData.IbeData[j].IBESeat[k].PolicyId = policy.PolicyId;
avhData.IbeData[j].IBESeat[k].PlatformCode = policy.PlatformCode;
avhData.IbeData[j].IBESeat[k].Commission = dataBill.GetCommission(policy.Point, avhData.IbeData[j].IBESeat[k].SeatPrice, avhData.IbeData[j].IBESeat[k].ReturnMoney);
}
}
if (addRowList.Count > 0)
{
avhData.IbeData[j].IBESeat.AddRange(addRowList.ToArray());
}
}
}
}
}
catch (Exception ex)
{
//记录日志
log.WriteLog("MatchPolicy", "异常信息:" + ex.Message + "\r\n");
}
return avhList;
}
private bool Filter(PolicyCache policy, List<string> InterfaceCode, List<AVHData> avhList, AVHData avhData, TravelType travelType, DateTime flyDate, DayOfWeek[] WeekendTimes, int i, int k)
{
bool Issuc = false;
try
{
//出发城市
if (!(policy.FromCityCode != null && policy.FromCityCode.Contains(avhData.QueryParam.FromCode)))
{
return Issuc;
}
//到达城市
if (!(policy.ToCityCode != null && policy.ToCityCode.Contains(avhData.QueryParam.ToCode)))
{
return Issuc;
}
//乘机有效期
if (!(flyDate > policy.CheckinTime.FromTime && flyDate < policy.CheckinTime.EndTime))
{
return Issuc;
}
//出票有效期
//if (!(flyDate > policy.IssueTime.FromTime && flyDate < policy.IssueTime.EndTime))
//{
// return Issuc;
//}
//适用星期
if (policy.SuitableWeek.Length > 0)
{
if (!policy.SuitableWeek.Contains(flyDate.DayOfWeek))
{
return Issuc;
}
}
//承运人
if (policy.CarrierCode.ToUpper() != avhData.IbeData[i].CarrierCode)
{
return Issuc;
}
//适用舱位
if (policy.CabinSeatCode.Length == 0
|| !policy.CabinSeatCode.Contains(avhData.IbeData[i].IBESeat[k].Seat))
{
return Issuc;
}
if (policy.Applay == EnumApply.Apply)
{
//适用航班号
if (policy.SuitableFlightNo.Length == 0
|| !policy.SuitableFlightNo.Contains(avhData.IbeData[i].FlightNo)
)
{
return Issuc;
}
}
else if (policy.Applay == EnumApply.NotApply)
{
//排除航班号
if (policy.ExceptedFlightNo.Length > 0
&& policy.ExceptedFlightNo.Contains(avhData.IbeData[i].FlightNo))
{
return Issuc;
}
}
//第二程
if (avhList.Count > 1)
{
string carryCode = avhData.IbeData[i].CarrierCode;
string flightNo = avhData.IbeData[i].FlightNo;
string seat = avhData.IbeData[i].IBESeat[k].Seat;
var IbeRowList = avhList[1].IbeData.Where(p => p.CarrierCode.ToUpper().Trim() == carryCode.ToUpper().Trim()).ToList();
//承运人
if (policy.CarrierCode.ToUpper() != carryCode || IbeRowList == null)
{
return Issuc;
}
int seatCount = IbeRowList.Where(p => p.IBESeat.Where(p1 => p1.Seat == seat).Count() > 0).Count();
//适用舱位
if (policy.CabinSeatCode.Length == 0
|| seatCount == 0
)
{
return Issuc;
}
}
if (InterfaceCode.Contains(policy.PlatformCode))
{
////适用航班号
//if (policy.SuitableFlightNo.Length > 0)
//{
// if (!policy.SuitableFlightNo.Contains(avhData.IbeData[i].FlightNo))
// {
// return Issuc;
// }
//}
////排除航班号
//if (policy.ExceptedFlightNo.Length > 0 && policy.ExceptedFlightNo.Contains(avhData.IbeData[i].FlightNo))
//{
// return Issuc;
//}
//上下班时间
//周六周日
if (WeekendTimes.Contains(System.DateTime.Now.DayOfWeek))
{
if (!(DateTime.Compare(DateTime.Parse(policy.ServiceTime.WeekendTime.FromTime.ToString("HH:mm:ss")), DateTime.Parse(System.DateTime.Now.ToString("HH:mm:ss"))) < 0
&& DateTime.Compare(DateTime.Parse(policy.ServiceTime.WeekendTime.EndTime.ToString("HH:mm:ss")), DateTime.Parse(System.DateTime.Now.ToString("HH:mm:ss"))) > 0
))
{
return Issuc;
}
}
else
{
//周一至周五
if (!(DateTime.Compare(DateTime.Parse(policy.ServiceTime.WeekTime.FromTime.ToString("HH:mm:ss")), DateTime.Parse(System.DateTime.Now.ToString("HH:mm:ss"))) < 0
&& DateTime.Compare(DateTime.Parse(policy.ServiceTime.WeekTime.EndTime.ToString("HH:mm:ss")), DateTime.Parse(System.DateTime.Now.ToString("HH:mm:ss"))) > 0
))
{
return Issuc;
}
}
}
//....
}
catch (Exception ex)
{
log.WriteLog("MatchPolicy_1", "异常信息:" + ex.Message + ex.StackTrace + "\r\n");
}
Issuc = true;
return Issuc;
}
/// <summary>
/// 获取政策
/// </summary>
/// <returns></returns>
public List<PolicyCache> GetPolicy(PolicyQueryParam queryParam)
{
//查询政策。。。
List<PolicyCache> policyList = new List<PolicyCache>();
bool queryFlightCachePolicyClose = false;
try
{
string QueryFlightCachePolicyClose = System.Configuration.ConfigurationManager.AppSettings["QueryFlightCachePolicyClose"];
bool.TryParse(QueryFlightCachePolicyClose, out queryFlightCachePolicyClose);
}
catch { }
if (queryFlightCachePolicyClose) return policyList;
StringBuilder sbWhere = new StringBuilder();
sbWhere.AppendFormat(" TravelType='{0}' ", ((int)queryParam.TravelType).ToString());
try
{
//过滤不查询的航空公司
List<string> airCloseList = new List<string>();
SystemConsoSwitch.AirSystems.ForEach(p =>
{
if (!p.IsQuery)
{
airCloseList.Add(p.AirCode.ToUpper());
}
});
//承运人
if (!string.IsNullOrEmpty(queryParam.InputParam[0].CarrierCode)
&& !airCloseList.Contains(queryParam.InputParam[0].CarrierCode))
{
sbWhere.AppendFormat(" and CarrierCode like '{0}'", queryParam.InputParam[0].CarrierCode);
}
else
{
//过滤不查询的航空公司
if (airCloseList.Count > 0)
{
List<string> tempList = new List<string>();
airCloseList.ForEach(p =>
{
tempList.Add("'" + p.ToUpper().Trim() + "'");
});
if (tempList.Count > 0)
sbWhere.AppendFormat(" and CarrierCode not in({0})", string.Join(",", tempList.ToArray()));
}
}
if (queryParam.InputParam.Count > 1)
{
if (queryParam.TravelType == TravelType.Twoway)
{
sbWhere.AppendFormat(" and FromCityCode Like '%{0}%' and ToCityCode like '%{1}%' ", queryParam.InputParam[0].FromCode, queryParam.InputParam[0].ToCode);
sbWhere.AppendFormat(" and ToCityCode Like '%{0}%' and FromCityCode like '%{1}%' ", queryParam.InputParam[1].FromCode, queryParam.InputParam[1].ToCode);
}
else if (queryParam.TravelType == TravelType.Connway)
{
sbWhere.AppendFormat(" and FromCityCode like '%{0}%' and MidCityCode like '%{1}%' ", queryParam.InputParam[0].FromCode, queryParam.InputParam[0].ToCode);
sbWhere.AppendFormat(" and MidCityCode like '%{0}%' and ToCityCode like '%{1}%' ", queryParam.InputParam[1].FromCode, queryParam.InputParam[1].ToCode);
}
DateTime FlyDate = DateTime.Parse(queryParam.InputParam[0].FlyDate);
DateTime FlyBackDate = DateTime.Parse(queryParam.InputParam[1].FlyDate);
sbWhere.AppendFormat(" and '{0}'>= CheckinTime_FromTime and '{0}'<= CheckinTime_EndTime", FlyDate.ToString("yyyy-MM-dd HH:mm:ss"));
sbWhere.AppendFormat(" and '{0}'>= IssueTime_FromTime and '{0}'<= IssueTime_EndTime", FlyDate.ToString("yyyy-MM-dd HH:mm:ss"));
sbWhere.AppendFormat(" and '{0}'>= CheckinTime_FromTime and '{0}'<= CheckinTime_EndTime", FlyBackDate.ToString("yyyy-MM-dd HH:mm:ss"));
sbWhere.AppendFormat(" and '{0}'>= IssueTime_FromTime and '{0}'<= IssueTime_EndTime", FlyBackDate.ToString("yyyy-MM-dd HH:mm:ss"));
sbWhere.Append(" and (getDate()<=CacheExpiresDate or CacheExpiresDate is null)");
policyList = test.GetPolicyCache(sbWhere.ToString());
}
else
{
if (queryParam.TravelType == TravelType.Oneway)
{
//去回城市
DateTime FlyDate = DateTime.Parse(queryParam.InputParam[0].FlyDate);
sbWhere.AppendFormat(" and FromCityCode Like '%{0}%' and ToCityCode like '%{1}%' ", queryParam.InputParam[0].FromCode, queryParam.InputParam[0].ToCode);
sbWhere.AppendFormat(" and '{0}'>= CheckinTime_FromTime and '{0}'<= CheckinTime_EndTime", FlyDate.ToString("yyyy-MM-dd HH:mm:ss"));
sbWhere.AppendFormat(" and '{0}'>= IssueTime_FromTime and '{0}'<= IssueTime_EndTime", FlyDate.ToString("yyyy-MM-dd HH:mm:ss"));
sbWhere.Append(" and (getDate()<=CacheExpiresDate or CacheExpiresDate is null)");
//过滤不查询的航空公司
policyList = test.GetPolicyCache(sbWhere.ToString());
}
}
}
catch (Exception ex)
{
StringBuilder sblog = new StringBuilder();
sblog.Append("参数:\r\n" + queryParam.ToString());
sblog.Append("异常信息:" + ex.Message + "\r\n");
//记录日志
log.WriteLog("GetPolicy", sblog.ToString());
}
return policyList;
}
//匹配扣点
public List<PolicyCache> DeductionSetting(string code, List<AVHData> avhList, List<PolicyCache> pclist)
{
PlatformDeductionParam pfDp = new PlatformDeductionParam();
foreach (AVHData leg in avhList)
{
pfDp.FlyLineList.Add(new FlyLine()
{
CarrayCode = leg.QueryParam.CarrierCode,
FromCityCode = leg.QueryParam.FromCode,
ToCityCode = leg.QueryParam.ToCode
});
}
DomesticService domesticService = ObjectFactory.GetInstance<DomesticService>();
UserRelation userRealtion = domesticService.GetUserRealtion(code);
DeductionGroup deductionGroup = userRealtion.deductionGroup;
List<string> codeList = ObjectFactory.GetAllInstances<IPlatform>().Select(p => p.Code).ToList();
DeductionType deductionType = DeductionType.Interface;
EnumPolicySourceType PolicySourceType = EnumPolicySourceType.Interface;
//本地运营的下级供应code
List<string> LocalSupplierCodeList = userRealtion.SupplierList.Where(p => p.CarrierCode == userRealtion.carrier.Code).Select(p => p.Code).ToList();
for (int i = 0; i < pclist.Count; i++)
{
PolicyCache pc = pclist[i];
if (codeList.Contains(pc.PlatformCode))
{
deductionType = DeductionType.Interface;
PolicySourceType = EnumPolicySourceType.Interface;
}
else
{
if (userRealtion.carrier.Code == pc.PlatformCode
|| LocalSupplierCodeList.Contains(pc.PlatformCode))
{
deductionType = DeductionType.Local;
PolicySourceType = EnumPolicySourceType.Local;
}
else
{
deductionType = DeductionType.Share;
PolicySourceType = EnumPolicySourceType.Share;
}
}
pc.Point = domesticService.MatchDeductionRole(PolicyCacheToPolicy(pc, PolicySourceType), pfDp, pc.CarrierCode, deductionGroup, userRealtion, deductionType);
}
return pclist;
}
/// <summary>
/// 缓存数据修改
/// </summary>
/// <param name="pclist"></param>
/// <returns></returns>
public List<PolicyCache> PolicyCacheSetting(List<PolicyCache> pclist)
{
try
{
string strCachePolicySetting = System.Configuration.ConfigurationManager.AppSettings["CachePolicySetting"];
if (!string.IsNullOrEmpty(strCachePolicySetting) && pclist != null && pclist.Count > 0)
{
string[] strRows = strCachePolicySetting.Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries);
string[] rowArr = null;
decimal startPoint = 0m;
decimal endPoint = 0m;
decimal adujstPoint = 0m;
string policySource = "0";
pclist.ForEach(p =>
{
foreach (string row in strRows)
{
rowArr = row.Split(new string[] { "^" }, StringSplitOptions.RemoveEmptyEntries);
if (rowArr != null && rowArr.Length >= 4)
{
policySource = rowArr[0];
//0接口缓存 1系统政策 2所有政策
bool IsSet = (
(policySource == "0" && p.PlatformCode != "系统")
|| (policySource == "1" && p.PlatformCode == "系统")
|| policySource == "2") ? true : false;
if (IsSet)
{
if (p.Point < 0) p.Point = 0m;
if (rowArr[1].ToLower() == "down") startPoint = -100m;
if (rowArr[2].ToLower() == "up") endPoint = 100m;
decimal.TryParse(rowArr[1], out startPoint);
decimal.TryParse(rowArr[2], out endPoint);
decimal.TryParse(rowArr[3], out adujstPoint);
if (p.Point > startPoint && p.Point <= endPoint)
{
p.Point = p.Point + adujstPoint;
}
}
}
}
});
}
}
catch (Exception ex)
{
//记录日志
log.WriteLog("PolicyCacheSetting", "缓存政策调整区间配置未设置!");
}
return pclist;
}
/// <summary>
/// 获取基础数据
/// </summary>
/// <param name="travelParam"></param>
/// <returns></returns>
public List<AVHData> GetBasic(List<QueryParam> travelParam)
{
// IbeService ibe = new IbeService();
List<AVHData> result = new List<AVHData>();
try
{
if (travelParam.Count == 1)//单程
{
QueryParam queryParam = travelParam[0];
AVHData avhData = new AVHData();
FDData fdData = new FDData();
Parallel.Invoke(
() => avhData = new IbeService(queryParam).GetAvh(queryParam.FromCode, queryParam.ToCode, DateTime.Parse(queryParam.FlyDate), queryParam.CarrierCode),
() => fdData = new IbeService(queryParam).GetFD(queryParam.FromCode, queryParam.ToCode, DateTime.Parse(queryParam.FlyDate), queryParam.CarrierCode)
);
//补全数据
avhData = BuQuanAVH(avhData, fdData);
result.Add(avhData);
}
else if (travelParam.Count == 2)//往返或者联程
{
// IbeService ibeBack = new IbeService();
QueryParam fromParam = travelParam[0];
AVHData fromParamAvhData = new AVHData();
FDData fromParamFdData = new FDData();
QueryParam toParam = travelParam[1];
AVHData toParamAvhData = new AVHData();
FDData toParamFdData = new FDData();
Parallel.Invoke(
() => fromParamAvhData = new IbeService(fromParam).GetAvh(fromParam.FromCode, fromParam.ToCode, DateTime.Parse(fromParam.FlyDate), fromParam.CarrierCode),
() => fromParamFdData = new IbeService(fromParam).GetFD(fromParam.FromCode, fromParam.ToCode, DateTime.Parse(fromParam.FlyDate), fromParam.CarrierCode)
//() => toParamAvhData = ibeBack.GetAvh(toParam.FromCode, toParam.ToCode, DateTime.Parse(toParam.FlyDate), toParam.CarrierCode),
//() => toParamFdData = ibeBack.GetFD(toParam.FromCode, toParam.ToCode, DateTime.Parse(toParam.FlyDate), toParam.CarrierCode)
);
Parallel.Invoke(
() => toParamAvhData = new IbeService(toParam).GetAvh(toParam.FromCode, toParam.ToCode, DateTime.Parse(toParam.FlyDate), toParam.CarrierCode),
() => toParamFdData = new IbeService(toParam).GetFD(toParam.FromCode, toParam.ToCode, DateTime.Parse(toParam.FlyDate), toParam.CarrierCode)
);
//补全数据
fromParamAvhData = BuQuanAVH(fromParamAvhData, fromParamFdData);
toParamAvhData = BuQuanAVH(toParamAvhData, toParamFdData);
result.Add(fromParamAvhData);
result.Add(toParamAvhData);
}
}
catch (Exception ex)
{
//记录日志
log.WriteLog("GetBasic", "异常信息:" + ex.Message + "\r\n");
}
return result;
}
/// <summary>
/// 补全数据
/// </summary>
/// <param name="avhData"></param>
/// <param name="fdData"></param>
/// <returns></returns>
public AVHData BuQuanAVH(AVHData avhData, FDData fdData)
{
try
{
if (avhData.IbeData.Count > 0 && fdData.FdRow.Count > 0)
{
// TestData test = new TestData();
List<AirplainType> listAirplainType = new List<AirplainType>();
try
{
//mgHelper.All<AirplainType>().ToList();//
listAirplainType = test.GetAirplainType();
}
catch (Exception)
{
listAirplainType = new List<AirplainType>();
}
//所有的baseCabin
List<BaseCabin> allBaseCabin = test.GetBaseCabin("");
decimal TaxFee = 0m;//机建费
for (int i = 0; i < avhData.IbeData.Count; i++)
{
//空舱位
if (avhData.IbeData[i].IBESeat == null || avhData.DicYSeatPrice == null)
{
continue;
}
//Y舱价格
if (!avhData.DicYSeatPrice.ContainsKey(avhData.IbeData[i].CarrierCode))
{
if (fdData.YFdRow.ContainsKey(avhData.IbeData[i].CarrierCode))
{
avhData.DicYSeatPrice.Add(avhData.IbeData[i].CarrierCode, fdData.YFdRow[avhData.IbeData[i].CarrierCode].SeatPrice);
}
}
//查找机建费
AirplainType airplainType = listAirplainType.Find(p => p.Code == avhData.IbeData[i].AirModel);
if (airplainType != null)
{
TaxFee = airplainType.TaxFee;
}
else
{
try
{
AirplainType _airplainType = new AirplainType()
{
Code = avhData.IbeData[i].AirModel,
TaxFee = 50m
};
//补全机型机建
//mgHelper.Add<AirplainType>();
if (!test.ExistAirplainType(_airplainType.Code))
{
test.ExecuteSQL(string.Format("insert into AirplainType(Code,TaxFee) values('{0}',{1})", _airplainType.Code, _airplainType.TaxFee));
}
}
catch (Exception)
{
}
}
for (int j = 0; j < avhData.IbeData[i].IBESeat.Count; j++)
{
FdRow fdRow = fdData.FdRow.Where(p => p.CarrierCode == avhData.IbeData[i].CarrierCode && p.Seat == avhData.IbeData[i].IBESeat[j].Seat).FirstOrDefault();
if (fdRow != null)
{
//燃油
avhData.IbeData[i].ADultFuleFee = fdRow.ADultFuleFee;
avhData.IbeData[i].ChildFuleFee = fdRow.ADultFuleFee;
//机建费 从数据库中读取 暂时假数据
if (TaxFee != 0)
{
avhData.IbeData[i].TaxFee = TaxFee;
}
//舱位价
avhData.IbeData[i].IBESeat[j].SeatPrice = fdRow.SeatPrice;
//折扣
avhData.IbeData[i].IBESeat[j].Rebate = fdRow.Rebate;
}
else
{
try
{
//从数据库中获取
//BaseCabin baseCabin = mgHelper.Query<BaseCabin>(p => p.CarrierCode == avhData.IbeData[i].CarrierCode && p.Code == avhData.IbeData[i].IBESeat[j].Seat).FirstOrDefault();
//List<BaseCabin> baseCabinList = test.GetBaseCabin(string.Format(" CarrierCode='{0}' and Code='{1}' ", avhData.IbeData[i].CarrierCode, avhData.IbeData[i].IBESeat[j].Seat));
List<BaseCabin> baseCabinList = allBaseCabin.Where(m => m.CarrierCode == avhData.IbeData[i].CarrierCode && m.Code == avhData.IbeData[i].IBESeat[j].Seat).ToList();
BaseCabin baseCabin = null;
if (baseCabinList != null && baseCabinList.Count > 0)
{
baseCabin = baseCabinList[0];
}
if (baseCabin != null && avhData.DicYSeatPrice.ContainsKey(avhData.IbeData[i].CarrierCode) && avhData.DicYSeatPrice[avhData.IbeData[i].CarrierCode] != 0m)
{
//折扣
avhData.IbeData[i].IBESeat[j].Rebate = baseCabin.Rebate;
//舱位价
avhData.IbeData[i].IBESeat[j].SeatPrice = dataBill.MinusCeilTen((baseCabin.Rebate / 100) * avhData.DicYSeatPrice[avhData.IbeData[i].CarrierCode]);
}
fdRow = fdData.FdRow.Where(p => p.ADultFuleFee != 0).FirstOrDefault();
//取这条航线的燃油 但不精确
avhData.IbeData[i].ADultFuleFee = fdRow.ADultFuleFee;
avhData.IbeData[i].ChildFuleFee = fdRow.ADultFuleFee;
//机建费 从数据库中读取 暂时假数据
avhData.IbeData[i].TaxFee = TaxFee;
}
catch (Exception)
{
}
}
}
}
}
}
catch (Exception ex)
{
//记录日志
log.WriteLog("BuQuanAVH", "异常信息:" + ex.Message + "\r\n");
}
return avhData;
}
public bool LogPnr(string UserName, string IP, string Port, string Office, string Pnr)
{
bool IsSuccess = false;
ThreadPool.QueueUserWorkItem(it =>
{
StringBuilder sbLog = new StringBuilder();
sbLog.Append("参数:IP=" + IP + "\r\n Port=" + Port + " \r\n Office=" + Office + "\r\n Pnr=" + Pnr + "\r\n");
PidService.PidServiceSoapClient Pid = new PidService.PidServiceSoapClient();
try
{
if (IP == "10.11.5.251")
{
IP = IP.Replace(IP, "mpb.51cbc.com");
}
IsSuccess = Pid.Flight_AddPNR(UserName, UserName, IP, Port, Pnr, Office, "查航班预订");
}
catch (Exception ex1)
{
try
{
//在记录一次
IsSuccess = Pid.Flight_AddPNR(UserName, UserName, IP, Port, Pnr, Office, "查航班预订");
}
catch (Exception ex)
{
sbLog.Append("异常信息:" + ex.Message + "\r\n");
//记录日志
log.WriteLog("LogPnr", sbLog.ToString());
}
}
});
return IsSuccess;
}
public CabinData GetBaseCabinUsePolicy(string CarrayCode)
{
string sqlWhere = string.Empty;
CabinData cabinData = new CabinData();
if (!string.IsNullOrEmpty(CarrayCode))
{
sqlWhere = string.Format("CarrierCode='{0}'", CarrayCode);
}
List<BaseCabin> BaseCabinList = test.GetBaseCabin(sqlWhere);
BaseCabinList.ForEach(p =>
{
if (!cabinData.CabinList.Exists(p1 => p1.Seat.ToUpper() == p.Code.ToUpper()))
{
cabinData.CabinList.Add(new CabinRow()
{
CarrayCode = p.CarrierCode,
Seat = p.Code,
Rebate = p.Rebate
});
}
});
List<CabinRow> CabinSeatList = test.GetCabinSeatListPolicy(sqlWhere);
CabinSeatList.ForEach(p =>
{
if (!cabinData.CabinList.Exists(p1 => p1.Seat.ToUpper() == p.Seat.ToUpper() && p1.CarrayCode.ToUpper() == p.CarrayCode.ToUpper()))
{
cabinData.CabinList.Add(p);
}
});
return cabinData;
}
private Policy PolicyCacheToPolicy(PolicyCache pc, EnumPolicySourceType PolicySourceType)
{
Policy p = new Policy();
p.PolicyId = pc.PolicyId;
p.CarryCode = pc.CarrierCode;
p.PolicySourceType = PolicySourceType;
p.Code = pc.PlatformCode;
p.Name = pc.PlatformCode;
p.PlatformCode = pc.PlatformCode;
p.OriginalPolicyPoint = pc.Point;
p.PaidPoint = pc.Point;
p.DownPoint = 0m;
p.PolicyPoint = pc.Point;
p.DeductionDetails = p.DeductionDetails == null ? new List<DeductionDetail>() : p.DeductionDetails;
return p;
}
}
}
|
namespace RealEstate.Models.UI
{
public static class Page
{
public const string Home = "Home";
public const string Property = "Property";
}
} |
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace CallCenter.Client.ViewModel.Helpers
{
public abstract class DependencyObject:INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void RaisePropertyChanged([CallerMemberName] string propertyName = null)
{
if (this.PropertyChanged != null)
this.PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}
|
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
namespace DataAccess
{
/// <summary>
/// SQL Server table.
/// </summary>
public class SQLTable : IDisposable
{
#region - Constants -
private const int DEFAULT_CMD_TIMEOUT = 1200; //-> 1200sec = 20 minutes
private const string DEFAULT_SCHEMA = "dbo";
#endregion
#region - Attributes (Protected) -
protected SQLDataBase sqlDB;
protected string schema, tableName;
protected DataTable dataTable;
#endregion
/// <summary>
/// Create instance of SQLTable and read definition from SQL Server.
/// </summary>
/// <param name="tableName"></param>
/// <param name="sqlDatabase"></param>
public SQLTable(string tableName, SQLDataBase sqlDB) : this(sqlDB, DEFAULT_SCHEMA, tableName) { }
/// <summary>
/// Create instance of SQLTable and read definition from SQL Server.
/// </summary>
/// <param name="tableName">Name of the table on SQL Server.</param>
/// <param name="tableName">Name of the schema.</param>
/// <param name="sqlDatabase">Destination SQLDatabase.</param>
public SQLTable(SQLDataBase sqlDB, string schema, string tableName, bool withKeyInfo = true)
{
// - Save arguments -
this.sqlDB = sqlDB;
this.schema = schema;
this.tableName = tableName;
// - Display warning as this new method could produce bugs -
System.Diagnostics.Debug.Print("Warning : GetEmptyResult method used !");
// - Get table definition -
this.dataTable = sqlDB.GetEmptyResult("SELECT * FROM {0}.{1}", schema, tableName);
//// - Read definition from SQL Server -
//this.ReadTableSchema();
}
/// <summary>
/// Create instance of SQLTable and use given System.Data.DataTable.
/// </summary>
/// <param name="tableName">Name of the table on SQL Server.</param>
/// <param name="dataTable">DataTable.</param>
/// <param name="sqlDB">Destination SQLDatabase.</param>
public SQLTable(string tableName, DataTable dataTable, SQLDataBase sqlDatabase)
{
this.schema = DEFAULT_SCHEMA;
this.tableName = tableName;
this.dataTable = dataTable;
this.sqlDB = sqlDatabase;
}
#region - INSERT INCOMPLET !!
//private void InsertTemp()
//{
// SqlConnection sqlConn;
// SqlCommand bcCMD, bapCMD;
// String cmdText;
// // - Open SQL Connection - (Will be closed only at the application end)
// sqlConn = sqlDatabase.GetNewOpenedConnection();
// // - Prepare BackupCustomer statement -
// cmdText = "INSERT INTO TD_BACKUP_CUSTOMER (CUSTOMER_ID, SALES_ORG, TERRITORY, SELECTED) VALUES (@CUSTOMER_ID, @SALES_ORG, @TERRITORY, @SELECTED)";
// bcCMD = new SqlCommand(cmdText, sqlConn);
// bcCMD.Parameters.Add("@CUSTOMER_ID", SqlDbType.VarChar, 10);
// bcCMD.Parameters.Add("@SALES_ORG", SqlDbType.VarChar, 4);
// bcCMD.Parameters.Add("@TERRITORY", SqlDbType.VarChar, 4);
// // - Prepare BackupActionPlan statement -
// cmdText = "INSERT INTO TD_BACKUP_ACTION_PLAN (CUSTOMER_ID, SALES_ORG, GOAL, CONTACT, HOW, WHO, [WHEN]) VALUES (@CUSTOMER_ID, @SALES_ORG, @GOAL, @HOW, @WHO, @[WHEN])";
// bcCMD = new SqlCommand(cmdText, sqlConn);
//}
#endregion
#region - Read TableSchema from SQL Server -
private void ReadTableSchema()
{
// - Declare temp object -
object objTmp;
// - Building SQL request (Table Schema) -
string sqlCmdStr = "SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE, CHARACTER_MAXIMUM_LENGTH, COLUMN_DEFAULT FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema ='{0}' AND table_name='{1}'";
sqlCmdStr = string.Format(sqlCmdStr, schema, tableName);
// Open connection:
SqlConnection sqlConn = sqlDB.GetNewConnection();
sqlConn.Open();
// New sql command:
SqlCommand sqlCmd = GetNewSqlCommand(sqlCmdStr, sqlConn);
// Init:
dataTable = new DataTable(tableName);
// Go:
SqlDataReader sRdr = sqlCmd.ExecuteReader();
while (sRdr.Read())
{
DataColumn dataColumn = new DataColumn();
dataColumn.ColumnName = (string)sRdr["COLUMN_NAME"];
dataColumn.DataType = TryGetType(sRdr["DATA_TYPE"]);
dataColumn.AllowDBNull = TryGetBoolYesNo(sRdr["IS_NULLABLE"]);
//dataColumn.MaxLength = DBNull.Value.Equals(sRdr["CHARACTER_MAXIMUM_LENGTH"]) ? -1 : (Int32)sRdr["CHARACTER_MAXIMUM_LENGTH"];
try
{
dataColumn.MaxLength = (Int32)sRdr["CHARACTER_MAXIMUM_LENGTH"];
}
catch (Exception) { }
// - Default value -
objTmp = sRdr["COLUMN_DEFAULT"];
if (objTmp != null && objTmp != DBNull.Value)
{
string defaultValue = objTmp.ToString();
// - Remove special char - Ex: ('0900')
defaultValue = defaultValue.Replace("(", string.Empty);
defaultValue = defaultValue.Replace(")", string.Empty);
if (defaultValue.Contains("'"))
defaultValue = defaultValue.Replace("'", string.Empty);
// - Set default value -
try
{
dataColumn.DefaultValue = defaultValue;
}
catch (Exception) { Console.WriteLine(string.Format("SQLTable - Unable to set column default value : {0}", objTmp)); }
}
// - Add row to table -
dataTable.Columns.Add(dataColumn);
}
// Close:
FreeMemory(sqlCmd, sRdr);
// Reading Primary Key Column name:
try
{
sqlCmdStr = "SELECT column_name FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE OBJECTPROPERTY(OBJECT_ID(constraint_name), 'IsPrimaryKey')=1 AND table_name='{0}' ORDER BY ORDINAL_POSITION";
sqlCmdStr = string.Format(sqlCmdStr, tableName);
sqlCmd = GetNewSqlCommand(sqlCmdStr, sqlCmd.Connection);
// Go:
List<DataColumn> pkList = new List<DataColumn>();
sRdr = sqlCmd.ExecuteReader();
while (sRdr.Read())
{
string columnName = (string)sRdr["column_name"];
pkList.Add(dataTable.Columns[columnName]);
}
dataTable.PrimaryKey = pkList.ToArray();
// - Free ressources -
pkList.Clear();
FreeMemory(sqlCmd, sRdr);
}
catch (Exception e)
{
Console.WriteLine("Primary Key: " + e.Message);
}
// Reading IDENTITY Column name:
try
{
sqlCmdStr = "SELECT column_name FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMNPROPERTY(OBJECT_ID(TABLE_NAME),COLUMN_NAME,'ISIdentity')=1 AND table_name='{0}'";
sqlCmdStr = string.Format(sqlCmdStr, tableName);
sqlCmd = GetNewSqlCommand(sqlCmdStr, sqlCmd.Connection);
// Go:
string identity = sqlCmd.ExecuteScalar() as string;
if (identity != null)
{
dataTable.Columns[identity].AutoIncrement = true;
dataTable.Columns[identity].AutoIncrementSeed = 1;
}
// Close:
FreeMemory(sqlCmd, sRdr);
}
catch (Exception e)
{
Console.WriteLine("IDENTITY Column: " + e.Message);
}
// - Free memory -
FreeMemory(sqlConn);
}
#endregion
#region - Properties -
public SQLDataBase SQLDataBaseLocal
{
get { return sqlDB; }
}
public DataTable DataTable
{
get { return dataTable; }
set { dataTable = value; }
}
public DataTable Table
{
get { return dataTable; }
set { dataTable = value; }
}
/// <summary>
/// Table name in SQL Server.
/// </summary>
public string TableName
{
get { return tableName; }
}
#endregion
#region - Disable PrimaryKey -
public void DisablePrimaryKey()
{
dataTable.PrimaryKey = new DataColumn[0];
}
#endregion
#region - Read data -
/// <summary>
/// Select all data from the table
/// </summary>
/// <returns>System.Data.DataTable that contains all data</returns>
public DataTable SelectAll()
{
return ReadAll();
}
public DataTable ReadAll()
{
// Reading Table Schema:
string sqlCmdStr = string.Format("SELECT * FROM {0}.{1}", schema, tableName);
// Open connection:
SqlConnection sqlConn = sqlDB.GetNewConnection();
sqlConn.Open();
// New sql command:
SqlCommand sqlCmd = GetNewSqlCommand(sqlCmdStr, sqlConn);
// Go:
SqlDataReader sRdr = sqlCmd.ExecuteReader();
Fill(sRdr);
// Close:
FreeMemory(sqlCmd, sRdr, sqlConn);
return dataTable;
}
public void Fill(SqlDataReader sRdr)
{
while (sRdr.Read())
{
try
{
DataRow dRow = dataTable.NewRow();
for (int i = 0; i < sRdr.FieldCount; i++)
dRow[i] = sRdr[i];
dataTable.Rows.Add(dRow);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
#endregion
#region - Truncate (Erase data) -
/// <summary>
/// Truncate table (All data erased, Auto-Increment reset, etc.)
/// </summary>
public void Truncate()
{
Truncate(sqlDB, schema, tableName);
}
public static void Truncate(SQLDataBase sqlDB, string tableName)
{
Truncate(sqlDB, DEFAULT_SCHEMA, tableName);
}
public static void Truncate(SQLDataBase sqlDB, string schema, string tableName)
{
sqlDB.ExecuteNonQuery("TRUNCATE TABLE {0}.{1}", schema, tableName);
}
//public Boolean EraseTable()
//{
// String sqlCmdStr; SqlConnection sqlConn; SqlCommand sqlCmd;
// try
// {
// sqlCmdStr = "TRUNCATE TABLE {0}";
// sqlCmdStr = String.Format(sqlCmdStr, tableName);
// // Open connection:
// sqlConn = sqlDB.GetNewConnection();
// sqlConn.Open();
// // New sql command:
// sqlCmd = GetNewSqlCommand(sqlCmdStr, sqlConn);
// sqlCmd.ExecuteNonQuery();
// // Close:
// FreeMemory(sqlCmd, sqlConn);
// return true;
// }
// catch (Exception e)
// {
// Console.WriteLine(e.Message);
// return false;
// }
//}
#endregion
#region - Import (From DataTable) -
/// <summary>
/// Import all rows of a DataTable
/// </summary>
/// <param name="srcTable"></param>
public void Import(DataTable srcTable)
{
for (int i = 0; i < srcTable.Rows.Count; i++)
{
dataTable.ImportRow(srcTable.Rows[i]);
}
}
#endregion
#region - Add row -
/// <summary>
/// Add row from values array.
/// </summary>
/// <param name="values">Array of values to insert into a new row.</param>
/// <returns></returns>
public DataRow AddRow(params object[] values)
{
// - Add row to the DataTable -
return dataTable.Rows.Add(values);
}
#endregion
#region - WriteToServer -
public bool WriteToServer()
{
return WriteToServer(tableName, dataTable);
}
public bool WriteToServer(DataTable dataTableArg)
{
return WriteToServer(dataTableArg.TableName, dataTableArg);
}
public bool WriteToServer(string tableNameArg, DataTable dataTableArg)
{
SqlConnection sqlConn; SqlBulkCopy sqlBulkCopy;
try
{
// Open connection:
sqlConn = sqlDB.GetNewOpenedConnection();
// - Init -
sqlBulkCopy = new SqlBulkCopy(sqlConn);
sqlBulkCopy.BulkCopyTimeout = 15 * 60; //-> 15 min !
sqlBulkCopy.DestinationTableName = tableNameArg;
sqlBulkCopy.BatchSize = dataTableArg.Rows.Count;
// - Run -
sqlBulkCopy.WriteToServer(dataTableArg);
// - Free memory -
sqlBulkCopy.Close();
sqlBulkCopy = null;
FreeMemory(sqlConn);
return true;
}
catch (Exception e)
{
Console.WriteLine("Bulk insert : {0}", e.Message);
return false;
}
}
#endregion
#region - WriteToServer (TableLock) -
/// <summary>
/// Copy all rows from DataTable to SQL Server table. Table is locked during the process.
/// </summary>
/// <returns>Return true in case of success in false in case of failure.</returns>
public bool WriteToServerTL(bool setUpdateDate = false)
{
return WriteToServerTL(tableName, dataTable, setUpdateDate);
}
private bool WriteToServerTL(string tableNameArg, DataTable dataTableArg, bool setUpdateDate = false)
{
// - Declare SqlBulkCopy -
SqlBulkCopy sqlBulkCopy = null;
try
{
// - Build SqlBulkCopy -
sqlBulkCopy = new SqlBulkCopy(sqlDB.ConnectionString, SqlBulkCopyOptions.TableLock);
sqlBulkCopy.BulkCopyTimeout = 15 * 60; //-> 15 min !
sqlBulkCopy.DestinationTableName = string.Format("{0}.{1}", schema, tableNameArg);
sqlBulkCopy.BatchSize = dataTableArg.Rows.Count;
// - Run -
sqlBulkCopy.WriteToServer(dataTableArg);
// - Set UpdateDate -
if (setUpdateDate == true)
{
SetUpdateDate();
}
// - Return true in case of success -
return true;
}
catch (Exception e)
{
// - Display error message -
Console.WriteLine("BulkCopy error : {0}" + e.Message);
// - Return false in case of error -
return false;
}
finally
{
// - Close SqlBulkCopy -
sqlBulkCopy?.Close();
}
}
#endregion
#region - Select (Formated) -
public DataRow[] Select(string filterExpression, params object[] argList)
{
return dataTable.Select(string.Format(filterExpression, argList));
}
#endregion
#region - Select List -
/// <summary>
/// Return a list instead of a row array (Memory)
/// </summary>
/// <param name="columnName"></param>
/// <param name="query"></param>
/// <param name="argList"></param>
/// <returns></returns>
public List<T> SelectList<T>(string columnName, string query, params object[] argList)
{
// - Initialize list -
List<T> list = new List<T>();
// - Select -
DataRow[] results = Select(query, argList);
// - Build list -
for (int i = 0; i < results.Length; i++)
list.Add((T)results[i][columnName]);
return list;
}
#endregion
#region - Find (Memory) -
/// <summary>
/// Return the row corresponding to the given key list (Memory)
/// </summary>
/// <param name="keyList"></param>
/// <returns></returns>
public DataRow Find(params object[] keyList)
{
return dataTable.Rows.Find(keyList);
}
#endregion
#region - Contains (Memory) -
/// <summary>
/// Check if there is a row corresponding to the given key list (Memory PK)
/// </summary>
/// <param name="keyList"></param>
/// <returns></returns>
public bool Contains(params object[] keyList)
{
return dataTable.Rows.Contains(keyList);
}
#endregion
#region - Contains (SQL) -
protected bool Contains(int sqlColID, int sapColID, DataRow sapRow) // String Primary Key only !
{
bool contains = true; int count; string sqlCmdStr, pkColumn, pkValue; SqlConnection sqlConn; SqlCommand sqlCmd;
try
{
pkColumn = dataTable.Columns[sqlColID].ColumnName;
pkValue = (string)sapRow[sapColID];
// Reading Table Schema:
sqlCmdStr = "SELECT COUNT(*) FROM {0} WHERE {1} = '{2}'";
sqlCmdStr = string.Format(sqlCmdStr, tableName, pkColumn, pkValue);
// Open connection:
sqlConn = sqlDB.GetNewConnection();
sqlConn.Open();
// New sql command:
sqlCmd = GetNewSqlCommand(sqlCmdStr, sqlConn);
count = (int)sqlCmd.ExecuteScalar();
if (count == 0)
contains = false;
else
contains = true;
// Close:
FreeMemory(sqlCmd, sqlConn);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
return contains;
}
protected bool ContainsObject(int sqlColID, int sapColID, DataRow sapRow)
{
bool contains = true; int count; string sqlCmdStr, pkColumn; SqlConnection sqlConn; SqlCommand sqlCmd;
object pkValue;
try
{
pkColumn = dataTable.Columns[sqlColID].ColumnName;
pkValue = sapRow[sapColID];
// Reading Table Schema:
sqlCmdStr = "SELECT COUNT(*) FROM {0} WHERE {1} = {2}";
sqlCmdStr = string.Format(sqlCmdStr, tableName, pkColumn, pkValue);
// Open connection:
sqlConn = sqlDB.GetNewConnection();
sqlConn.Open();
// New sql command:
sqlCmd = GetNewSqlCommand(sqlCmdStr, sqlConn);
count = (int)sqlCmd.ExecuteScalar();
if (count == 0)
contains = false;
// Close:
FreeMemory(sqlCmd, sqlConn);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
return contains;
}
#endregion
#region - Exists (SQL) -
/// <summary>
/// Check if a row match the WHERE criteria. (SQL Query / Include already the WHERE keyword)
/// </summary>
/// <param name="whereClause"></param>
/// <param name="args"></param>
/// <returns></returns>
public bool Exists(string whereClause, params object[] args)
{
return Exists(string.Format(whereClause, args));
}
/// <summary>
/// Check if a row match the WHERE criteria. (SQL Query / Include already the WHERE keyword)
/// </summary>
/// <param name="whereClause"></param>
/// <returns></returns>
public bool Exists(string whereClause)
{
return Exists(sqlDB, tableName, whereClause);
}
/// <summary>
/// Check if a row match the WHERE criteria. (SQL Query / Include already the WHERE keyword)
/// </summary>
/// <param name="anyDB"></param>
/// <param name="tableName"></param>
/// <param name="whereClause"></param>
/// <param name="args"></param>
/// <returns></returns>
public static bool Exists(SQLDataBase anyDB, string tableName, string whereClause, params object[] args)
{
return Exists(anyDB, tableName, string.Format(whereClause, args));
}
/// <summary>
/// Check if a row match the WHERE criteria. (SQL Query / Include already the WHERE keyword)
/// </summary>
/// <param name="anyDB"></param>
/// <param name="anyTableName"></param>
/// <param name="whereClause"></param>
/// <returns></returns>
public static bool Exists(SQLDataBase anyDB, string tableName, string whereClause)
{
// - Return true if at least 1 line meat the where criteria -
return (int)anyDB.ExecuteScalar(string.Format("SELECT CASE WHEN EXISTS (SELECT * FROM {0} WHERE {1}) THEN 1 ELSE 0 END", tableName, whereClause)) == 1;
}
#endregion
#region - SQL Function -
static public SqlCommand GetNewSqlCommand(string command, SqlConnection sqlConn)
{
SqlCommand cmd = new SqlCommand(command, sqlConn);
cmd.CommandTimeout = DEFAULT_CMD_TIMEOUT;
return cmd;
}
#endregion
#region - Dispose -
/// <summary>
/// Clear all data and call "DataTable.Dispose()" method (E2MKI)
/// </summary>
public void Dispose()
{
FreeMemory(dataTable);
// - Clear reference -
dataTable = null;
sqlDB = null;
tableName = null;
}
#endregion
#region - Static method Get DataTable -
public static DataTable GetDataTable(string tableName, SQLDataBase sqlDB)
{
SQLTable sqlTable = new SQLTable(tableName, sqlDB);
return sqlTable.ReadAll();
}
#endregion
#region - SetUpdateDate -
private void SetUpdateDate()
{
SetUpdateDate(sqlDB.Name, tableName, sqlDB);
}
static public void SetUpdateDate(string databaseNameToUpdate, string tableNameUpdated, SQLDataBase anySqlDB)
{
try
{
// - Init -
bool rowExist = false;
// - Init SQL Query -
string statement = "SELECT CASE WHEN EXISTS (SELECT * FROM [E2MKI-MasterData].dbo.TD_UpdateDate WHERE DatabaseName='{0}' AND TableName='{1}') THEN 1 ELSE 0 END";
statement = string.Format(statement, databaseNameToUpdate, tableNameUpdated);
// - Run SQL Query -
if ((int)anySqlDB.ExecuteScalar(statement) == 1)
rowExist = true;
// - If row exists Update else Insert -
if (rowExist == true)
statement = "UPDATE [E2MKI-MasterData].dbo.TD_UpdateDate SET UpdateDate=GETDATE() WHERE DatabaseName='{0}' AND TableName='{1}'";
else
statement = "INSERT INTO [E2MKI-MasterData].dbo.TD_UpdateDate (DatabaseName, TableName, UpdateDate) VALUES ('{0}', '{1}', GETDATE())";
// - Prepare statement -
statement = string.Format(statement, databaseNameToUpdate, tableNameUpdated);
// - Execute Statement -
anySqlDB.ExecuteNonQuery(statement);
}
catch (Exception e)
{
Console.WriteLine("Error during SetUpdateDate()\n{0}", e.Message);
}
}
#endregion
#region - Static method GetData -
static public bool TryGetBool(object data) // Boolean
{
return (bool)data;
}
static public bool TryGetBoolYesNo(object data) // Boolean YES/NO
{
if (data.Equals("YES"))
return true;
else
return false;
}
/// <summary>
/// Cast Object to Boolean (False returned if null or DBNULL)
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
static public bool TryGetBoolNoNull(object data) // Boolean
{
bool rBool;
if (data == null || DBNull.Value.Equals(data))
rBool = false;
else
rBool = (bool)data;
return rBool;
}
static public Int32 TryGetInt32(object data) // Int32
{
if (data != DBNull.Value)
return (Int32)data;
else
return -1;
}
static public string TryGetString(object data) // String
{
if (data == null || data.Equals(DBNull.Value))
return string.Empty;
else
return (string)data;
}
static public Int32 TryGetStringInt32(object data) // String to int32
{
int value = 0;
if (data != DBNull.Value)
{
string tempValue = TryGetString(data);
if (tempValue != string.Empty)
value = int.Parse(tempValue);
}
return value;
}
static public object TryGetDate(object data) // Date
{
if (data != DBNull.Value && (string)data != "#")
return data;
else
return DBNull.Value;
}
static public DateTime TryGetAccessDate(object data) // Date
{
return (DateTime)data;
}
static public string TryGetDateString(object data) // Date - String
{
if (data != DBNull.Value)
//return ((DateTime)data).ToShortDateString();
//return ((DateTime)data).ToLongDateString();
return string.Format("{0:dd/MM/yyyy}", data);
else
return null;
}
static public Type TryGetType(object data) // Type
{
return SQLType.GetType((string)data);
}
static public Single TryGetSingle(object data) // Single
{
Single single;
if (data != null && !data.Equals(""))
single = Single.Parse((string)data);
else
single = 0;
return single;
}
static public Single TryGetRealSingle(object data) // Single
{
Single single;
if (data != DBNull.Value)
single = (Single)data;
else
single = 0;
return single;
}
static public string TryGetSingleString(object data) // Single String
{
return ((Single)data).ToString();
}
static public Int32 TryGetSingleInt32(object data) // Single Int
{
if (data != DBNull.Value)
return int.Parse(TryGetSingle(data).ToString());
else
return 0;
}
// --- New TryGet ---
static public object TryGetStringDate(object data)
{
string dateStr = (string)data;
if (dateStr != null) dateStr.Trim();
if (data != DBNull.Value && dateStr != "#" && dateStr != string.Empty)
{
return dateStr.Replace(".", "/");
}
else
return DBNull.Value;
}
static public Int32 TryGetStringENInt32(object data) // String EN to int32
{
int value = 0;
if (data != DBNull.Value)
{
string tempValue = TryGetString(data);
if (tempValue != string.Empty)
value = int.Parse(tempValue.Replace(".", ""));
}
return value;
}
static public Single TryGetSingleEN(object data) // Single English
{
Single single;
if (data != null)
{
string tempValue = TryGetString(data);
single = Single.Parse(tempValue.Replace(".", ""));
}
else
single = 0;
return single;
}
#endregion
#region - Static method Close / FreeMemory -
/// <summary>
/// Clear all data and call "DataTable.Dispose()" method (E2MKI)
/// </summary>
/// <param name="dataTable"></param>
static public void FreeMemory(DataTable dataTable)
{
if (dataTable != null)
{
dataTable.Clear();
dataTable.Dispose();
dataTable = null;
}
}
static public void FreeMemory(SqlConnection sqlConn)
{
sqlConn.Close();
sqlConn.Dispose();
}
static public void FreeMemory(SqlCommand sqlCmd)
{
sqlCmd.Dispose();
}
static public void FreeMemory(SqlCommand sqlCmd, SqlDataReader sRdr)
{
sqlCmd.Dispose();
sRdr.Close();
sRdr.Dispose();
}
static public void FreeMemory(SqlCommand sqlCmd, SqlConnection sqlConn)
{
sqlCmd.Dispose();
sqlConn.Close();
sqlConn.Dispose();
}
static public void FreeMemory(SqlCommand sqlCmd, SqlDataReader sRdr, SqlConnection sqlConn)
{
sqlCmd.Dispose();
sRdr.Close();
sRdr.Dispose();
sqlConn.Close();
sqlConn.Dispose();
}
#endregion
}
}
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class StateChanger : MonoBehaviour
{
private Animator ufoAnim;
private Text textScaredTime;
private MusicPlayer musicPlayer;
private float timeRemaining = 0f;
public bool scaredState = false;
private bool deadState = false;
public bool recoverState = false;
// Start is called before the first frame update
void Start()
{
ufoAnim = GetComponent<Animator>();
textScaredTime = GameObject.Find("txtScaredTimer").GetComponent<Text>();
musicPlayer = GameObject.Find("BackgroundSource").GetComponent<MusicPlayer>();
}
// Update is called once per frame
void Update()
{
if (scaredState == true)
{
timeRemaining -= Time.deltaTime;
if (timeRemaining <= 0)
{
SetNormal();
} else if (timeRemaining <= 3)
{
SetRecover();
}
textScaredTime.text = "Scared Time Remaining: " + (int)timeRemaining;
} else if (deadState == true)
{
timeRemaining -= Time.deltaTime;
if (timeRemaining <= 0)
{
SetNormal();
}
}
}
public void SetScared()
{
ufoAnim.SetBool("Scared", true);
ufoAnim.SetBool("Normal", false);
ufoAnim.SetBool("Dead", false);
ufoAnim.SetBool("Recover", false);
timeRemaining = 10f;
scaredState = true;
textScaredTime.enabled = true;
musicPlayer.PlayScaredBackground();
}
public void SetDead()
{
ufoAnim.SetBool("Dead", true);
ufoAnim.SetBool("Scared", false);
ufoAnim.SetBool("Normal", false);
ufoAnim.SetBool("Recover", false);
timeRemaining = 5f;
deadState = true;
scaredState = false;
musicPlayer.PlayDeadBackground();
}
public void SetRecover()
{
ufoAnim.SetBool("Recover", true);
ufoAnim.SetBool("Dead", false);
ufoAnim.SetBool("Scared", false);
ufoAnim.SetBool("Normal", false);
}
public void SetNormal()
{
ufoAnim.SetBool("Normal", true);
ufoAnim.SetBool("Recover", false);
ufoAnim.SetBool("Scared", false);
ufoAnim.SetBool("Dead", false);
scaredState = false;
deadState = false;
timeRemaining = 0f;
textScaredTime.enabled = false;
musicPlayer.PlayNormalBackground();
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Diagnostics;
namespace LaplaceMethod
{
class LaplaceParallel
{
public double LeftBorder { get; set; }
public double RightBorder { get; set; }
public double TopBorder { get; set; }
public double BottomBorder { get; set; }
public double Step { get; set; }
public int[] XInterval { get; set; }
public int[] YInterval { get; set; }
public int Size { get; set; }
public Point[,] Matrix { get; set; }
public Point[,] DuplicatedMatrix { get; set; }
public double TotalTime { get; set; }
public int Iterations { get; set; }
public LaplaceParallel(
double leftBorder,
double topBorder,
double rightBorder,
double bottomBorder,
int[] xInterval,
int[] yInterval,
double step,
int iterations
)
{
Step = step;
XInterval = xInterval;
YInterval = yInterval;
Size = (int)(Math.Abs(XInterval[0]) + Math.Abs(YInterval[1]) / Step);
LeftBorder = leftBorder;
TopBorder = topBorder;
RightBorder = rightBorder;
BottomBorder = bottomBorder;
Matrix = new Point[Size + 1, Size + 1];
DuplicatedMatrix = new Point[Size + 1, Size + 1];
TotalTime = 0;
Iterations = iterations;
FillGrid(Matrix);
FillGrid(DuplicatedMatrix);
Run();
}
public void Reset()
{
Matrix = new Point[Size + 1, Size + 1];
DuplicatedMatrix = new Point[Size + 1, Size + 1];
FillGrid(Matrix);
FillGrid(DuplicatedMatrix);
}
public void FillGrid(Point[,] matrix)
{
double xValue = XInterval[0];
double yValue = YInterval[1];
double zValue = 0;
for (int i = 0; i <= Size; i++)
{
for (int j = 0; j <= Size; j++)
{
zValue = 0;
if (i == 0)
{
zValue = TopBorder;
}
else if (i == Size)
{
zValue = BottomBorder;
}
else if (j == 0)
{
zValue = LeftBorder;
}
else if (j == Size)
{
zValue = RightBorder;
}
matrix[i, j] = new Point(xValue, yValue, zValue);
xValue = Math.Round(xValue + Step, 5);
}
xValue = 0;
yValue = Math.Round(yValue - Step, 5);
}
}
public void Run()
{
Thread firstMatrixThread, secondMatrixThread;
Stopwatch sw = new Stopwatch();
TimeSpan ts;
for (var i = 0; i < Iterations; i++)
{
firstMatrixThread = new Thread(CalcFirstMatrix);
secondMatrixThread = new Thread(CalcSecondMatrix);
sw.Start();
firstMatrixThread.Start();
secondMatrixThread.Start();
firstMatrixThread.Join();
secondMatrixThread.Join();
AddMatrixes();
CalcFinalMatrix();
sw.Stop();
ts = sw.Elapsed;
TotalTime += ts.TotalMilliseconds;
sw.Reset();
}
TotalTime /= Iterations;
}
public void CalcFirstMatrix()
{
CalcInitialApproximation();
}
public void CalcSecondMatrix()
{
CalcInitialReverseApproximation();
}
public void AddMatrixes()
{
for (var i = 1; i < Size; i++)
{
for (var j = 1; j < Size; j++)
{
Matrix[i, j].Z = (Matrix[i, j].Z + DuplicatedMatrix[i, j].Z) / 2;
}
}
}
public void CalcFinalMatrix()
{
for (var i = 1; i < Size; i++)
{
for (var j = 1; j < Size; j++)
{
Matrix[i, j].Z = (Matrix[i, j - 1].Z + Matrix[i, j + 1].Z) / 2;
}
}
}
public void CalcInitialApproximation()
{
for (int i = 1; i < Size; i++)
{
for (int j = 1; j < Size; j++)
{
Matrix[i, j].Z = Math.Round((Matrix[i - 1, j - 1].Z + Matrix[i - 1, j].Z + Matrix[i, j - 1].Z) / 3, 5);
}
}
}
public void CalcInitialReverseApproximation()
{
for (int i = Size - 1; i >= 1; i--)
{
for (int j = Size - 1; j >= 1; j--)
{
DuplicatedMatrix[i, j].Z = Math.Round((DuplicatedMatrix[i + 1, j + 1].Z + DuplicatedMatrix[i + 1, j].Z + DuplicatedMatrix[i, j + 1].Z) / 3, 5);
}
}
}
}
}
|
// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using System.Collections.Generic;
using System.Threading.Tasks;
using Orleans;
namespace Squidex.Infrastructure.Orleans
{
public sealed class OrleansPubSubGrain : Grain, IPubSubGrain
{
private readonly List<IPubSubGrainObserver> subscriptions = new List<IPubSubGrainObserver>();
public Task PublishAsync(object message)
{
foreach (var subscription in subscriptions)
{
try
{
subscription.Handle(message);
}
catch
{
continue;
}
}
return Task.CompletedTask;
}
public Task SubscribeAsync(IPubSubGrainObserver observer)
{
subscriptions.Add(observer);
return Task.CompletedTask;
}
}
}
|
namespace FilmShow2.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class ManytoManyrelationshipbetweenusersandmovies : DbMigration
{
public override void Up()
{
DropForeignKey("dbo.Favorite", "ApplicationUser_Id", "dbo.AspNetUsers");
DropIndex("dbo.Favorite", new[] { "ApplicationUser_Id" });
CreateTable(
"dbo.UserMovie",
c => new
{
ApplicationUserRefId = c.String(nullable: false, maxLength: 128),
MovieRefId = c.Int(nullable: false),
})
.PrimaryKey(t => new { t.ApplicationUserRefId, t.MovieRefId })
.ForeignKey("dbo.AspNetUsers", t => t.ApplicationUserRefId, cascadeDelete: true)
.ForeignKey("dbo.Show", t => t.MovieRefId, cascadeDelete: true)
.Index(t => t.ApplicationUserRefId)
.Index(t => t.MovieRefId);
DropTable("dbo.Favorite");
}
public override void Down()
{
CreateTable(
"dbo.Favorite",
c => new
{
favoriteID = c.Int(nullable: false, identity: true),
movieID = c.Int(nullable: false),
ApplicationUser_Id = c.String(nullable: false, maxLength: 128),
})
.PrimaryKey(t => t.favoriteID);
DropForeignKey("dbo.UserMovie", "MovieRefId", "dbo.Show");
DropForeignKey("dbo.UserMovie", "ApplicationUserRefId", "dbo.AspNetUsers");
DropIndex("dbo.UserMovie", new[] { "MovieRefId" });
DropIndex("dbo.UserMovie", new[] { "ApplicationUserRefId" });
DropTable("dbo.UserMovie");
CreateIndex("dbo.Favorite", "ApplicationUser_Id");
AddForeignKey("dbo.Favorite", "ApplicationUser_Id", "dbo.AspNetUsers", "Id");
}
}
}
|
///
/// Copyright(c) Sweet MIT.All rights reserved.
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace Xamarin.Forms_Pages.Views
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class CarouselPageView : CarouselPage
{
public CarouselPageView()
{
InitializeComponent();
}
}
} |
using System;
using System.Collections.Generic;
using System.Text;
namespace Envision.MDM.Location.Infrastructure.Entity.POCO
{
public class PCompanyInfo
{
public int CompanyId { get; set; }
public string CompanyName { get; set; }
public string CAdd1 { get; set; }
public string CAdd2 { get; set; }
public string CCity { get; set; }
public string CPincode { get; set; }
public string CState { get; set; }
public string CCstNo { get; set; }
public string CGstNo { get; set; }
public string CTinNo { get; set; }
public string CPanNo { get; set; }
public string CPinNo { get; set; }
}
}
|
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using Kbg.NppPluginNET.PluginInfrastructure;
using NppFormatPlugin.DpTools;
namespace Kbg.NppPluginNET
{
class Main
{
#region Members
internal const string PluginName = "DP Formatter";
static string iniFilePath = null;
static bool someSetting = false;
// Id of the format menu item
protected static int menuId_Format = 0;
// Id of the seperator menu item
protected static int menuId_MenuSeparator = 1;
// Id of the About menu item
protected static int menuId_ShowAboutWindow = 2;
// Holds the reference to the current Scintilla
protected static ScintillaGateway scintillaGateway = new ScintillaGateway(PluginBase.GetCurrentScintilla());
// Holds the reference of the DpTools class that hat the formatting functionality
protected static DpTools m_DpFormatter = null;
#endregion
public static void OnNotification(ScNotification notification)
{
// This method is invoked whenever something is happening in notepad++
// use eg. as
// if (notification.Header.Code == (uint)NppMsg.NPPN_xxx)
// { ... }
// or
//
// if (notification.Header.Code == (uint)SciMsg.SCNxxx)
// { ... }
}
internal static void CommandMenuInit()
{
StringBuilder sbIniFilePath = new StringBuilder(Win32.MAX_PATH);
Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_GETPLUGINSCONFIGDIR, Win32.MAX_PATH, sbIniFilePath);
iniFilePath = sbIniFilePath.ToString();
if (!Directory.Exists(iniFilePath)) Directory.CreateDirectory(iniFilePath);
iniFilePath = Path.Combine(iniFilePath, PluginName + ".ini");
someSetting = (Win32.GetPrivateProfileInt("SomeSection", "SomeKey", 0, iniFilePath) != 0);
// Here we build the menu of our plugin
PluginBase.SetCommand(menuId_Format, "Format", FormatMessages, new ShortcutKey(true, false, false, Keys.F12));
PluginBase.SetCommand(menuId_MenuSeparator, "-", null);
PluginBase.SetCommand(menuId_ShowAboutWindow, "About", ShowAboutWindow);
}
/// <summary>
/// Provides the icons in the Notepad++ toolbar
/// </summary>
internal static void SetToolBarIcon()
{
// Icon for the print button
toolbarIcons tbIcons = new toolbarIcons()
{
// Get the handle from the Format resource object
hToolbarBmp = NppFormatPlugin.Properties.Resources.Format.GetHbitmap()
};
// Allocate the resources in the none .NET world of Notepad++
IntPtr pTbIcons = Marshal.AllocHGlobal(Marshal.SizeOf(tbIcons));
Marshal.StructureToPtr(tbIcons, pTbIcons, false);
// Send a system message to Npp to set add a toolbar icon.
Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_ADDTOOLBARICON, PluginBase._funcItems.Items[menuId_Format]._cmdID, pTbIcons);
Marshal.FreeHGlobal(pTbIcons);
}
internal static void PluginCleanUp()
{
Win32.WritePrivateProfileString("SomeSection", "SomeKey", someSetting ? "1" : "0", iniFilePath);
}
/// <summary>
/// Returns the text content of the selected tab
/// </summary>
/// <returns>Content of the selected tab</returns>
static string GetCurrentTabText()
{
// Handle zum Scintilla was der word editor control in Notepad++ ist
IntPtr hCurrentEditView = PluginBase.GetCurrentScintilla();
// Laenge des Texts in den current edit view lesen
int currentTabTextLength = (int)Win32.SendMessage(hCurrentEditView, SciMsg.SCI_GETLENGTH, 0, 0) + 1;
Debug.WriteLine("CurrentEditView groesse = " + currentTabTextLength.ToString());
IntPtr currentTextPtr = IntPtr.Zero;
string contentString;
// speicher reservieren fuer den Text
try
{
currentTextPtr = Marshal.AllocHGlobal(currentTabTextLength);
// Text aus den current Tab lesen
Win32.SendMessage(hCurrentEditView, SciMsg.SCI_GETTEXT, currentTabTextLength, currentTextPtr);
// von Umanaged zu managed casten
contentString = Marshal.PtrToStringAnsi(currentTextPtr);
}
finally
{
// jetzt kann der unmanged text freigegeben werden
Marshal.FreeHGlobal(currentTextPtr);
}
return contentString;
}
internal static void FormatMessages()
{
try
{
string currentTabContent = GetCurrentTabText();
if (currentTabContent.Length < 4)
{
// The shortest DP message is <a:> four characters long
return;
}
if (m_DpFormatter == null)
{
m_DpFormatter = new DpTools(currentTabContent);
}
else
{
m_DpFormatter.Load(currentTabContent);
}
string formattedString = m_DpFormatter.Format();
// Text im current Tab setzen
scintillaGateway.SetText(formattedString);
}
catch (Exception ex)
{
// Make sure that Notepad++ does not go down in case of exceptions.
}
}
internal static void ShowAboutWindow()
{
try
{
NppFormatPlugin.Forms.frmAboutDPDHL aboutForm = new NppFormatPlugin.Forms.frmAboutDPDHL();
aboutForm.ShowDialog();
}
catch (Exception ex)
{
// Make sure that Notepad++ does not go down in case of exceptions.
}
}
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.