public UpdateWindow(UpdateAction action, string url) { this.InitializeComponent(); this.DataContext = this; this.Action = action; this.UpdateUrl = url; }
private void UpdatePeerSubscription(Peer peer, BindingKey subscription, UpdateAction action) { if (subscription.IsEmpty) UpdatePeersMatchingAllMessages(peer, action); else _rootNode.Update(peer, subscription, action); }
public void StartGame() { TitleBomb.Play ("TitleBomb"); TitleSound.Play (); BGM.Stop (); FadeoutBlanket.gameObject.SetActive (true); UpdateNext = UpdateAction.StartFade; }
public UpdateElement(BaseControl control, UpdateAction action) : this() { Control = control; Action = action; if (Action == UpdateAction.None) Console.WriteLine("!Terribile"); }
protected RunspaceConfigurationEntry(string name) { this._action = UpdateAction.None; if (string.IsNullOrEmpty(name) || string.IsNullOrEmpty(name.Trim())) { throw PSTraceSource.NewArgumentNullException("name"); } this._name = name.Trim(); }
private IEnumerable<IDOUpdateItem> get_update_items(IIdoCommandBuilder builder, IEnumerable<IdoItemWrapper> list, UpdateAction action) { var items = new List<IDOUpdateItem>(); list.ForEach(idoItemWrapper => { var item = getUpdateItem(builder, action, idoItemWrapper); items.Add(item); }); return items; }
private static void UpdateList(ref List<Peer> peers, Peer peer, UpdateAction action) { var newPeers = new List<Peer>(peers.Capacity); newPeers.AddRange(peers.Where(x => x.Id != peer.Id)); if (action == UpdateAction.Add) newPeers.Add(peer); peers = newPeers; }
internal RunspaceConfigurationEntry(string name, PSSnapInInfo psSnapin) { this._action = UpdateAction.None; if (string.IsNullOrEmpty(name) || string.IsNullOrEmpty(name.Trim())) { throw PSTraceSource.NewArgumentNullException("name"); } this._name = name.Trim(); if (psSnapin == null) { throw PSTraceSource.NewArgumentException("psSnapin"); } this._PSSnapin = psSnapin; }
void Update() { float time = Time.deltaTime; switch (UpdateNext) { case UpdateAction.StartFade: Color fadecolor = FadeoutBlanket.color; fadecolor.a += time / FadeoutTime; if (fadecolor.a >= 1){ fadecolor.a = 1; UpdateNext = UpdateAction.Start; } FadeoutBlanket.color = fadecolor; break; case UpdateAction.Start: Application.LoadLevel("Menu"); break; } }
private static EventUpdate ProcessUpdate(EventModel eventModel, string message, string oldValue, string newValue, Guid itemID, string itemType, string field, UpdateAction action) { var update = new EventUpdate() { ID = Guid.NewGuid(), Date = DateTime.Now, Event = eventModel.Event, UserID = AccessService.Current.User.ID, Message = message, OldValue = oldValue, NewValue = newValue, ItemId = itemID, ItemType = itemType, Field = field, Action = action }; return update; }
/// <summary>Sets the UI based on the <c>UpdateAction</c>.</summary> /// <param name="action">The action.</param> void SetUI(UpdateAction action) { this.btnAction.IsShieldNeeded = false; this.btnAction.Visibility = Visibility.Collapsed; this.tbHeading.Visibility = Visibility.Collapsed; this.tbStatus.Visibility = Visibility.Collapsed; this.tbSelectedUpdates.Visibility = Visibility.Collapsed; this.tbSelectedUpdates.FontWeight = FontWeights.Normal; this.tbViewOptionalUpdates.Visibility = Visibility.Collapsed; this.tbViewImportantUpdates.Visibility = Visibility.Collapsed; this.line.Visibility = Visibility.Collapsed; App.TaskBar.ProgressState = TaskbarItemProgressState.None; switch (action) { case UpdateAction.Canceled: this.tbHeading.Text = Properties.Resources.UpdatesCanceled; this.tbStatus.Text = Properties.Resources.CancelInstallation; this.btnAction.ButtonText = Properties.Resources.TryAgain; this.tbHeading.Visibility = Visibility.Visible; this.tbStatus.Visibility = Visibility.Visible; this.btnAction.Visibility = Visibility.Visible; break; case UpdateAction.CheckForUpdates: this.tbHeading.Text = Properties.Resources.CheckForUpdatesHeading; this.tbStatus.Text = Properties.Resources.InstallLatestUpdates; this.btnAction.ButtonText = Properties.Resources.CheckForUpdates; this.tbHeading.Visibility = Visibility.Visible; this.tbStatus.Visibility = Visibility.Visible; this.btnAction.Visibility = Visibility.Visible; break; case UpdateAction.CheckingForUpdates: this.tbHeading.Text = Properties.Resources.CheckingForUpdates; this.tbHeading.Visibility = Visibility.Visible; this.line.Y1 = 25; App.TaskBar.ProgressState = TaskbarItemProgressState.Indeterminate; break; case UpdateAction.ConnectingToService: this.tbHeading.Text = Properties.Resources.ConnectingToService; this.tbHeading.Visibility = Visibility.Visible; break; case UpdateAction.DownloadCompleted: this.tbHeading.Text = Properties.Resources.UpdatesReadyInstalled; this.btnAction.ButtonText = Properties.Resources.InstallUpdates; this.tbHeading.Visibility = Visibility.Visible; this.tbSelectedUpdates.Visibility = Visibility.Visible; this.btnAction.Visibility = Visibility.Visible; this.line.Visibility = Visibility.Visible; this.line.Y1 = 25; this.btnAction.IsShieldNeeded = !Core.Instance.IsAdmin; break; case UpdateAction.Downloading: this.tbHeading.Text = Properties.Resources.DownloadingUpdates; this.tbStatus.Text = Properties.Resources.PreparingDownload; this.btnAction.ButtonText = Properties.Resources.StopDownload; this.tbHeading.Visibility = Visibility.Visible; this.tbStatus.Visibility = Visibility.Visible; this.btnAction.Visibility = Visibility.Visible; this.btnAction.IsShieldNeeded = !Core.Instance.IsAdmin; App.TaskBar.ProgressState = TaskbarItemProgressState.Indeterminate; break; case UpdateAction.ErrorOccurred: this.tbHeading.Text = Properties.Resources.ErrorOccurred; this.tbStatus.Text = Properties.Resources.UnknownErrorOccurred; this.btnAction.ButtonText = Properties.Resources.TryAgain; this.tbHeading.Visibility = Visibility.Visible; this.tbStatus.Visibility = Visibility.Visible; this.btnAction.Visibility = Visibility.Visible; App.TaskBar.ProgressState = TaskbarItemProgressState.Error; break; case UpdateAction.InstallationCompleted: this.tbHeading.Text = Properties.Resources.UpdatesInstalledTitle; this.tbHeading.Visibility = Visibility.Visible; this.tbStatus.Visibility = Visibility.Visible; break; case UpdateAction.Installing: this.tbHeading.Text = Properties.Resources.InstallingUpdates; this.tbStatus.Text = Properties.Resources.PreparingInstall; this.btnAction.ButtonText = Properties.Resources.StopInstallation; this.tbHeading.Visibility = Visibility.Visible; this.tbStatus.Visibility = Visibility.Visible; this.btnAction.Visibility = Visibility.Visible; this.btnAction.IsShieldNeeded = !Core.Instance.IsAdmin; App.TaskBar.ProgressState = TaskbarItemProgressState.Indeterminate; break; case UpdateAction.NoUpdates: this.tbHeading.Text = Properties.Resources.ProgramsUpToDate; this.tbStatus.Text = Properties.Resources.NoNewUpdates; this.tbHeading.Visibility = Visibility.Visible; this.tbStatus.Visibility = Visibility.Visible; break; case UpdateAction.RebootNeeded: this.tbHeading.Text = Properties.Resources.RebootNeeded; this.tbStatus.Text = Properties.Resources.SaveAndReboot; this.btnAction.ButtonText = Properties.Resources.RestartNow; this.tbHeading.Visibility = Visibility.Visible; this.tbStatus.Visibility = Visibility.Visible; this.btnAction.Visibility = Visibility.Visible; break; case UpdateAction.UpdatesFound: this.tbHeading.Text = Properties.Resources.DownloadAndInstallUpdates; this.tbSelectedUpdates.Text = Properties.Resources.NoUpdatesSelected; this.btnAction.ButtonText = Properties.Resources.InstallUpdates; this.tbHeading.Visibility = Visibility.Visible; this.tbSelectedUpdates.Visibility = Visibility.Visible; this.line.Visibility = Visibility.Visible; this.btnAction.IsShieldNeeded = !Core.Instance.IsAdmin; break; } }
public UpdateHelperData(UpdateStep step) { Action = UpdateAction.UpdateStep; UpdateStep = step; }
private static MembershipUpdate ProcessMembershipUpdate(MemberModel memberModel, string message, string oldValue, string newValue, Guid itemID, string itemType, string field, UpdateAction action) { var update = new MembershipUpdate() { ID = Guid.NewGuid(), Date = DateTime.Now, MemberID = memberModel.Member.ID, UserID = AccessService.Current.User.ID, Message = message, OldValue = oldValue, NewValue = newValue, ItemId = itemID, ItemType = itemType, Field = field, Action = Convert.ToInt32(action) }; return update; }
static void AddAction(UpdateAction action) { if (!_actions.Contains(action)) _actions.Insert(0, action); }
private void StartDrag(PointerEventInfo info, ILevelGeometry viewport, MergeAction action) { TileCoord location = TileLocation(info); int x = (int)(location.X * Layer.TileWidth); int y = (int)(location.Y * Layer.TileHeight); _band = new RubberBand(new Point(location.X, location.Y)); _selectionAnnot = new SelectionAnnot(new Point((int)info.X, (int)info.Y)) { Fill = new SolidColorBrush(new Color(76, 178, 255, 128)), }; _annots.Add(_selectionAnnot); _action = UpdateAction.Box; _mergeAction = action; StartAutoScroll(info, viewport); }
private void EndDrag(PointerEventInfo info, ILevelGeometry viewport) { Rectangle selection = ClampSelection(_band.Selection); CompoundCommand command = new CompoundCommand(); if (_mergeAction == MergeAction.New || !_selectLayer.HasSelection || _selectLayer.TileSelection.Floating) ResetSelection(command); switch (_mergeAction) { case MergeAction.New: ModifyNewTileSelectionCommand newCommand = new ModifyNewTileSelectionCommand(_selectLayer); newCommand.AddLocations(TileCoordsFromRegion(selection)); command.AddCommand(newCommand); break; case MergeAction.Add: ModifyAddTileSelectionCommand addCommand = new ModifyAddTileSelectionCommand(_selectLayer); addCommand.AddLocations(TileCoordsFromRegion(selection)); command.AddCommand(addCommand); break; case MergeAction.Remove: ModifyRemoveTileSelectionCommand removeCommand = new ModifyRemoveTileSelectionCommand(_selectLayer); removeCommand.AddLocations(TileCoordsFromRegion(selection)); command.AddCommand(removeCommand); break; } if (command.Count > 0) History.Execute(command); _annots.Remove(_selectionAnnot); _action = UpdateAction.None; EndAutoScroll(info, viewport); }
public int Update(Peer peer, BindingKey subscription, UpdateAction action) { if (IsLeaf(subscription)) { var update = UpdateList(peer, action); _peerCountIncludingChildren += update; return update; } var nextPart = subscription.GetPart(_nextPartIndex); if (nextPart == "#" || nextPart == null) { var sharpNode = GetOrCreateSharpNode(); return UpdateChildNode(sharpNode, peer, subscription, action, null, _removeSharpNode); } if (nextPart == "*") { var starNode = GetOrCreateStarNode(); return UpdateChildNode(starNode, peer, subscription, action, null, _removeStarNode); } var childNode = GetOrAddChildNode(nextPart); return UpdateChildNode(childNode, peer, subscription, action, nextPart, _removeNode); }
/// <summary> /// Enqueues a control for update. /// </summary> /// <remarks>Multiple events in rapid succession may cause a control to update its appearance. /// This makes sure that a control is not added multiple times to the queue if it has not yet /// been updated. /// <para>When a control is updated, the entire vertex buffer is discared and rewritten, for /// performance purposes.</para></remarks> /// <param name="control">The control to update.</param> public void EnqueueForUpdate(BaseControl control, UpdateAction updateAction) { if (control.IsBeingUpdated) return; ///TODO //Console.WriteLine(string.Format("Enqueing {0} for {1}",control.Id, updateAction)); UpdateElement updateElement = new UpdateElement(control, updateAction); updateQueue.Enqueue(updateElement); control.IsBeingUpdated = true; uiUCommand.Resume(); }
/// <summary> /// Updates this instance of the control by updating the current appearance /// status and rewriting the vertexbuffer if applicable. /// </summary> public virtual void UpdateAppearance(UpdateAction updateAction = UpdateAction.UpdateShape) { if (isVisible && !DesignMode && (ApplyStatusChanges || updateAction == UpdateAction.Move) && !IsBeingRemoved && Description.HasShape) { UpdateStatus(); OdysseyUI.CurrentHud.EnqueueForUpdate(this, updateAction); } return; }
/// <summary> /// Updates a zone. /// </summary> /// <param name="zoneId">ID of the zone</param> /// <param name="version">The expected version of the zone on which the changes should be applied.</param> /// <param name="action">The update action to be performed on the zone.</param> /// <returns>Zone</returns> /// <see href="http://dev.commercetools.com/http-api-projects-zones.html#update-zone"/> public Task <Response <Zone> > UpdateZoneAsync(string zoneId, int version, UpdateAction action) { return(UpdateZoneAsync(zoneId, version, new List <UpdateAction> { action })); }
/// <summary> /// Updates a zone. /// </summary> /// <param name="zone">Zone</param> /// <param name="action">The update action to be performed on the zone.</param> /// <returns>Zone</returns> /// <see href="http://dev.commercetools.com/http-api-projects-zones.html#update-zone"/> public Task <Response <Zone> > UpdateZoneAsync(Zone zone, UpdateAction action) { return(UpdateZoneAsync(zone.Id, zone.Version, new List <UpdateAction> { action })); }
/// <summary> /// If update dialog is customized by returning <c>true</c> in <see cref="ReleaseAvailableCallback"/>, /// You need to tell the distribute SDK using this function what is the user action. /// </summary> /// <param name="updateAction">Update action. On mandatory update, you can only pass <see cref="UpdateAction.Update"/></param> public static void NotifyUpdateAction(UpdateAction updateAction) { DistributeInternal.NotifyUpdateAction((int)updateAction); }
private IDOUpdateItem getUpdateItem(IIdoCommandBuilder builder, UpdateAction action, IdoItemWrapper idoItemWrapper) { var item = new IDOUpdateItem(action); item.Action = GetUpdateActionFromBuilder(builder); item.ItemID = idoItemWrapper[IdoConstants.KEY].ToString(); var propertyKeys = builder.Properties.Keys; propertyKeys.ForEach(key => item.Properties.Add(key, builder.Properties[key])); builder.GetChildren().ForEach(child => { var updateCollectionRequestData = new List<UpdateCollectionRequestData>(); idoItemWrapper.Records.Where(record => record.IdoName == child.IdoName) .ForEach(record => updateCollectionRequestData.Add(getNestedUpdate(child, record))); updateCollectionRequestData.ForEach(request => item.NestedUpdates.Add(request)); }); return item; }
private static void ReverseApply(out UpdateAction<ManageableMarketDataSnapshot> fwdAction, out WeakReference beforeRef, out WeakReference afterRef) { var snapshotManager = Context.MarketDataSnapshotManager; using (var proc = snapshotManager.CreateFromViewDefinition(RemoteViewClientBatchTests.ViewName)) { using (var newProc = snapshotManager.CreateFromViewDefinition(RemoteViewClientBatchTests.ViewName)) { //TODO more strict var testedMds = proc.Snapshot.GlobalValues.Values.First().Key; var valueSnapshots = newProc.Snapshot.GlobalValues.Values[testedMds]; valueSnapshots.Remove(valueSnapshots.Keys.First()); UpdateAction<ManageableMarketDataSnapshot> fwd = proc.Snapshot.PrepareUpdateFrom(newProc.Snapshot); UpdateAction<ManageableMarketDataSnapshot> bwd = newProc.Snapshot.PrepareUpdateFrom(proc.Snapshot); var pre = proc.Snapshot.GlobalValues.Values[testedMds].ToDictionary(k => k.Key, k => k.Value.MarketValue); fwd.Execute(proc.Snapshot); bwd.Execute(proc.Snapshot); var post = proc.Snapshot.GlobalValues.Values[testedMds].ToDictionary(k => k.Key, k => k.Value.MarketValue); Assert.True(pre.Keys.Concat(post.Keys).All(k => pre[k] == post[k])); bwd.Execute(newProc.Snapshot); fwd.Execute(newProc.Snapshot); beforeRef = new WeakReference(proc.Snapshot); fwdAction = fwd; afterRef = new WeakReference(newProc.Snapshot); } } }
private int UpdateChildNode(SubscriptionNode childNode, Peer peer, BindingKey subscription, UpdateAction action, string childNodePart, Action<SubscriptionNode, string> remover) { var update = childNode.Update(peer, subscription, action); _peerCountIncludingChildren += update; if (childNode.IsEmpty) remover(this, childNodePart); return update; }
private void EndMove(PointerEventInfo info, ILevelGeometry viewport) { Command command = new MoveTileSelectionCommand(_selectLayer, _initialOffset, _selectLayer.TileSelectionOffset); History.Execute(command); _action = UpdateAction.None; EndAutoScroll(info, viewport); }
private int UpdateList(Peer peer, UpdateAction action) { return action == UpdateAction.Add ? AddToList(peer) : RemoveFromList(peer); }
private void StartMove(PointerEventInfo info, ILevelGeometry viewport) { _initialLocation = new Point((int)info.X - Layer.TileWidth / 2, (int)info.Y - Layer.TileHeight / 2); _initialOffset = _selectLayer.TileSelectionOffset; if (!_selectLayer.TileSelection.Floating) { Command command = new FloatTileSelectionCommand(Layer, _selectLayer); History.Execute(command); } _action = UpdateAction.Move; StartAutoScroll(info, viewport); }
public UpdateHelperData(UpdateAction action) { Action = action; }
/* void StartNewSelfAndClose() { bool checkForClients = false; // when this function is called in the constructor // (i.e. before the handle for the form is created) // then the pipeserver will not have yet been created if (!updateHelper.RunningServer) { checkForClients = true; updateHelper.StartPipeServer(this); } Process clientProcess = new Process { StartInfo = { FileName = newSelfLocation, //NOTE: (Very goddamn important - change this and die) // Arguments must have the "clear space" before the closing quote after // baseDirectory. "Why?" you ask, because Windows is the offspring // of a Unicorn and an Angel. Everyone knows that Angels don't // respect backslash-quote combos. // And Unicorns are racists. // The non-absurd reason is that if you have a baseDirectory variable with // a trailing slash then a quote character adjacent to this slash (i.e. // with no space between the slash and quote) the commandline args // get fubar-ed. A base directory with a trailing slash is valid // input, thus the slash-space-quote combo must remain. // start the client in automatic update mode (a.k.a. wait mode) Arguments = "-cdata:\"" + clientFileLoc + "\" -basedir:\"" + baseDirectory + " \" /autoupdate /ns", WindowStyle = ProcessWindowStyle.Hidden } }; clientProcess.Start(); if (checkForClients) { // there must be at least one client running to receive this message int timeSpent = 0; while (updateHelper.TotalConnectedClients == 0) { // if we've already waited 30 seconds, we've wait long enough // something has gone wrong with the AutomaticUpdater control // no point in waiting around any longer. if (timeSpent == 30000) break; // wait 1/3 of a second timeSpent += 300; Thread.Sleep(300); } } // tell all the clients that there's a new wyUpdate updateHelper.SendNewWyUpdate(UpdateHelperData.PipenameFromFilename(newSelfLocation), clientProcess.Id); CancelUpdate(true); } * */ void UpdateHelper_RequestReceived(object sender, UpdateAction a, UpdateStep s) { if (a == UpdateAction.Cancel) { CancelUpdate(true); return; } // filter out-of-order requests (never assume the step 's' is coming in the correct order) if (FilterBadRequest(s)) return; // set the current update step (ForceCheck == Check) autoUpdateStepProcessing = s == UpdateStep.ForceRecheckForUpdate ? UpdateStep.CheckForUpdate : s; switch (s) { case UpdateStep.ForceRecheckForUpdate: //TODO: perhaps delete old crufty files // show the checking frame regardless of the current step panelDisplaying.ClearText(); ShowFrame(Frame.Checking); CheckForUpdate(); break; case UpdateStep.CheckForUpdate: CheckForUpdate(); break; case UpdateStep.DownloadUpdate: ShowFrame(Frame.InstallUpdates); DownloadUpdate(); break; case UpdateStep.BeginExtraction: update.CurrentlyUpdating = UpdateOn.Extracting; InstallUpdates(update.CurrentlyUpdating); break; case UpdateStep.RestartInfo: // send a success signal (with the Window Handle) updateHelper.SendSuccess(autoUpdateStepProcessing, (int)Handle); break; case UpdateStep.Install: if (!updateHelper.IsAService) { // show self & make topmost Visible = true; TopMost = true; TopMost = false; } if (needElevation) { // save the RestartInfo details (file to launch, where to save the update success details) //SaveAutoUpdateData(UpdateStepOn.UpdateReadyToInstall); StartSelfElevated(); return; } // install the regular update update.CurrentlyUpdating = UpdateOn.ClosingProcesses; InstallUpdates(update.CurrentlyUpdating); break; } }
/// <summary> /// Updates a Payment. /// </summary> /// <param name="payment">Payment</param> /// <param name="action">The update action to be performed on the payment.</param> /// <returns>Payment</returns> /// <see href="http://dev.commercetools.com/http-api-projects-payments.html#update-payment"/> public Task <Response <Payment> > UpdatePaymentAsync(Payment payment, UpdateAction action) { return(UpdatePaymentAsync(payment.Id, payment.Version, new List <UpdateAction> { action })); }
/// <summary> /// (Partial) updates are made to an existing product by sending a list of actions to be applied. The actions are applied in the given order. If price selection query parameters are provided, the selected prices will be added to the response. /// </summary> /// <param name="product">Product</param> /// <param name="action">The update action to apply to the product.</param> /// <param name="priceCurrency">The currency code compliant to ISO 4217. Enables price selection.</param> /// <param name="priceCountry">A two-digit country code as per ISO 3166-1 alpha-2. Enables price selection. Can only be used in conjunction with the priceCurrency parameter.</param> /// <param name="priceCustomerGroup">Enables price selection. Can only be used in conjunction with the priceCurrency parameter.</param> /// <param name="priceChannel">Enables price selection. Can only be used in conjunction with the priceCurrency parameter.</param> /// <returns>Product</returns> /// <see href="http://dev.commercetools.com/http-api-projects-products.html#update-product"/> public Task <Response <Product> > UpdateProductAsync(Product product, UpdateAction action, string priceCurrency = null, string priceCountry = null, Guid priceCustomerGroup = new Guid(), Guid priceChannel = new Guid()) { return(UpdateProductByIdAsync(product.Id, product.Version, new List <UpdateAction> { action }, priceCurrency, priceCountry, priceCustomerGroup, priceChannel)); }
/// <summary> /// Updates a cart discount. /// </summary> /// <param name="cartDiscount">CartDiscount</param> /// <param name="action">The update action to be performed on the cart discount.</param> /// <returns>CartDiscount</returns> /// <see href="https://dev.commercetools.com/http-api-projects-cartDiscounts.html#update-cartdiscount"/> public Task <Response <CartDiscount> > UpdateCartDiscountAsync(CartDiscount cartDiscount, UpdateAction action) { return(UpdateCartDiscountAsync(cartDiscount.Id, cartDiscount.Version, new List <UpdateAction> { action })); }
private void UpdatePeersMatchingAllMessages(Peer peer, UpdateAction action) { UpdateList(ref _peersMatchingAllMessages, peer, action); }
public static void Update(T data, Expression <Func <Selector <T>, Selector <T> > > expression, UpdateAction action, Expression <Func <T, IList> > fields, bool immediately = true) { if (!Support) { return; } try { var tenant = CoreContext.TenantManager.GetCurrentTenant().TenantId; Indexer.Update(data, expression, tenant, action, fields, immediately); } catch (Exception e) { Logger.Error("Update", e); } }
private void downloadUpdate(UpdateXml update, string location, UpdateAction action) { UpdateDownloader form = new UpdateDownloader(update.Uri, update.MD5, applicationInfos[0].ApplicationIcon); DialogResult result = form.ShowDialog(applicationInfos[0].Context); form.Close(); if (result == DialogResult.OK) { string currentPath = location; string newPath = Path.Combine(Path.GetDirectoryName(currentPath), update.FileName); if (action == UpdateAction.RESTART) updateApplication(form.TempFilePath, currentPath, newPath, update.LaunchArgs, false); else if (action == UpdateAction.INSTALL) updateApplication(form.TempFilePath, currentPath, newPath, update.LaunchArgs, true); else if (action == UpdateAction.FILECOPY) updateFile(form.TempFilePath, currentPath, newPath, update.Version.ToString()); } else if (result == DialogResult.Abort) { MessageBox.Show(Strings.updateCancelled, "Update Download "+Strings.cancelled, MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show(Strings.updateError, "Update Download "+Strings.error, MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Updates a Customer. /// </summary> /// <param name="customer">Customer</param> /// <param name="action">The update action to be performed on the Customer.</param> /// <returns>Customer</returns> /// <see href="http://dev.commercetools.com/http-api-projects-customers.html#update-customer"/> public Task <Response <Customer> > UpdateCustomerAsync(Customer customer, UpdateAction action) { return(UpdateCustomerAsync(customer.Id, customer.Version, new List <UpdateAction> { action })); }