本文整理汇总了C#中Logic类的典型用法代码示例。如果您正苦于以下问题:C# Logic类的具体用法?C# Logic怎么用?C# Logic使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Logic类属于命名空间,在下文中一共展示了Logic类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ItemIcon
public ItemIcon(UIElement parent, Vector2 position, Logic.ICollectible item)
: base(parent, position, new Vector2(32, 32), item != null ? item.Texture : null)
{
oldPos = position;
_item = item;
backgroundPanel = new Panel(this, new Vector2(-2, -2), new Vector2(40, 40), Content.ContentInterface.LoadTexture("UITest"));
}
示例2: HomeMovieItem
public HomeMovieItem(Logic.Models.Movie movie)
{
this.Image = new BitmapImage(new Uri(movie.MediumCoverImage));
this.Name = movie.Title;
this.Year = movie.Year;
this.Id = movie.Id;
}
示例3: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (Session["username"] == null)
{
Response.Redirect("~/Login.aspx");
}
else
{
if (!Page.IsPostBack)
{
Logic lo = new Logic();
Label lb = Page.Master.FindControl("lbTitle") as Label;
lb.Text = "Welcome, to Task Manager Web App";
lb.ForeColor = Color.Black;
Label user = Page.Master.FindControl("lbUsername") as Label;
string u = Session["username"].ToString();
Person pp = lo.GetPerson(u);
user.Text = pp.Username;
int pend, complete, total;
TaskManagerModelContainer db = new TaskManagerModelContainer();
pend = lo.GetAllPendingTasks(pp.Id).Count;
complete = lo.GetAllCompletedTasks(pp.Id).Count;
total = lo.GetAllTasks(pp.Id).Count;
Label1.Text = pend.ToString() + " Task(s) Pending";
Label2.Text = complete.ToString() + " Task(s) Completed";
Label3.Text = total.ToString() + " Task(s) in Total";
}
}
}
示例4: Program
public Program()
{
mServiceManager = new ServiceManager();
mDeviceManager = new DeviceManager();
string path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\Automation";
Settings settings = new Settings(path, "settings.xml");
var config = settings.GetConfig();
if (config.ContainsKey("port"))
mPort = UInt16.Parse(config["port"]);
CreateSystemService();
// Create services
var serviceConfigs = settings.GetServiceConfigs();
CreateServices(serviceConfigs);
// Create devices
var deviceConfigs = settings.GetDeviceConfigs();
CreateDevices(deviceConfigs);
Log.Info("Number of services: " + mServiceManager.Services.Count);
Log.Info("Number of devices: " + mDeviceManager.Devices.Count);
mLogic = new Logic(mDeviceManager, mServiceManager);
InitSpeechCommands();
// createStatusWindow
startWebEndpoint();
StartUIThread();
}
示例5: Initialize
internal void Initialize(Logic.Networking.NikseWebServiceSession _networkSession)
{
textBoxSessionKey.Text = _networkSession.SessionId;
textBoxUserName.Text = _networkSession.CurrentUser.UserName;
textBoxWebServiceUrl.Text = _networkSession.WebServiceUrl;
textBoxLog.Text = _networkSession.GetLog();
}
示例6: Spel
public Spel(Logic.Spel logicSpel, IView game, Dictionary<Logic.Speler, ISpeler> spelers)
{
_logicSpel = logicSpel;
_random = _logicSpel.Random;
_game = game;
_spelers = spelers;
}
示例7: UpdateInfo
public static void UpdateInfo(Logic.Player player)
{
if (!_clientInfos.ContainsKey(player.Name))
_clientInfos.Add(player.Name, new ClientInfo(player));
else
_clientInfos[player.Name].UpdateInfo(player);
}
示例8: ProcessStopContentDialog
public ProcessStopContentDialog(MainPage mainPage, Logic logic)
{
this.mainPage = mainPage;
this.logic = logic;
this.InitializeComponent();
}
示例9: GoalLogic
public GoalLogic(Data.GoalRepo goalRepository, Data.DimensionRepo dimensionRepo, Logic.TeamLogic teamLogic, System.Security.Principal.IPrincipal principal)
: base(principal)
{
_goalRepository = goalRepository;
_teamLogic = teamLogic;
_dimensionRepo = dimensionRepo;
}
示例10: Move
public void Move(Logic.EventArgs args)
{
//TODO ADD MOVE LOGIC
MoveButtonPressedEventArgs inargs = (MoveButtonPressedEventArgs)args;
MoveEventArgs eventargs = new MoveEventArgs ();
LogicRunner<Events>.GetInstance ().TriggerEvent (Events.PlayerMove, eventargs);
}
示例11: Load
public void Load()
{
try
{
TaskManagerModelContainer db = new TaskManagerModelContainer();
Logic lo = new Logic();
Pendin p = new Pendin();
List<Taskk> ts = lo.GetAllTasks(1);
List<Pendin> pen = new List<Pendin>();
List<string> fr = new List<string>();
for (int i = 0; i < ts.Count; i++)
{
fr.Add(ts[i].Title);
}
drpTitles.DataSource = fr;
drpTitles.DataBind();
}
catch
{
Label lb = new Label();
lb.Text = "Loading Failed. Please Try Again";
Panel1.CssClass = "divError";
icon.CssClass = "img";
icon.ImageUrl = "~/assets/icons/error3.png";
icon.Visible = true;
PlaceHolder1.Controls.Add(lb);
}
}
示例12: Singleton
public static Logic Singleton()
{
if(_singleton == null)
_singleton = Transform.FindObjectOfType<Logic>();
return _singleton;
}
示例13: Initialize
internal void Initialize(Logic.OCR.NOcrDb _nOcrDb)
{
if (_nOcrDb != null)
{
}
}
示例14: Initialize
internal void Initialize(Logic.Subtitle subtitle, int firstSelectedIndex)
{
StringBuilder sb = new StringBuilder();
foreach (Paragraph p in subtitle.Paragraphs)
sb.AppendLine(p.Text);
string watermark = ReadWaterMark(sb.ToString().Trim());
LabelWatermark.Text = string.Format("Watermark: {0}", watermark);
if (watermark.Length == 0)
{
buttonRemove.Enabled = false;
textBoxWatermark.Focus();
}
else
{
groupBoxGenerate.Enabled = false;
buttonOK.Focus();
}
_firstSelectedIndex = firstSelectedIndex;
Paragraph current = subtitle.GetParagraphOrDefault(_firstSelectedIndex);
if (current != null)
radioButtonCurrentLine.Text = radioButtonCurrentLine.Text + " " + current.Text.Replace(Environment.NewLine, Configuration.Settings.General.ListViewLineSeparatorString);
else
radioButtonCurrentLine.Enabled = false;
}
示例15: Initialize
internal void Initialize(Logic.Subtitle subtitle, string fileName)
{
_subtitle = subtitle;
_fileName = fileName;
textBoxText.ReadOnly = true;
comboBoxTimeCodeSeperator.SelectedIndex = 0;
GeneratePreview();
comboBoxEncoding.Items.Clear();
int encodingSelectedIndex = 0;
comboBoxEncoding.Items.Add(Encoding.UTF8.EncodingName);
foreach (EncodingInfo ei in Encoding.GetEncodings())
{
if (ei.Name != Encoding.UTF8.BodyName)
{
if (ei.Name != Encoding.UTF8.BodyName && ei.CodePage >= 949 && !ei.DisplayName.Contains("EBCDIC") && ei.CodePage != 1047)
{
comboBoxEncoding.Items.Add(ei.CodePage + ": " + ei.DisplayName);
if (ei.Name == Configuration.Settings.General.DefaultEncoding)
encodingSelectedIndex = comboBoxEncoding.Items.Count - 1;
}
}
}
comboBoxEncoding.SelectedIndex = encodingSelectedIndex;
}