예제 #1
0
 private void HandlePossibleErrors()
 {
     CurrentLog.Close();
     ScriptHelper.RegisterClientScriptBlock(this, typeof(string), "terminatePendingCallbacks", ScriptHelper.GetScript("var __pendingCallbacks = new Array();"));
     if (!String.IsNullOrEmpty(CurrentError))
     {
         ShowError(CurrentError);
     }
 }
예제 #2
0
    /// <summary>
    /// Ensures log for asynchronous control
    /// </summary>
    private void EnsureAsyncLog()
    {
        pnlLog.Visible     = true;
        pnlContent.Visible = false;

        CurrentError = string.Empty;
        CurrentLog.Close();
        EnsureLog();
    }
예제 #3
0
 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();
 }
예제 #5
0
    /// <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());
    }
예제 #7
0
        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() + ")");
            }
        }
예제 #8
0
        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() + ")");
            }
        }
예제 #9
0
 private void ctlAsync_OnError(object sender, EventArgs e)
 {
     if (ctlAsync.Status == AsyncWorkerStatusEnum.Running)
     {
         ctlAsync.Stop();
     }
     ctlAsync.Parameter = null;
     lblError.Text      = CurrentError;
     CurrentLog.Close();
 }
예제 #10
0
 private void HandlePossibleError()
 {
     if (!string.IsNullOrEmpty(CurrentError))
     {
         lblError.Text    = CurrentError;
         lblError.Visible = true;
     }
     // Clear selection
     CurrentLog.Close();
 }
예제 #11
0
 /// <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;
 }
예제 #12
0
    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();
    }
예제 #13
0
    private void ctlAsync_OnFinished(object sender, EventArgs e)
    {
        lblError.Text = CurrentError;
        CurrentLog.Close();

        if (ctlAsync.Parameter != null)
        {
            AddScript(ctlAsync.Parameter.ToString());
        }
    }
예제 #14
0
        public void Resend(Guid idRequest)
        {
            CurrentLog = LogIntegrationBuilder.Get <TLog>(idRequest);

            if (CurrentLog != null)
            {
                var model = CurrentLog.GetRequest <TRequest>();
                SendSync(model);
            }
        }
예제 #15
0
    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();
 }
예제 #17
0
    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());
    }
예제 #18
0
    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;
        }
    }
예제 #19
0
    private void ctlAsync_OnFinished(object sender, EventArgs e)
    {
        CurrentLog.Close();

        if (!String.IsNullOrEmpty(CurrentError))
        {
            RedirectTo("error", CurrentError);
        }

        URLHelper.Redirect(redirectUrl);
    }
예제 #20
0
    /// <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();
    }
예제 #21
0
 private void ctlAsync_OnFinished(object sender, EventArgs e)
 {
     if (!HandlePossibleErrors())
     {
         AddScript(refreshScript);
     }
     else
     {
         AddScript("DestroyLog();");
     }
     CurrentLog.Close();
 }
예제 #22
0
    /// <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());
    }
예제 #23
0
    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());
    }
예제 #24
0
    /// <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());
    }
예제 #25
0
    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;
    }
예제 #26
0
        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());
        }
예제 #27
0
 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());
        }
    }
예제 #29
0
    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();
 }