本文整理汇总了C#中ServiceClient.GetPositionsForMosaic方法的典型用法代码示例。如果您正苦于以下问题:C# ServiceClient.GetPositionsForMosaic方法的具体用法?C# ServiceClient.GetPositionsForMosaic怎么用?C# ServiceClient.GetPositionsForMosaic使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ServiceClient
的用法示例。
在下文中一共展示了ServiceClient.GetPositionsForMosaic方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProcessStatusMessage
private void ProcessStatusMessage(MessageViewModel message)
{
string command = message.Command;
if (command != null)
{
if (!(command == "Make UnAvailable"))
{
if (command == "Make Available")
{
CustomerPage.Instance.Update(0x4e20);
Switcher.Switch(CustomerPage.Instance);
goto Label_014E;
}
if (command == "Added Theme")
{
ServiceClient client = new ServiceClient("BasicHttpBinding_IService", Constants.ServerAddress);
long mosaicIDForStation = client.GetMosaicIDForStation(Constants.MyStationID);
Positions = client.GetPositionsForMosaic(mosaicIDForStation);
MainWindow.Instance.LoadPositions(null);
goto Label_014E;
}
if (command == "Removed Theme")
{
ServiceClient client2 = new ServiceClient("BasicHttpBinding_IService", Constants.ServerAddress);
long mosaicID = client2.GetMosaicIDForStation(Constants.MyStationID);
Positions = client2.GetPositionsForMosaic(mosaicID);
MainWindow.Instance.LoadPositions(null);
goto Label_014E;
}
if (command == "Screenshot")
{
try
{
ThreadPool.QueueUserWorkItem(delegate(object hjhj)
{
string filename = string.Concat(new object[]
{ "Screenshot#", Constants.MyStationID, "#", string.Format("{0:yyyy-MM-dd_hh-mm-ss-tt}", DateTime.Now), ".jpg"
});
new ScreenCapture().CaptureScreenToFile(filename, ImageFormat.Jpeg);
NameValueCollection nvc = new NameValueCollection();
nvc.Add("StationID", Constants.MyStationID.ToString());
nvc.Add("btn-submit-photo", "Upload");
WebUpload.HttpUploadFile(Constants.ServerUrl + "/Stations/UploadScreenshot", filename, "file", "image/jpeg", nvc);
});
}
catch (Exception)
{
}
goto Label_014E;
}
}
else
{
CustomerPage.CurrentRFID = message.Text;
CustomerPage.Instance.Update(0xea60);
Switcher.Switch(CustomerPage.Instance);
goto Label_014E;
//.........这里部分代码省略.........
示例2: LoadMosaic
private static void LoadMosaic(MessageViewModel message)
{
ThreadPool.QueueUserWorkItem(delegate(object state)
{
try
{
ServiceClient client = new ServiceClient("BasicHttpBinding_IService", Constants.ServerAddress);
long mosaicID = client.GetMosaicIDForStation(Constants.MyStationID);
Constants.CurrentClientConfiguration.CurrentMosaic=mosaicID;
Constants.SaveDefaults();
Positions = client.GetPositionsForMosaic(mosaicID);
SavePositions(new List<PositionViewModel>(Positions));
MainWindow.Instance.LoadPositions(null);
client.SetStationStatus(Constants.MyStationID, "Positions Loaded, Now Playing");
}
catch (Exception)
{
}
ServiceClient client2 = new ServiceClient();
try
{
if (message != null)
{
client2.MessageRead(message.ID);
}
}
catch (TimeoutException exception)
{
Console.WriteLine("Got {0}", exception.GetType());
client2.Abort();
}
catch (CommunicationException exception2)
{
Console.WriteLine("Got {0}", exception2.GetType());
client2.Abort();
}
});
}