Пример #1
0
        private void OnRequestSmallMenuItemRequest(object sender, SmallRequestEventArgs e) {
            try {
                using (NumericDialog dlg = new NumericDialog()) {
                    dlg.Title = String.Format(StringResources.RequestSmallDialogTitle, e.Small);
                    dlg.Caption = StringResources.RequestSmallDialogCaption;
                    dlg.Value = 0;
                    dlg.Minimum = 0;
                    dlg.Maximum = UInt32.MaxValue;

                    if (dlg.ShowDialog(this) == DialogResult.OK) {
                        client.Request(e.Small, dlg.Value);
                    }
                }
            }
            catch (Exception ex) {
                Dialog.ShowError(
                    String.Format(StringResources.RequestFailedDialogTitle, e.Small),
                    StringResources.RequestFailedDialogMessage,
                    ex.Message);
            }
        }
Пример #2
0
 protected virtual void OnSmallRequest(SmallRequestEventArgs e) {
     EventHandler<SmallRequestEventArgs> temp = SmallRequest;
     if (temp != null) {
         temp(this, e);
     }
 }