コード例 #1
0
        private void CmdDecoderNew_Click(object sender, System.EventArgs e)
        {
            FeedbackEncoderEditorView form = new FeedbackEncoderEditorView();

            if (form.ShowDialog() == DialogResult.OK)
            {
                this.ShowInputs(this.SelectedConnection);
            }
        }
コード例 #2
0
 private void CmdDecoderAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (tabDecoder.SelectedTabPage == tabDecoderAcc)
     {
         AccessoryDecoderEditorView form = new AccessoryDecoderEditorView();
         if (form.ShowDialog(this) == DialogResult.OK)
         {
             this.ListAccessoryDecoders();
         }
     }
     else
     {
         FeedbackEncoderEditorView form = new FeedbackEncoderEditorView();
         if (form.ShowDialog(this) == DialogResult.OK)
         {
             this.ListFeedbackEncoders();
         }
     }
 }
コード例 #3
0
        private void CmdDecoderEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                if (tabDecoder.SelectedTabPage == tabDecoderAcc)
                {
                    if (!(this.GetSelectedResource() is AccessoryDecoder accDecoder))
                    {
                        return;
                    }

                    AccessoryDecoderEditorView form = new AccessoryDecoderEditorView(accDecoder);
                    if (form.ShowDialog(this) == DialogResult.OK)
                    {
                        this.ListAccessoryDecoders();
                    }
                }
                else
                {
                    if (!(this.GetSelectedResource() is FeedbackEncoder fbEncoder))
                    {
                        return;
                    }

                    FeedbackEncoderEditorView form = new FeedbackEncoderEditorView(fbEncoder);
                    if (form.ShowDialog(this) == DialogResult.OK)
                    {
                        this.ListFeedbackEncoders();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }