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


C# ServiceClient.GetMosaicIDForStation方法代码示例

本文整理汇总了C#中ServiceClient.GetMosaicIDForStation方法的典型用法代码示例。如果您正苦于以下问题:C# ServiceClient.GetMosaicIDForStation方法的具体用法?C# ServiceClient.GetMosaicIDForStation怎么用?C# ServiceClient.GetMosaicIDForStation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ServiceClient的用法示例。


在下文中一共展示了ServiceClient.GetMosaicIDForStation方法的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;
//.........这里部分代码省略.........
开发者ID:afrog33k,项目名称:eAd,代码行数:101,代码来源:PageSwitcher.xaml.cs

示例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();

            }

        });

    }
开发者ID:afrog33k,项目名称:eAd,代码行数:67,代码来源:PageSwitcher.xaml.cs


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