当前位置: 首页>>代码示例>>C#>>正文


C# Logic类代码示例

本文整理汇总了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"));
 }
开发者ID:MyEyes,项目名称:Igorr,代码行数:7,代码来源:ItemIcon.cs

示例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;
 }
开发者ID:nguyenkien,项目名称:DirectTorrent,代码行数:7,代码来源:HomeMovieItem.cs

示例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";
            }
        }
    }
开发者ID:imostom,项目名称:TaskManager,代码行数:33,代码来源:Default.aspx.cs

示例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();
        }
开发者ID:Necat0r,项目名称:Automation,代码行数:35,代码来源:Program.cs

示例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();
 }
开发者ID:leeyikkong,项目名称:testing,代码行数:7,代码来源:NetworkLogAndInfo.cs

示例6: Spel

        public Spel(Logic.Spel logicSpel, IView game, Dictionary<Logic.Speler, ISpeler> spelers)
        {
            _logicSpel = logicSpel;
            _random = _logicSpel.Random;
            _game = game;
            _spelers = spelers;
	    }
开发者ID:Roconda,项目名称:Barricade,代码行数:7,代码来源:Spel.cs

示例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);
 }
开发者ID:MyEyes,项目名称:Igorr,代码行数:7,代码来源:ClientInfo.cs

示例8: ProcessStopContentDialog

        public ProcessStopContentDialog(MainPage mainPage, Logic logic)
        {
            this.mainPage = mainPage;
            this.logic = logic;

            this.InitializeComponent();
        }
开发者ID:s114898,项目名称:TSS_program,代码行数:7,代码来源:ProcessStopContentDialog.xaml.cs

示例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;
 }
开发者ID:SBGLevelUpToolkit,项目名称:continuum-api,代码行数:7,代码来源:GoalLogic.cs

示例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);
 }
开发者ID:sudocoders,项目名称:PandemicAnimalWarfare,代码行数:7,代码来源:Player.cs

示例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);
        }
    }
开发者ID:imostom,项目名称:TaskManager,代码行数:29,代码来源:DeleteTask.aspx.cs

示例12: Singleton

    public static Logic Singleton()
    {
        if(_singleton == null)
            _singleton = Transform.FindObjectOfType<Logic>();

        return _singleton;
    }
开发者ID:kostya05,项目名称:RunGame,代码行数:7,代码来源:Logic.cs

示例13: Initialize

        internal void Initialize(Logic.OCR.NOcrDb _nOcrDb)
        {
            if (_nOcrDb != null)
            {

            }
        }
开发者ID:nguansak,项目名称:subtitleedit,代码行数:7,代码来源:VobSubNOcrTrain.cs

示例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;
        }
开发者ID:radinamatic,项目名称:subtitleedit,代码行数:26,代码来源:Watermark.cs

示例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;
        }
开发者ID:IlgnerBri,项目名称:subtitleedit,代码行数:25,代码来源:ExportText.cs


注:本文中的Logic类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。