Пример #1
0
 private void FormInstanceClosing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     lock (_lockObj)
     {
         _formInstance.Closing -= FormInstanceClosing;
         _formInstance          = null;
     }
 }
Пример #2
0
        private void btnContacts_Click(object sender, System.EventArgs e)
        {
            ContactsListForm contactsListForm = new ContactsListForm();

            contactsListForm.EmailAdded += EmailAdded;

            contactsListForm.ShowDialog();
        }
Пример #3
0
        protected override void ExecuteCommand(object sender, object data)
        {
            lock (_lockObj)
            {
                if (_formInstance == null)
                {
                    _formInstance          = new ContactsListForm(Plugin.PluginManager.Core.ContactsManager);
                    _formInstance.Closing += FormInstanceClosing;
                }

                _formInstance.Show();
            }
        }