Exemple #1
0
        public void ShowWalker(UIApplication uiapp)
        {
            if (walkerWindow == null)
            {
                WalkerHandler handler = new WalkerHandler(uiapp);
                ExternalEvent exEvent = ExternalEvent.Create(handler);

                walkerWindow         = new WalkerWindow(exEvent, handler);
                walkerWindow.Closed += WindowClosed;
                walkerWindow.Show();
            }
        }
Exemple #2
0
        public Result OnStartup(UIControlledApplication application)
        {
            thisApp      = this;
            walkerWindow = null;

            try { application.CreateRibbonTab(tabName); }
            catch { }

            AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);

            RibbonPanel rp = application.CreateRibbonPanel(tabName, "BCF");
            string      currentAssembly = System.Reflection.Assembly.GetAssembly(this.GetType()).Location;

            BitmapSource walkerImage = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(Properties.Resources.walker.GetHbitmap(), IntPtr.Zero, System.Windows.Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());

            PushButton walkerButton = rp.AddItem(new PushButtonData("smartBCF", "smartBCF", currentAssembly, "HOK.SmartBCF.BCFCommand")) as PushButton;

            walkerButton.LargeImage = walkerImage;

            return(Result.Succeeded);
        }
Exemple #3
0
 public void WindowClosed(object sender, System.EventArgs e)
 {
     walkerWindow = null;
 }