本文整理汇总了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();
}
示例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();
}
}
示例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;
}
示例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();
}
示例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);
}
}
示例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);
}
示例7: PageMarks
public PageMarks(Classes.Standard standard)
{
this.standard= standard;
InitializeComponent();
init();
}
示例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 };
}
}
示例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;
}
示例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>();
}
示例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();
}
示例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();
}
示例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;
}
示例14: FantasyNameSettings
public FantasyNameSettings(Classes chosenclass, Race race, bool includeHomeland, bool includePostfix, Gender gender)
{
ChosenClass = chosenclass;
ChosenRace = race;
IncludeHomeland = includeHomeland;
IncludePostfix = includePostfix;
Gender = gender;
}
示例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();
}