Example #1
0
        public WsatControl(IntPtr propPageParam, IntPtr propSheetDialogParam, WsatPropertySheet propertySheetPage)
        {
            if (propertySheetPage == null)
            {
                throw new ArgumentNullException("propSheetPage");
            }

            // The order of the following calls is important!
            InitializeComponent();
            this.propPage = propPageParam;
            this.propSheetDialog = propSheetDialogParam;
            this.propertySheetPage = propertySheetPage;
            this.machineName = this.propertySheetPage.MachineName;
            this.virtualServer = this.propertySheetPage.VirtualServer;

            InitializeConfig();

            if (config != null)
            {
                this.oldNetworkSupportEnabledValue = this.config.TransactionBridgeEnabled || this.config.TransactionBridge30Enabled;
                propertySheetPage.ShowPropertyPage += new ShowWindowEventHander(OnShowContainerPropertyPage);
                propertySheetPage.BeforeApplyChanges += new BeforeApplyChangesEventHandler(OnBeforeApplyChanges);
                propertySheetPage.ApplyChanges += new ApplyChangesEventHandler(OnApplyChanges);
            }
            Application.EnableVisualStyles();
        }