コード例 #1
0
        /// <summary>
        /// OKボタン押下時の動作
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CommitButton_Click(object sender, RoutedEventArgs e)
        {
            // this.SaveMethodChange();

            int RowCnt = attrMethSearchResultList.Items.IndexOf(attrMethSearchResultList.SelectedItem);
            AttrMthSearchItem nowRow = viewModel.AttrMethItems[RowCnt];

            string appendString = "";

            if (nowRow.attrMethFlg == "m")
            {
                if (nowRow.methParameterDesc != null)
                {
                    appendString = nowRow.elemName + "." + nowRow.attrMethName + "(" + nowRow.methParameterDesc + ")";
                }
                else
                {
                    appendString = nowRow.elemName + "." + nowRow.attrMethName + "( )";
                }
            }
            else
            {
                appendString = nowRow.elemName + "." + nowRow.attrMethName;
            }


            // 親画面(BehaviorEditor)から呼ばれた場合
            if (this.Owner != null)
            {
                BehaviorEditor parent = (BehaviorEditor)this.Owner;
                parent.insertTextOnCaret(appendString);
            }

            this.Close();
        }
コード例 #2
0
        /// <summary>
        /// メソッド振る舞いのテキストボックスのダブルクリックイベントハンドラ(振る舞い編集画面を開く)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void MethodTextBoxDoubleClick(object sender, EventArgs e)
        {
            MethodVO method = (MethodVO)((TextBox)sender).Tag;

            // Form f = new MethodBehaviorEditForm(myElement, method);
            // f.ShowDialog(this);

            var window = new BehaviorEditor(myElement, method);

            // var window = new BehaviorWindow();
            ElementHost.EnableModelessKeyboardInterop(window);
            window.Show();

            if (method.changed == 'U')
            {
                this.repaintFormMethod(method);
            }
        }