Ejemplo n.º 1
0
        private void LoadExpListConfig()
        {
            CBox_ExpList.BeginUpdate();
            {
                CBox_ExpList.Items.Clear();
                foreach (var exp in ConfigManager.User.SendPanel_Data_List.Value)
                {
                    CBox_ExpList.Items.Add(exp);
                }

                /* 先頭のアイテムを選択 */
                if (CBox_ExpList.Items.Count > 0)
                {
                    CBox_ExpList.SelectedIndex = 0;
                }
            }
            CBox_ExpList.EndUpdate();
        }
Ejemplo n.º 2
0
        private void AddLog(string text)
        {
            CBox_ExpList.BeginUpdate();
            {
                var text_now = CBox_ExpList.Text;

                /* 重複するコマンドを削除 */
                CBox_ExpList.Items.Remove(text);

                /* ログの最大値に合わせて古いログを削除 */
                if (CBox_ExpList.Items.Count >= (ConfigManager.User.SendPanelLogLimit.Value - 1))
                {
                    CBox_ExpList.Items.RemoveAt(CBox_ExpList.Items.Count - 1);
                }

                /* 先頭に追加 */
                CBox_ExpList.Items.Insert(0, text);

                /* コマンドを復元 */
                CBox_ExpList.Text = text_now;
            }
            CBox_ExpList.EndUpdate();
        }