示例#1
0
        private void FoundryKeyRingMatchList_Click(object sender, int row, int col)
        {
            try
            {
                HudList.HudListRowAccessor HudRow = FoundryKeyRingMatchList[row];

                if(col == 1)
                {
                    mGeneralSettings.FoundrySettings.KeyRingMatchList.RemoveAll(x => x.KeyName == ((HudStaticText)HudRow[0]).Text);
                    mCurrentKeyRingPair = null;
                    iLockerUpdate.bSubmitGeneralSettings = true;
                }
                else
                {
                    mCurrentKeyRingPair = mGeneralSettings.FoundrySettings.KeyRingMatchList.Find(x => x.KeyName == ((HudStaticText)HudRow[0]).Text);
                }
                _UpdateFoundryControlPanel();
            }catch(Exception ex){LogError(ex);}
        }
示例#2
0
        private void FoundryKeyRingMatchAdd_Hit(object sender, EventArgs e)
        {
            try
            {
                if(!FoundryKeyRingMatchEdit.Text.Contains(":"))
                {
                    WriteToChat("Enter Key and Keyring pairs in the following format:");
                    WriteToChat("Key Name:Key Ring Name");
                }

                string[] splittext = FoundryKeyRingMatchEdit.Text.Split(':');
                KeyRingMatch krm = new KeyRingMatch();
                krm.KeyName = splittext[0].Trim();
                krm.RingName = splittext[1].Trim();
                mGeneralSettings.FoundrySettings.KeyRingMatchList.Add(krm);

                mCurrentKeyRingPair = mGeneralSettings.FoundrySettings.KeyRingMatchList.Find(x => x.KeyName == splittext[0].Trim());

                iLockerUpdate.bSubmitGeneralSettings = true;
                _UpdateFoundryControlPanel();
            }catch(Exception ex){LogError(ex);}
        }