public void ThrowsExceptionWhenAddFeatureWithExistingNameToCapabilites() { var pc = new Capabilities(); pc = pc.Add(new Feature(Exp.SomeFeature)); Assert.Throws<DuplicateNameException>(() => { pc = pc.Add(new Feature(Exp.SomeFeature)); }); }
public void ThrowsExceptionWhenAddPropertyWithExistingNameToCapabilites() { var pc = new Capabilities(); pc = pc.Add(new Property(Exp.SomeProperty)); Assert.Throws<DuplicateNameException>(() => { pc = pc.Add(new Property(Exp.SomeProperty)); }); }
public void ThrowsExceptionWhenAddPropertyWithExistingNameToCapabilites() { var pc = new Capabilities(); pc = pc.Add(new Property(Exp.SomeProperty)); Assert.Throws <DuplicateNameException>(() => { pc = pc.Add(new Property(Exp.SomeProperty)); }); }
public void ThrowsExceptionWhenAddFeatureWithExistingNameToCapabilites() { var pc = new Capabilities(); pc = pc.Add(new Feature(Exp.SomeFeature)); Assert.Throws <DuplicateNameException>(() => { pc = pc.Add(new Feature(Exp.SomeFeature)); }); }
public bool Init(EosCamera camera) { try { Camera = camera; Camera.IsErrorTolerantMode = true; DeviceName = Camera.DeviceDescription; Manufacturer = "Canon Inc."; SerialNumber = Camera.SerialNumber; Camera.Error += _camera_Error; Camera.Shutdown += _camera_Shutdown; Camera.LiveViewPaused += Camera_LiveViewPaused; Camera.LiveViewUpdate += Camera_LiveViewUpdate; Camera.PictureTaken += Camera_PictureTaken; Camera.PropertyChanged += Camera_PropertyChanged; Capabilities.Add(CapabilityEnum.Bulb); Capabilities.Add(CapabilityEnum.LiveView); Capabilities.Add(CapabilityEnum.CaptureInRam); CaptureInSdRam = true; InitMode(); InitShutterSpeed(); InitFNumber(); InitIso(); InitEc(); InitOther(); Battery = (int)Camera.BatteryLevel; IsConnected = true; return(true); } catch (Exception exception) { Log.Error("Error initialize EOS camera object ", exception); return(false); } }
private void GetCapabilities() { Logger.Debug("Getting Nikon capabilities"); Capabilities.Clear(); foreach (NkMAIDCapInfo info in _camera.GetCapabilityInfo()) { Capabilities.Add(info.ulID, info); var description = info.GetDescription(); var canGet = info.CanGet(); var canGetArray = info.CanGetArray(); var canSet = info.CanSet(); var canStart = info.CanStart(); Logger.Debug(description); Logger.Debug("\t Id: " + info.ulID.ToString()); Logger.Debug("\t CanGet: " + canGet.ToString()); Logger.Debug("\t CanGetArray: " + canGetArray.ToString()); Logger.Debug("\t CanSet: " + canSet.ToString()); Logger.Debug("\t CanStart: " + canStart.ToString()); if (info.ulID == eNkMAIDCapability.kNkMAIDCapability_ShutterSpeed && !canSet) { throw new NikonException("Cannot set shutterspeeds. Please make sure the camera dial is set to a position where bulb mode is possible and the mirror lock is turned off"); } } }
public async Task CanCreateClusterWithHwxPrivateVersion() { Capabilities.Add("CAPABILITY_FEATURE_CLUSTERS_CONTRACT_1_SDK"); Capabilities.Add("CAPABILITY_FEATURE_CLUSTERS_CONTRACT_VERSION_3_SDK"); var restClient = ServiceLocator.Instance.Locate <IRdfeClustersResourceRestClientFactory>() .Create(this.DefaultHandler, this.HdInsightCertCred, this.Context, false, SchemaVersionUtils.GetSchemaVersion(Capabilities)); var clustersPocoClient = new PaasClustersPocoClient(this.HdInsightCertCred, false, this.Context, Capabilities, restClient); var clusterCreateParameters = new HDInsight.ClusterCreateParametersV2 { Name = "HwxVersionTest", DefaultStorageAccountKey = IntegrationTestBase.TestCredentials.Environments[0].DefaultStorageAccount.Key, DefaultStorageAccountName = IntegrationTestBase.TestCredentials.Environments[0].DefaultStorageAccount.Name, DefaultStorageContainer = "HwxVersionTest", ClusterSizeInNodes = 2, Location = "East US", UserName = "******", Password = "******", Version = "3.2-hwx-trunk", ClusterType = ClusterType.Hadoop, }; await clustersPocoClient.CreateContainer(clusterCreateParameters); var containersList = clustersPocoClient.ListContainers().Result; Assert.AreEqual(containersList.Count, 1); Assert.IsNotNull(containersList.SingleOrDefault(cluster => cluster.Name.Equals("HwxVersionTest"))); }
public void WriteValueInProperty() { var pc = new Capabilities(); pc = pc.Add(new Property(Psk.JobName, "some job name")); var buffer = new StringBuilder(); var writer = XmlWriter.Create(buffer); pc.Save(writer); var doc = XDocument.Parse(buffer.ToString()); Assert.Equal(Psf.PrintCapabilities, doc.Root.Name); var prop = doc.Root.Element(Psf.Property); Assert.NotNull(prop); Assert.Equal("psk:JobName", prop.Attribute("name").Value); var value = prop.Element(Psf.Value); Assert.Equal("xsd:string", value.Attribute(Xsi.Type).Value); Assert.Equal("some job name", value.Value); }
public FakeCameraDevice() { HaveLiveView = false; IsBusy = false; DeviceName = "Fake camera"; SerialNumber = "00000000"; IsConnected = true; HaveLiveView = false; ExposureStatus = 1; ExposureCompensation = new PropertyValue <int>() { IsEnabled = false }; Mode = new PropertyValue <uint> { IsEnabled = false }; FNumber = new PropertyValue <int> { IsEnabled = false }; ShutterSpeed = new PropertyValue <long> { IsEnabled = false }; WhiteBalance = new PropertyValue <long> { IsEnabled = false }; FocusMode = new PropertyValue <long> { IsEnabled = false }; CompressionSetting = new PropertyValue <int> { IsEnabled = false }; IsoNumber = new PropertyValue <int> { IsEnabled = true }; ExposureMeteringMode = new PropertyValue <int> { IsEnabled = false }; Battery = 100; Capabilities.Add(CapabilityEnum.CaptureNoAf); Capabilities.Add(CapabilityEnum.LiveView); LiveViewImageZoomRatio = new PropertyValue <int>(); LiveViewImageZoomRatio.AddValues("All", 0); LiveViewImageZoomRatio.Value = "All"; IsoNumber.AddValues("100", 100); IsoNumber.AddValues("200", 200); IsoNumber.AddValues("300", 300); IsoNumber.Value = "100"; var val = new PropertyValue <long>() { Name = "Test Test" }; val.AddValues("Val 1", 1); val.AddValues("Val 2", 2); val.AddValues("Val 3", 3); val.Value = "Val 1"; AdvancedProperties.Add(val); }
public override bool Init(DeviceDescriptor deviceDescriptor) { bool ret = base.Init(deviceDescriptor); Capabilities.Add(CapabilityEnum.LiveView); return(ret); }
public void FindPropertyByNameTest() { var pc = new Capabilities(); pc = pc.Add(new Property(Psk.DisplayName, "value")); var p = pc.Properties[Psk.DisplayName]; Assert.Equal("value", p.Value); }
public override bool Init(DeviceDescriptor deviceDescriptor) { bool res = base.Init(deviceDescriptor); Capabilities.Clear(); Capabilities.Add(CapabilityEnum.CaptureNoAf); HaveLiveView = false; CaptureInSdRam = false; return res; }
public void FindPropertyByNameTest() { var pc = new Capabilities(); pc = pc.Add(new Property(Psk.DisplayName, "value")); var p = pc.Properties[Psk.DisplayName]; Assert.Equal("value", p.Value); }
public override bool Init(DeviceDescriptor deviceDescriptor) { bool res = base.Init(deviceDescriptor); Capabilities.Clear(); Capabilities.Add(CapabilityEnum.LiveView); Capabilities.Add(CapabilityEnum.CaptureInRam); Capabilities.Add(CapabilityEnum.CaptureNoAf); return(res); }
public override bool Init(DeviceDescriptor deviceDescriptor) { //StillImageDevice = new StillImageDevice(deviceDescriptor.WpdId); //StillImageDevice.ConnectToDevice(AppName, AppMajorVersionNumber, AppMinorVersionNumber); //StillImageDevice.DeviceEvent += _stillImageDevice_DeviceEvent; Capabilities.Add(CapabilityEnum.Bulb); Capabilities.Add(CapabilityEnum.LiveView); IsConnected = true; return(true); }
public override bool Init(DeviceDescriptor deviceDescriptor) { bool res = base.Init(deviceDescriptor); Capabilities.Clear(); Capabilities.Add(CapabilityEnum.LiveView); Capabilities.Add(CapabilityEnum.RecordMovie); CaptureInSdRam = false; PropertyChanged -= NikonBase_PropertyChanged; return(res); }
public EvaluatorRequestBuilder(EvaluatorRequest request) { foreach (ICapability capability in request.Capabilities) { Capabilities.Add(capability); } Number = request.Number; Catalog = request.Catalog; MegaBytes = request.MemoryMegaBytes; VirtualCore = request.VirtualCore; }
public override bool Init(DeviceDescriptor deviceDescriptor) { CurrentValues = new Dictionary <string, string>(); Capabilities.Add(CapabilityEnum.LiveView); Capabilities.Add(CapabilityEnum.LiveViewStream); Capabilities.Add(CapabilityEnum.RecordMovie); Protocol = deviceDescriptor.StillImageDevice as YiCameraProtocol; Protocol.DataReceiverd += Protocol_DataReceiverd; DeviceName = Protocol.Model; Manufacturer = Protocol.Manufacturer; IsConnected = true; CompressionSetting = new PropertyValue <long> { Tag = "photo_quality" }; Mode = new PropertyValue <long> { Tag = "capture_mode" }; Mode.AddValues("Single", 0); Mode.AddValues("Burst", 1); Mode.AddValues("Delayed", 2); //Mode.AddValues("TimeLapse", 3); Mode.ReloadValues(); ExposureMeteringMode = new PropertyValue <long>() { Tag = "meter_mode" }; LiveViewImageZoomRatio = new PropertyValue <long>(); LiveViewImageZoomRatio.AddValues("All", 0); LiveViewImageZoomRatio.Value = "All"; SendCommand(3); Thread.Sleep(500); SerialNumber = GetValue("serial_number"); SetProperty(Mode.Tag, GetValue(Mode.Tag)); var thread = new Thread(LoadProperties) { Priority = ThreadPriority.Lowest }; thread.Start(); return(true); }
public override bool Init(DeviceDescriptor deviceDescriptor) { StillImageDevice = new StillImageDevice(deviceDescriptor.WpdId); StillImageDevice.ConnectToDevice(AppName, AppMajorVersionNumber, AppMinorVersionNumber); StillImageDevice.DeviceEvent += _stillImageDevice_DeviceEvent; DeviceName = StillImageDevice.Model; Manufacturer = StillImageDevice.Manufacturer; Capabilities.Add(CapabilityEnum.Bulb); Capabilities.Add(CapabilityEnum.LiveView); InitShutterSpeed(); IsConnected = true; ExecuteWithNoData(CONST_CMD_CANON_EOS_SetRemoteMode, 1); ExecuteWithNoData(CONST_CMD_CANON_EOS_SetEventMode, 1); _timer.Start(); return(true); }
internal DeviceInfo(DeviceInfo info, ResponseType type) : this(type) { ServerVersion = info.ServerVersion; WurflLastUpdate = info.WurflLastUpdate; Id = info.Id; foreach (var c in info.Capabilities) { Capabilities.Add(c.Key, c.Value); string value; if (!Capabilities.TryGetValue(c.Key, out value)) { Errors.Add("Exception", String.Format("The {0} capability is not currently available", c.Key)); } } foreach (var e in info.Errors) { Errors.Add(e.Key, e.Value); } }
public PtzOpticsCamera(string ip) { _address = ip; IsBusy = false; IsConnected = true; HaveLiveView = false; ExposureStatus = 1; ExposureCompensation = new PropertyValue <long>() { IsEnabled = false }; Mode = new PropertyValue <long> { IsEnabled = false }; FNumber = new PropertyValue <long> { IsEnabled = false }; ShutterSpeed = new PropertyValue <long> { IsEnabled = false }; WhiteBalance = new PropertyValue <long> { IsEnabled = false }; FocusMode = new PropertyValue <long> { IsEnabled = false }; IsoNumber = new PropertyValue <long> { IsEnabled = true }; ExposureMeteringMode = new PropertyValue <long> { IsEnabled = false }; Battery = 100; Capabilities.Add(CapabilityEnum.CaptureNoAf); Capabilities.Add(CapabilityEnum.LiveView); Capabilities.Add(CapabilityEnum.LiveViewStream); LiveViewImageZoomRatio = new PropertyValue <long>(); LiveViewImageZoomRatio.AddValues("All", 0); LiveViewImageZoomRatio.Value = "All"; }
internal DeviceInfo(CloudResponse response) : this(ResponseType.Cloud) { ServerVersion = response.ApiVersion; WurflLastUpdate = _baseDate.AddSeconds(response.MTime); Id = response.Id; foreach (var c in response.Capabilities) { Capabilities.Add(c.Key, c.Value); string value; if (!Capabilities.TryGetValue(c.Key, out value)) { Errors.Add("Exception", String.Format("The {0} capability is not currently available", c.Key)); } } foreach (var e in response.Errors) { Errors.Add(e.Key, e.Value); } }
public void WriteValueInProperty() { var pc = new Capabilities(); pc = pc.Add(new Property(Psk.JobName, "some job name")); var buffer = new StringBuilder(); var writer = XmlWriter.Create(buffer); pc.Save(writer); var doc = XDocument.Parse(buffer.ToString()); Assert.Equal(Psf.PrintCapabilities, doc.Root.Name); var prop = doc.Root.Element(Psf.Property); Assert.NotNull(prop); Assert.Equal("psk:JobName", prop.Attribute("name").Value); var value = prop.Element(Psf.Value); Assert.Equal("xsd:string", value.Attribute(Xsi.Type).Value); Assert.Equal("some job name", value.Value); }
public FakeCameraDevice() { HaveLiveView = false; IsBusy = false; DeviceName = "Fake camera"; SerialNumber = "00000000"; IsConnected = true; HaveLiveView = false; ExposureStatus = 1; ExposureCompensation = new PropertyValue <int>() { IsEnabled = false }; Mode = new PropertyValue <uint> { IsEnabled = false }; FNumber = new PropertyValue <int> { IsEnabled = false }; ShutterSpeed = new PropertyValue <long> { IsEnabled = false }; WhiteBalance = new PropertyValue <long> { IsEnabled = false }; FocusMode = new PropertyValue <long> { IsEnabled = false }; CompressionSetting = new PropertyValue <int> { IsEnabled = false }; IsoNumber = new PropertyValue <int> { IsEnabled = false }; ExposureMeteringMode = new PropertyValue <int> { IsEnabled = false }; Battery = 100; Capabilities.Add(CapabilityEnum.CaptureNoAf); }
public bool Init(string endpoint) { Capabilities.Add(CapabilityEnum.LiveView); _timer.Elapsed += _timer_Elapsed; _timer.AutoReset = true; IsBusy = true; EndPoint = endpoint; AvailableMethods = GetMethodTypes(); ExecuteMethod("startRecMode"); IsConnected = true; ExposureMeteringMode = new PropertyValue <int>(); ExposureMeteringMode.Available = false; LiveViewImageZoomRatio = new PropertyValue <int>(); for (int i = 0; i < 101; i++) { LiveViewImageZoomRatio.AddValues(i.ToString(), i); } LiveViewImageZoomRatio.ReloadValues(); LiveViewImageZoomRatio.ValueChanged += LiveViewImageZoomRatio_ValueChanged; Task.Factory.StartNew(InitProps); return(true); }
public async Task CanEnableAndDisableRdpUser() { Capabilities.Add("CAPABILITY_FEATURE_CLUSTERS_CONTRACT_1_SDK"); Capabilities.Add("CAPABILITY_FEATURE_CLUSTERS_CONTRACT_VERSION_3_SDK"); var restClient = ServiceLocator.Instance.Locate <IRdfeClustersResourceRestClientFactory>() .Create(this.DefaultHandler, this.HdInsightCertCred, this.Context, false, SchemaVersionUtils.GetSchemaVersion(Capabilities)); var clusterDnsName = "rdpTestCluster"; var clustersPocoClient = new PaasClustersPocoClient(this.HdInsightCertCred, false, this.Context, Capabilities, restClient); var clusterCreateParameters = new HDInsight.ClusterCreateParametersV2 { Name = clusterDnsName, DefaultStorageAccountKey = IntegrationTestBase.TestCredentials.Environments[0].DefaultStorageAccount.Key, DefaultStorageAccountName = IntegrationTestBase.TestCredentials.Environments[0].DefaultStorageAccount.Name, DefaultStorageContainer = "EnableDisableRdpTest", ClusterSizeInNodes = 2, Location = "East US", UserName = "******", Password = "******", Version = "3.1", ClusterType = ClusterType.Hadoop, }; await clustersPocoClient.CreateContainer(clusterCreateParameters); var cluster = clustersPocoClient.ListContainer(clusterDnsName).Result; var rdpUsername = "******"; await clustersPocoClient.EnableRdp(clusterDnsName, cluster.Location, rdpUsername, "Had00p!123", DateTime.Now.AddHours(1)); cluster = clustersPocoClient.ListContainer(clusterDnsName).Result; var actualRdpUserName = cluster.RdpUserName; Assert.AreEqual(rdpUsername, actualRdpUserName); await clustersPocoClient.DisableRdp(clusterDnsName, cluster.Location); cluster = clustersPocoClient.ListContainer(clusterDnsName).Result; Assert.IsNull(cluster.RdpUserName); await clustersPocoClient.DeleteContainer(cluster.Name, cluster.Location); }
public SpirV(Stream stream) { using (var br = new BinaryReader(stream)) { // Word 0; file magic var magic = br.ReadUInt32(); if (magic != SpirVMagic) { throw new InvalidDataException("File magic was incorrect"); } // Word 1; version number br.ReadByte(); VersionMinor = br.ReadByte(); VersionMajor = br.ReadByte(); br.ReadByte(); // Word 2; generator magic GeneratorMagic = br.ReadUInt32(); // Word 3; bound IDs where 0 < ID < this Bound = br.ReadInt32(); // Word 4; optional instruction schema br.ReadInt32(); // Word 5 and beyond; instructions Instructions = new List <Instruction>(); while (stream.Position < stream.Length) { var inst = new Instruction(br); string sA; int iA; List <int> lA; switch (inst.OpCode) { case OpCodeID.Capability: Capabilities.Add((Capability)inst[1]); break; case OpCodeID.Extension: Extensions.Add(inst.String(1)); break; case OpCodeID.ExtInstImport: ExtInstImports.Add(inst[1], inst.String(2)); break; case OpCodeID.MemoryModel: MemoryModel = (MemoryModel)inst[1]; break; case OpCodeID.EntryPoint: sA = inst.String(3, out iA); lA = new List <int>(); for (var i = iA; i < inst.Length; i++) { lA.Add(inst[i]); } EntryPoints.Add(new EntryPoint((ExecutionModel)inst[1], inst[2], sA, lA)); break; case OpCodeID.ExecutionMode: ExecutionModes.Add(inst[1], (ExecutionMode)inst[2]); break; case OpCodeID.Name: Names.Add(inst[1], inst.String(2)); MemberNames.Add(inst[1], new Dictionary <int, string>()); break; case OpCodeID.MemberName: MemberNames[inst[1]].Add(inst[2], inst.String(3)); break; default: Instructions.Add(new Instruction(br)); break; } } } }
/// <summary> /// Add an AppContainer capability by name. /// </summary> /// <param name="capability_name"></param> public void AddNamedCapability(string capability_name) { Capabilities.Add(NtSecurity.GetCapabilitySid(capability_name)); }
public void AddCapabilities(Capability cap) { LOGGER.GetInstance.Info(String.Format("Add Capabilities: {0}", cap)); Capabilities.Add(cap); }
public WebCameraDevice() { Capabilities.Add(CapabilityEnum.LiveView); }
/// <summary> /// Reads information from WMAppManifest.xml. /// </summary> /// <returns></returns> public bool Read() { if (_fileName == null) { throw new Exception("File name is empty"); } UpdateView(); //Cleanup(); error = XapReadError.NotRead; string TempFileName = _fileName; bool deleteFile = false; IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication(); XDocument reader = null; StreamResourceInfo xapStream = null; try { if (TempFileName.Contains("\\")) { string shortname = _fileName.Substring(_fileName.LastIndexOf("\\") + 1).Replace("%20", " "); if (shortname.Contains(" ")) { bool res = Functions.CopyFile(_fileName, "\\Temp\\temp.xap"); if (res == false) { error = XapReadError.CouldNotCopyFile; throw new Exception("Could not copy file"); } TempFileName = "\\Temp\\temp.xap"; deleteFile = true; } } var uri = new Uri(TempFileName, UriKind.Relative); xapStream = Application.GetResourceStream(uri); if (xapStream == null) { error = XapReadError.OpenError; throw new Exception("Couldn't read XAP"); } _fileSize = xapStream.Stream.Length; // Input WMAppManifest not always has valid encoding. Let's try different ones to find the best. var stream = Application.GetResourceStream(xapStream, new Uri("WMAppManifest.xml", UriKind.Relative)).Stream; if (stream == null) { error = XapReadError.CouldNotOpenWMAppManifest; throw new Exception("Couldn't open WMAppManifest"); } byte[] bytes = new byte[stream.Length]; stream.Read(bytes, 0, bytes.Length); stream.Close(); stream = null; var encodings = new System.Text.Encoding[3] { Encoding.UTF8, Encoding.Unicode, Encoding.BigEndianUnicode }; bool correctEncodingFound = false; for (int i = 0; i < encodings.Length; ++i) { try { Encoding enc = encodings[i]; string text = enc.GetString(bytes, 0, bytes.Length); text = text.Replace("utf-16", "utf-8"); byte[] newBytes = Encoding.UTF8.GetBytes(text); var memStream = new MemoryStream(newBytes); reader = XDocument.Load(memStream); memStream.Close(); memStream = null; } catch (Exception ex) { continue; } correctEncodingFound = true; break; } if (!correctEncodingFound) { error = XapReadError.InvalidEncoding; throw new Exception("Invalid WMAppManifest.xml encoding"); } } catch (Exception ex) { if (error == XapReadError.NotRead) { error = XapReadError.OpenError; } if (deleteFile == true) { Functions.RemoveFile(TempFileName); } UpdateView(); return(false); } _isSigned = false; try { var rs = Application.GetResourceStream(xapStream, new Uri("WMAppPRHeader.xml", UriKind.Relative)); if (rs != null) { _isSigned = true; rs.Stream.Close(); } } catch (Exception ex) { _isSigned = false; } var nodes = reader.Descendants().Descendants <XElement>(); bool AppNodeFound = false; bool ProductIdFound = false; foreach (var node in nodes) { string uri = node.BaseUri; if (node.Name.LocalName == "App") { AppNodeFound = true; var attrs = node.Attributes(); foreach (var attr in attrs) { switch (attr.Name.LocalName) { case "ProductID": _productId = attr.Value; ProductIdFound = true; break; case "Title": _title = attr.Value; break; case "Version": _version = attr.Value; break; case "Author": _author = attr.Value; break; case "Description": _description = attr.Value; break; case "Publisher": _publisher = attr.Value; break; case "Genre": _genre = attr.Value; break; } } _title = ExtractResourceString(xapStream, _title); _version = ExtractResourceString(xapStream, _version); _author = ExtractResourceString(xapStream, _author); _description = ExtractResourceString(xapStream, _description); _publisher = ExtractResourceString(xapStream, _publisher); var elems = node.Elements(); foreach (var elem in elems) { switch (elem.Name.LocalName) { case "IconPath": _applicationIcon = elem.Value; if (ExtractFile(xapStream, isf, _applicationIcon) == true) { string shortFileName = ShortenFileName(_applicationIcon); _applicationIcon = shortFileName; } break; case "Capabilities": var caps = elem.Elements(); foreach (var cap in caps) { Capabilities.Add(cap.Attribute("Name").Value); } break; } } } } xapStream.Stream.Close(); xapStream.Stream.Dispose(); xapStream = null; reader = null; if (!AppNodeFound) { error = XapReadError.NoAppElement; } else if (!ProductIdFound) { error = XapReadError.NoProductId; } if (error == XapReadError.NotRead) { error = XapReadError.Success; } if (deleteFile == true) { Functions.RemoveFile(TempFileName); } UpdateView(); return(true); }