Exemplo n.º 1
0
 public Result OnStartup(UIControlledApplication application)
 {
     //IL_0009: Unknown result type (might be due to invalid IL or missing references)
     //IL_0032: Unknown result type (might be due to invalid IL or missing references)
     //IL_0048: Unknown result type (might be due to invalid IL or missing references)
     //IL_004a: Unknown result type (might be due to invalid IL or missing references)
     //IL_004f: Unknown result type (might be due to invalid IL or missing references)
     //IL_0054: Unknown result type (might be due to invalid IL or missing references)
     //IL_0057: Unknown result type (might be due to invalid IL or missing references)
     //IL_005c: Unknown result type (might be due to invalid IL or missing references)
     //IL_005e: Unknown result type (might be due to invalid IL or missing references)
     //IL_0075: Unknown result type (might be due to invalid IL or missing references)
     //IL_007a: Unknown result type (might be due to invalid IL or missing references)
     //IL_007f: Expected O, but got Unknown
     //IL_007f: Unknown result type (might be due to invalid IL or missing references)
     //IL_0084: Unknown result type (might be due to invalid IL or missing references)
     //IL_0086: Unknown result type (might be due to invalid IL or missing references)
     //IL_00a8: Unknown result type (might be due to invalid IL or missing references)
     //IL_00ca: Unknown result type (might be due to invalid IL or missing references)
     //IL_00e7: Unknown result type (might be due to invalid IL or missing references)
     //IL_00ec: Unknown result type (might be due to invalid IL or missing references)
     //IL_00ee: Unknown result type (might be due to invalid IL or missing references)
     //IL_00f0: Unknown result type (might be due to invalid IL or missing references)
     //IL_00f9: Unknown result type (might be due to invalid IL or missing references)
     //IL_010e: Unknown result type (might be due to invalid IL or missing references)
     //IL_0113: Unknown result type (might be due to invalid IL or missing references)
     try
     {
         string text = "HTSS Add-Ins";
         try
         {
             application.CreateRibbonTab(text);
         }
         catch (ArgumentException)
         {
         }
         catch (InvalidOperationException)
         {
             text = string.Empty;
         }
         string      text2 = "Family Manager Basic";
         string      text3 = "Family Manager Basic";
         RibbonPanel val3  = null;
         val3 = ((!(text == string.Empty)) ? application.CreateRibbonPanel(text, text2) : application.CreateRibbonPanel(text2));
         PushButton val4 = val3.AddItem(new PushButtonData(text3, text3, FamMgrBasicAppln.AddInPath, typeof(FamMgrBasicCmd).FullName));
         val4.set_LargeImage((ImageSource) new BitmapImage(new Uri(Path.Combine(FamMgrBasicAppln.IconsFolder, "FM32.png"), UriKind.Absolute)));
         val4.set_Image((ImageSource) new BitmapImage(new Uri(Path.Combine(FamMgrBasicAppln.IconsFolder, "FM32.png"), UriKind.Absolute)));
         val4.set_ToolTip("Load and save families from other revit projects");
         ContextualHelp contextualHelp = new ContextualHelp(3, FamMgrBasicAppln.IconsFolder + "\\FMB_help.chm");
         val4.SetContextualHelp(contextualHelp);
         return(0);
     }
     catch (Exception ex)
     {
         FamMgr_Util.ShowMessage(ex.ToString());
         return(-1);
     }
 }
Exemplo n.º 2
0
        public void Start(Document docRvt)
        {
            //IL_0002: Unknown result type (might be due to invalid IL or missing references)
            //IL_000b: Unknown result type (might be due to invalid IL or missing references)
            //IL_000c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0011: Unknown result type (might be due to invalid IL or missing references)
            //IL_0026: Unknown result type (might be due to invalid IL or missing references)
            //IL_002b: Unknown result type (might be due to invalid IL or missing references)
            //IL_002d: Unknown result type (might be due to invalid IL or missing references)
            //IL_003e: Unknown result type (might be due to invalid IL or missing references)
            //IL_00b1: Unknown result type (might be due to invalid IL or missing references)
            //IL_00b7: Unknown result type (might be due to invalid IL or missing references)
            //IL_00bc: Unknown result type (might be due to invalid IL or missing references)
            //IL_00bd: Unknown result type (might be due to invalid IL or missing references)
            //IL_00be: Unknown result type (might be due to invalid IL or missing references)
            //IL_00cf: Unknown result type (might be due to invalid IL or missing references)
            //IL_00ec: Unknown result type (might be due to invalid IL or missing references)
            //IL_00ed: Unknown result type (might be due to invalid IL or missing references)
            //IL_010b: Unknown result type (might be due to invalid IL or missing references)
            //IL_010e: Unknown result type (might be due to invalid IL or missing references)
            //IL_0116: Unknown result type (might be due to invalid IL or missing references)
            //IL_0126: Unknown result type (might be due to invalid IL or missing references)
            //IL_0127: Unknown result type (might be due to invalid IL or missing references)
            TransactionGroup val = null;

            try
            {
                StringBuilder stringBuilder = new StringBuilder();
                foreach (Document document in docRvt.get_Application().get_Documents())
                {
                    if (document.get_IsFamilyDocument())
                    {
                        stringBuilder.Append(document.get_Title() + "\n");
                    }
                }
                if (stringBuilder.Length > 0)
                {
                    FamMgr_Util.ShowMessage(EnvMsg.CloseAllFamilyDocument + "\n\n" + stringBuilder);
                }
                else
                {
                    val = new TransactionGroup(docRvt, "FamilyManager Basic");
                    val.Start();
                    IntPtr mainWindowHandle = Process.GetCurrentProcess().MainWindowHandle;
                    (CEntry.FamilyUploaderDlg = new frmFamilyUploader(docRvt)).ShowDialog(new MainWin32Wnd(mainWindowHandle));
                    val.Commit();
                }
            }
            catch (Exception ex)
            {
                FamMgr_Util.ShowMessage(FamMgr_Util.GetMessageString(ex.Message));
                if ((int)val != 0 && val.HasStarted() && !val.HasEnded())
                {
                    val.RollBack();
                }
            }
        }