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


C# Classes类代码示例

本文整理汇总了C#中Classes的典型用法代码示例。如果您正苦于以下问题:C# Classes类的具体用法?C# Classes怎么用?C# Classes使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Classes类属于命名空间,在下文中一共展示了Classes类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UnregisterEventForMessage

 /// <summary>
 /// <para>Disable the specified <paramref name="messageID"/> for being processed and forwared</para>
 /// </summary>
 /// <param name="messageID"></param>
 public void UnregisterEventForMessage(Classes.System.WindowsMessages messageID)
 {
     _lock.AcquireWriterLock(Timeout.Infinite);
     if (_messageSet.ContainsKey((int)messageID) && _messageSet[(int)messageID] > 1)
         _messageSet[(int)messageID]--;
     _lock.ReleaseWriterLock();
 }
开发者ID:Jonny007-MKD,项目名称:Trigger4Win,代码行数:11,代码来源:Main.Win32Window.cs

示例2: Scoreboard

 public Scoreboard(string guidFromMain = "", Classes.CustomSnapshotRoot root = null)
 {
     guid = guidFromMain;
     Classes.Logger.addLog("Opened scoreboard on server -> " + guid);
     InitializeComponent();
     if(root != null)
     {
         Classes.ScoreboardRenderer render = new Classes.ScoreboardRenderer(this, root.snapshot.mapId, root);
         Classes.Logger.addLog("Enabled initial render: ");
     }
     else
     {
         _timer = new System.Timers.Timer(3000);
         _timer.Elapsed += new ElapsedEventHandler(_timer_Elapsed);
         _timer.Enabled = true; // Enable it
         _timer_Elapsed(this, null);
     }
     if(MainWindow.keeperSettings.ScoreboardBackgrounds == false)
     {
         BackgroundAnimation.Stop();
         BackgroundAnimation.Visibility = Visibility.Hidden;
     }
     else
     {
         BackgroundAnimation.Play();
     }
 }
开发者ID:xHeinrich,项目名称:keeperScoreboard,代码行数:27,代码来源:Scoreboard.xaml.cs

示例3: Character

        //Konstruktor
        public Character(string charName, Classes className, int level, Animation standardAnimation, Animation attackAnimation, Animation deathAnimation)
        {
            this.Name = charName;
            this.Class = className;
            this.Level = level;
            this.SetInitiative();

            this.ChangeAttributes(AttributesHelperClass.SetAttributes());

            for (int i = Level; i > 0; i--)
            {
                this.ChangeAttributes(AttributesHelperClass.LevelUpAttributes(this.Class));
            }

            this.SetFightAttributes();

            this.Skills = new List<Skill>();
            this.Statuseffects = new List<IStatuseffect>();

            if (standardAnimation != null && attackAnimation != null && deathAnimation != null)
            {
                this.StandardAnimation = standardAnimation;
                this.AttackAnimation = attackAnimation;
                this.DeathAnimation = deathAnimation;
            }
            else
            {
                StandardAnimation = LoadContentHelper.PlaceHolderForStatics;
                AttackAnimation = LoadContentHelper.PlaceHolderForStatics;
                DeathAnimation = LoadContentHelper.PlaceHolderForStatics;
            }
            LoadSkillHelperClass.AddStandardSkills(this);
            this.IsMindBlown = false;
        }
开发者ID:DerSpecht,项目名称:Good-Feel-Inc,代码行数:35,代码来源:Character.cs

示例4: serialize

 static void serialize(Classes.Character.Player playerToSerialize, string fileName)
 {
     IFormatter formatter = new BinaryFormatter();
     Stream stream = new FileStream(fileName, FileMode.Create, FileAccess.Write, FileShare.None);
     formatter.Serialize(stream, playerToSerialize);
     stream.Close();
 }
开发者ID:Josh-Russell,项目名称:HDATE,代码行数:7,代码来源:Saving.cs

示例5: ApproveApplication

        private void ApproveApplication(Classes.WorkflowApplicationResponse ApplicationInfo)
        {
            try
            {
                this.textBox1.Text = string.Format("{0}\r\n{1}\r\n{2}", "Approval Message", ApplicationInfo.application, this.textBox1.Text);

                string _user = ApplicationInfo.user.Replace("//", @"\");
                this.textBox1.Text = string.Format("{0}\r\n{1}\r\n{2}", "Querying SF for app", ApplicationInfo.application, this.textBox1.Text);
                var _applicationSubscription = _store.GetSubscriptionInfo(_user, ApplicationInfo.application);
                if (_applicationSubscription != null)
                {
                    this.textBox1.Text = string.Format("{0}\r\n{1}\r\n{2}", "Subscription is not null", ApplicationInfo.application, this.textBox1.Text);
                    this.textBox1.Text = string.Format("{0}\r\n{1}\r\n{2}", "Found app", ApplicationInfo.application, this.textBox1.Text);
                    this.textBox1.Text = string.Format("{0}\r\n{1}\r\n{2}", "Updating app status", ApplicationInfo.application, this.textBox1.Text);
                    _applicationSubscription.Status = SubscriptionStatus.subscribed;
                    this.textBox1.Text = string.Format("{0}\r\n{1}\r\n{2}", "Saving status", ApplicationInfo.application, this.textBox1.Text);
                    _store.SetSubscriptionInfo(_applicationSubscription);
                    _store.SaveChanges();
                }
            }
            catch(Exception e)
            {
                this.textBox1.Text = string.Format("{0}\r\n{1}", "Error", e.Message);
            }
        }
开发者ID:citrix,项目名称:Citrix-Storefront-ApprovalMonitoring,代码行数:25,代码来源:Form1.cs

示例6: Enemy

 public Enemy(string charName, Classes className, int level, GUIElement staticEnemy, Animation standardAnimation, Animation attackAnimation, Animation deathAnimation, bool isAnimated)
     : base(charName, className, level, standardAnimation, attackAnimation, deathAnimation)
 {
     this.isAnimated = isAnimated;
     this.StaticEnemy = staticEnemy;
     LoadSkillHelperClass.AddSkillsForEnemy(this);
 }
开发者ID:DerSpecht,项目名称:Good-Feel-Inc,代码行数:7,代码来源:Enemy.cs

示例7: PageMarks

        public PageMarks(Classes.Standard standard)
        {
            this.standard= standard;

            InitializeComponent();
            init();
        }
开发者ID:aarsee,项目名称:Marksheet-Application,代码行数:7,代码来源:PageMarks.xaml.cs

示例8: LevelUpAttributes

        //Gibt die Änderung der Festwerte der spezifischen Klasse bei Level Up zurück
        public static List<int> LevelUpAttributes(Classes charClass)
        {
            if (charClass.Equals(Classes.Warrior))
            {
                return new List<int>() { 200, 5, 80, 40, 30, 1, 3 };
            }

            if (charClass.Equals(Classes.DamageDealer))
            {
                return new List<int>() { 200, 0, 80, 80, 15, 1, 6 };
            }

            if (charClass.Equals(Classes.Coloss))
            {
                return new List<int>() { 400, 0, 40, 40, 30, 2, 3 };
            }

            if (charClass.Equals(Classes.Patron))
            {
                return new List<int>() { 200, 5, 40, 80, 15, 2, 3 };
            }

            if (charClass.Equals(Classes.Harasser))
            {
                return new List<int>() { 400, 5, 40, 80, 15, 1, 3 };
            }
            else
            {
                return new List<int>() { 0,0,0,0,0,0,0 };
            }
        }
开发者ID:DerSpecht,项目名称:Good-Feel-Inc,代码行数:32,代码来源:AttributesHelperClass.cs

示例9: EntryPoint

        static void EntryPoint()
        {
            // Класс - это лишь шаблон, свой тип данных
            // Программы манипулируют именно объектами

            // Создав класс, вы можете объявлять переменную этого типа так же, как и уже знакомых вам int, string
            Classes classInstance;

            // Точно так же вы можете объявить массив экземпляров вашего класса
            Classes[] classInstances;

            // Это только объявление. Инициализация таких переменных отличается от int, string, etc
            // Инициализация происходит с помощью ключевого слова new и вызова конструктора
            classInstance = new Classes(0);
            classInstances = new Classes[10]; // не путайте создание массива
            classInstances[0] = new Classes(10); // и создание объекта

            // После объявления вы можете пользоваться публичными элементами класса: полями, методами, свойствами
            string methodResult = classInstance.MakeSomething(42);
            int propertyValue = classInstance.ClassProperty;
            classInstance.ClassProperty = 24;

            // int fieldValue = classInstance._classField; - вызовет ошибку компиляции
            // Т.к. _classField объявлен private;
        }
开发者ID:holymosh,项目名称:Lesson2,代码行数:25,代码来源:ClassUsage.cs

示例10: Configuration

        public Configuration(BaseClass home)
        {
            Class = new Classes(this);
            Class.DeclareClasses(home);

            Class.Set.Title = new List<string>();
            Class.Set.Data = new List<string>();
        }
开发者ID:Nefylem,项目名称:consoleXstream,代码行数:8,代码来源:Configuration.cs

示例11: UpdateOne

 public void UpdateOne(Classes classe)
 {
     TPDataBaseEntities context = new TPDataBaseEntities();
     Classes dbClasse = context.Classes.Find(classe.Id);
     dbClasse.Libelle = classe.Libelle;
     dbClasse.Annee = classe.Annee;
     context.SaveChanges();
 }
开发者ID:fmartinez31,项目名称:VaeliaTP,代码行数:8,代码来源:ClasseRepository.cs

示例12: ViewRelationProperies_Form

 public ViewRelationProperies_Form(Classes.Relation r)
 {
     InitializeComponent();
     this.r = r;
     checkBox1.Checked = r.isFinal();
     if (r.isFinal())
         textBox1.Text = r.Specialization_Char.ToString();
 }
开发者ID:NARF-V,项目名称:controlPrg,代码行数:8,代码来源:ViewRelationProperies_Form.cs

示例13: CreateAction

 public static int CreateAction(Classes.MSrvType.ActionType ActionType, int TicketId, string ActionComment)
 {
     int MSrv_TicketActionId = (int)adpAction.NewId();
     DateTime ServerDatetime = Classes.Managers.DataManager.defaultInstance.ServerDateTime;
     adpAction.Insert(MSrv_TicketActionId, (int)ActionType, TicketId, ServerDatetime, ActionComment, Managers.UserManager.defaultInstance.User.UserId
         , ServerDatetime, Convert.ToInt16(Managers.UserManager.defaultInstance.User.MSrvDepartmentId));
     return MSrv_TicketActionId;
 }
开发者ID:EgyFalseX-Nestle,项目名称:NICSQLTools,代码行数:8,代码来源:MSrv.cs

示例14: FantasyNameSettings

 public FantasyNameSettings(Classes chosenclass, Race race, bool includeHomeland, bool includePostfix, Gender gender)
 {
     ChosenClass = chosenclass;
     ChosenRace = race;
     IncludeHomeland = includeHomeland;
     IncludePostfix = includePostfix;
     Gender = gender;
 }
开发者ID:knunery,项目名称:FantasyNameGenerator,代码行数:8,代码来源:FantasyNameSettings.cs

示例15: RegisterEventForMessage

 /// <summary>
 /// <para>Enable the specified <paramref name="messageID"/> for being processed and forwared</para>
 /// </summary>
 /// <param name="messageID"></param>
 public void RegisterEventForMessage(Classes.System.WindowsMessages messageID)
 {
     _lock.AcquireWriterLock(Timeout.Infinite);
     if (!_messageSet.ContainsKey((int)messageID))
         _messageSet.Add((int)messageID, 1);
     else
         _messageSet[(int)messageID]++;
     _lock.ReleaseWriterLock();
 }
开发者ID:Jonny007-MKD,项目名称:Trigger4Win,代码行数:13,代码来源:Main.Win32Window.cs


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