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


C# IDevice类代码示例

本文整理汇总了C#中IDevice的典型用法代码示例。如果您正苦于以下问题:C# IDevice类的具体用法?C# IDevice怎么用?C# IDevice使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IDevice类属于命名空间,在下文中一共展示了IDevice类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RemoteAndroidTestRunner

 /// <summary>
 /// Creates a remote Android test runner.
 /// </summary>
 /// <param name="packageName"> the Android application package that contains the tests to run </param>
 /// <param name="runnerName"> the instrumentation test runner to execute. If null, will use default
 ///   runner </param>
 /// <param name="remoteDevice"> the Android device to execute tests on </param>
 public RemoteAndroidTestRunner(string packageName, string runnerName, IDevice remoteDevice)
 {
     mPackageName = packageName;
     mRunnerName = runnerName;
     mRemoteDevice = remoteDevice;
     mArgMap = new Dictionary<string, string>();
 }
开发者ID:Xtremrules,项目名称:dot42,代码行数:14,代码来源:RemoteAndroidTestRunner.cs

示例2: CreateJavaScriptAudioDevice

        public JavaScriptAudioDevice CreateJavaScriptAudioDevice(IDevice audioDevice)
        {
            if (audioDevice == null)
                return null;

            return new JavaScriptAudioDevice(Engine, AudioController, audioDevice);
        }
开发者ID:cdhunt,项目名称:AudioSwitcher,代码行数:7,代码来源:AudioSwitcherLibrary.cs

示例3: ActivityClient

        public ActivityClient( string ip, int port, IDevice device, bool useCache = true )
        {
            LocalCaching = useCache;

            InitializeEvents();

            Ip = ip;
            Port = port;

            Address = Net.GetUrl( ip, port, "" ).ToString();

            Device = device;

            try
            {
                _eventHandler = new Connection(Address);
                _eventHandler.JsonSerializer.TypeNameHandling = TypeNameHandling.Objects;
                _eventHandler.Received += eventHandler_Received;
                _eventHandler.Start().Wait();
            }
            catch(HttpClientException ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
开发者ID:StevenHouben,项目名称:NooSphere,代码行数:25,代码来源:ActivityClient.cs

示例4: OnDelete

 protected override void OnDelete(IDevice device)
 {
     string s = string.Format(
         "delete from tblDevice where DeviceID = {0}",
         GuidHelper.ConvertToInt32(device.Guid));
     DBI.Instance.ExecuteScalar(s);
 }
开发者ID:hkiaipc,项目名称:C3,代码行数:7,代码来源:Class1.cs

示例5: IoTHubTransport

 public IoTHubTransport(ISerialize serializer, ILogger logger, IConfigurationProvider configurationProvider, IDevice device)
 {
     _serializer = serializer;
     _logger = logger;
     _configurationProvider = configurationProvider;
     _device = device;
 }
开发者ID:b3540,项目名称:azure-iot-predictive-maintenance,代码行数:7,代码来源:IoTHubTransport.cs

示例6: SpeakerDetailsPage

        public SpeakerDetailsPage(string sessionId, IDevice device)
        {
            this.sessionId = sessionId;
            InitializeComponent();
            MainScroll.ParallaxView = HeaderView;

            
            ListViewSessions.ItemSelected += async (sender, e) => 
                {
                    var session = ListViewSessions.SelectedItem as Session;
                    if(session == null)
                        return;

                    var sessionDetails = new SessionDetailsPage(session, device);

                    App.Logger.TrackPage(AppPage.Session.ToString(), session.Title);
                    await NavigationService.PushAsync(Navigation, sessionDetails);

                    ListViewSessions.SelectedItem = null;
                };

            if (Device.Idiom != TargetIdiom.Phone)
                Row1Header.Height = Row1Content.Height = 350;


        }
开发者ID:RobGibbens,项目名称:app-evolve,代码行数:26,代码来源:SpeakerDetailsPage.xaml.cs

示例7: DeviceInitialize

        public override void DeviceInitialize (IDevice device)
        {
            Volume = device as IVolume;

            if (Volume == null) {
                throw new InvalidDeviceException ();
            }

            if (!Volume.IsMounted && device.MediaCapabilities != null && device.MediaCapabilities.IsType ("ipod")) {
                Hyena.Log.Information ("Found potential unmounted iDevice, trying to mount it now");
                Volume.Mount ();
            }

            if (!Volume.IsMounted) {
                Hyena.Log.Information ("AppleDeviceSource is ignoring unmounted volume " + Volume.Name);
                throw new InvalidDeviceException ();
            }
            
            Device = new GPod.Device (Volume.MountPoint);

            if (GPod.ITDB.GetControlPath (Device) == null) {
                throw new InvalidDeviceException ();
            }

            base.DeviceInitialize (device);

            Name = Volume.Name;
            SupportsPlaylists = true;
            SupportsPodcasts = Device.SupportsPodcast;
            SupportsVideo = Device.SupportsVideo;

            Initialize ();
            GPod.ITDB.InitIpod (Volume.MountPoint, Device.IpodInfo == null ? null : Device.IpodInfo.ModelNumber, Name);

            // HACK: ensure that m4a, and mp3 are set as accepted by the device; bgo#633552
            AcceptableMimeTypes = (AcceptableMimeTypes ?? new string [0]).Union (new string [] { "taglib/m4a", "taglib/mp3" }).ToArray ();

            // FIXME: Properly parse the device, color and generation and don't use the fallback strings

            // IpodInfo is null on Macos formated ipods. I don't think we can really do anything with them
            // but they get loaded as UMS devices if we throw an NRE here.
            if (Device.IpodInfo != null) {
                AddDapProperty (Catalog.GetString ("Device"), Device.IpodInfo.ModelString);
                AddDapProperty (Catalog.GetString ("Generation"), Device.IpodInfo.GenerationString);
            }

            // FIXME
            //AddDapProperty (Catalog.GetString ("Color"), "black");
            AddDapProperty (Catalog.GetString ("Capacity"), string.Format ("{0:0.00}GB", BytesCapacity / 1024.0 / 1024.0 / 1024.0));
            AddDapProperty (Catalog.GetString ("Available"), string.Format ("{0:0.00}GB", BytesAvailable / 1024.0 / 1024.0 / 1024.0));
            AddDapProperty (Catalog.GetString ("Serial number"), Volume.Serial);
            //AddDapProperty (Catalog.GetString ("Produced on"), ipod_device.ProductionInfo.DisplayDate);
            //AddDapProperty (Catalog.GetString ("Firmware"), ipod_device.FirmwareVersion);

            //string [] capabilities = new string [ipod_device.ModelInfo.Capabilities.Count];
            //ipod_device.ModelInfo.Capabilities.CopyTo (capabilities, 0);
            //AddDapProperty (Catalog.GetString ("Capabilities"), String.Join (", ", capabilities));
            AddYesNoDapProperty (Catalog.GetString ("Supports cover art"), Device.SupportsArtwork);
            AddYesNoDapProperty (Catalog.GetString ("Supports photos"), Device.SupportsPhoto);
        }
开发者ID:fatman2021,项目名称:gnome-apps,代码行数:60,代码来源:AppleDeviceSource.cs

示例8: StartLaunchMonitor

 /// <summary>
 /// Start looking for JDWP processes now.
 /// </summary>
 internal static void StartLaunchMonitor(IIde ide, IDevice device, string apkPath, string packageName, int apiLevel, int launchFlags, Action<LauncherStates, string> stateUpdate, CancellationToken token)
 {
     OutputPaneLog.EnsureLoaded(ide);
     var newMonitor = new LaunchMonitor(ide, device, apkPath, packageName, apiLevel, launchFlags, stateUpdate, token);
     monitor = newMonitor;
     newMonitor.Start();
 }
开发者ID:rfcclub,项目名称:dot42,代码行数:10,代码来源:Launcher.cs

示例9: CapdEmulatorService

 protected CapdEmulatorService(IDevice device)
 {
     this.device = device;
       // Список для обратной связи.
       callbacks = new List<ICapdControlEmulatorEvents>();
       currentQuantum = new Quantum();
 }
开发者ID:DarkGraf,项目名称:CapdEmulator,代码行数:7,代码来源:CapdEmulatorService.cs

示例10: TestWindow

		public TestWindow(IDevice device) {
			Device = device;
			InitializeComponent();
			if (device != null && device.Tests != null) {
				testTreeView.ItemsSource = device.Tests;
			}
		}
开发者ID:ddcc,项目名称:EERILControlSystem,代码行数:7,代码来源:TestWindow.xaml.cs

示例11: MainPage

 public MainPage(MainViewModel mainViewModel, IDevice device) 
 {
     _device = device;
     InitializeComponent();
     Setup(mainViewModel);
     this.BindingContext = mainViewModel;
 }
开发者ID:onikiri2007,项目名称:TestApp,代码行数:7,代码来源:MainPage.xaml.cs

示例12: Config

        public Config(ref IDevice[] devices)
        {
            InitializeComponent();
            this.devices = new SimpleFileDevice[devices.Length];
            this.outDevices = devices;
            tbs = new TextBox[7];
            tbs[0] = tbFile00;
            tbs[1] = tbFileF1;
            tbs[2] = tbFileF2;
            tbs[3] = tbFileF3;
            tbs[4] = tbFile04;
            tbs[5] = tbFile05;
            tbs[6] = tbFile06;

            for (int i = 0; i < 7; i++)
            {
                if (devices[i] is SimpleFileDevice)
                {
                    if (((SimpleFileDevice)devices[i]).fs != null)
                        tbs[i].Text = ((SimpleFileDevice)devices[i]).fs.Name;
                    this.devices[i] = (SimpleFileDevice)devices[i];
                }
                else
                {
                    this.devices[i] = null;
                    tbs[i].Text = "Not a file device.";
                }
            }
        }
开发者ID:pmsanford,项目名称:sic-debug,代码行数:29,代码来源:Config.cs

示例13: SetDevice

        public async Task SetDevice(IDevice device)
        {
            SetValue(devicePropertyKey, device);
            SetValue(deviceNamePropertyKey, device.Name);

            await SetDeviceInternal(device);
        }
开发者ID:JRoughan,项目名称:Emanate,代码行数:7,代码来源:InputSelector.cs

示例14: ConnectionManager

        public ConnectionManager(ILogger logger,
            ICredentialProvider credentialProvider,
            INetworkConnection networkConnectivity,
            IServerLocator serverDiscovery,
            string applicationName,
            string applicationVersion,
            IDevice device,
            ClientCapabilities clientCapabilities,
            ICryptographyProvider cryptographyProvider,
            Func<IClientWebSocket> webSocketFactory = null,
            ILocalAssetManager localAssetManager = null)
        {
            _credentialProvider = credentialProvider;
            _networkConnectivity = networkConnectivity;
            _logger = logger;
            _serverDiscovery = serverDiscovery;
            _httpClient = AsyncHttpClientFactory.Create(logger);
            ClientCapabilities = clientCapabilities;
            _webSocketFactory = webSocketFactory;
            _cryptographyProvider = cryptographyProvider;
            _localAssetManager = localAssetManager;

            Device = device;
            ApplicationVersion = applicationVersion;
            ApplicationName = applicationName;
            ApiClients = new Dictionary<string, IApiClient>(StringComparer.OrdinalIgnoreCase);
            SaveLocalCredentials = true;

            Device.ResumeFromSleep += Device_ResumeFromSleep;

            var jsonSerializer = new NewtonsoftJsonSerializer();
            _connectService = new ConnectService(jsonSerializer, _logger, _httpClient, _cryptographyProvider, applicationName, applicationVersion);
        }
开发者ID:daltekkie,项目名称:Emby.ApiClient,代码行数:33,代码来源:ConnectionManager.cs

示例15: ServiceList

		public ServiceList (IAdapter adapter, IDevice device)
		{
			InitializeComponent ();
			this.adapter = adapter;
			this.device = device;
			this.services = new ObservableCollection<IService> ();
			listView.ItemsSource = services;

			// when device is connected
			adapter.DeviceConnected += (s, e) => {
				device = e.Device; // do we need to overwrite this?

				// when services are discovered
				device.ServicesDiscovered += (object se, EventArgs ea) => {
					Debug.WriteLine("device.ServicesDiscovered");
					//services = (List<IService>)device.Services;
					if (services.Count == 0)
						Device.BeginInvokeOnMainThread(() => {
							foreach (var service in device.Services) {
								services.Add(service);
							}
						});
				};
				// start looking for services
				device.DiscoverServices ();

			};
			// TODO: add to IAdapter first
			//adapter.DeviceFailedToConnect += (sender, else) => {};

			DisconnectButton.Activated += (sender, e) => {
				adapter.DisconnectDevice (device);
				Navigation.PopToRootAsync(); // disconnect means start over
			};
		}
开发者ID:Roddoric,项目名称:Monkey.Robotics,代码行数:35,代码来源:ServiceList.xaml.cs


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