예제 #1
0
        public AddinModule()
        {
            InitializeComponent();

            // Please add any initialization code to the AddinInitialize event handler
            commandBarOption  = new CommandBarOption();
            imageToolBar      = new ImageToolBar();
            imageLargeToolBar = new ImageLargeToolbar();
            openkmAddIn       = new OpenKMAddIn();

            // Buttons
            this.configureButton.ImageList      = imageToolBar.get();
            this.addButton.ImageList            = imageToolBar.get();
            this.editButton.ImageList           = imageToolBar.get();
            this.checkinButton.ImageList        = imageToolBar.get();
            this.cancelCheckoutButton.ImageList = imageToolBar.get();
            this.configureButton.Image          = ImageToolBar.IMG_TOOLBAR_OPENKM;
            this.addButton.Image                            = ImageToolBar.IMG_TOOLBAR_ADD;
            this.editButton.Image                           = ImageToolBar.IMG_TOOLBAR_EDIT;
            this.checkinButton.Image                        = ImageToolBar.IMG_TOOLBAR_CHECKIN;
            this.cancelCheckoutButton.Image                 = ImageToolBar.IMG_TOOLBAR_CANCELCHECKOUT;
            this.addButton.ImageTransparentColor            = Color.Black;
            this.editButton.ImageTransparentColor           = Color.Black;
            this.checkinButton.ImageTransparentColor        = Color.Black;
            this.cancelCheckoutButton.ImageTransparentColor = Color.Black;
            this.configureButton.ImageTransparentColor      = Color.White;
            // Internationalization
            this.configureButton.Caption              = resources.GetString("configuration");
            this.configureButton.TooltipText          = resources.GetString("configuration");
            this.configureButton.DescriptionText      = resources.GetString("configuration");
            this.addButton.TooltipText                = resources.GetString("add");
            this.addButton.DescriptionText            = resources.GetString("add");
            this.editButton.TooltipText               = resources.GetString("edit");
            this.editButton.DescriptionText           = resources.GetString("edit");
            this.checkinButton.TooltipText            = resources.GetString("checkin");
            this.checkinButton.DescriptionText        = resources.GetString("checkin");
            this.cancelCheckoutButton.TooltipText     = resources.GetString("cancelcheckout");
            this.cancelCheckoutButton.DescriptionText = resources.GetString("cancelcheckout");
            this.helpButton.TooltipText               = resources.GetString("help");
            this.helpButton.DescriptionText           = resources.GetString("help");
            // Click
            this.configureButton.Click      += new AddinExpress.MSO.ADXClick_EventHandler(configureButton_Click);
            this.addButton.Click            += new AddinExpress.MSO.ADXClick_EventHandler(addButton_Click);
            this.editButton.Click           += new AddinExpress.MSO.ADXClick_EventHandler(editButton_Click);
            this.checkinButton.Click        += new AddinExpress.MSO.ADXClick_EventHandler(checkinButton_Click);
            this.helpButton.Click           += new AddinExpress.MSO.ADXClick_EventHandler(helpButton_Click);
            this.cancelCheckoutButton.Click += new AddinExpress.MSO.ADXClick_EventHandler(cancelCheckoutButton_Click);

            // Ribbons
            this.configurationRibbonButton.ImageList  = imageToolBar.get();
            this.addRibbonButton.ImageList            = imageToolBar.get();
            this.editRibbonButton.ImageList           = imageToolBar.get();
            this.checkinRibbonButton.ImageList        = imageToolBar.get();
            this.cancelCheckoutRibbonButton.ImageList = imageToolBar.get();
            imageLargeToolBar.get().ImageSize = new Size(32, 32);
            this.ribbonSplitButton.ImageList      = imageLargeToolBar.get();
            this.configurationRibbonButton.Image  = ImageToolBar.IMG_TOOLBAR_OPENKM;
            this.addRibbonButton.Image            = ImageToolBar.IMG_TOOLBAR_ADD;
            this.editRibbonButton.Image           = ImageToolBar.IMG_TOOLBAR_EDIT;
            this.checkinRibbonButton.Image        = ImageToolBar.IMG_TOOLBAR_CHECKIN;
            this.cancelCheckoutRibbonButton.Image = ImageToolBar.IMG_TOOLBAR_CANCELCHECKOUT;
            this.ribbonSplitButton.Image          = ImageLargeToolbar.IMG_TOOLBAR_LOGO;
            this.configurationRibbonButton.ImageTransparentColor  = Color.White;
            this.addRibbonButton.ImageTransparentColor            = Color.Black;
            this.editRibbonButton.ImageTransparentColor           = Color.Black;
            this.checkinRibbonButton.ImageTransparentColor        = Color.Black;
            this.cancelCheckoutRibbonButton.ImageTransparentColor = Color.Black;
            this.ribbonSplitButton.ImageTransparentColor          = Color.White;

            // Internationalization
            this.configurationRibbonButton.Caption  = resources.GetString("configuration");
            this.addRibbonButton.Caption            = resources.GetString("add");
            this.editRibbonButton.Caption           = resources.GetString("edit");
            this.checkinRibbonButton.Caption        = resources.GetString("checkin");
            this.cancelCheckoutRibbonButton.Caption = resources.GetString("cancelcheckout");
            this.helpRibbonButton.Caption           = resources.GetString("help");
            // Click
            this.configurationRibbonButton.OnClick  += new AddinExpress.MSO.ADXRibbonOnAction_EventHandler(configurationRibbonButton_OnClick);
            this.addRibbonButton.OnClick            += new AddinExpress.MSO.ADXRibbonOnAction_EventHandler(addRibbonButton_OnClick);
            this.editRibbonButton.OnClick           += new AddinExpress.MSO.ADXRibbonOnAction_EventHandler(editRibbonButton_OnClick);
            this.checkinRibbonButton.OnClick        += new AddinExpress.MSO.ADXRibbonOnAction_EventHandler(checkinRibbonButton_OnClick);
            this.cancelCheckoutRibbonButton.OnClick += new AddinExpress.MSO.ADXRibbonOnAction_EventHandler(cancelcheckoutRibbonButton_OnClick);
            this.helpRibbonButton.OnClick           += new AddinExpress.MSO.ADXRibbonOnAction_EventHandler(helpRibbonButton_OnClick);

            adxPowerPointEvents.WindowActivate    += new AddinExpress.MSO.ADXHostWindow_EventHandler(adxPowerPointEvents_WindowActivate);
            adxPowerPointEvents.PresentationClose += new AddinExpress.MSO.ADXHostActiveObject_EventHandler(adxPowerPointEvents_PresentationClose);
        }
예제 #2
0
        public AddinModule()
        {
            InitializeComponent();

            // Please add any initialization code to the AddinInitialize event handler
            commandBarOption = new CommandBarOption();
            imageToolBar = new ImageToolBar();
            imageLargeToolBar = new ImageLargeToolbar();
            openkmAddIn = new OpenKMAddIn();

            // Buttons
            this.configureButton.ImageList = imageToolBar.get();
            this.addButton.ImageList = imageToolBar.get();
            this.editButton.ImageList = imageToolBar.get();
            this.checkinButton.ImageList = imageToolBar.get();
            this.cancelCheckoutButton.ImageList = imageToolBar.get();
            this.configureButton.Image = ImageToolBar.IMG_TOOLBAR_OPENKM;
            this.addButton.Image = ImageToolBar.IMG_TOOLBAR_ADD;
            this.editButton.Image = ImageToolBar.IMG_TOOLBAR_EDIT;
            this.checkinButton.Image = ImageToolBar.IMG_TOOLBAR_CHECKIN;
            this.cancelCheckoutButton.Image = ImageToolBar.IMG_TOOLBAR_CANCELCHECKOUT;
            this.addButton.ImageTransparentColor = Color.Black;
            this.editButton.ImageTransparentColor = Color.Black;
            this.checkinButton.ImageTransparentColor = Color.Black;
            this.cancelCheckoutButton.ImageTransparentColor = Color.Black;
            this.configureButton.ImageTransparentColor = Color.White;
            // Internationalization
            this.configureButton.Caption = resources.GetString("configuration");
            this.configureButton.TooltipText = resources.GetString("configuration");
            this.configureButton.DescriptionText = resources.GetString("configuration");
            this.addButton.TooltipText = resources.GetString("add");
            this.addButton.DescriptionText = resources.GetString("add");
            this.editButton.TooltipText = resources.GetString("edit");
            this.editButton.DescriptionText = resources.GetString("edit");
            this.checkinButton.TooltipText = resources.GetString("checkin");
            this.checkinButton.DescriptionText = resources.GetString("checkin");
            this.cancelCheckoutButton.TooltipText = resources.GetString("cancelcheckout");
            this.cancelCheckoutButton.DescriptionText = resources.GetString("cancelcheckout");
            this.helpButton.TooltipText = resources.GetString("help");
            this.helpButton.DescriptionText = resources.GetString("help");
            // Click
            this.configureButton.Click += new AddinExpress.MSO.ADXClick_EventHandler(configureButton_Click);
            this.addButton.Click += new AddinExpress.MSO.ADXClick_EventHandler(addButton_Click);
            this.editButton.Click += new AddinExpress.MSO.ADXClick_EventHandler(editButton_Click);
            this.checkinButton.Click += new AddinExpress.MSO.ADXClick_EventHandler(checkinButton_Click);
            this.helpButton.Click += new AddinExpress.MSO.ADXClick_EventHandler(helpButton_Click);
            this.cancelCheckoutButton.Click += new AddinExpress.MSO.ADXClick_EventHandler(cancelCheckoutButton_Click);

            // Ribbons
            this.configurationRibbonButton.ImageList = imageToolBar.get();
            this.addRibbonButton.ImageList = imageToolBar.get();
            this.editRibbonButton.ImageList = imageToolBar.get();
            this.checkinRibbonButton.ImageList = imageToolBar.get();
            this.cancelCheckoutRibbonButton.ImageList = imageToolBar.get();
            imageLargeToolBar.get().ImageSize = new Size(32, 32);
            this.ribbonSplitButton.ImageList = imageLargeToolBar.get();
            this.configurationRibbonButton.Image = ImageToolBar.IMG_TOOLBAR_OPENKM;
            this.addRibbonButton.Image = ImageToolBar.IMG_TOOLBAR_ADD;
            this.editRibbonButton.Image = ImageToolBar.IMG_TOOLBAR_EDIT;
            this.checkinRibbonButton.Image = ImageToolBar.IMG_TOOLBAR_CHECKIN;
            this.cancelCheckoutRibbonButton.Image = ImageToolBar.IMG_TOOLBAR_CANCELCHECKOUT;
            this.ribbonSplitButton.Image = ImageLargeToolbar.IMG_TOOLBAR_LOGO;
            this.configurationRibbonButton.ImageTransparentColor = Color.White;
            this.addRibbonButton.ImageTransparentColor = Color.Black;
            this.editRibbonButton.ImageTransparentColor = Color.Black;
            this.checkinRibbonButton.ImageTransparentColor = Color.Black;
            this.cancelCheckoutRibbonButton.ImageTransparentColor = Color.Black;
            this.ribbonSplitButton.ImageTransparentColor = Color.White;

            // Internationalization
            this.configurationRibbonButton.Caption = resources.GetString("configuration");
            this.addRibbonButton.Caption = resources.GetString("add");
            this.editRibbonButton.Caption = resources.GetString("edit");
            this.checkinRibbonButton.Caption = resources.GetString("checkin");
            this.cancelCheckoutRibbonButton.Caption = resources.GetString("cancelcheckout");
            this.helpRibbonButton.Caption = resources.GetString("help");
            // Click
            this.configurationRibbonButton.OnClick += new AddinExpress.MSO.ADXRibbonOnAction_EventHandler(configurationRibbonButton_OnClick);
            this.addRibbonButton.OnClick += new AddinExpress.MSO.ADXRibbonOnAction_EventHandler(addRibbonButton_OnClick);
            this.editRibbonButton.OnClick += new AddinExpress.MSO.ADXRibbonOnAction_EventHandler(editRibbonButton_OnClick);
            this.checkinRibbonButton.OnClick += new AddinExpress.MSO.ADXRibbonOnAction_EventHandler(checkinRibbonButton_OnClick);
            this.cancelCheckoutRibbonButton.OnClick += new AddinExpress.MSO.ADXRibbonOnAction_EventHandler(cancelcheckoutRibbonButton_OnClick);
            this.helpRibbonButton.OnClick += new AddinExpress.MSO.ADXRibbonOnAction_EventHandler(helpRibbonButton_OnClick);

            adxPowerPointEvents.WindowActivate += new AddinExpress.MSO.ADXHostWindow_EventHandler(adxPowerPointEvents_WindowActivate);
            adxPowerPointEvents.PresentationClose += new AddinExpress.MSO.ADXHostActiveObject_EventHandler(adxPowerPointEvents_PresentationClose);
        }