Esempio n. 1
0
        private void txt_BotName_Leave(object sender, EventArgs e)
        {
            var ckeckResult = _logic.CheckBotName(txt_BotName.Text.Trim());

            if (false == ckeckResult.success)
            {
                tab_Main.SelectedIndex = 2;
                txt_BotName.Text       = string.Empty;
                txt_BotName.Focus();
                SetSetting(_botNameSettingName, txt_BotName.Text.Trim());
                MessageBox.Show(ckeckResult.msg, "錯囉", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            SetSetting(_botNameSettingName, txt_BotName.Text.Trim());
            _logic = new LineThieveLogic(GetIdFromTextbox(), txt_BotKey.Text.Trim(), txt_BotName.Text.Trim());
        }
Esempio n. 2
0
        private void LineThieves_Load(object sender, EventArgs e)
        {
            _config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
            FillTelegramSetting();

            var id = default(int);

            int.TryParse(txt_UserId.Text.Trim(), out id);
            _logic = new LineThieveLogic(id, txt_BotKey.Text.Trim(), txt_BotName.Text.Trim());

            txt_Search.Text = _txtSearchPlaceHolder;
            dg_PickSticker.Columns["dg_PickSticker_Col_Emoji"].DefaultCellStyle.Font = new Font("Microsoft Sans Serif", 30f);

            txt_Search.Focus();
            _emojiSelector.VisibleChanged += formVisibleChanged;

            _openFolder = AppDomain.CurrentDomain.BaseDirectory.TrimEnd('\\');

            this.Text = $"LineThieves v{System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString().Replace(".0.0", "")} by Telegram: @EsnChg";
        }