Example #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            StMsgEditForm form = new StMsgEditForm("Add", this.storedIsPrimary);

            form.OnStoMsgChangedEvt += new EventHandler <StoredMsgChangedEventArgs>(form_OnStoMsgChangedEvt);
            form.ShowDialog();
            form.OnStoMsgChangedEvt -= new EventHandler <StoredMsgChangedEventArgs>(form_OnStoMsgChangedEvt);

            AddListViewItem();
            this.SetMsgInfo();
        }
Example #2
0
        private void lvMsg_DoubleClick(object sender, EventArgs e)
        {
            ListView.SelectedIndexCollection selText = lvMsg.SelectedIndices;

            StMsgEditForm form = new StMsgEditForm((lvMsg.Items[selText[0]].Tag as MsgInfo).msgNum, this.storedIsPrimary);

            form.OnStoMsgChangedEvt += new EventHandler <StoredMsgChangedEventArgs>(form_OnStoMsgChangedEvt);
            form.ShowDialog();
            form.OnStoMsgChangedEvt -= new EventHandler <StoredMsgChangedEventArgs>(form_OnStoMsgChangedEvt);

            AddListViewItem();
            this.SetMsgInfo();
        }
Example #3
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            ListView.SelectedIndexCollection selText = lvMsg.SelectedIndices;

            if (selText.Count <= 0)
            {
                MessageBox.Show(LangPack.GetMongolian("Please select message text to modify."), LangPack.GetMongolian(this.Name), MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            StMsgEditForm form = new StMsgEditForm((lvMsg.Items[selText[0]].Tag as MsgInfo).msgNum, this.storedIsPrimary);

            form.OnStoMsgChangedEvt += new EventHandler <StoredMsgChangedEventArgs>(form_OnStoMsgChangedEvt);
            form.ShowDialog();
            form.OnStoMsgChangedEvt -= new EventHandler <StoredMsgChangedEventArgs>(form_OnStoMsgChangedEvt);

            AddListViewItem();
            this.SetMsgInfo();
        }