Esempio n. 1
0
        public static TreeNode GetAppropriateTreeNode(Category oCategory, TreeView treeFamily)
        {
            //IL_0003: Unknown result type (might be due to invalid IL or missing references)
            //IL_0004: Unknown result type (might be due to invalid IL or missing references)
            //IL_000a: Invalid comparison between Unknown and O
            //IL_0025: 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_003b: 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_006a: Unknown result type (might be due to invalid IL or missing references)
            //IL_0070: Unknown result type (might be due to invalid IL or missing references)
            //IL_007d: Unknown result type (might be due to invalid IL or missing references)
            //IL_007e: Expected O, but got Unknown
            TreeNode treeNode = null;

            treeNode = (((object)oCategory.get_Parent() != null) ? FamMgr_Util.GetAppropriateTreeNode(oCategory.get_Parent(), treeFamily) : treeFamily.Nodes[0]);
            TreeNode treeNode2 = null;

            if (treeNode.Nodes.ContainsKey(oCategory.get_Name()))
            {
                treeNode2 = treeNode.Nodes[oCategory.get_Name()];
            }
            else
            {
                treeNode2           = treeNode.Nodes.Add(oCategory.get_Name(), oCategory.get_Name());
                treeNode2.Tag       = (object)oCategory;
                treeNode2.ForeColor = frmFamilyUploader.DISABLED_FAMILY_COLOR;
            }
            return(treeNode2);
        }
Esempio n. 2
0
        public static string CreateTemporaryPathForFamily(FamilyDetail famDetail)
        {
            string str  = FamMgr_Util.CreateTempFolder(FamMgr_Util.WorkingDirectory, famDetail.CategoryName + "-" + famDetail.ElmID);
            string text = FamMgr_Util.MakeValidFileName(famDetail.FamilyName);

            text = ((text == string.Empty) ? famDetail.ElmID.ToString() : text);
            return(str + "\\" + text + ".rfa");
        }
Esempio n. 3
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);
     }
 }
Esempio n. 4
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();
                }
            }
        }