コード例 #1
0
        private void LoadSetting()
        {
            try
            {
                if (SettingsManager.Instance.TryLoad <PluginSettings>(typeof(BPFManager), out settings))
                {
                    return;
                }
                else
                {
                    settings = new PluginSettings();
                }
            }
            catch (InvalidOperationException ex)
            {
                log.LogData(EventType.Exception, LogAction.SettingLoaded, ex);
            }

            log.LogData(EventType.Event, LogAction.SettingLoaded);

            if (!settings.AllowLogUsage.HasValue)
            {
                log.PromptToLog();
                SaveSettings();
            }
        }
コード例 #2
0
        private void toolStripButtonLoadPluginStepsClick(object sender, EventArgs evt)
        {
            if (Service == null)
            {
                MessageBox.Show("Please get connected to an environment first.");
            }
            else
            {
                // we clear the content of the list first
                comboBoxAssemblyList.Items.Clear();

                WorkAsync(new WorkAsyncInfo
                {
                    Message = "Loading CRM Assemblies...",
                    Work    = (bw, e) =>
                    {
                        listOfCRMAssemblies = Service.RetrieveMultiple(new QueryExpression("pluginassembly")
                        {
                            ColumnSet = new ColumnSet(true),
                            Criteria  = new FilterExpression
                            {
                                Conditions =
                                {
                                    new ConditionExpression("name", ConditionOperator.DoesNotBeginWith, "Microsoft."),
                                    new ConditionExpression("name", ConditionOperator.DoesNotBeginWith, "ActivityFeeds.")
                                }
                            }
                        }).Entities.Select(p => p.GetAttributeValue <string>("name")).OrderBy(n => n).ToArray();
                    },
                    PostWorkCallBack = e =>
                    {
                        if (e.Error != null)
                        {
                            log.LogData(EventType.Exception, LogAction.CRMAssembliesLoaded, e.Error);
                            MessageBox.Show(this, e.Error.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                            return;
                        }

                        if (listOfCRMAssemblies != null)
                        {
                            if (comboBoxAssemblyList != null)
                            {
                                comboBoxAssemblyList.Items.AddRange(listOfCRMAssemblies);
                                comboBoxAssemblyList.Focus();
                            }
                        }

                        this.log.LogData(EventType.Event, LogAction.CRMAssembliesLoaded);
                    },
                    ProgressChanged = e => { SetWorkingMessage(e.UserState.ToString()); }
                });
            }
        }
コード例 #3
0
 private void DeltaStepsBetweenEnvironments_Load(object sender, EventArgs e)
 {
     // initializing log class
     Log = new LogUsage(this);
     Log.LogData(EventType.Event, LogAction.PluginOpened);
     LoadSetting();
 }
コード例 #4
0
        private void BPFMigration_Load(object sender, EventArgs e)
        {
            log = new LogUsage(this);
            log.LogData(EventType.Event, LogAction.PluginOpened);
            LoadSetting();

            //displaying the proper control for query
            radioButtonQueryView.Checked = true;
        }
コード例 #5
0
 private void DeltaAssemblyvsCrm_Load(object sender, EventArgs e)
 {
     log = new LogUsage(this);
     log.LogData(EventType.Event, LogAction.PluginOpened);
     LoadSetting();
 }