private void HandlePossibleErrors() { CurrentLog.Close(); ScriptHelper.RegisterClientScriptBlock(this, typeof(string), "terminatePendingCallbacks", ScriptHelper.GetScript("var __pendingCallbacks = new Array();")); if (!String.IsNullOrEmpty(CurrentError)) { ShowError(CurrentError); } }
/// <summary> /// Ensures log for asynchronous control /// </summary> private void EnsureAsyncLog() { pnlLog.Visible = true; pnlContent.Visible = false; CurrentError = string.Empty; CurrentLog.Close(); EnsureLog(); }
private void HandlePossibleErrors() { CurrentLog.Close(); TerminateCallbacks(); lblError.Text = CurrentError; lblInfo.Text = CurrentInfo; ugRecycleBin.ResetSelection(); ReloadFilter((CurrentSite != null) ? CurrentSite.SiteID : -1, IsSingleSite, true); }
private void HandlePossibleError() { if (!string.IsNullOrEmpty(CurrentError)) { ShowError(CurrentError); } // Clear selection CurrentLog.Close(); }
/// <summary> /// On finished event /// </summary> private void ctlAsync_OnFinished(object sender, EventArgs e) { mErrorText = CurrentError; CurrentLog.Close(); pnlLog.Visible = false; pnlGrid.Visible = true; PostProcessData(); }
/// <summary> /// Runs async thread. /// </summary> /// <param name="action">Method to run</param> protected void RunAsync(AsyncAction action) { pnlLog.Visible = true; CurrentLog.Close(); EnsureLog(); ctlAsync.RunAsync(action, WindowsIdentity.GetCurrent()); }
protected virtual void OnWindowNameChanged(object sender, NameChangeEventArgs e) { AWindow awin = WindowHelper.windowList.FirstOrDefault(awindow => awindow.Hwnd == e.HWND); if (awin != null) { awin.Title = e.newName; CurrentLog.Add(LogEntryType.WindowsEvent, "Window Name Changed: " + e.oldName + " to " + e.newName + " (" + e.HWND.ToString() + ")"); } }
protected virtual void OnWindowDestroyed(object sender, OpenCloseEventArgs e) { AWindow awin = WindowHelper.windowList.FirstOrDefault(awindow => awindow.Hwnd == e.HWND); if (awin != null) { WindowHelper.windowList.Remove(awin); CurrentLog.Add(LogEntryType.WindowsEvent, "Window Destroyed: " + e.Title + ", (" + e.HWND.ToString() + ")"); } }
private void ctlAsync_OnError(object sender, EventArgs e) { if (ctlAsync.Status == AsyncWorkerStatusEnum.Running) { ctlAsync.Stop(); } ctlAsync.Parameter = null; lblError.Text = CurrentError; CurrentLog.Close(); }
private void HandlePossibleError() { if (!string.IsNullOrEmpty(CurrentError)) { lblError.Text = CurrentError; lblError.Visible = true; } // Clear selection CurrentLog.Close(); }
/// <summary> /// On finished event /// </summary> private void ctlAsync_OnFinished(object sender, EventArgs e) { if (!string.IsNullOrEmpty(CurrentError)) { mErrorText = CurrentError; } CurrentLog.Close(); pnlLog.Visible = false; pnlGrid.Visible = true; }
private void ctlAsync_OnCancel(object sender, EventArgs e) { ctlAsync.Parameter = null; string cancel = GetString("DeleteDocument.DeletionCanceled"); AddLog(cancel); ltlScript.Text += ScriptHelper.GetScript("var __pendingCallbacks = new Array();RefreshCurrent();"); ShowConfirmation(cancel); CurrentLog.Close(); }
private void ctlAsync_OnFinished(object sender, EventArgs e) { lblError.Text = CurrentError; CurrentLog.Close(); if (ctlAsync.Parameter != null) { AddScript(ctlAsync.Parameter.ToString()); } }
public void Resend(Guid idRequest) { CurrentLog = LogIntegrationBuilder.Get <TLog>(idRequest); if (CurrentLog != null) { var model = CurrentLog.GetRequest <TRequest>(); SendSync(model); } }
protected void btnSaveAll_Click(object sender, EventArgs e) { pnlLog.Visible = true; CurrentError = string.Empty; CurrentLog.Close(); EnsureLog(); ctlAsync.RunAsync(Deploy, WindowsIdentity.GetCurrent()); }
private void ctlAsync_OnCancel(object sender, EventArgs e) { CurrentInfo = GetString(canceledString); ltlScript.Text += ScriptHelper.GetScript("var __pendingCallbacks = new Array();"); if (!String.IsNullOrEmpty(CurrentInfo)) { ShowConfirmation(CurrentInfo); } CurrentLog.Close(); }
protected void btnSourceControl_Click(object sender, EventArgs e) { pnlLog.Visible = true; CurrentError = string.Empty; CurrentLog.Close(); EnsureLog(); ctlAsync.Parameter = new bool[] { chkSaveCSS.Checked, chkSaveLayouts.Checked, chkSavePageTemplate.Checked, chkSaveTransformation.Checked, chkSaveWebpartLayout.Checked, chkSaveWebpartContainer.Checked }; ctlAsync.RunAsync(SaveExternally, WindowsIdentity.GetCurrent()); }
protected void btnOk_OnClick(object sender, EventArgs e) { pnlLog.Visible = true; //pnlContent.Visible = false; CurrentError = string.Empty; CurrentLog.Close(); EnsureLog(); int actionValue = ValidationHelper.GetInteger(drpAction.SelectedValue, 0); Action action = (Action)actionValue; int whatValue = ValidationHelper.GetInteger(drpWhat.SelectedValue, 0); currentWhat = (What)whatValue; ctlAsync.Parameter = new BinSettingsContainer(currentUser, currentWhat); switch (action) { case Action.Restore: switch (currentWhat) { case What.AllDocuments: titleElemAsync.TitleImage = GetImageUrl("CMSModules/CMS_RecycleBin/restoreall.png"); break; case What.SelectedDocuments: titleElemAsync.TitleImage = GetImageUrl("CMSModules/CMS_RecycleBin/restoreselected.png"); if (ugRecycleBin.SelectedItems.Count <= 0) { return; } break; } titleElemAsync.TitleText = GetString("Recyclebin.RestoringDocuments"); RunAsync(Restore); break; case Action.Delete: switch (currentWhat) { case What.AllDocuments: titleElemAsync.TitleImage = GetImageUrl("CMSModules/CMS_RecycleBin/emptybin.png"); break; case What.SelectedDocuments: titleElemAsync.TitleImage = GetImageUrl("CMSModules/CMS_RecycleBin/emptyselected.png"); break; } titleElemAsync.TitleText = GetString("recyclebin.emptyingbin"); RunAsync(EmptyBin); break; } }
private void ctlAsync_OnFinished(object sender, EventArgs e) { CurrentLog.Close(); if (!String.IsNullOrEmpty(CurrentError)) { RedirectTo("error", CurrentError); } URLHelper.Redirect(redirectUrl); }
/// <summary> /// On cancel event /// </summary> private void ctlAsync_OnCancel(object sender, EventArgs e) { ctlAsync.Parameter = null; AddError(ResHelper.GetString("validation.validationcanceled")); ScriptHelper.RegisterStartupScript(this, typeof(string), "CancelLog", ScriptHelper.GetScript("var __pendingCallbacks = new Array();")); mInfoText = CurrentError; pnlLog.Visible = false; pnlGrid.Visible = true; CurrentLog.Close(); PostProcessData(); }
private void ctlAsync_OnFinished(object sender, EventArgs e) { if (!HandlePossibleErrors()) { AddScript(refreshScript); } else { AddScript("DestroyLog();"); } CurrentLog.Close(); }
/// <summary> /// Executes given action asynchronously /// </summary> /// <param name="action">Action to run</param> protected void RunAsync(AsyncAction action) { pnlLog.Visible = true; CurrentLog.Close(); EnsureLog(); CurrentError = string.Empty; CurrentInfo = string.Empty; eventType = EventLogProvider.EVENT_TYPE_INFORMATION; plcContent.Visible = false; ctlAsync.RunAsync(action, WindowsIdentity.GetCurrent()); }
protected void btnOK_Click(object sender, EventArgs e) { pnlLog.Visible = true; pnlContent.Visible = false; CurrentError = string.Empty; CurrentLog.Close(); EnsureLog(); ctlAsync.Parameter = currentUser.PreferredCultureCode + ";" + currentSite.SiteName; ctlAsync.RunAsync(Delete, WindowsIdentity.GetCurrent()); }
/// <summary> /// Runs async thread. /// </summary> /// <param name="action">Method to run</param> protected void RunAsync(AsyncAction action) { pnlLog.Visible = true; //pnlContent.Visible = false; CurrentError = string.Empty; CurrentInfo = string.Empty; CurrentLog.Close(); EnsureLog(); ctlAsync.RunAsync(action, WindowsIdentity.GetCurrent()); }
private void ctlAsync_OnError(object sender, EventArgs e) { if (ctlAsync.Status == AsyncWorkerStatusEnum.Running) { ctlAsync.Stop(); } ctlAsync.Parameter = null; ShowError(CurrentError); CurrentLog.Close(); pnlLog.Visible = false; }
protected virtual void OnMoveSizeStart(object sender, WinEventProcEventArgs e) { MouseInput.GetMousePoint(); WindowDraggingHWND = e._hwnd; IsStartDragging = true; WindowHelper.GetWindowRect(e._hwnd, ref currentWindowRECT); lastWindowRECT = currentWindowRECT; string name = WindowHelper.GetTitleOfWindow(e._hwnd); CurrentLog.Add(LogEntryType.WindowsEvent, "Window MoveSize Started: " + name + " (" + e._hwnd.ToString() + ") at " + MouseInput.mousePoint.ToString()); }
private void ctlAsync_OnError(object sender, EventArgs e) { if (ctlAsync.Status == AsyncWorkerStatusEnum.Running) { ctlAsync.Stop(); } ctlAsync.Parameter = null; if (!String.IsNullOrEmpty(CurrentError)) { ShowError(CurrentError); } CurrentLog.Close(); }
private void ctlAsync_OnFinished(object sender, EventArgs e) { if (!String.IsNullOrEmpty(CurrentError)) { ShowError(CurrentError); } CurrentLog.Close(); if (ctlAsync.Parameter != null) { AddScript(ctlAsync.Parameter.ToString()); } }
private void ctlAsync_OnFinished(object sender, EventArgs e) { CurrentLog.Close(); if (!String.IsNullOrEmpty(CurrentWarning)) { ShowWarning(CurrentWarning); } if (!String.IsNullOrEmpty(CurrentError)) { ShowError(CurrentError); } }
private void HandlePossibleErrors() { CurrentLog.Close(); TerminateCallbacks(); if (!String.IsNullOrEmpty(CurrentError)) { ShowError(CurrentError); } if (!String.IsNullOrEmpty(CurrentInfo)) { ShowConfirmation(CurrentInfo); } ugRecycleBin.ResetSelection(); }