本文整理汇总了C#中Statuses类的典型用法代码示例。如果您正苦于以下问题:C# Statuses类的具体用法?C# Statuses怎么用?C# Statuses使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Statuses类属于命名空间,在下文中一共展示了Statuses类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:ep2012,项目名称:OCP-2.0,代码行数:30,代码来源:NewContract.xaml.cs
示例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;
}
开发者ID:hsinchen,项目名称:MahApps.Twitter,代码行数:34,代码来源:TwitterClient.cs
示例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;
}
开发者ID:hsinchen,项目名称:MahApps.Twitter,代码行数:29,代码来源:IdenticaClient.cs
示例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();
}
开发者ID:TlhanGhun,项目名称:digiTweetSnarlEdition,代码行数:28,代码来源:TweetsManagerTests.cs
示例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();
}
开发者ID:Usagination,项目名称:Azpe,代码行数:8,代码来源:ImageViwer.cs
示例6: fingerprint
public fingerprint(string username, string account, string protocol, string fingerprint, Statuses status)
{
Username = username;
Account = account;
Protocol = protocol;
Fingerprint = fingerprint;
Status = status;
}
开发者ID:eXcomm,项目名称:otr-1,代码行数:8,代码来源:fingerprint.cs
示例7: Pause
public void Pause()
{
if (Status == Statuses.Finished)
{
throw new Exception();
}
Status = Statuses.Paused;
}
开发者ID:peitor,项目名称:CodeKatas,代码行数:8,代码来源:FolderStatsMock.cs
示例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);
}
开发者ID:ep2012,项目名称:OCP-2.0,代码行数:9,代码来源:Contracts.xaml.cs
示例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();
}
开发者ID:Usagination,项目名称:Azpe,代码行数:10,代码来源:ImageViwer.cs
示例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;
}
开发者ID:Remper,项目名称:Templater,代码行数:12,代码来源:Task.cs
示例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"));
}
开发者ID:eduardolm87,项目名称:ncrffce2,代码行数:12,代码来源:Character.cs
示例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;
}
开发者ID:phinixx14,项目名称:Property-Managment,代码行数:13,代码来源:MaintenanceItem.cs
示例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(); }
}
开发者ID:phinixx14,项目名称:Property-Managment,代码行数:13,代码来源:Occurence.cs
示例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;
}
开发者ID:fatihgurdal,项目名称:HotelOtomasyonMVC,代码行数:15,代码来源:StatusesConvert.cs
示例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;
});
}
开发者ID:peitor,项目名称:CodeKatas,代码行数:15,代码来源:FolderStatsMock.cs
示例16: BeginUserTimeline_ForAnonymousUser_ReturnsAtLeastOneTweet
public void BeginUserTimeline_ForAnonymousUser_ReturnsAtLeastOneTweet()
{
var wasCalled = false;
var twitterClient = Substitute.For<IBaseTwitterClient>();
twitterClient.SetReponseBasedOnRequestPath();
var statuses = new Statuses(twitterClient);
// assert
GenericResponseDelegate endUserTimeline = (a, b, c) =>
{
wasCalled = true;
var tweets = c as IEnumerable<Tweet>;
Assert.That(tweets.Count(), Is.GreaterThan(0));
};
// act
statuses.BeginUserTimeline("someone", endUserTimeline);
Assert.That(wasCalled, Errors.CallbackDidNotFire);
}
开发者ID:hsinchen,项目名称:MahApps.Twitter,代码行数:20,代码来源:StatusesTests.cs
示例17: BeginGetTweet_WhichFindsATweet_ReturnsSuccessfulTweet
public void BeginGetTweet_WhichFindsATweet_ReturnsSuccessfulTweet()
{
var wasCalled = false;
var twitterClient = Substitute.For<IBaseTwitterClient>();
twitterClient.SetResponse(File.ReadAllText(@".\Data\statuses\show-existing.txt"));
var statuses = new Statuses(twitterClient);
// assert
GenericResponseDelegate endGetTweet = (a, b, c) =>
{
wasCalled = true;
var tweet = c as Tweet;
Assert.That(tweet, Is.Not.Null);
Assert.That(tweet.Id, Is.EqualTo(16381619317248000));
};
// act
statuses.BeginGetTweet("16381619317248000", endGetTweet);
Assert.That(wasCalled, Errors.CallbackDidNotFire);
}
开发者ID:hsinchen,项目名称:MahApps.Twitter,代码行数:21,代码来源:StatusesTests.cs
示例18: TaskEntry
internal TaskEntry(TasksQueue tasks, DateTime executionDate, Statuses initialStatus, Action<TaskEntry> callback)
{
ASSERT( (initialStatus == Statuses.Delayed) || (initialStatus == Statuses.Queued), "Invalid 'initialStatus'" );
ASSERT( executionDate.Kind == DateTimeKind.Utc, "'executionDate' is not in UTC" );
ID = Guid.NewGuid();
LockObject = this;
Tasks = tasks;
ExecutionDate = executionDate;
Status = initialStatus;
Callback = callback;
if( Tasks.TransferCultureInfo )
{
CreatorCultureInfo = Thread.CurrentThread.CurrentCulture;
CreatorUICultureInfo = Thread.CurrentThread.CurrentUICulture;
}
else
{
CreatorCultureInfo = null;
CreatorUICultureInfo = null;
}
}
开发者ID:alaincao,项目名称:CommonLibs,代码行数:23,代码来源:TaskEntry.cs
示例19: WriteLog
/// <summary>
/// Ajoute l'épisode au fichier d'historique
/// </summary>
/// <param name="stat">Statut de l'épisode</param>
public void WriteLog(Statuses stat)
{
XmlDocument doc;
XmlElement root;
XmlNode node;
bool newfile = true;
try
{
doc = new XmlDocument();
if (File.Exists(LogFile))
try
{
doc.Load(LogFile);
newfile = false;
}
catch { }
else
{
string dir = Path.GetDirectoryName(LogFile);
if (!Directory.Exists(dir))
MyExtensions.CreateDirectory(dir);
}
if (newfile)
{
doc.AppendChild(doc.CreateNode(XmlNodeType.XmlDeclaration, "utf-8", string.Empty));
root = doc.CreateElement("history");
doc.AppendChild(root);
}
else root = doc.DocumentElement;
node = root.SelectSingleNode("//history/episode[@name=\"" + FileName.ToXpathString() + "\"]");
XmlAttribute attr;
if (node == null)
{
node = doc.CreateElement("episode");
attr = doc.CreateAttribute("name");
attr.InnerText = FileName;
node.Attributes.Append(attr);
root.AppendChild(node);
}
else attr = node.Attributes["name"];
XmlNode InnerNode = node.SelectSingleNode("date");
if (InnerNode == null)
{
InnerNode = doc.CreateElement("date");
node.AppendChild(InnerNode);
}
InnerNode.InnerText = DateTime.Now.ToString("yyyyMMddHHmmss");
InnerNode = node.SelectSingleNode("status");
if (InnerNode == null)
{
InnerNode = doc.CreateElement("status");
node.AppendChild(InnerNode);
}
InnerNode.InnerText = stat.ToString();
doc.Save(LogFile);
}
catch (Exception err)
{
throw err;
}
}
开发者ID:skualler,项目名称:moveshow,代码行数:71,代码来源:TvShowEpisode.cs
示例20: ChangeStatus
/// <summary>
/// Changes the status and raises the StatusChanged event
/// </summary>
/// <param name="newStatus"></param>
private void ChangeStatus(Statuses newStatus)
{
m_status = newStatus;
if ( m_logger.IsDebugEnabled ) m_logger.Debug("PracticeSharpLogic - Status changed: " + m_status);
// Raise StatusChanged Event
if (StatusChanged != null)
{
// explicitly invoke each subscribed event handler *asynchronously*
foreach (StatusChangedEventHandler subscriber in StatusChanged.GetInvocationList())
{
// Event is unidirectional - No call back (i.e. EndInvoke) needed
subscriber.BeginInvoke(this, newStatus, null, subscriber);
}
}
}
开发者ID:pbeardshear,项目名称:TempoMonkey,代码行数:20,代码来源:PracticeSharpLogic.cs
注:本文中的Statuses类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论