Exemple #1
0
        public PrefPlugin(METAboltInstance instance)
        {
            InitializeComponent();

            this.instance = instance;
            config = this.instance.Config;

            if (this.instance.EList != null)
            {
                foreach (IExtension extOn in this.instance.EList)
                {
                    listBox1.Items.Add(extOn.Title);
                }
            }

            plugins = config.CurrentConfig.PluginsToLoad;

            if (!string.IsNullOrEmpty(plugins))
            {
                string[] lplugs = plugins.Split('|');

                foreach (string plug in lplugs)
                {
                    if (!string.IsNullOrEmpty(plug))
                    {
                        listBox2.Items.Add(plug);
                    }
                }
            }
        }
        public PrefChairAnn(METAboltInstance instance)
        {
            InitializeComponent();

            this.instance = instance;
            config = this.instance.Config;

            string msg2 = "Send messages to the Group UUIDs entered below, blank for no group. You can copy the UUID for a group you belong to from the Group window.";
            toolTip1 = new Popup(customToolTip = new CustomToolTip(instance, msg2));
            toolTip1.AutoClose = false;
            toolTip1.FocusOnOpen = false;
            toolTip1.ShowingAnimation = toolTip1.HidingAnimation = PopupAnimations.Blend;

            textBox1.Text = config.CurrentConfig.ChairAnnouncerUUID.ToString();
            textBox2.Text = config.CurrentConfig.ChairAnnouncerInterval.ToString(CultureInfo.CurrentCulture);

            checkBox1.Enabled = true;
            checkBox1.Checked = config.CurrentConfig.ChairAnnouncerEnabled;
            checkBox2.Checked = config.CurrentConfig.ChairAnnouncerChat;

            textBox3.Text = config.CurrentConfig.ChairAnnouncerGroup1.ToString();
            textBox4.Text = config.CurrentConfig.ChairAnnouncerGroup2.ToString();
            textBox5.Text = config.CurrentConfig.ChairAnnouncerGroup3.ToString();
            textBox6.Text = config.CurrentConfig.ChairAnnouncerGroup4.ToString();
            textBox7.Text = config.CurrentConfig.ChairAnnouncerGroup5.ToString();
            textBox8.Text = config.CurrentConfig.ChairAnnouncerGroup6.ToString();
            //added by GM on 1-APR-2010
            textBox9.Text = config.CurrentConfig.ChairAnnouncerAdvert;
        }
        public PrefTextConsole(METAboltInstance instance)
        {
            InitializeComponent();

            this.instance = instance;
            config = this.instance.Config;

            string msg1 = "Use this setting to limit the amount (lines) of text stored on your chat screen. Especially in busy areas we recommend using this feature so that your machine does not run out of memory. The recommended setting is 250.";
            toolTip = new Popup(customToolTip = new CustomToolTip(instance, msg1));
            toolTip.AutoClose = false;
            toolTip.FocusOnOpen = false;
            toolTip.ShowingAnimation = toolTip.HidingAnimation = PopupAnimations.Blend;

            chkChatTimestamps.Checked = config.CurrentConfig.ChatTimestamps;
            chkIMTimestamps.Checked = config.CurrentConfig.IMTimestamps;
            chkSmileys.Checked = config.CurrentConfig.ChatSmileys;
            nud.Value = config.CurrentConfig.lineMax;
            chkIMs.Checked = config.CurrentConfig.SaveIMs;
            chkChat.Checked = config.CurrentConfig.SaveChat;
            txtDir.Text = config.CurrentConfig.LogDir;
            chkGroupNotices.Checked = config.CurrentConfig.DisableGroupNotices;
            chkGIMs.Checked = config.CurrentConfig.DisableGroupIMs;

            //if (config.CurrentConfig.BusyReply != string.Empty && config.CurrentConfig.BusyReply != null)
            //{
            textBox1.Text = config.CurrentConfig.BusyReply;
            //}

            // Initial IM feature thx to Elmo Clarity 20/12/2010
            textBox2.Text = config.CurrentConfig.InitialIMReply;

            chkSLT.Checked = config.CurrentConfig.UseSLT;
            chkSound.Checked = config.CurrentConfig.PlaySound;
        }
        public PrefParcelMusic(METAboltInstance instance)
        {
            InitializeComponent();

            this.instance = instance;
            config = this.instance.Config;

            chkParcelMusic.Checked = config.CurrentConfig.ParcelMusic;
        }
        //private int _findex = 0;
        //private Color bgcolour = Color.White;
        //[System.Runtime.InteropServices.DllImport("user32.dll")]
        //private static extern IntPtr SendMessage(IntPtr window, int message, int wparam, int lparam);
        //const int WM_VSCROLL = 0x115;
        //const int SB_BOTTOM = 7;
        ////[System.Runtime.InteropServices.DllImport("user32.dll")]
        ////static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, Int32 wParam, Int32 lParam);
        ////const int WM_USER = 0x400;
        ////const int EM_HIDESELECTION = WM_USER + 63;
        public RichTextBoxPrinter(METAboltInstance instance, ExRichTextBox textBox)
        {
            rtb = textBox;

            this.instance = instance;
            config = this.instance.Config;

            hideSmileys = config.CurrentConfig.ChatSmileys;
            config.ConfigApplied += new EventHandler<ConfigAppliedEventArgs>(Config_ConfigApplied);

            //rtb.BackColor = bgcolour = config.CurrentConfig.BgColour;

            if (config.CurrentConfig.HeaderFont != null)
            {
                headerfont = config.CurrentConfig.HeaderFont;
                headerfontstyle = config.CurrentConfig.HeaderFontStyle;
                headerfontsize = config.CurrentConfig.HeaderFontSize;
                bkcolour = config.CurrentConfig.HeaderBackColour;
            }

            switch (headerfontstyle.ToLower(CultureInfo.CurrentCulture))
            {
                case "bold":
                    fontsy = FontStyle.Bold;
                    break;
                case "italic":
                    fontsy = FontStyle.Italic;
                    break;
                default:
                    fontsy = FontStyle.Regular;
                    break;
            }

            if (config.CurrentConfig.TextFont != null)
            {
                textfont = config.CurrentConfig.TextFont;
                textfontstyle = config.CurrentConfig.TextFontStyle;
                textfontsize = config.CurrentConfig.TextFontSize;
            }

            switch (textfontstyle.ToLower(CultureInfo.CurrentCulture))
            {
                case "bold":
                    fontst = FontStyle.Bold;
                    break;
                case "italic":
                    fontst = FontStyle.Italic;
                    break;
                default:
                    fontst = FontStyle.Regular;
                    break;
            }
        }
Exemple #6
0
        public PrefProxy(METAboltInstance instance)
        {
            InitializeComponent();

            this.instance = instance;
            config = this.instance.Config;

            checkBox1.Checked = config.CurrentConfig.UseProxy;
            textBox1.Text = config.CurrentConfig.ProxyURL;
            textBox4.Text = config.CurrentConfig.ProxyPort;
            textBox2.Text = config.CurrentConfig.ProxyUser;
            textBox3.Text = config.CurrentConfig.ProxyPWD;
        }
        public frmPluginManager(METAboltInstance instance)
        {
            InitializeComponent();

            this.instance = instance;
            config = this.instance.Config;

            if (this.instance.EList != null)
            {
                foreach (IExtension extOn in this.instance.EList)
                {
                    listBox1.Items.Add(extOn.Title);
                }
            }

            plugins = config.CurrentConfig.PluginsToLoad;

            if (!string.IsNullOrEmpty(plugins))
            {
                string[] lplugs = plugins.Split('|');

                foreach (string plug in lplugs)
                {
                    if (!string.IsNullOrEmpty(plug))
                    {
                        listBox2.Items.Add(plug);
                    }
                }
            }

            IExtension result = this.instance.EList.Find(
            delegate(IExtension fn)
            {
                return fn.Title == "MB_LSLAPI";
            }
            );

            if (result != null)
            {
                ismbapiloaded = true;
            }
            else
            {
                ismbapiloaded = false;
            }
        }
Exemple #8
0
        public Pref3D(METAboltInstance instance)
        {
            InitializeComponent();

            string msg4 = "If META3D is not rendering textures and displaying them as WHITE surfaces, then disable mipmaps";
            toolTip3 = new Popup(customToolTip = new CustomToolTip(instance, msg4));
            toolTip3.AutoClose = false;
            toolTip3.FocusOnOpen = false;
            toolTip3.ShowingAnimation = toolTip3.HidingAnimation = PopupAnimations.Blend;

            this.instance = instance;
            //client = this.instance.Client;
            config = this.instance.Config;

            chkAI.Checked = config.CurrentConfig.DisableMipmaps;

            isloading = false;
        }
Exemple #9
0
        public PrefAI(METAboltInstance instance)
        {
            InitializeComponent();

            string msg4 = "Enable this option for your avatar to enter intelligent conversations (automated) with anyone that IMs it. Note that this feature only works via IM and not chat";
            toolTip3 = new Popup(customToolTip = new CustomToolTip(instance, msg4));
            toolTip3.AutoClose = false;
            toolTip3.FocusOnOpen = false;
            toolTip3.ShowingAnimation = toolTip3.HidingAnimation = PopupAnimations.Blend;

            this.instance = instance;
            //client = this.instance.Client;
            config = this.instance.Config;

            chkAI.Checked = config.CurrentConfig.AIon;
            chkReply.Checked = config.CurrentConfig.ReplyAI;
            textBox1.Text = config.CurrentConfig.ReplyText;
            checkBox2.Checked = false;   // config.CurrentConfig.MultiLingualAI;

            panel1.Enabled = groupBox1.Enabled = checkBox2.Enabled = chkAI.Checked;

            isloading = false;
        }
        //private bool loading = true;
        //private bool restart = false;
        public PrefGeneralConsole(METAboltInstance instance)
        {
            InitializeComponent();

            string msg1 = "Disables toolbar nofications that popup from the bottom right hand corner of your screen. Be warned that important system information will not be displayed if this is disabled.";
            toolTip = new Popup(customToolTip = new CustomToolTip(instance, msg1));
            toolTip.AutoClose = false;
            toolTip.FocusOnOpen = false;
            toolTip.ShowingAnimation = toolTip.HidingAnimation = PopupAnimations.Blend;

            string msg3 = "If you will be crossing SIMs or will be near SIM borders and want to see the avatars in the next SIM listed on your radar then you must enable this option. This option requires a restart.";
            toolTip2 = new Popup(customToolTip = new CustomToolTip(instance, msg3));
            toolTip2.AutoClose = false;
            toolTip2.FocusOnOpen = false;
            toolTip2.ShowingAnimation = toolTip2.HidingAnimation = PopupAnimations.Blend;

            string msg5 = "Approximately 1 minute after login the avatar will autosit on an object that has its UUID in the object description. The object needs to be within 10 metre radius of the avatar.";
            toolTip4 = new Popup(customToolTip = new CustomToolTip(instance, msg5));
            toolTip4.AutoClose = false;
            toolTip4.FocusOnOpen = false;
            toolTip4.ShowingAnimation = toolTip4.HidingAnimation = PopupAnimations.Blend;

            string msg6 = "Sets radar range (in metres) throughout the application for objects & avatars. Lower setting means using less bandwidth. Default is 64m. If set to 10, avatars & objects outside the 10m range will be ignored.";
            toolTip5 = new Popup(customToolTip = new CustomToolTip(instance, msg6));
            toolTip5.AutoClose = false;
            toolTip5.FocusOnOpen = false;
            toolTip5.ShowingAnimation = toolTip5.HidingAnimation = PopupAnimations.Blend;

            string msg7 = "Sets the default object range used on the 'Object Manager' screen. The maximum value of this setting can not be greater than the selected 'radar range' value above.";
            toolTip6 = new Popup(customToolTip = new CustomToolTip(instance, msg7));
            toolTip6.AutoClose = false;
            toolTip6.FocusOnOpen = false;
            toolTip6.ShowingAnimation = toolTip6.HidingAnimation = PopupAnimations.Blend;

            string msg8 = "Group Inviter users need to use the generated password or type your own in. Enter the same password into the Group Inviter in SL. Use 'reset' button to generate new one. For your security THIS FIELD MUST NOT BE BLANK.";
            toolTip7 = new Popup(customToolTip = new CustomToolTip(instance, msg8));
            toolTip7.AutoClose = false;
            toolTip7.FocusOnOpen = false;
            toolTip7.ShowingAnimation = toolTip7.HidingAnimation = PopupAnimations.Blend;

            string msg9 = "For this to work you need to create a folder called 'GroupMan Items' under the root of your inventory and place your give away items in it.";
            toolTip8 = new Popup(customToolTip = new CustomToolTip(instance, msg9));
            toolTip8.AutoClose = false;
            toolTip8.FocusOnOpen = false;
            toolTip8.ShowingAnimation = toolTip8.HidingAnimation = PopupAnimations.Blend;

            string msg10 = "If unchecked and a master avatar and/or object UUID is not specified, LSL commands from all avatars and objects (with MD5'ed METAbolt passwords in the command) will be accepted and processed.";
            toolTip9 = new Popup(customToolTip = new CustomToolTip(instance, msg10));
            toolTip9.AutoClose = false;
            toolTip9.FocusOnOpen = false;
            toolTip9.ShowingAnimation = toolTip9.HidingAnimation = PopupAnimations.Blend;

            this.instance = instance;
            client = this.instance.Client;
            config = this.instance.Config;

            if (config.CurrentConfig.InterfaceStyle == 0)
                rdoSystemStyle.Checked = true;
            else if (config.CurrentConfig.InterfaceStyle == 1)
                rdoOfficeStyle.Checked = true;

            //chkRadar.Checked = config.CurrentConfig.iRadar;
            chkConnect4.Checked = config.CurrentConfig.Connect4;
            chkNotifications.Checked = config.CurrentConfig.DisableNotifications;
            chkFriends.Checked = config.CurrentConfig.DisableFriendsNotifications;
            chkAutoSit.Checked = config.CurrentConfig.AutoSit;

            try
            {
                tBar1.Value = config.CurrentConfig.RadarRange;
            }
            catch
            {
                tBar1.Value = config.CurrentConfig.RadarRange = tBar1.Maximum;
                MessageBox.Show("Your radar setting was greater than the maximum allowed.\nIt has been changed to " + tBar1.Maximum.ToString(CultureInfo.CurrentCulture), "METAbolt");
            }

            textBox1.Text = tBar1.Value.ToString(CultureInfo.CurrentCulture);

            tbar2.Maximum = tBar1.Value;

            try
            {
                tbar2.Value = config.CurrentConfig.ObjectRange;
            }
            catch
            {
                tbar2.Value = tbar2.Minimum;
            }

            textBox2.Text = tbar2.Value.ToString(CultureInfo.CurrentCulture);
            textBox3.Text = config.CurrentConfig.GroupManPro;
            chkHide.Checked = config.CurrentConfig.HideMeta;
            chkInvites.Checked = config.CurrentConfig.DisableInboundGroupInvites;
            chkLookAt.Checked = config.CurrentConfig.DisableLookAt;
            checkBox1.Checked = config.CurrentConfig.GivePresent;
            checkBox2.Checked = config.CurrentConfig.AutoRestart;
            nUD1.Value = config.CurrentConfig.LogOffTime;
            nUD2.Value = config.CurrentConfig.ReStartTime;
            textBox4.Text = client.Settings.ASSET_CACHE_DIR;
            checkBox13.Checked = config.CurrentConfig.HideDisconnectPrompt;
            chkDisableRadar.Checked = config.CurrentConfig.DisableRadar;
            chkRestrictRadar.Checked = config.CurrentConfig.RestrictRadar;
            chkVoice.Checked = config.CurrentConfig.DisableVoice;
            chkFavs.Checked = config.CurrentConfig.DisableFavs;
            cbHHTPInv.Checked = config.CurrentConfig.DisableHTTPinv;
            chkRadarMiniMap.Checked = config.CurrentConfig.DisableRadarImageMiniMap;
            cbLLSD.Checked = config.CurrentConfig.UseLLSD;

            numChatBuff.Value = config.CurrentConfig.ChatBufferLimit;
            numScriptBuff.Value = config.CurrentConfig.ScriptUrlBufferLimit;

            if (config.CurrentConfig.BandwidthThrottle > 500.0f)
            {
                config.CurrentConfig.BandwidthThrottle = 500.0f;
            }

            if (config.CurrentConfig.BandwidthThrottle < 500.0f)
            {
                radioButton2.Checked = true;
                trackBar1.Enabled = true;

                try
                {
                    trackBar1.Value = Convert.ToInt32(config.CurrentConfig.BandwidthThrottle);
                }
                catch
                {
                    trackBar1.Value = 160;
                }

                label19.Text = trackBar1.Value.ToString(CultureInfo.CurrentCulture);
            }
            else
            {
                radioButton1.Checked = true;
                trackBar1.Enabled = false;

                try
                {
                    trackBar1.Value = 500;
                }
                catch
                {
                    trackBar1.Value = trackBar1.Maximum;
                }

                label19.Text = "500";
            }

            SetBarValue();

            comboBox1.SelectedIndex = 0;
            cbApp.SelectedIndex = 0;
            cbLand.SelectedIndex = 0;
            cbFn.SelectedIndex = 0;

            if (config.CurrentConfig.ClassicChatLayout)
            {
                checkBox4.Checked = false;
            }
            else
            {
                checkBox4.Checked = true;
            }

            textBox7.BackColor = textBox6.BackColor = config.CurrentConfig.HeaderBackColour;
            //textBox9.BackColor = config.CurrentConfig.BgColour;

            if (config.CurrentConfig.HeaderFont != null)
            {
                headerfont = config.CurrentConfig.HeaderFont;
                headerfontstyle = config.CurrentConfig.HeaderFontStyle;
                headerfontsize = config.CurrentConfig.HeaderFontSize;

                FontStyle fontsy;

                switch (headerfontstyle.ToLower(CultureInfo.CurrentCulture))
                {
                    case "bold":
                        fontsy = FontStyle.Bold;
                        break;
                    case "italic":
                        fontsy = FontStyle.Italic;
                        break;
                    default:
                        fontsy = FontStyle.Regular;
                        break;
                }

                textBox7.Font = new Font(headerfont, headerfontsize, fontsy);
                textBox7.Text = "size " + headerfontsize.ToString(CultureInfo.CurrentCulture);
            }

            if (config.CurrentConfig.TextFont != null)
            {
                textfont = config.CurrentConfig.TextFont;
                textfontstyle = config.CurrentConfig.TextFontStyle;
                textfontsize = config.CurrentConfig.TextFontSize;

                FontStyle fontst;

                switch (textfontstyle.ToLower(CultureInfo.CurrentCulture))
                {
                    case "bold":
                        fontst = FontStyle.Bold;
                        break;
                    case "italic":
                        fontst = FontStyle.Italic;
                        break;
                    default:
                        fontst = FontStyle.Regular;
                        break;
                }

                textBox8.Font = new Font(textfont, textfontsize, fontst);
                textBox8.Text = "size " + textfontsize.ToString(CultureInfo.CurrentCulture);
            }

            checkBox6.Checked = config.CurrentConfig.PlayFriendOnline;
            checkBox7.Checked = config.CurrentConfig.PlayFriendOffline;
            checkBox8.Checked = config.CurrentConfig.PlayIMreceived;
            checkBox9.Checked = config.CurrentConfig.PlayGroupIMreceived;
            checkBox10.Checked = config.CurrentConfig.PlayGroupNoticeReceived;
            checkBox11.Checked = config.CurrentConfig.PlayInventoryItemReceived;
            checkBox5.Checked = config.CurrentConfig.PlayPaymentReceived;
            chkMinimised.Checked = config.CurrentConfig.StartMinimised;
            txtAdRemove.Text = config.CurrentConfig.AdRemove.Trim();
            txtMavatar.Text = config.CurrentConfig.MasterAvatar.Trim();
            txtMObject.Text = config.CurrentConfig.MasterObject.Trim();
            chkAutoTransfer.Checked = config.CurrentConfig.AutoTransfer;
            chkTray.Checked = config.CurrentConfig.DisableTrayIcon;
            chkTyping.Checked = config.CurrentConfig.DisableTyping;
            chkAutoFriend.Checked = config.CurrentConfig.AutoAcceptFriends;
            checkBox12.Checked = config.CurrentConfig.EnforceLSLsecurity;
            chkLSL.Checked = config.CurrentConfig.DisplayLSLcommands;
            //cbTag.Checked = config.CurrentConfig.BroadcastID;

            if (config.CurrentConfig.DeclineInv)
            {
                comboBox1.SelectedIndex = 1;
            }

            if (config.CurrentConfig.AutoAcceptItems)
            {
                comboBox1.SelectedIndex = 2;
            }

            cbApp.SelectedItem = config.CurrentConfig.AppMenuPos;
            cbLand.SelectedItem = config.CurrentConfig.LandMenuPos;
            cbFn.SelectedItem = config.CurrentConfig.FnMenuPos;
        }
        public METAboltInstance(bool firstInstance)
        {
            SetExceptionReporter();
            Application.ThreadException += new ThreadExceptionHandler().ApplicationThreadException;

            Application.ApplicationExit += new EventHandler(Application_ApplicationExit);

            this.firstInstance = firstInstance;

            //LoadXMLFile(appdir + "\\MuteList.xml");
            LoadGiverItems(appdir + "\\METAgiverItems.xml");

            MakeTPTable();
            CreateLogDir();
            CreateNotesDir();
            CreateSpellingDir();

            client = new GridClient();

            config = new ConfigManager();
            config.ApplyDefault();

            SetSettings();

            netcom = new SLNetCom(client, this);
            InitializeConfig();

            state = new StateManager(this);

            imageCache = new ImageCache();

            mainForm = new frmMain(this);
            mainForm.InitializeControls();
            tabsConsole = mainForm.TabConsole;

            //CheckForShortcut();

            if (config.CurrentConfig.AIon)
            {
                //myBot = new AIMLbot.Bot();
                InitAI();
            }

            //InitAI();

            RandomPwd();

            METAbolt_Version = Properties.Resources.METAboltVersion.ToString(CultureInfo.CurrentCulture);
            //mutelist = LoadXMLFile("MuteList.xml");
            //mutelist.PrimaryKey = new DataColumn[] { mutelist.Columns["uuid"] };
        }
        public METAboltInstance(bool firstInstance, string[] args)
        {
            SetExceptionReporter();
            Application.ThreadException += new ThreadExceptionHandler().ApplicationThreadException;

            Application.ApplicationExit += new EventHandler(Application_ApplicationExit);

            this.firstInstance = firstInstance;

            //LoadXMLFile(appdir + "\\MuteList.xml");
            LoadGiverItems(appdir + "\\METAgiverItems.xml");

            MakeTPTable();
            CreateLogDir();
            CreateNotesDir();
            CreateSpellingDir();

            client = new GridClient();

            //at this point we have been given: metabolt.exe [firstname] [lastname] [password]
            //so args[0] and args[1] have the necessary name parts
            if (args.Length > 1)
            {
                string full_name = args[0] + "_" + args[1];
                config = new ConfigManager(full_name);

            }
            else
            {
                config = new ConfigManager();
            }

            config.ApplyDefault();

            SetSettings();
            netcom = new SLNetCom(client, this);

            this.rebooted = true;
            startfrombat = true;

            config.CurrentConfig.FirstName = args[0].ToString(CultureInfo.CurrentCulture);
            config.CurrentConfig.LastName = args[1].ToString(CultureInfo.CurrentCulture);
            config.CurrentConfig.PasswordMD5 = args[2].ToString(CultureInfo.CurrentCulture);

            InitializeConfig();

            imageCache = new ImageCache();
            state = new StateManager(this);

            mainForm = new frmMain(this);
            mainForm.InitializeControls();
            tabsConsole = mainForm.TabConsole;

            if (config.CurrentConfig.AIon)
            {
                //myBot = new AIMLbot.Bot();
                InitAI();
            }

            //InitAI();

            RandomPwd();

            METAbolt_Version = Properties.Resources.METAboltVersion.ToString(CultureInfo.CurrentCulture);
            //mutelist = LoadXMLFile("MuteList.xml");
            //mutelist.PrimaryKey = new DataColumn[] { mutelist.Columns["uuid"] };
        }