Esempio n. 1
0
        private void PowerBiEmbedder_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
        {
            LogInfo("Connection has changed to: {0}", e.ConnectionDetail.WebApplicationUrl);

            UnlockControls();

            RbApiButton = rbApi;
            CmbGroups   = cbGroup;
            CmbReports  = cbReport;
            CmbPages    = cbPage;

            TbReport = tbReportId;
            TbGroup  = tbGrpId;
            TbPage   = tbPbiPage;

            CbxPbiFilter = cbxPbiFilter;
            TbPbiTable   = tbPbiTable;
            TbPbiColumn  = tbPbiColumn;

            tbGrpId.Text    = "00000000-0000-0000-0000-000000000000";
            tbReportId.Text = "00000000-0000-0000-0000-000000000000";
            tbPbiUrl.Text   = "https://app.powerbi.com";
            tbRowspan.Text  = "20";
            cmbEntity.Text  = "Select an entity";
            lblSection.Text = "Section 🔗";

            cmbEntityField.Enabled = false;

            _entities = new List <EntityMetadataProxy>();

            LoadEntities();
            CheckIfPbiSettingsEnabled();
        }
Esempio n. 2
0
        private void FetchXmlBuilder_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
        {
            entities = null;
            entityShitList.Clear();
            View  = null;
            views = null;
            LoadSettingConnection();
            CDSVersion = new Version(e.ConnectionDetail.OrganizationVersion);
            LogInfo("Connected database version: {0} (Major: {1} Minor: {2})",
                    CDSVersion, e.ConnectionDetail.OrganizationMajorVersion, e.ConnectionDetail.OrganizationMinorVersion);
            // Verifying version where MetadataChanges request exists https://msdn.microsoft.com/en-us/library/jj863599(v=crm.5).aspx
            // According to TechNet 2011 UR12 is 05.00.9690.3218 https://social.technet.microsoft.com/wiki/contents/articles/8062.crm-2011-build-and-version-numbers-for-update-rollups.aspx
            var orgok = CDSVersion >= new Version(05, 00, 9690, 3218);

            if (orgok)
            {
                if (!working)
                {
                    LoadEntities();
                }
            }
            else
            {
                LogError("CRM version too old for FXB");
                MessageBox.Show($"RetrieveMetadataChangesRequest was introduced in\nMicrosoft Dynamics CRM 2011 UR12 (5.0.9690.3218)\nCurrent version is {CDSVersion}\n\nPlease connect to a newer organization to use this cool tool.",
                                "Organization too old", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            EnableControls(orgok && buttonsEnabled);
        }
Esempio n. 3
0
        private void AutoNumMgr_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
        {
            LogInfo("Connection has changed to: {0}", e.ConnectionDetail.WebApplicationUrl);
            gbAttribute.Enabled = false;
            tsbFXB.Enabled      = false;
            cmbSolution.Enabled = false;
            cmbEntities.Enabled = false;
            rbShowAttributesOnlyNumber.Enabled = false;
            rbShowAttributesAllString.Enabled  = false;
            entities = new List <EntityMetadataProxy>();
            var orgver = new Version(e.ConnectionDetail.OrganizationVersion);

            LogInfo("Connected CRM version: {0}", orgver);
            var orgok = orgver >= new Version(9, 0);

            if (orgok)
            {
                LoadSolutions();
                LoadEntities();
                LoadUserSettings();
            }
            else
            {
                LogError("CRM version too old for Auto Number Manager");
                LogUse("IncompatibleCRM");
                MessageBox.Show($"Auto Number feature was introduced in\nMicrosoft Dynamics 365 July 2017 (9.0)\nCurrent version is {orgver}\n\nPlease connect to a newer organization to use this cool tool.",
                                "Organization too old", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Esempio n. 4
0
 private void EarlyBoundGenerator_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
 {
     EntityMetadatas  = null;
     GlobalOptionSets = null;
     Actions          = null;
     DisplayActionsIfSupported(false);
 }
Esempio n. 5
0
 private void DataUpdater_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
 {
     crmGridView1.DataSource = null;
     entities = null;
     entityShitList.Clear();
     EnableControls(true);
 }
Esempio n. 6
0
        private void RetrieveAvailableEntities(object sender, ConnectionUpdatedEventArgs eventArgs)
        {
            WorkAsync(new WorkAsyncInfo
            {
                Message = "Retrieving entity metadata ...",
                Work    = (w, e) =>
                {
                    _entitiesSource = RetrieveEntities(Service);

                    if (AdditionalConnectionDetails.Count > 0)
                    {
                        _entitiesTarget = RetrieveEntities(GetTargetService());
                    }
                    else
                    {
                        _entitiesTarget = _entitiesSource;
                    }
                },
                PostWorkCallBack = e =>
                {
                    SetAvailableEntities();
                },
                AsyncArgument = null,
                IsCancelable  = true,
                MessageWidth  = 340,
                MessageHeight = 150
            });
        }
Esempio n. 7
0
        protected void AutoUpdater_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
        {
            // Stop current action
            monitor.Stop();
            ManageWorkingState(false);

            SetConnectionLabel(e.ConnectionDetail.ConnectionName);
            LoadSolutions();
        }
Esempio n. 8
0
        protected virtual void OnConnectionUpdated(ConnectionUpdatedEventArgs e)
        {
            var handler = ConnectionUpdated;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Esempio n. 9
0
        protected override void OnConnectionUpdated(ConnectionUpdatedEventArgs e)
        {
            base.OnConnectionUpdated(e);
            IsConnected = true;

            if (e.Service == null)
            {
                IsConnected = false;
            }
        }
Esempio n. 10
0
        protected override void OnConnectionUpdated(ConnectionUpdatedEventArgs e)
        {
            AddConnection(e.ConnectionDetail);

            if (dockPanel.ActiveDocument == null)
            {
                tsbNewQuery_Click(this, EventArgs.Empty);
            }

            base.OnConnectionUpdated(e);
        }
        protected virtual void OnConnectionUpdated(ConnectionUpdatedEventArgs e)
        {
            logManager.SetConnection(e.ConnectionDetail);

            var handler = ConnectionUpdated;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Esempio n. 12
0
 private void EarlyBoundGenerator_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
 {
     if (!FormLoaded)
     {
         return;
     }
     EntityMetadatas  = null;
     GlobalOptionSets = null;
     Actions          = null;
     DisplayActionsIfSupported(false);
     SetConnectionSettingOnConnectionChanged();
 }
        /// <summary>
        /// This event occurs when the connection has been updated in XrmToolBox
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void PersonalArtefactManagerControl_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
        {
            ResetFormState();

            if (_isPluginLoaded)
            {
                _pluginSettings.LastUsedOrganizationWebappUrl = e.ConnectionDetail.WebApplicationUrl;
                LogInfo("Connection has changed to: {0}", e.ConnectionDetail.WebApplicationUrl);
                // Reload users
                btnLoadUsers.PerformClick();
            }
        }
        protected void DataTransporter_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
        {
            var service = e.Service;
            var detail  = e.ConnectionDetail;

            organisationid = detail.ConnectionId.Value;
            SetConnectionLabel(detail.ConnectionName, ServiceType.Source);
            // init buttons -> value based on connection
            InitMappings();
            InitFilter();
            // Save settings file
            SettingFileHandler.SaveConfigData(settings);
            // Load entities when source connection changes
            PopulateEntities();
        }
Esempio n. 15
0
 private void LCG_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
 {
     LogInfo("Connection has changed to: {0}", e.ConnectionDetail.WebApplicationUrl);
     chkEntAll.Visible     = false;
     chkAttAll.Visible     = false;
     btnLoadConfig.Enabled = false;
     btnSaveConfig.Enabled = false;
     entities                  = null;
     selectedEntity            = null;
     gridAttributes.DataSource = null;
     gridEntities.DataSource   = null;
     LoadSettings(e.ConnectionDetail?.ConnectionName);
     LoadSolutions();
     Enabled = true;
 }
        private void DateTimeBehaviorUtility_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
        {
            var orgver = new Version(e.ConnectionDetail.OrganizationVersion);
            var orgok  = orgver >= new Version(7, 1);

            btnLoadAttributes.Enabled = orgok;
            if (orgok)
            {
                listAttributes.Items.Clear();
                listAttributes.Groups.Clear();
                metadata = null;
            }
            else
            {
                MessageBox.Show("DateTime Behavior was introduced in\nMicrosoft Dynamics CRM 2015 Update 1 (7.1.0.0)\n\nPlease connect to a newer organization to use this cool tool.", "Organization too old", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
        private void ctlCRMViewer_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
        {
            if (!SettingsManager.Instance.TryLoad(GetType(), out mySettings))
            {
                mySettings = new Settings();

                LogWarning("Settings not found => a new settings file has been created!");

                SettingsManager.Instance.Save(GetType(), mySettings);
            }
            else
            {
                LogInfo("Settings found and loaded");
            }

            results = new Stack <Result>();
            ExecuteMethod(LoadEntityList);
        }
        private void PluginTraceViewer_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
        {
            if (crmGridView.DataSource != null)
            {
                crmGridView.DataSource = null;
            }
            var orgver = new Version(e.ConnectionDetail.OrganizationVersion);
            var orgok  = orgver >= new Version(7, 1);

            crmGridView.OrganizationService = orgok ? e.Service : null;
            buttonRetrieveLogs.Enabled      = orgok;
            buttonRefreshFilter.Enabled     = orgok;
            if (orgok)
            {
                LoadConstraints();
            }
            else
            {
                MessageBox.Show("Plug-in Trace Log was introduced in\nMicrosoft Dynamics CRM 2015 Update 1 (7.1.0.0)\n\nPlease connect to a newer organization to use this cool tool.", "Organization too old", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
        private void PluginTraceViewer_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
        {
            LoadFilter();
            var orgver = new Version(e.ConnectionDetail.OrganizationVersion);

            LogInfo("Connected CRM version: {0}", orgver);
            ClearControls();
            var orgok = orgver >= new Version(7, 1);

            gridControl.SetOrgService(orgok ? e.Service : null);
            buttonRetrieveLogs.Enabled = orgok;
            tsmiRefreshFilter.Enabled  = orgok;
            if (orgok)
            {
                filterControl.LoadConstraints();
                LoadLogSetting();
            }
            else
            {
                LogError("CRM version too old for Plugin Trace Viewer");
                MessageBox.Show("Plug-in Trace Log was introduced in\nMicrosoft Dynamics CRM 2015 Update 1 (7.1.0.0)\n\nPlease connect to a newer organization to use this cool tool.", "Organization too old", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Esempio n. 20
0
        private void RetrieveAvailableEntities(object sender, ConnectionUpdatedEventArgs eventArgs)
        {
            WorkAsync(new WorkAsyncInfo
            {
                Message = "Retrieving entity metadata ...",
                Work    = (w, e) =>
                {
                    var retrieveEntitiesRequest = new RetrieveAllEntitiesRequest
                    {
                        EntityFilters         = EntityFilters.Entity,
                        RetrieveAsIfPublished = false
                    };

                    if (Service == null)
                    {
                        throw new Exception("No Service set!");
                    }

                    var response = Service.Execute(retrieveEntitiesRequest) as RetrieveAllEntitiesResponse;

                    if (response == null)
                    {
                        throw new Exception("Failed to retrieve entities!");
                    }

                    _entities = response.EntityMetadata.ToList();
                },
                PostWorkCallBack = e =>
                {
                    SetAvailableEntities();
                },
                AsyncArgument = null,
                IsCancelable  = true,
                MessageWidth  = 340,
                MessageHeight = 150
            });
        }
Esempio n. 21
0
 private void MyPluginControl_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
 {
     ResetLayout();
 }
Esempio n. 22
0
 protected override void OnConnectionUpdated(ConnectionUpdatedEventArgs e)
 {
     base.OnConnectionUpdated(e);
     ResetLayout();
 }
Esempio n. 23
0
 void ShuffleRunner_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
 {
     EnableShuffle();
 }
Esempio n. 24
0
 /// <summary>
 /// Will initiate loading of assemblies from currently connected server if current connection was updated in main application
 /// </summary>
 /// <param name="sender">Instance of class <see cref="MainControl"/></param>
 /// <param name="e">Event arguments</param>
 private void MainControl_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
 {
     ExecuteMethod(RetrieveAssemblies);
 }
 private void EarlyBoundGenerator_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
 {
     EntityMetadatas = null;
     GlobalOptionSets = null;
     Actions = null;
     DisplayActionsIfSupported(false);
 }
 private void ShuffleBuilder_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
 {
     GetSolutions();
 }
Esempio n. 27
0
        //protected override void ConnectionDetailsUpdated(NotifyCollectionChangedEventArgs e)
        //{
        //    // For now, only support one target org
        //    if (e.Action.Equals(NotifyCollectionChangedAction.Add))
        //    {
        //        var detail = (ConnectionDetail)e.NewItems[0];
        //        SetConnectionLabel(detail.ConnectionName, ServiceType.Target);
        //        targetService = detail.ServiceClient;
        //    }
        //}

        protected void Custom_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
        {
            _vm.Service = e.Service;
            var t = _vm.LoadEntities();
        }
Esempio n. 28
0
        protected override void OnConnectionUpdated(ConnectionUpdatedEventArgs e)
        {
            base.OnConnectionUpdated(e);

            LoadSolutions();
        }
Esempio n. 29
0
 private void FetchXmlBuilder_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
 {
     entities = null;
     entityShitList.Clear();
     View = null;
     views = null;
     if (!working)
     {
         LoadEntities();
     }
     EnableControls(buttonsEnabled);
 }
Esempio n. 30
0
 private void ShuffleBuilder_ConnectionUpdated(object sender, ConnectionUpdatedEventArgs e)
 {
     Solutions = null;
     Entities  = null;
 }
        protected override void OnConnectionUpdated(ConnectionUpdatedEventArgs e)
        {
            LogInfo("Connection has changed to: {0}", e.ConnectionDetail.WebApplicationUrl);

            base.OnConnectionUpdated(e);
        }