Beispiel #1
1
        public frmStats(METAboltInstance instance)
        {
            InitializeComponent();

            string msg1 = "Click for online help/guidance";
            toolTip = new Popup(customToolTip = new CustomToolTip(instance, msg1));
            toolTip.AutoClose = false;
            toolTip.FocusOnOpen = false;
            toolTip.ShowingAnimation = toolTip.HidingAnimation = PopupAnimations.Blend;

            this.instance = instance;
            client = this.instance.Client;

            sim = client.Network.CurrentSim;

            client.Network.SimChanged += new EventHandler<SimChangedEventArgs>(Network_SimChanged);
        }
Beispiel #2
0
        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;
        }
Beispiel #3
0
 public tweetusercontrols()
 {
     InitializeComponent();
     complex = new Popup(complexPopup = new TweetMentionUserUsingScrapedList());
     complex.Resizable = true;
     
 }
Beispiel #4
0
        public frmPreferences(METAboltInstance instance)
        {
            InitializeComponent();

            string msg1 = "Click for help on how to use Application/Preferences";
            toolTip = new Popup(customToolTip = new CustomToolTip(instance, msg1));
            toolTip.AutoClose = false;
            toolTip.FocusOnOpen = false;
            toolTip.ShowingAnimation = toolTip.HidingAnimation = PopupAnimations.Blend;

            this.instance = instance;
            panes = new Dictionary<string, IPreferencePane>();
            //tcons = new PrefTextConsole(instance);

            AddPreferencePane(new PrefGeneralConsole(instance));
            AddPreferencePane(new PrefTextConsole(instance));
            AddPreferencePane(new PrefAI(instance));
            //AddPreferencePane(new PrefTwitter(instance));
            AddPreferencePane(new PrefChairAnn(instance));
            AddPreferencePane(new PrefProxy(instance));
            AddPreferencePane(new PrefPlugin(instance));
            AddPreferencePane(new PrefMETAgiver(instance));
            AddPreferencePane(new Pref3D(instance));
            AddPreferencePane(new PrefSpelling(instance));
            lbxPanes.SelectedIndex = 0;
        }
Beispiel #5
0
        public PrefSpelling(METAboltInstance instance)
        {
            InitializeComponent();

            this.instance = instance;

            GetDictionaries();

            string msg = "Enables spell checking in public chat and IMs.\n\nClick for online help";
            toolTip3 = new Popup(customToolTip = new CustomToolTip(instance, msg));
            toolTip3.AutoClose = false;
            toolTip3.FocusOnOpen = false;
            toolTip3.ShowingAnimation = toolTip3.HidingAnimation = PopupAnimations.Blend;

            checkBox1.Checked = instance.Config.CurrentConfig.EnableSpelling;
            lang = instance.Config.CurrentConfig.SpellLanguage;

            label2.Text = "Selected language: " + lang;

            listBox1.SelectedItem = lang + ".dic";

            SetFlag();

            //this.instance.DictionaryFile = lang + ".dic";
            //this.instance.AffFile = lang + ".aff";
        }
        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;
        }
Beispiel #7
0
 private void Form1_Load(object sender, EventArgs e)
 {
     complex = new Popup(complexPopup = new Settings());
     complex.Resizable = true;
     complexPopup.button1.Click += (_sender, _e) =>
     {
         MessageBox.Show(complexPopup.textBox1.Text);
     };
 }
Beispiel #8
0
        public frmTPhistory(METAboltInstance instance)
        {
            InitializeComponent();
            this.instance = instance;
            client = this.instance.Client;
            netcom = this.instance.Netcom;

            dataGridView1.DataSource = instance.TP;
            dataGridView1.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCellsExceptHeader);

            string msg1 = "To delete a history record, select the whole row by clicking the arrow on the left of the row and hit the DEL button on your keyboard";
            toolTip = new Popup(customToolTip = new CustomToolTip(instance, msg1));
            toolTip.AutoClose = false;
            toolTip.FocusOnOpen = false;
            toolTip.ShowingAnimation = toolTip.HidingAnimation = PopupAnimations.Blend;
        }
Beispiel #9
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;
        }
Beispiel #10
0
        //private GridClient client;
        //private bool isloading = true;
        public PrefMETAgiver(METAboltInstance instance)
        {
            InitializeComponent();

            string msg = "To delete an entry, select the whole row by clicking the arrow on the left of the row and hit the DEL button on your keyboard";
            toolTip = new Popup(customToolTip = new CustomToolTip(instance, msg));
            toolTip.AutoClose = false;
            toolTip.FocusOnOpen = false;
            toolTip.ShowingAnimation = toolTip.HidingAnimation = PopupAnimations.Blend;

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

            GW.DataSource = instance.GiverItems;

            //isloading = false;
        }
Beispiel #11
0
 public SearchControl()
 {
     InitializeComponent();
     popup = new Popup(searchProviders = new SearchProviders());
     if (SystemInformation.IsComboBoxAnimationEnabled)
     {
         popup.ShowingAnimation = PopupAnimations.Slide | PopupAnimations.TopToBottom;
         popup.HidingAnimation = PopupAnimations.Slide | PopupAnimations.BottomToTop;
     }
     else
     {
         popup.ShowingAnimation = popup.HidingAnimation = PopupAnimations.None;
     }
     borderLabel.Image = searchProviders.ProviderImage;
     borderLabel.Text = searchProviders.ProviderName;
     popup.Closed += popup_Closed;
     searchProviders.ProviderChanged += fireSearch_Event;
 }
Beispiel #12
0
        public IMbox(METAboltInstance instance)
        {
            InitializeComponent();

            SetExceptionReporter();
            Application.ThreadException += new ThreadExceptionHandler().ApplicationThreadException;

            this.instance = instance;
            client = this.instance.Client;
            netcom = this.instance.Netcom;

            string msg1 = "To view IMs, double click on an IM session from the list.\nWhen the IMbox tab turns BLUE it means there is a new IM.\nThis tab can be detached from the 'PC' icon on the right.";
            toolTip = new Popup(customToolTip = new CustomToolTip(instance, msg1));
            toolTip.AutoClose = false;
            toolTip.FocusOnOpen = false;
            toolTip.ShowingAnimation = toolTip.HidingAnimation = PopupAnimations.Blend;

            tabsconsole = instance.TabConsole;
            this.instance.imBox = this;

            Disposed += new EventHandler(IMbox_Disposed);

            netcom.InstantMessageReceived += new EventHandler<InstantMessageEventArgs>(netcom_InstantMessageReceived);
            this.instance.Config.ConfigApplied += new EventHandler<ConfigAppliedEventArgs>(Config_ConfigApplied);

            label5.Text = this.instance.Config.CurrentConfig.BusyReply;

            label6.Text = this.instance.Config.CurrentConfig.InitialIMReply;
            label8.Visible = this.instance.Config.CurrentConfig.DisableGroupIMs;
            label9.Visible = this.instance.Config.CurrentConfig.ReplyAI;

            if (string.IsNullOrEmpty(label5.Text))
            {
                label5.Text = "<empty>";
            }

            if (string.IsNullOrEmpty(label6.Text))
            {
                label6.Text = "<empty>";
            }
        }
Beispiel #13
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;
        }
Beispiel #14
0
 private void SetOwnerItem(Control control)
 {
     if (control == null)
         return;
     if (control is Popup)
     {
         var popupControl = control as Popup;
         _ownerPopup = popupControl;
         _ownerPopup._childPopup = this;
         OwnerItem = popupControl.Items[0];
         return;
     }
     else if (_opener == null)
         _opener = control;
     if (control.Parent != null)
         SetOwnerItem(control.Parent);
 }
Beispiel #15
0
        public frmMap(METAboltInstance instance)
        {
            InitializeComponent();

            this.instance = instance;
            netcom = this.instance.Netcom;

            client = this.instance.Client;
            sim = client.Network.CurrentSim;
            client.Grid.CoarseLocationUpdate += new EventHandler<CoarseLocationUpdateEventArgs>(Grid_OnCoarseLocationUpdate);
            client.Network.SimChanged += new EventHandler<SimChangedEventArgs>(Network_OnCurrentSimChanged);

            string msg1 = "Yellow dot with red border = your avatar \nGreen dots = avs at your altitude\nRed squares = avs 20m+ below you\nBlue squares = avs 20m+ above you\n\n Click on map area to get TP position.";
            toolTip = new Popup(customToolTip = new CustomToolTip(instance, msg1));
            toolTip.AutoClose = false;
            toolTip.FocusOnOpen = false;
            toolTip.ShowingAnimation = toolTip.HidingAnimation = PopupAnimations.Blend;

            //List<AvLocation> avlocations = new List<AvLocation>();

            world4.Cursor = Cursors.Cross;
        }
        void breadCrumbLabel_Click(object sender, EventArgs e)
        {
            var arrow = breadCrumbToolStrip.Items[breadCrumbToolStrip.Items.IndexOf(sender as ToolStripStatusLabel) - 1];
            if (_subItemPopup != null && _subItemPopup.Tag == ((ToolStripStatusLabel) sender).Tag)
            {
                _subItemPopup.Tag = null;
                _subItemPopup.Close();
            }
            else if (((ToolStripStatusLabel) sender).Tag is DataFilter)
            {
                breadCrumbToolStrip.Items[breadCrumbToolStrip.Items.IndexOf(sender as ToolStripStatusLabel) - 1].Text = "v";

                var ContainerBox = CreateContainerBox(breadCrumbToolStrip.Items[breadCrumbToolStrip.Items.IndexOf((ToolStripStatusLabel)sender)+1].Tag as BreadCrumb);
                _subItemPopup = new Popup(ContainerBox)
                                    {
                                        AutoSize = true,
                                        Size = _tableSize,
                                        AutoClose = true,
                                        FocusOnOpen = true,
                                        Tag = (sender as ToolStripStatusLabel).Tag
                                    };
                _subItemPopup.Closed += delegate
                                           {
                                               breadCrumbToolStrip.Items[
                                                   breadCrumbToolStrip.Items.IndexOf(sender as ToolStripStatusLabel) - 1
                                                   ].Text = ">";
                                               _subItemPopup.Tag = null;
                                           };

                _subItemPopup.Show(PointToScreen(new Point(arrow.Bounds.Left, arrow.Bounds.Bottom)));
            }
        }
Beispiel #17
0
        public META3D(METAboltInstance instance, ObjectsListItem obtectitem)
        {
            InitializeComponent();

            SetExceptionReporter();
            Application.ThreadException += new ThreadExceptionHandler().ApplicationThreadException;

            Disposed += new EventHandler(META3D_Disposed);

            this.RootPrimLocalID = obtectitem.Prim.LocalID;

            selitem = obtectitem.Prim;

            string msg1 = "Drag (left mouse down) to rotate object\n" +
                            "ALT+Drag to Zoom\n" +
                            "Ctrl+Drag to Pan\n" +
                            "Wheel in/out to Zoom in/out\n\n" +
                            "Click camera then object for snapshot";

            toolTip = new Popup(customToolTip = new CustomToolTip(instance, msg1));
            toolTip.AutoClose = false;
            toolTip.FocusOnOpen = false;
            toolTip.ShowingAnimation = toolTip.HidingAnimation = PopupAnimations.Blend;

            UseMultiSampling = false;

            this.instance = instance;
            client = this.instance.Client;
            //netcom = this.instance.Netcom;
            isobject = true;
            this.objectitem = obtectitem;

            TexturePointers[0] = 0;

            renderer = new MeshmerizerR();
            textRendering = new TextRendering(instance);

            client.Objects.TerseObjectUpdate += new EventHandler<TerseObjectUpdateEventArgs>(Objects_TerseObjectUpdate);
            client.Objects.ObjectUpdate += new EventHandler<PrimEventArgs>(Objects_ObjectUpdate);
            client.Objects.ObjectDataBlockUpdate += new EventHandler<ObjectDataBlockUpdateEventArgs>(Objects_ObjectDataBlockUpdate);
            client.Network.SimChanged += new EventHandler<SimChangedEventArgs>(SIM_OnSimChanged);
            client.Self.TeleportProgress += new EventHandler<TeleportEventArgs>(Self_TeleportProgress);
        }
Beispiel #18
0
        public frmObjects(METAboltInstance instance)
        {
            InitializeComponent();

            Disposed += new EventHandler(Objects_Disposed);

            SetExceptionReporter();
            Application.ThreadException += new ThreadExceptionHandler().ApplicationThreadException;

            this.instance = instance;
            client = this.instance.Client;
            netcom = this.instance.Netcom;

            range = (float)instance.Config.CurrentConfig.ObjectRange;
            //newrange = range;
            //numericUpDown1.Maximum = instance.Config.CurrentConfig.RadarRange;
            numericUpDown1.Value = Convert.ToDecimal(range);

            string msg1 = "Click for online help on how to use the Object Manager";
            toolTip1 = new Popup(customToolTip = new CustomToolTip(instance, msg1));
            toolTip1.AutoClose = false;
            toolTip1.FocusOnOpen = false;
            toolTip1.ShowingAnimation = toolTip1.HidingAnimation = PopupAnimations.Blend;

            client.Network.Disconnected += new EventHandler<DisconnectedEventArgs>(Network_OnDisconnected);
            client.Avatars.UUIDNameReply += new EventHandler<UUIDNameReplyEventArgs>(Avatars_OnAvatarNames);
            netcom.ClientLoggedOut += new EventHandler(netcom_ClientLoggedOut);
            netcom.ClientDisconnected += new EventHandler<DisconnectedEventArgs>(netcom_ClientDisconnected);
            client.Self.AvatarSitResponse += new EventHandler<AvatarSitResponseEventArgs>(Self_AvatarSitResponse);
            client.Network.SimChanged += new EventHandler<SimChangedEventArgs>(SIM_OnSimChanged);
            //client.Self.TeleportProgress += new EventHandler<TeleportEventArgs>(Self_TeleportProgress);
        }
Beispiel #19
0
 private void btnAutoSubmitSet_Click(object sender, EventArgs e)
 {
     pop = new Popup(new ControlPassengers(_passengersData, _QuickPassengers));
     pop.AutoClose = false;
     pop.ShowingAnimation = pop.HidingAnimation = PopupAnimations.Blend;
     pop.Show(formSelectTicket.FormThis.Location.X + formSelectTicket.FormThis.Width / 2 - pop.Width / 2,
         formSelectTicket.FormThis.Location.X + formSelectTicket.FormThis.Height / 2 - pop.Height / 2);
     pop.Closed += (ss, ee) =>
     {
         GetPassengers();
         UpdateAutoPassengersList();
     };
 }
Beispiel #20
0
 private void SetOwnerItem(Control control)
 {
     if (control == null)
     {
         return;
     }
     if (control is Popup)
     {
         Popup popupControl = control as Popup;
         ownerPopup = popupControl;
         ownerPopup.childPopup = this;
         OwnerItem = popupControl.Items[0];
         return;
     }
     else if (opener == null)
     {
         opener = control;
     }
     if (control.Parent != null)
     {
         SetOwnerItem(control.Parent);
     }
 }
        //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;
        }
Beispiel #22
0
        //private const UInt32 SB_TOP = 0x6;
        //private const UInt32 WM_VSCROLL = 0x115;
        //[return: MarshalAs(UnmanagedType.Bool)]
        //[DllImport("user32.dll", SetLastError = true)]
        //private static extern bool PostMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, IntPtr lParam);
        //private void HandleRichTextBoxAdjustScroll(Object sender,
        //    EventArgs e)
        //{
        //    PostMessage(rtbChat.Handle, WM_VSCROLL, (IntPtr)SB_TOP, IntPtr.Zero);
        //}
        public ChatConsole(METAboltInstance instance)
        {
            try
            {
                InitializeComponent();
            }
            catch { ; }

            SetExceptionReporter();
            Application.ThreadException += new ThreadExceptionHandler().ApplicationThreadException;

            this.instance = instance;
            netcom = this.instance.Netcom;
            client = this.instance.Client;

            AddNetcomEvents();

            chatManager = new ChatTextManager(instance, new RichTextBoxPrinter(instance, rtbChat));
            chatManager.PrintStartupMessage();

            afffile = this.instance.AffFile = instance.Config.CurrentConfig.SpellLanguage + ".aff";   // "en_GB.aff";
            dicfile = this.instance.DictionaryFile = instance.Config.CurrentConfig.SpellLanguage + ".dic";   // "en_GB.dic";

            this.instance.MainForm.Load += new EventHandler(MainForm_Load);

            ApplyConfig(this.instance.Config.CurrentConfig);
            this.instance.Config.ConfigApplied += new EventHandler<ConfigAppliedEventArgs>(Config_ConfigApplied);

            CreateSmileys();
            //AddLanguages();

            Disposed += new EventHandler(ChatConsole_Disposed);

            lvwRadar.ListViewItemSorter = new RadarSorter();

            //sim = client.Network.CurrentSim;

            world.Cursor = Cursors.NoMove2D;
            //pictureBox1.Cursor = Cursors.Hand;

            string msg1 = "Click for help on how to use/setup the Voice feature.";
            tTip = new Popup(customToolTip = new CustomToolTip(instance, msg1));
            tTip.AutoClose = false;
            tTip.FocusOnOpen = false;
            tTip.ShowingAnimation = tTip.HidingAnimation = PopupAnimations.Blend;

            string msg2 = ">Hover mouse on avatar icon for info\n>Click on avatar icon for Profile\n>Left click on map and drag to zoom\n>Double click on map to open large map";
            tTip1 = new Popup(customToolTip = new CustomToolTip(instance, msg2));
            tTip1.AutoClose = false;
            tTip1.FocusOnOpen = false;
            tTip1.ShowingAnimation = tTip1.HidingAnimation = PopupAnimations.Blend;

            toolTip.AutoPopDelay = 7000;
            toolTip.InitialDelay = 450;
            toolTip.ReshowDelay = 450;
            toolTip.IsBalloon = false;
            //toolTip.ToolTipIcon = ToolTipIcon.Info;

            toolTip.OwnerDraw = true;
            toolTip.BackColor = Color.RoyalBlue;
            toolTip.ForeColor = Color.White;
            toolTip.Draw += new DrawToolTipEventHandler(toolTip_Draw);

            tp1 = tabPage1;
            tp2 = tabPage2;
            tp3 = tabPage3;
            tp4 = tabPage4;

            //pTP.BackColor = Color.FromArgb(170, 64, 64, 64);  //Color.FromArgb(25, Color.DimGray);

            //rtbChat.VScroll += HandleRichTextBoxAdjustScroll;
            //rtbChat.TextChanged += HandleRichTextBoxAdjustScroll;
        }
Beispiel #23
0
        public void ApplyQonverterSettings(IDictionary<Analysis, QonverterSettings> qonverterSettings)
        {
            clearData();
            setControlsWhenDatabaseLocked(true);

            var workerThread = new BackgroundWorker()
            {
                WorkerReportsProgress = true,
                WorkerSupportsCancellation = true
            };

            workerThread.DoWork += (s, e) =>
            {
                var qonverter = new Qonverter();
                qonverter.QonversionProgress += progressMonitor.UpdateProgress;
                foreach (var item in qonverterSettings)
                    qonverter.SettingsByAnalysis[(int) item.Key.Id] = item.Value.ToQonverterSettings();

                //qonverter.LogQonversionDetails = true;
                qonverter.Reset(Text);
                qonverter.Qonvert(Text);
            };

            workerThread.RunWorkerCompleted += (s, e) =>
            {
                if (e.Result is Exception)
                {
                    Program.HandleException(e.Result as Exception);
                    setControlsWhenDatabaseLocked(false);
                    return;
                }

                lock (session)
                {
                    var sessionFactory = DataModel.SessionFactoryFactory.CreateSessionFactory(Text, new SessionFactoryConfig { WriteSqlToConsoleOut = true });
                    session = sessionFactory.OpenSession();
                    //session.CreateSQLQuery("PRAGMA temp_store=MEMORY").ExecuteUpdate();
                    _layoutManager.SetSession(session);

                    // delete old filters since they are not valid with different qonverter settings
                    session.CreateSQLQuery("DELETE FROM FilterHistory").ExecuteUpdate();
                    session.Clear();

                    if (basicFilter == null)
                        basicFilter = new DataFilter()
                        {
                            MaximumQValue = 0.02,
                            MinimumDistinctPeptides = 2,
                            MinimumSpectra = 2,
                            MinimumAdditionalPeptides = 1,
                            GeneLevelFiltering = false,
                            DistinctMatchFormat = new DistinctMatchFormat
                            {
                                IsChargeDistinct = true,
                                IsAnalysisDistinct = false,
                                AreModificationsDistinct = true,
                                ModificationMassRoundToNearest = 1.0m
                            }
                        };

                    basicFilterControl.DataFilter = basicFilter;

                    viewFilter = basicFilter;

                    session.Close();
                    sessionFactory.Close();
                }

                progressMonitor = new ProgressMonitor();
                progressMonitor.ProgressUpdate += progressMonitor_ProgressUpdate;
                basicFilterControl = new BasicFilterControl();
                basicFilterControl.BasicFilterChanged += basicFilterControl_BasicFilterChanged;
                basicFilterControl.ShowQonverterSettings += ShowQonverterSettings;
                dataFilterPopup = new Popup(basicFilterControl) { FocusOnOpen = true };
                dataFilterPopup.Closed += dataFilterPopup_Closed;
                new Thread(() => OpenFiles(new List<string> { Text }, null)).Start();
            };

            workerThread.RunWorkerAsync();
        }
Beispiel #24
0
        void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            List<string> fileNames;
            TreeNode treeStructure = null;

            if (sender == openToolStripMenuItem)
            {
                var ofd = new OpenFileDialog
                              {
                                  Filter = "IDPicker DB|*.idpDB",
                                  Multiselect = true,
                                  SupportMultiDottedExtensions = true
                              };
                var folderHistory = FolderHistoryInterface.GetRecentFolders();
                if (folderHistory.Any() && Directory.Exists(folderHistory.Last()))
                    ofd.InitialDirectory = folderHistory.First();

                if (ofd.ShowDialog() == DialogResult.OK)
                {
                    fileNames = ofd.FileNames.ToList();
                    if (fileNames.Any())
                    {
                        var baseDirectory = Path.GetDirectoryName(fileNames[0]);
                        foreach (var file in fileNames)
                            if (Path.GetDirectoryName(file) != baseDirectory)
                                baseDirectory = null;
                        if (baseDirectory != null)
                            FolderHistoryInterface.AddFolderToHistory(baseDirectory);
                    }
                }
                else return;
            }
            else
            {
                var fileTypeList = new List<string>
                {
                    "IDPicker files|*.idpDB;*.mzid;*.pepXML;*.pep.xml;*.xml;*.dat",
                    "Importable files|*.mzid;*.pepXML;*.pep.xml;*.xml;*.dat",
                    "MzIdentML files|*.mzid;*.xml",
                    "PepXML files|*.pepXML;*.pep.xml;*.xml",
                    "Mascot files|*.dat",
                    //"IDPicker XML|*.idpXML",
                    "IDPicker DB|*.idpDB",
                    "All files|*.*"
                };

                var openFileDialog = new IDPOpenDialog(fileTypeList);

                if (openFileDialog.ShowDialog() == DialogResult.OK)
                {
                    fileNames = openFileDialog.GetFileNames().Distinct().ToList();
                    if (session != null && sender == importToolStripMenuItem)
                        treeStructure = openFileDialog.GetTreeStructure(session);
                    else
                        treeStructure = openFileDialog.GetTreeStructure();
                    if (!fileNames.Any())
                        return;
                }
                else return;
            }

            clearData();
            progressMonitor = new ProgressMonitor();
            progressMonitor.ProgressUpdate += progressMonitor_ProgressUpdate;

            basicFilterControl = new BasicFilterControl();
            basicFilterControl.BasicFilterChanged += basicFilterControl_BasicFilterChanged;
            basicFilterControl.ApplyFilterChanges += basicFilterControl_ApplyFilterChanges;
            basicFilterControl.ShowQonverterSettings += ShowQonverterSettings;
            dataFilterPopup = new Popup(basicFilterControl) {FocusOnOpen = true};
            dataFilterPopup.Closed += dataFilterPopup_Closed;

            breadCrumbControl.ClearBreadcrumbs();

            if (session != null)
            {
                if (sender == importToolStripMenuItem)
                {
                    //add current session to file list
                    var idpDbFilepath = session.Connection.GetDataSource();
                    if (!fileNames.Contains(idpDbFilepath))
                        fileNames.Add(idpDbFilepath);
                }
                clearSession();
            }
            //System.Data.SQLite.SQLiteConnection.ClearAllPools();

            new Thread(() => { OpenFiles(fileNames, treeStructure); }).Start();
        }
Beispiel #25
0
        private void Form1_Load(object sender, EventArgs e)
        {
            timer.Tick += new EventHandler(timer_Tick); // Every time timer ticks, timer_Tick will be called
            timer.Interval = 10000;                     // Timer will tick every 10 seconds
            timer.Enabled = true;                       // Enable the timer
            timer.Start();

            InplacePopup = new Popup(SettingsPopup = new CSRAssistant.UserControls.Settings());
            InplacePopup.Resizable = false;

            // code for folder browser
            SettingsPopup.btnBrowse.Click += (_sender, _e) =>
            {
                FolderBrowserDialog folderBrowserdg = new FolderBrowserDialog();
                if (folderBrowserdg.ShowDialog() == DialogResult.OK)
                {
                    SettingsPopup.txtPath.Text = folderBrowserdg.SelectedPath;
                }
            };

            SettingsPopup.btnServerBrowse.Click += (_sender, _e) =>
            {
                FolderBrowserDialog folderBrowserdg = new FolderBrowserDialog();
                folderBrowserdg.SelectedPath = @"\\192.168.006.2\d$\CSRAssistant\Biswajit";
                if (folderBrowserdg.ShowDialog() == DialogResult.OK)
                {
                    SettingsPopup.txtServerPath.Text = folderBrowserdg.SelectedPath;
                }

            };

            // code for saving file location in config file
            SettingsPopup.btnSave.Click += (_sender, _e) =>
            {
                try
                {
                    if (Utils.IsDirectory(SettingsPopup.txtPath.Text))
                    {
                        Configuration config = ConfigurationManager.OpenExeConfiguration(Application.ExecutablePath);
                        if (config.AppSettings.Settings["localVoiceRecordsPath"].Value != null && config.AppSettings.Settings["localVoiceRecordsPath"].Value!="")
                        {
                            if (!Directory.Exists(SettingsPopup.txtPath.Text))
                            {
                                Directory.CreateDirectory(SettingsPopup.txtPath.Text);
                            }
                            config.AppSettings.Settings.Add("localVoiceRecordsPath", SettingsPopup.txtPath.Text.Replace(",", string.Empty));
                            config.Save(ConfigurationSaveMode.Modified);
                            SettingsPopup.txtPath.Text = config.AppSettings.Settings["localVoiceRecordsPath"].Value.Replace(",", string.Empty);
                        }
                    }
                    else
                    {
                        MessageBox.Show("Invalid directory specified");
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
                InplacePopup.Hide();
            };

            SettingsPopup.btnServerSave.Click += (_sender, _e) =>
            {
                try
                {
                    if (Utils.IsDirectory(SettingsPopup.txtServerPath.Text))
                    {
                        Configuration config = ConfigurationManager.OpenExeConfiguration(Application.ExecutablePath);
                        if (config.AppSettings.Settings["ServerVoiceRecordsPath"].Value != null)
                        {
                            if (!Directory.Exists(SettingsPopup.txtServerPath.Text))
                            {
                                Directory.CreateDirectory(SettingsPopup.txtServerPath.Text);
                            }
                            config.AppSettings.Settings.Add("ServerVoiceRecordsPath", SettingsPopup.txtServerPath.Text.Replace(",", string.Empty));
                            config.Save(ConfigurationSaveMode.Modified);
                            SettingsPopup.txtServerPath.Text = config.AppSettings.Settings["ServerVoiceRecordsPath"].Value.Replace(",", string.Empty);
                        }
                    }
                    else
                    {
                        MessageBox.Show("Invalid directory specified");
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
                InplacePopup.Hide();
            };

            Utils.ReadProperty(metroStyleManager1);
            SetLineSize();
            if (!User.IsLoggedIn)
            {
                metroTile6.Text = "Login";
                metroTile6.Refresh();
            }
            else
            {
                metroTile6.Text = "Logout";
                metroTile6.Refresh();
            }
        }
Beispiel #26
0
        private void formLogin_Shown(object sender, EventArgs e)
        {
            try
            {
                string[] directorys = System.IO.Directory.GetDirectories(AppDomain.CurrentDomain.BaseDirectory + "data\\");
                string[] rDirectorys = new string[directorys.Length];
                int j = 0;
                for (int i = 0; i < directorys.Length; i++)
                {
                    var time = DateTime.Now.AddDays(-1);
                    var path = directorys[i] + "\\usrCookie.cfg";
                    if (System.IO.File.Exists(path))
                    {
                        time = System.IO.File.GetLastWriteTime(path);
                        if (DateTime.Now.Subtract(time).TotalMinutes > 30)
                        {
                            System.IO.File.Delete(path);
                        }
                        else
                        {
                            rDirectorys[j++] =
                                directorys[i].Substring(directorys[i].LastIndexOf("\\")).Replace("\\", "");
                        }
                    }
                }
                if (rDirectorys[0] != null)
                {
                    var ql = new QuicklyLogin();
                    ql.Buttons = rDirectorys;
                    var popup = new Popup(ql)
                    {
                        AutoClose = true,
                        FocusOnOpen = false,
                        ShowingAnimation = PopupAnimations.Slide | PopupAnimations.LeftToRight,
                        HidingAnimation = PopupAnimations.Slide | PopupAnimations.RightToLeft
                    };
                    popup.Closing += popup_Closing;
                    popup.Show(new Point(this.Location.X + this.Width + 3, this.Location.Y + 3));
                }
            }
            catch (Exception)
            {

               
            }
            finally { }
          

            GetRandCodeImg();    
        }
Beispiel #27
0
        public IDPickerForm (IList<string> args)
        {
            InitializeComponent();

            toolStripStatusLabel.Text = "Initializing...";

            Thread.CurrentThread.Priority = ThreadPriority.AboveNormal;

            this.args = args;

            defaultDataFilter = new DataFilter();

            manager = new Manager(dockPanel)
            {
                ShowChromatogramListForNewSources = false,
                ShowSpectrumListForNewSources = false,
                OpenFileUsesCurrentGraphForm = true,
            };

            progressMonitor = new ProgressMonitor();
            progressMonitor.ProgressUpdate += progressMonitor_ProgressUpdate;

            if (Program.IsHeadless)
                Load += IDPickerForm_Load;
            else
                Shown += IDPickerForm_Load;

            basicFilterControl = new BasicFilterControl();
            basicFilterControl.BasicFilterChanged += basicFilterControl_BasicFilterChanged;
            basicFilterControl.ApplyFilterChanges += basicFilterControl_ApplyFilterChanges;
            basicFilterControl.ShowQonverterSettings += ShowQonverterSettings;
            dataFilterPopup = new Popup(basicFilterControl) { FocusOnOpen = true };
            dataFilterPopup.Closed += dataFilterPopup_Closed;

            breadCrumbControl = new BreadCrumbControl() { Dock = DockStyle.Fill };
            breadCrumbControl.BreadCrumbClicked += breadCrumbControl_BreadCrumbClicked;
            breadCrumbPanel.Controls.Add(breadCrumbControl);

            fragmentationStatisticsForm = new FragmentationStatisticsForm(this);
            fragmentationStatisticsForm.Show(dockPanel, DockState.DockBottomAutoHide);
            fragmentationStatisticsForm.AutoHidePortion = 0.5;

            peakStatisticsForm = new PeakStatisticsForm(this);
            peakStatisticsForm.Show(dockPanel, DockState.DockBottomAutoHide);
            peakStatisticsForm.AutoHidePortion = 0.5;

            distributionStatisticsForm = new DistributionStatisticsForm(this);
            distributionStatisticsForm.Show(dockPanel, DockState.DockBottomAutoHide);
            distributionStatisticsForm.AutoHidePortion = 0.5;

            reassignPSMsForm = new RescuePSMsForm(this);
            reassignPSMsForm.Show(dockPanel, DockState.DockBottomAutoHide);
            reassignPSMsForm.AutoHidePortion = 0.5;

            ptmAttestationForm = new PTMAttestationForm(this);
            ptmAttestationForm.Show(dockPanel, DockState.DockBottomAutoHide);
            ptmAttestationForm.AutoHidePortion = 0.5;

            spectrumTableForm = new SpectrumTableForm();
            spectrumTableForm.Show(dockPanel, DockState.DockLeft);
            spectrumTableForm.AutoHidePortion = 0.5;

            proteinTableForm = new ProteinTableForm();
            proteinTableForm.Show(dockPanel, DockState.DockTop);
            proteinTableForm.AutoHidePortion = 0.5;

            peptideTableForm = new PeptideTableForm();
            peptideTableForm.Show(dockPanel, DockState.DockTop);
            peptideTableForm.AutoHidePortion = 0.5;

            proteinTableForm.Activate();

            modificationTableForm = new ModificationTableForm();
            modificationTableForm.Show(dockPanel, DockState.Document);
            modificationTableForm.AutoHidePortion = 0.5;

            analysisTableForm = new AnalysisTableForm();
            analysisTableForm.Show(dockPanel, DockState.Document);
            analysisTableForm.AutoHidePortion = 0.5;

            filterHistoryForm = new FilterHistoryForm();
            filterHistoryForm.Show(dockPanel, DockState.Document);
            filterHistoryForm.AutoHidePortion = 0.5;

            spectrumTableForm.SpectrumViewFilter += handleViewFilter;
            spectrumTableForm.SpectrumViewVisualize += spectrumTableForm_SpectrumViewVisualize;
            spectrumTableForm.FinishedSetData += handleFinishedSetData;
            spectrumTableForm.StartingSetData += handleStartingSetData;
            proteinTableForm.ProteinViewFilter += handleViewFilter;
            proteinTableForm.ProteinViewVisualize += proteinTableForm_ProteinViewVisualize;
            proteinTableForm.FinishedSetData += handleFinishedSetData;
            proteinTableForm.StartingSetData += handleStartingSetData;
            peptideTableForm.PeptideViewFilter += handleViewFilter;
            peptideTableForm.FinishedSetData += handleFinishedSetData;
            peptideTableForm.StartingSetData += handleStartingSetData;
            modificationTableForm.ModificationViewFilter += handleViewFilter;
            modificationTableForm.FinishedSetData += handleFinishedSetData;
            modificationTableForm.StartingSetData += handleStartingSetData;
            analysisTableForm.AnalysisViewFilter += handleViewFilter;
            analysisTableForm.FinishedSetData += handleFinishedSetData;
            analysisTableForm.StartingSetData += handleStartingSetData;
            filterHistoryForm.LoadPersistentDataFilter += handleLoadPersistentDataFilter;
            //filterHistoryForm.FinishedSetData += handleFinishedSetData;
            //filterHistoryForm.StartingSetData += handleStartingSetData;

            // hide DockPanel before initializing layout manager
            dockPanel.Visible = false;
            dockPanel.ShowDocumentIcon = true;

            persistentForms = new IPersistentForm[]
            {
                proteinTableForm,
                peptideTableForm,
                spectrumTableForm,
                analysisTableForm,
                filterHistoryForm
            };

            _layoutManager = new LayoutManager(this, dockPanel, persistentForms);

            // load last or default location and size
            _layoutManager.LoadMainFormSettings();

            // certain features are only enabled for development builds
            if (Application.ExecutablePath.Contains("build-nt-x86"))
            {
                // provide SQL logging for development builds
                logForm = new LogForm();
                logForm.AutoHidePortion = 0.25;
                Console.SetOut(logForm.LogWriter);

                developerToolStripMenuItem.ForeColor = SystemColors.MenuBar;
            }
            else
            {
                Console.SetOut(TextWriter.Null);

                developerToolStripMenuItem.Visible = false;
            }

            /*spyEventLogForm = new SpyEventLogForm();
            spyEventLogForm.AddEventSpy(new EventSpy("proteinTableForm", proteinTableForm));
            spyEventLogForm.AddEventSpy(new EventSpy("peptideTableForm", peptideTableForm));
            spyEventLogForm.AddEventSpy(new EventSpy("spectrumTableForm", spectrumTableForm));
            spyEventLogForm.AddEventSpy(new EventSpy("modificationTableForm", modificationTableForm));
            spyEventLogForm.Show(dockPanel, DockState.DockBottomAutoHide);*/
        }
Beispiel #28
0
 private void 显示过站信息ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     //dgvQuickTrainInfo.DataSource = null;
     if (dgvTrainView.SelectedRows.Count > 0)
     {
         Rectangle rect = dgvTrainView.GetCellDisplayRectangle(1, dgvTrainView.SelectedRows[0].Cells[0].RowIndex, true);
         var data = dgvTrainView.SelectedRows[0].DataBoundItem as QueryLeftNewDTO;
         pop = new Popup(new TrainDeatils(cookieContainer, String.Format("{0} : {1} - {2}",
             data.Station_train_code, data.From_station_name,
             data.To_station_name), data.From_station_name,
             data.To_station_name, data.Train_no,
             data.From_station_telecode, data.To_station_telecode,
             dtpRiqi.Value.ToString("yyyy-MM-dd")));
         pop.AutoClose = true;
         pop.FocusOnOpen = true;
         pop.ShowingAnimation = PopupAnimations.TopToBottom | PopupAnimations.Slide;
         pop.HidingAnimation = PopupAnimations.BottomToTop | PopupAnimations.Slide;
         pop.Show(dgvTrainView, rect);
     }
 }
Beispiel #29
0
        public MainForm()
        {
            InitializeComponent();
            gridToolTip = new Popup(gridCustomToolTip = new GridToolTip());
            gridToolTip.AutoClose = false;
            gridToolTip.FocusOnOpen = false;
            gridToolTip.ShowingAnimation = gridToolTip.HidingAnimation = PopupAnimations.LeftToRight | PopupAnimations.Slide;

            toolTip = new Popup(customToolTip = new CustomToolTip());
            toolTip.AutoClose = false;
            toolTip.FocusOnOpen = false;
            toolTip.ShowingAnimation = toolTip.HidingAnimation = PopupAnimations.Blend;

            complex = new Popup(complexPopup = new ComplexPopup());
            complex.Resizable = true;
            complexPopup.ButtonMore.Click += delegate(object _sender, EventArgs _e)
            {
                ComplexPopup cp = new ComplexPopup();
                cp.ButtonMore.Click += delegate(object __sender, EventArgs __e)
                {
                    new Popup(new ComplexPopup()).Show(__sender as Button);
                };
                new Popup(cp).Show(_sender as Button);
            };

            dataGridView.Columns.Add("col1", "col1");
            dataGridView.Columns.Add("col2", "col2");
            dataGridView.Columns.Add("col3", "col3");

            dataGridView.Rows.Add("1", "A", "!");
            dataGridView.Rows.Add("2", "B", "@");
            dataGridView.Rows.Add("3", "C", "#");
            dataGridView.CellMouseEnter += new DataGridViewCellEventHandler(dataGridView_CellMouseEnter);
            dataGridView.CellMouseLeave += new DataGridViewCellEventHandler(dataGridView_CellMouseLeave);
            dataGridView.CellMouseMove += new DataGridViewCellMouseEventHandler(dataGridView_CellMouseMove);

            // Simple treeview attached to the PopupComboBox
            treeView = new TreeView()
            {
                FullRowSelect = true,
                HotTracking = true,
                ShowLines = false,
                ShowNodeToolTips = false,
                ShowPlusMinus = false,
                ShowRootLines = false
            };
            treeView.Nodes.AddRange(new TreeNode[] { new TreeNode("Node 1"), new TreeNode("Node 2"), new TreeNode("Node 3") });
            treeView.Nodes[1].Nodes.Add("Node 2.5");
            treeView.ExpandAll();
            treeView.BeforeCollapse += treeView_BeforeCollapse;
            treeView.NodeMouseClick += treeView_NodeMouseClick;
            popupComboBox.DropDownControl = treeView;

            // Fill the PopupComboBox with nodes from the tree view
            Action<TreeNodeCollection> fillCombo = null;
            fillCombo = delegate(TreeNodeCollection nodes)
            {
                if (nodes == null) return;
                foreach (TreeNode node in nodes)
                {
                    popupComboBox.Items.Add(node.Text);
                    fillCombo(node.Nodes);
                }
            };
            fillCombo(treeView.Nodes);
        }
Beispiel #30
0
        private void DisplaySelected()
        {
            try
            {
                lbxTask.Items.Clear();

                button6.Enabled = groupBox1.Enabled = gbxInworld.Enabled = (lbxPrims.SelectedItem != null);

                int iDx = lbxPrims.SelectedIndex;

                if (iDx < 0)
                {
                    //btnTP.Enabled = false;
                    return;
                }

                ObjectsListItem item = (ObjectsListItem)lbxPrims.Items[iDx];

                Primitive sPr = new Primitive();
                sPr = item.Prim;

                if (sPr.Properties == null)
                {
                    //client.Objects.SelectObject(client.Network.CurrentSim, sPr.LocalID);
                    client.Objects.SelectObject(client.Network.CurrentSim, sPr.LocalID, true);
                    //client.Objects.RequestObject(client.Network.CurrentSim, sPr.LocalID);
                    return;
                }

                //btnTP.Enabled = true;

                lblOwner.Text = sPr.Properties.OwnerID.ToString();
                lblUUID.Text = sPr.Properties.ObjectID.ToString();

                if (instance.State.SitPrim != UUID.Zero)
                {
                    if (sPr.ID == instance.State.SitPrim)
                    {
                        btnSitOn.Text = "&Stand";
                    }
                    else
                    {
                        btnSitOn.Text = "&Sit";
                    }
                }
                else
                {
                    btnSitOn.Text = "&Sit";
                }

                // Get the owner name
                UUID lookup = sPr.Properties.OwnerID;
                if (!instance.avnames.ContainsKey(lookup))
                {
                    client.Avatars.RequestAvatarName(lookup);
                    pictureBox1.Cursor = Cursors.Default;
                }
                else
                {
                    label9.Text = instance.avnames[lookup];
                    pictureBox1.Enabled = true;
                    pictureBox1.Cursor = Cursors.Hand;
                }

                txtCreator.Text = "??? (click on selected object)";

                lookup = sPr.Properties.CreatorID;

                if (lookup != UUID.Zero)
                {
                    if (!instance.avnames.ContainsKey(lookup))
                    {
                        client.Avatars.RequestAvatarName(lookup);
                        pictureBox2.Cursor = Cursors.Default;
                    }
                    else
                    {
                        txtCreator.Text = instance.avnames[lookup];
                        pictureBox2.Enabled = true;
                        pictureBox2.Cursor = Cursors.Hand;
                    }

                    label21.Text = sPr.Properties.CreatorID.ToString();
                }
                else
                {
                    pictureBox2.Enabled = false;
                    pictureBox2.Cursor = Cursors.Default;
                }

                btnReturn.Enabled = btnTake.Enabled = true;

                PermissionMask sPerm = sPr.Properties.Permissions.NextOwnerMask;
                PermissionMask sOPerm = sPr.Properties.Permissions.OwnerMask;

                string sEp = sPerm.ToString();
                string sOEp = sOPerm.ToString();

                if (sPr.Properties.SaleType != 0)
                {
                    label3.Text = "L$" + sPr.Properties.SalePrice.ToString(CultureInfo.CurrentCulture);
                }
                else
                {
                    label3.Text = "Not for sale";
                }

                label11.Text = sPr.Text;
                textBox2.Text = sPr.Properties.Name;
                label15.Text = sPr.Properties.Description;

                Vector3 primpos = new Vector3(Vector3.Zero);
                primpos = sPr.Position;
                //// Calculate the distance here in metres
                //int pX = (int)primpos.X;
                //int pY = (int)primpos.Y;
                //int pZ = (int)primpos.Z;

                //int sX = (int)client.Self.SimPosition.X;
                //int sY = (int)client.Self.SimPosition.Y;
                //int sZ = (int)client.Self.SimPosition.Z;

                int vZ = (int)primpos.Z - (int)instance.SIMsittingPos().Z;

                //int vX = sX - pX;
                //int vY = sY - pY;

                //int pX2 = vX * vX;
                //int pY2 = vY * vY;
                //int h2 = pX2 + pY2;

                //int hyp1 = (int)Math.Sqrt(h2);
                //int hyp = instance.Distance3D(sX, sY, sZ, pX, pY, pZ);

                double dist = Math.Round(Vector3.Distance(instance.SIMsittingPos(), primpos), MidpointRounding.ToEven);

                label13.Text = " " + dist.ToString(CultureInfo.CurrentCulture) + "m - [ Elev.:" + vZ.ToString(CultureInfo.CurrentCulture) + "m]";

                label5.Text = "L$" + sPr.Properties.OwnershipCost.ToString(CultureInfo.CurrentCulture);
                //label3.Text = sPr.Properties.SaleType.ToString();

                // Owner perms
                if (sOEp.Contains("Modify"))
                {
                    checkBox6.Checked = true;
                }
                else
                {
                    checkBox6.Checked = false;
                }

                if (sOEp.Contains("Copy"))
                {
                    checkBox5.Checked = true;
                }
                else
                {
                    checkBox5.Checked = false;
                }

                if (sOEp.Contains("Transfer"))
                {
                    checkBox4.Checked = true;
                }
                else
                {
                    checkBox4.Checked = false;
                }

                // Next Owner perms
                if (sEp.Contains("Modify"))
                {
                    checkBox1.Checked = true;
                }
                else
                {
                    checkBox1.Checked = false;
                }

                if (sEp.Contains("Copy"))
                {
                    checkBox2.Checked = true;
                }
                else
                {
                    checkBox2.Checked = false;
                }

                if (sEp.Contains("Transfer"))
                {
                    checkBox3.Checked = true;
                }
                else
                {
                    checkBox3.Checked = false;
                }

                //if (btnTP.Enabled)
                //    btnTP.Enabled = false;

                lkLocation.Text = "";

                //sPr.Flags = LLObject.ObjectFlags.Scripted;
                //client.Objects.RequestObject("", sPr.LocalID);
                //client.Objects.SelectObject();

                pBar1.Visible = true;
                pBar1.Refresh();

                label22.Text = "Local ID: " + sPr.LocalID.ToString(CultureInfo.CurrentCulture);

                // Populate child items here
                lbxChildren.BeginUpdate();
                lbxChildren.Items.Clear();

                button3.Visible = button7.Visible = false;

                List<Primitive> results = client.Network.CurrentSim.ObjectsPrimitives.FindAll(
                    delegate(Primitive prim)
                    {
                        return (prim.ParentID == sPr.LocalID);
                    }
                );

                if (results != null && results.Count > 0)
                {
                    foreach (var prim in results)
                    {
                        ObjectsListItem citem = new ObjectsListItem(prim, client, lbxChildren);

                        if (!childItems.ContainsKey(prim.LocalID))
                        {
                            childItems.Add(prim.LocalID, citem);
                        }
                    }
                }

                foreach (KeyValuePair<uint, ObjectsListItem> kvp in childItems)
                {
                    if (sPr.LocalID == kvp.Value.Prim.ParentID)
                    {
                        //ObjectsListItem citem = new ObjectsListItem(kvp.Value.Prim, client, lbxChildren);
                        //sPr.
                        //citem.PropertiesReceived += new EventHandler(citem_PropertiesReceived);
                        //citem.RequestProperties();
                        lbxChildren.Items.Add(kvp.Value);
                    }
                }

                lbxChildren.EndUpdate();
                pBar1.Visible = false;

                SetPerm(sPr);

                //if (sPr.Properties.OwnerID != client.Self.AgentID)
                //{
                //    //checkBox1.Enabled = checkBox2.Enabled = checkBox3.Enabled = label11.Enabled = label15.Enabled = textBox2.Enabled = false;
                //    label11.Enabled = label15.Enabled = textBox2.Enabled = false;
                //}
                //else
                //{
                //    //checkBox1.Enabled = checkBox2.Enabled = checkBox3.Enabled = label11.Enabled = label15.Enabled = textBox2.Enabled = true;
                //    label11.Enabled = label15.Enabled = textBox2.Enabled = true;
                //}

                sloading = false;
            }
            catch (Exception ex)
            {
                Logger.Log(ex.Message, Helpers.LogLevel.Error);
            }

            string msg1 = label11.Text;
            toolTip = new Popup(customToolTip = new CustomToolTip(instance, msg1));
            toolTip.AutoClose = false;
            toolTip.FocusOnOpen = false;
            toolTip.ShowingAnimation = toolTip.HidingAnimation = PopupAnimations.Blend;

            lbxPrims.SelectedItem = lbxPrims.SelectedItem;
            lbxPrims.Select();
        }