public async Task InitializeAsync(CancellationToken cancellationToken)
        {
            if (Initialized)
            {
                return;
            }

            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);

            if (_asyncServiceProvider is AsyncPackage package)
            {
                optionPage = package.GetDialogPage(typeof(PlcncliOptionPage)) as PlcncliOptionPage;

                OnOptionPagePropertyChanged(null, new PropertyChangedEventArgs(nameof(optionPage.ToolLocation)));
                optionPage.PropertyChanged += OnOptionPagePropertyChanged;
                Initialized = true;
            }
        }
Ejemplo n.º 2
0
 public SaveCMakeListsEventHandler(AsyncPackage package, IVsRunningDocumentTable rdt)
 {
     runningDocumentTable = rdt;
     optionPage           = package.GetDialogPage(typeof(PlcncliOptionPage)) as PlcncliOptionPage;
     cliCommunication     = Package.GetGlobalService(typeof(SPlcncliCommunication)) as IPlcncliCommunication;
 }