コード例 #1
0
        public void Load()
        {
            lbModules.Items.Clear();

            Guid[] moduleIDs = ManagementInterfaceClient.ManagementInterface.GetInstalledAddonModules();

            foreach (Guid module in moduleIDs)
            {
                global::Controls.ListBoxExItem lbItem = new global::Controls.ListBoxExItem();
                lbItem.Image = CallButler.Manager.Properties.Resources.gear_connection_24;
                lbItem.Text  = "Unknown Addon Module";

                CallButler.Manager.Plugin.CallButlerManagementPlugin managementPlugin = PluginManager.GetPluginFromID(module);

                if (managementPlugin != null && managementPlugin is CallButler.Manager.Plugin.CallButlerManagementAddonModulePlugin && !managementPlugin.ShowInPluginView)
                {
                    lbItem.Text    = managementPlugin.PluginName;
                    lbItem.Caption = managementPlugin.PluginDescription;

                    lbItem.Tag = module;

                    lbModules.Items.Add(lbItem);
                }
            }
        }
コード例 #2
0
        private void btnConfigureModule_Click(object sender, EventArgs e)
        {
            if (lbModules.SelectedItems.Count > 0)
            {
                Guid moduleID = (Guid)((global::Controls.ListBoxExItem)lbModules.SelectedItem).Tag;

                CallButler.Manager.Plugin.CallButlerManagementPlugin managementPlugin = PluginManager.GetPluginFromID(moduleID);

                if (managementPlugin != null && managementPlugin is CallButler.Manager.Plugin.CallButlerManagementAddonModulePlugin)
                {
                    // Load the plugin
                    managementPlugin.Load(new CallButler.Manager.Plugin.CallButlerManagementPluginContext(ManagementInterfaceClient.ManagementInterface, ManagementInterfaceClient.AuthInfo));

                    ((CallButler.Manager.Plugin.CallButlerManagementAddonModulePlugin)managementPlugin).OnShowSettingsDialog(this);

                    managementPlugin.Unload();
                }
            }
        }
コード例 #3
0
 public CallButlerManagementPluginViewControl(CallButlerManagementPlugin plugin)
 {
     this.plugin = plugin;
 }
コード例 #4
0
        public ExtensionEditorForm(WOSI.CallButler.Data.CallButlerDataset.ExtensionsDataTable extensions, WOSI.CallButler.Data.CallButlerDataset.ExtensionsRow extension, WOSI.CallButler.Data.CallButlerDataset.ExtensionContactNumbersDataTable extensionContacts, WOSI.CallButler.Data.CallButlerDataset.LocalizedGreetingsRow voicemailGreeting)
        {
            InitializeComponent();

            this.extensions        = extensions;
            this.extension         = extension;
            this.extensionContacts = extensionContacts;


            CallButler.Manager.Plugin.CallButlerManagementPlugin plugin = PluginManager.GetPluginFromID(new Guid(Properties.Settings.Default.DefaultFindMePluginID));

            if (plugin != null)
            {
                CallButler.Manager.Plugin.CallButlerManagementPluginViewControl c = plugin.GetNewViewControl();
                c.Load(new object[] { extension, extensionContacts, ManagementInterfaceClient.ManagementInterface.TelephoneNumberDescription, true, true, extensions });
                c.Dock = DockStyle.Fill;
                pnlFindMe.Controls.Add(c);
            }
            else
            {
                NoPluginFoundView c = new NoPluginFoundView();
                c.PluginType = "Find me/Follow me plugin";

                c.Dock = DockStyle.Fill;
                pnlFindMe.Controls.Add(c);
            }

            wizard.PageIndex = 0;

            // Update our UI
            numExtNum.Value             = extension.ExtensionNumber;
            txtFirstName.Text           = extension.FirstName;
            txtLastName.Text            = extension.LastName;
            cbEnableSearch.Checked      = extension.EnableSearch;
            cbEnableManagement.Checked  = extension.EnableManagement;
            cbEmailNotification.Checked = extension.EmailNotification;
            cbAttach.Checked            = extension.EmailAttachment;
            txtEmailAddress.Text        = extension.EmailAddress;
            cbCallScreening.Checked     = extension.EnableCallScreening;
            cbEnableOutbound.Checked    = extension.EnableOutboundCalls;

            if (!extension.IsUseConferenceTransferNull())
            {
                cbHandOff.Checked = !extension.UseConferenceTransfer;
            }
            else
            {
                cbHandOff.Checked = true;
            }

            greetingControl.LoadGreeting(voicemailGreeting, WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.GreetingsSoundCache));

            if (!extension.IsPasswordNull() && extension.Password.Length > 0)
            {
                txtPassword.Text        = blankPassword;
                txtConfirmPassword.Text = blankPassword;
            }

            if (!extension.IsPBXPasswordNull() && extension.PBXPassword.Length > 0)
            {
                txtPBXPassword.Text        = blankPassword;
                txtConfirmPBXPassword.Text = blankPassword;
            }

            txtFirstName.Select();

            btnImportOutlook.Enabled = Utilities.ContactManagement.ContactManagerFactory.CreateContactManager(Utilities.ContactManagement.ContactType.Outlook).IsInstalled;

            loading = false;
            greetingControl.LoadVoices(ManagementInterfaceClient.ManagementInterface.GetTTSVoices());

            pgFindme.Enabled       = true;
            pnlHandoff.Visible     = true;
            pnlPBXPassword.Visible = true;

            Utils.PrivateLabelUtils.ReplaceProductNameControl(this);
        }
 public CallButlerManagementPluginViewControl(CallButlerManagementPlugin plugin)
 {
     this.plugin = plugin;
 }