本文整理汇总了C#中Statuses类的典型用法代码示例。如果您正苦于以下问题:C# Statuses类的具体用法?C# Statuses怎么用?C# Statuses使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Statuses类属于命名空间,在下文中一共展示了Statuses类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: setBindings
private void setBindings()
{
TypesofAgreement typesofAgreement = new TypesofAgreement();
Binding binding1 = new Binding();
binding1.Source = typesofAgreement;
cboTypeofAgreement.SetBinding(ListBox.ItemsSourceProperty, binding1);
Statuses statuses = new Statuses();
Binding binding2 = new Binding();
binding2.Source = statuses;
cboStatus.SetBinding(ListBox.ItemsSourceProperty, binding2);
UIDepartments departments = new UIDepartments();
Binding binding3 = new Binding();
binding3.Source = departments;
cboUIDepartment.SetBinding(ListBox.ItemsSourceProperty, binding3);
ReimbursementPeriods reimbursementPeriods = new ReimbursementPeriods();
Binding binding4 = new Binding();
binding4.Source = reimbursementPeriods;
cboReimbursement1Period.SetBinding(ListBox.ItemsSourceProperty, binding4);
cboReimbursement2Period.SetBinding(ListBox.ItemsSourceProperty, binding4);
cboReimbursement3Period.SetBinding(ListBox.ItemsSourceProperty, binding4);
cboTravelReimbursementPeriod.SetBinding(ListBox.ItemsSourceProperty, binding4);
}
示例2: TwitterClient
public TwitterClient(IRestClient client, string consumerKey, string consumerSecret, string callback)
: base(client)
{
Encode = true;
Statuses = new Statuses(this);
Account = new Account(this);
DirectMessages = new DirectMessages(this);
Favourites = new Favourites(this);
Block = new Block(this);
Friendships = new Friendship(this);
Lists = new List(this);
Search = new Search(this);
Users = new Users(this);
FriendsAndFollowers = new FriendsAndFollowers(this);
OAuthBase = "https://api.twitter.com/oauth/";
TokenRequestUrl = "request_token";
TokenAuthUrl = "authorize";
TokenAccessUrl = "access_token";
Authority = "https://api.twitter.com/";
Version = "1";
#if !SILVERLIGHT
ServicePointManager.Expect100Continue = false;
#endif
Credentials = new OAuthCredentials
{
ConsumerKey = consumerKey,
ConsumerSecret = consumerSecret,
};
if (!string.IsNullOrEmpty(callback))
((OAuthCredentials)Credentials).CallbackUrl = callback;
}
示例3: IdenticaClient
public IdenticaClient(string username, string password)
{
Statuses = new Statuses(this);
Account = new Account(this);
DirectMessages = new DirectMessages(this);
Favourites = new Favourites(this);
Block = new Block(this);
Friendships = new Friendship(this);
Lists = new List(this);
Search = new Search(this);
Users = new Users(this);
FriendsAndFollowers = new FriendsAndFollowers(this);
Credentials = new BasicAuthCredentials
{
Username = username,
Password = password
};
Client = new RestClient
{
Authority = "http://identi.ca/api",
};
Authority = "http://identi.ca/api";
Encode = false;
}
示例4: CanRefreshAddToExistingTweetsCollection
public void CanRefreshAddToExistingTweetsCollection()
{
// setup twitter api mock return values
Statuses statuses = new Statuses();
statuses.Add(new Status { Id = "000", CreatedAt = DateTime.Today });
statuses.Add(new Status { Id = "111", CreatedAt = DateTime.Today.AddDays(-2) });
statuses.Add(new Status { Id = "222", CreatedAt = DateTime.Today.AddDays(-4) });
// add some tweets to tweet manager
_tweetsManager.All.Add(new Status { Id = "888", CreatedAt = DateTime.Today.AddDays(-10) });
_tweetsManager.All.Add(new Status { Id = "999", CreatedAt = DateTime.Today.AddDays(-12) });
// record
Expect.Call(_twitterApiClient.FriendsTimelineSince("888")).Return(statuses);
// playback
_mocks.ReplayAll();
_tweetsManager.Refresh();
// assert
Assert.AreEqual(5, _tweetsManager.All.Count);
Assert.AreEqual("000", _tweetsManager.All[0].Id);
Assert.AreEqual("111", _tweetsManager.All[1].Id);
Assert.AreEqual("222", _tweetsManager.All[2].Id);
Assert.AreEqual("888", _tweetsManager.All[3].Id);
Assert.AreEqual("999", _tweetsManager.All[4].Id);
_mocks.VerifyAll();
}
示例5: SetDownload
public void SetDownload(float progress, float speed)
{
this.m_status = Statuses.Download;
this.m_prog = progress > 1 ? 1 : progress;
this.m_speed = speed;
this.Invalidate();
}
示例6: fingerprint
public fingerprint(string username, string account, string protocol, string fingerprint, Statuses status)
{
Username = username;
Account = account;
Protocol = protocol;
Fingerprint = fingerprint;
Status = status;
}
示例7: Pause
public void Pause()
{
if (Status == Statuses.Finished)
{
throw new Exception();
}
Status = Statuses.Paused;
}
示例8: refreshFilterOptions
private void refreshFilterOptions(String statusSQL)
{
Statuses statuses = new Statuses();
statuses.resetStatuses(statusSQL);
Binding binding2 = new Binding();
binding2.Source = statuses;
lstStatusSelect.SetBinding(ListBox.ItemsSourceProperty, binding2);
}
示例9: SetImage
public void SetImage(Image image, MediaTypes type)
{
this.m_status = Statuses.Complete;
this.m_image = image;
this.m_type = type;
this.CheckPosition();
this.Invalidate();
}
示例10: Task
public Task(int id, int templateId, string website, string timestamp, int depth)
{
this._TemplateID = templateId;
this._Website = website;
this._Timestamp = DateTime.Parse(timestamp);
this._Depth = depth;
this._ID = id;
_Status = Statuses.Open;
_Progress = 0;
_curDepth = 0;
_Results = 0;
}
示例11: Die
public void Die()
{
if (isPlayer)
{
//todo: player death
Debug.Log("Player " + playerID + " Killed!");
return;
}
Status = Statuses.DISABLED;
iTween.ScaleTo(gameObject, iTween.Hash("scale", Vector3.zero, "time", 0.5f, "easetype", iTween.EaseType.easeInOutQuart, "oncompletetarget", gameObject, "oncomplete", "DieAfterAnimation"));
}
示例12: MaintenanceItem
private MaintenanceItem(string name, string desc, DateTime issueDate, Property property, Statuses status, List<Tenant> tenantsInvolved, RequestorTypes requestedBy, double estimatedCost, DateTime ealiestDue, DateTime latestDue, Priorities priority, TimeSpan estimatedTimeTaken,bool isServiceCall)
: base(name, desc, issueDate, property, status, tenantsInvolved)
{
InstanceID = "Mnt_" + new string(InstanceID.Skip(4).ToArray());
Priority = priority;
RequestedBy = requestedBy;
EstimatedCost = estimatedCost;
EstimatedTimeTaken = estimatedTimeTaken;
EarliestDueDate = ealiestDue;
LatestDueDate = latestDue;
IsServiceCall = isServiceCall;
}
示例13: Occurence
public Occurence(string name, string desc, DateTime date, Property address, Statuses status, IEnumerable<Tenant> tenantsInvolved)
{
InstanceName = name;
Description = desc;
IncidentDate = date;
Location = address;
Status = status;
InstanceID = "Occ_" + NextID++;
if (tenantsInvolved == null)
{ TenantsInvolved = new List<Tenant>(); }
else
{ TenantsInvolved = tenantsInvolved.ToList(); }
}
示例14: ModelToEnity
public static Statuses ModelToEnity(this StatusesModel model, bool virtualActive = false)
{
Statuses entity = new Statuses()
{
Name=model.Name,
Id = model.Id,
IsActive = model.IsActive
};
if (virtualActive)
{
entity.RoomStatuses = model.RoomStatuses;
}
return entity;
}
示例15: Start
public void Start()
{
Status = Statuses.Running;
Task.Run(
() =>
{
var root = fileSystem[RootPath];
var enumerable = root.SubDirectories.Select(CreateFolder).ToList();
enumerable.Add(CreateFolder(root));
Folders = enumerable;
Status = Statuses.Finished;
});
}