示例#1
0
 private void DoErrorToClipboard()
 {
     try
     {
         Clipboard.SetText(rbtnRenderError.ToolTip);
     }
     catch (Exception ex)
     {
         MessageForm.Error(string.Format(Strings.MainForm.ClipboardErrorFmt, ex.Message));
     }
 }
示例#2
0
 private void DoPasteReport()
 {
     try
     {
         PasteDataObject(Clipboard.GetDataObject());
     }
     catch (Exception ex)
     {
         MessageForm.Error(string.Format(Strings.MainForm.ClipboardErrorFmt, ex.Message));
     }
 }
示例#3
0
 private void Designer_DoCopy()
 {
     try
     {
         _flexDesigner.DoCopy();
     }
     catch (Exception ex)
     {
         MessageForm.Error(string.Format(Strings.MainForm.ClipboardErrorFmt, ex.Message));
     }
 }
示例#4
0
 private void Designer_DoPaste()
 {
     try
     {
         _flexDesigner.DoPaste();
     }
     catch (Exception ex)
     {
         MessageForm.Error(string.Format(Strings.MainForm.ClipboardErrorFmt, ex.Message));
     }
     _reportList.UpdateIcons(); // due to possible removal of subreports
 }
示例#5
0
 private void DoCutReport()
 {
     if (_reportList.SelectedItem != null)
     {
         try
         {
             Clipboard.SetDataObject(BuildDataObject());
             DeleteReport(true);
         }
         catch (Exception ex)
         {
             MessageForm.Error(string.Format(Strings.MainForm.ClipboardErrorFmt, ex.Message));
         }
     }
 }
示例#6
0
        private void DoCopyReport()
        {
            // copy report to clipboard
            if (_reportList.SelectedItem == null)
            {
                return;
            }

            try
            {
                Clipboard.SetDataObject(BuildDataObject());
            }
            catch (Exception ex)
            {
                MessageForm.Error(string.Format(Strings.MainForm.ClipboardErrorFmt, ex.Message));
            }
            UpdateUI(false);
        }
示例#7
0
 public static void Associate(bool on)
 {
     try
     {
         if (on)
         {
             string defaultIcon     = Application.ExecutablePath;
             string openWithCommand = OpenWithCommand();
             RegisterFileAssociations(progID, appID, friendlyName, defaultIcon, openWithCommand, ext1);
         }
         else
         {
             UnregisterFileAssociations(progID, ext1);
         }
     }
     catch (Exception e)
     {
         MessageForm.Error(string.Format(Strings.AppSettings.ErrorSettingFileAssocFmt, e.Message));
     }
 }