private void Open_button_Click(object sender, EventArgs e) { if (Scanning.IsBusy == false) { Scanning.RunWorkerAsync(); } }
private void OnOpen() { DriveSelectResult result = Dialogs.ShowDriveSelect(WindowOwner); if (result != null) { Scanning.CloseAsync(() => Scanning.ScanAsync(result)); } }
private void OnRefreshSelected() { HashSet <FileItemBase> filesToRefresh = new HashSet <FileItemBase>(); IsolateRefreshableFiles(filesToRefresh, SelectedFiles.Select(f => f.Model)); if (filesToRefresh.Count > 0) { Scanning.RefreshFilesAsync(filesToRefresh); } }
public static FfmpegCommand Create(string value) { switch (value) { case "AVI|MPEG2": FfmpegCommand aviresolution = new Resolution(); FfmpegCommand aviaspect = new AspectRatio(); FfmpegCommand aviscanning = new Scanning(); aviresolution.SetSuccessor(aviaspect); aviaspect.SetSuccessor(aviscanning); return(aviresolution); case "MP4|WEBM": // Don't need Scanning. Maybe need to add some other commands... FfmpegCommand mp4Resolution = new Resolution(); FfmpegCommand mp4Aspect = new AspectRatio(); mp4Resolution.SetSuccessor(mp4Aspect); return(mp4Resolution); //Etc etc... } return(null); }
private void AddFileFromScanner_Clicked(object sender, EventArgs e) { Scanning scan = new Scanning(); _parent.mainCanvas.Children.Add(scan); scan.ReadyButtonClicked += (s, ea) => { FileModel file = new FileModel(scan.FileName, new ContentType(MimeTypes.MimeTypeMap.GetMimeType(".pdf")), scan.FileStream.Length, DateTime.Now, scan.FileStream.ToArray()); file.Downloaded = true; AddFile(file); FileListContainer.Visibility = Visibility.Visible; _parent.mainCanvas.Children.Remove(scan); }; scan.CancelButtonClicked += (s, ea) => { _parent.mainCanvas.Children.Remove(scan); }; }
public override bool HandleEvent(GetShortDescriptionEvent E) { if (this.stage > 0) { string debug = ""; if (Scanning.HasScanningFor(XRLCore.Core.Game.Player.Body, Scanning.Scan.Bio)) { int drams = 0; if (GetPuddle() != null) { if (debugstring() == "thriving" || debugstring() == "dry") { drams = GetPuddle().Volume; } } int count = drams * stageLength; int days = (int)Math.Floor((double)count / 1200); int hours = (int)Math.Floor((double)(count % 1200) / (1200 / 24)); E.Postfix.Append("&gBIOSCAN: Suitable water for " + days.ToString() + "d " + hours.ToString() + "h."); } } return(true); }
private void OnCancel() { Scanning.Cancel(false); }
private void OnClose() { Scanning.Close(false); }
private void OnReload() { Scanning.ReloadAsync(); }
public Bot() { Scan = new Scanning(this); Recognizator = new Recognizator(this); Autonomous = new Autonomous(this); }
public static void Init() { if (adapter != null) { return; } adapter = BluetoothAdapter.DefaultAdapter; gattCallback = new GattCallback(); gattCallback.Connecting += OnDeviceConnecting; gattCallback.Connected += OnDeviceConnected; gattCallback.Disconnecting += OnDeviceDisconnecting; gattCallback.Disconnected += OnDeviceDisconencted; if (adapter == null) { Console.WriteLine("Device does not support Bluetooth"); return; } if (!adapter.IsEnabled) { Console.WriteLine("Bluetooth is not enabled"); return; } Scanning?.Invoke(null, EventArgs.Empty); ICollection <BluetoothDevice> pairedDevices = adapter.BondedDevices; if (pairedDevices.Count > 0) { // There are paired devices. Get the name and address of each paired device. foreach (BluetoothDevice d in pairedDevices) { string deviceName = d.Name; string deviceHardwareAddress = d.Address; Console.WriteLine(deviceName + " - " + deviceHardwareAddress); if (deviceHardwareAddress == "20:16:02:30:52:56" || deviceName == "aFloat") { Device = d; Found?.Invoke(null, EventArgs.Empty); Console.WriteLine("Device found. BondState = {0}", Device.BondState); } } } else { Console.WriteLine("No paired devices"); } if (Device == null) { NotFound?.Invoke(null, EventArgs.Empty); return; } }
// Start is called before the first frame update void Start() { scanning = player.GetComponent <Scanning>(); }
public frmScanning() { InitializeComponent(); oOrder = new Scanning(base.CompanyID); oOrder1 = new Scanning(base.CompanyID); }
private void OnScanning(string webPage) { Scanning?.Invoke(webPage); }
private void OnDeleteRecycle() { Scanning.RecycleFile(SelectedFile.Model); }
private void OnDeletePermanently() { Scanning.DeleteFile(SelectedFile.Model); }
private void OnScanning(string dir) { Scanning?.Invoke(this, new ScanEventArgs(dir)); }