Beispiel #1
0
        private void txtUnitPrice_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            beforeValueDlg = "";
            if (_entityListD.Count >= DataForm.CurrentIndex)
            {
                beforeValueDlg = ExCast.zCStr(_entityListD[DataForm.CurrentIndex]._unit_price);
            }

            if (_txtUnitPrice == null)
            {
                _txtUnitPrice = ExVisualTreeHelper.FindTextBox(this.DataForm, "txtUnitPrice");
            }

            Dlg_UnitPriceSetting unitPriceDlg = new Dlg_UnitPriceSetting();

            // 税転換が内税で明細課税有りの場合
            if ((_entityH._tax_change_id == 4 || _entityH._tax_change_id == 5 || _entityH._tax_change_id == 6) && _entityListD[DataForm.CurrentIndex]._tax_division_id == 1)
            {
                unitPriceDlg.retail_price     = _entityListD[DataForm.CurrentIndex]._retail_price_before_tax;
                unitPriceDlg.sales_unit_price = _entityListD[DataForm.CurrentIndex]._sales_unit_price_before_tax;
                unitPriceDlg.sales_cost_price = _entityListD[DataForm.CurrentIndex]._sales_cost_price_before_tax;
            }
            else
            {
                unitPriceDlg.retail_price     = _entityListD[DataForm.CurrentIndex]._retail_price_skip_tax;
                unitPriceDlg.sales_unit_price = _entityListD[DataForm.CurrentIndex]._sales_unit_price_skip_tax;
                unitPriceDlg.sales_cost_price = _entityListD[DataForm.CurrentIndex]._sales_cost_price_skip_tax;
            }
            unitPriceDlg.unit_decimal_digit = _entityListD[DataForm.CurrentIndex]._unit_decimal_digit;
            unitPriceDlg.credit_rate        = _entityH._credit_rate;
            unitPriceDlg.Closed            += unitPriceDlg_Closed;
            unitPriceDlg.Show();
        }
        private void ExUserControl_Loaded(object sender, RoutedEventArgs e)
        {
            if (this.gPageType != Common.gePageType.None)
            {
                this.utlID.Visibility    = System.Windows.Visibility.Visible;
                this.utlMstID.Visibility = System.Windows.Visibility.Collapsed;
                this.utlMstID.IsTabStop  = false;
                this_txtID = this.utlID.txtID;
            }
            else
            {
                this.utlID.Visibility    = System.Windows.Visibility.Collapsed;
                this.utlID.IsTabStop     = false;
                this.utlMstID.Visibility = System.Windows.Visibility.Visible;
                this_txtID = this.utlMstID.txtID;
            }

            // 画面初期化
            ExVisualTreeHelper.initDisplay(this.LayoutRoot);

            this.rdoAri.IsChecked = true;
            this.rdoAri_Checked(null, null);

            ExBackgroundWorker.DoWork_FocusForLoad(this.this_txtID);
        }
Beispiel #3
0
        private void cbxOps_SelectedValueChanged(object sender, EventArgs e)
        {
            pnlFields.Visible = false;
            _controls.Clear();
            pnlFields.Controls.Clear();
            PacketReflectionInfo info = PacketController.Client.Processor.Serializer.Info[cbxOps.Text];

            foreach (FieldInfo field in info.Fields)
            {
                Type        type      = field.FieldType;
                TypeCode    fTypeCode = Type.GetTypeCode(type);
                UserControl ctrl      = null;
                if (type.IsEnum)
                {
                    ctrl = new ExEnum(field);
                }
                else
                {
                    switch (fTypeCode)
                    {
                    case TypeCode.Object:
                        if (type == typeof(Vector3))
                        {
                            ctrl = new ExVector3(field);
                        }
                        if (type == typeof(Angle))
                        {
                            ctrl = new ExAngle(field);
                        }
                        break;

                    case TypeCode.Boolean: break;

                    case TypeCode.SByte:
                    case TypeCode.Byte:
                    case TypeCode.Int16:
                    case TypeCode.UInt16:
                    case TypeCode.Int32:
                    case TypeCode.UInt32:
                    case TypeCode.Int64:
                    case TypeCode.UInt64:
                    case TypeCode.Single:
                    case TypeCode.Double: ctrl = new ExUpDown(field); break;

                    case TypeCode.String: ctrl = new ExTextBox(field); break;
                    }
                }
                if (ctrl != null)
                {
                    AddControl(GetPanel()); AddControl(ctrl); _controls.Add((ExControl)ctrl);
                }
            }
            if (_controls.Count != info.Fields.Length)
            {
                throw new Exception("Not enough controls.");
            }
            pnlFields.Visible = true;
        }
Beispiel #4
0
        private void TextBlock_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            var binding = ExTextBox.GetBindingExpression(TextBox.TextProperty);

            if (binding != null)
            {
                binding.UpdateSource();
            }
        }
        private static void OnInputModeChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            ExTextBox textBox = obj as ExTextBox;

            if (textBox == null)
            {
                return;
            }
            SetImeState(textBox, (InputModeType)e.NewValue);
        }
 public MultiLineTextEntryBackend()
 {
     Widget = new ExTextBox {
         IsReadOnlyCaretVisible = true
     };
     Adorner         = new PlaceholderTextAdorner(TextBox);
     TextBox.Loaded += TextBox_Loaded;
     TextBox.VerticalContentAlignment = VerticalAlignment.Center;
     MultiLine            = true;
     TextBox.TextWrapping = TextWrapping.Wrap;
 }
Beispiel #7
0
        private void InitControl()
        {
            this.IsFocusOn = false;

            this._txtNo = null;
            this._txtReceiptDivisionId = null;
            this._txtReceiptDivisionNm = null;
            this._txtBillSiteDay       = null;
            this._txtPrice             = null;
            this._txtDetailMemo        = null;

            SetControl();
        }
Beispiel #8
0
 public TextEntryBackend()
 {
     Widget = new ExTextBox {
         IsReadOnlyCaretVisible = true
     };
     Adorner         = new PlaceholderTextAdorner(TextBox);
     TextBox.Loaded += delegate {
         var layer = AdornerLayer.GetAdornerLayer(TextBox);
         if (layer != null)
         {
             layer.Add(Adorner);
         }
     };
     TextBox.VerticalContentAlignment = VerticalAlignment.Center;
 }
 private void txt_LostFocus(object sender, RoutedEventArgs e)
 {
     try
     {
         ExTextBox txt = (ExTextBox)sender;
         //if (!string.IsNullOrEmpty(this.utlClass.txtBindID.Text.Trim()) && !string.IsNullOrEmpty(this.utlClass.txtNm.Text.Trim()))
         //{
         //    GetMstData();
         //}
         //else
         //{
         //    btnF2_Click(null, null);
         //}
     }
     catch
     {
     }
 }
 private void txt_LostFocus(object sender, RoutedEventArgs e)
 {
     try
     {
         ExTextBox txt = (ExTextBox)sender;
         if (!string.IsNullOrEmpty(this.utlCommodity.txtID.Text.Trim()) && !string.IsNullOrEmpty(this.utlCommodity.txtNm.Text.Trim()))
         {
             GetMstData();
         }
         else
         {
             btnF2_Click(null, null);
         }
     }
     catch
     {
     }
 }
Beispiel #11
0
        private void txtReceiptDivisionId_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            beforeValueDlg = "";
            if (_entityListD.Count >= DataForm.CurrentIndex)
            {
                beforeValueDlg = _entityListD[DataForm.CurrentIndex]._receipt_division_id;
            }

            if (_txtReceiptDivisionId == null)
            {
                _txtReceiptDivisionId = ExVisualTreeHelper.FindTextBox(this.DataForm, "txtReceiptDivisionId");
            }

            Dlg_MstSearch searchDlg = new Dlg_MstSearch();

            searchDlg.MstKbn = MstData.geMDataKbn.RecieptDivision;
            searchDlg.Show();
            searchDlg.Closed += searchDlg_Closed;
        }
Beispiel #12
0
        private void unitPriceDlg_Closed(object sender, EventArgs e)
        {
            Dlg_UnitPriceSetting unitPriceDlg = (Dlg_UnitPriceSetting)sender;

            if (unitPriceDlg.DialogResult == true)
            {
                if (_entityListD.Count > DataForm.CurrentIndex && DataForm.CurrentIndex != -1)
                {
                    _entityListD[DataForm.CurrentIndex]._unit_price = unitPriceDlg.return_unit_price;
                }
            }
            if (beforeValue != ExCast.zCStr(_entityListD[DataForm.CurrentIndex]._unit_price))
            {
                DataDetail.CalcDetail(DataForm.CurrentIndex, _entityH, _entityListD);
                this.Focus();
                _txtUnitPrice.Focus();
                _txtUnitPrice = null;
            }
        }
Beispiel #13
0
        private void InitControl()
        {
            this.IsFocusOn = false;

            this._txtNo              = null;
            this._cmbBreakdown       = null;
            this._txtDeliverDivision = null;
            this._txtGoodsId         = null;
            this._txtGoodsNm         = null;
            this._cboUnit            = null;
            this._txtEnterNum        = null;
            this._txtCaseNum         = null;
            this._txtNumber          = null;
            this._txtUnitPrice       = null;
            this._txtPrice           = null;
            this._cboTaxDivision     = null;
            this._txtDetailMemo      = null;

            SetControl();
        }
Beispiel #14
0
        private void searchDlg_Closed(object sender, EventArgs e)
        {
            Dlg_MstSearch dlg = (Dlg_MstSearch)sender;

            if (Dlg_MstSearch.this_DialogResult == true)
            {
                if (_entityListD.Count > DataForm.CurrentIndex && DataForm.CurrentIndex != -1)
                {
                    _entityListD[DataForm.CurrentIndex]._receipt_division_id = Dlg_MstSearch.this_id;
                    _entityListD[DataForm.CurrentIndex]._receipt_division_nm = Dlg_MstSearch.this_name;
                }
            }
            if (_entityListD.Count > DataForm.CurrentIndex && DataForm.CurrentIndex != -1)
            {
                if (beforeValueDlg != _entityListD[DataForm.CurrentIndex]._receipt_division_id)
                {
                    MstData _mstData = new MstData();
                    _mstData.GetMData(MstData.geMDataKbn.RecieptDivision, new string[] { _entityListD[DataForm.CurrentIndex]._receipt_division_id }, this);
                    this.Focus();
                    _txtReceiptDivisionNm.Focus();
                    _txtReceiptDivisionId = null;
                }
            }
        }
Beispiel #15
0
        private void txt_LostFocus(object sender, RoutedEventArgs e)
        {
            Control      ctl = (Control)sender;
            ExTextBox    txt = null;
            ExDatePicker dap = null;
            ComboBox     cmb = null;
            int          i   = beforeSelectedIndex;

            switch (ctl.Name)
            {
            case "txtReceiptDivisionId":
                txt = (ExTextBox)sender;
                if (beforeValue == ExCast.zCStr(txt.Text))
                {
                    return;
                }
                MstData _mstData = new MstData();
                _mstData.GetMData(MstData.geMDataKbn.RecieptDivision, new string[] { ExCast.zCStr(txt.Text), ExCast.zCStr(i) }, this);
                break;

            default:
                break;
            }
        }
Beispiel #16
0
        private void searchDlg_Closed(object sender, EventArgs e)
        {
            Dlg_MstSearch dlg = (Dlg_MstSearch)sender;

            if (Dlg_MstSearch.this_DialogResult == true)
            {
                if (_entityListD.Count > DataForm.CurrentIndex && DataForm.CurrentIndex != -1)
                {
                    _entityListD[DataForm.CurrentIndex]._commodity_id   = Dlg_MstSearch.this_id;
                    _entityListD[DataForm.CurrentIndex]._commodity_name = Dlg_MstSearch.this_name;
                }
            }
            if (_entityListD.Count > DataForm.CurrentIndex && DataForm.CurrentIndex != -1)
            {
                if (beforeValueDlg != _entityListD[DataForm.CurrentIndex]._commodity_id)
                {
                    MstData _mstData = new MstData();
                    _mstData.GetMData(MstData.geMDataKbn.Commodity, new string[] { _entityListD[DataForm.CurrentIndex]._commodity_id }, this);
                    this.Focus();
                    _txtGoodsId.Focus();
                    _txtGoodsId = null;
                }
            }
        }
Beispiel #17
0
        // フォーカス・IME制御の為のフォーカス用コントロール設定
        private void SetControl()
        {
            if (this._txtNo != null &&
                this._txtReceiptDivisionId != null &&
                this._txtReceiptDivisionNm != null &&
                this._txtBillSiteDay != null &&
                this._txtPrice != null &&
                this._txtDetailMemo != null)
            {
                SetFocusOn();
            }

            string[] _name = new string[6];
            _name[0] = "txtNo";
            _name[1] = "txtReceiptDivisionId";
            _name[2] = "txtReceiptDivisionNm";
            _name[3] = "txtPrice";
            _name[4] = "txtBillSiteDay";
            _name[5] = "txtDetailMemo";
            List <SlvHanbaiClient.Class.UI.ListControl> lst = ExVisualTreeHelper.FindControlList(this.DataForm, _name);

            for (int i = 0; i < lst.Count; i++)
            {
                switch (lst[i].ctlName)
                {
                case "txtNo":
                    if (this._txtNo == null)
                    {
                        this._txtNo = (ExTextBox)lst[i].ctl;
                    }
                    break;

                case "txtReceiptDivisionId":
                    if (this._txtReceiptDivisionId == null)
                    {
                        this._txtReceiptDivisionId = (ExTextBox)lst[i].ctl;
                    }
                    break;

                case "txtReceiptDivisionNm":
                    if (this._txtReceiptDivisionNm == null)
                    {
                        this._txtReceiptDivisionNm = (ExTextBox)lst[i].ctl;
                    }
                    break;

                case "txtBillSiteDay":
                    if (this._txtBillSiteDay == null)
                    {
                        this._txtBillSiteDay = (ExDatePicker)lst[i].ctl;
                    }
                    break;

                case "txtPrice":
                    if (this._txtPrice == null)
                    {
                        this._txtPrice = (ExTextBox)lst[i].ctl;
                    }
                    break;

                case "txtDetailMemo":
                    if (this._txtDetailMemo == null)
                    {
                        this._txtDetailMemo = (ExTextBox)lst[i].ctl;
                    }
                    break;
                }
            }

            SetFocusOn();
        }
Beispiel #18
0
        // フォーカス・IME制御の為のフォーカス用コントロール設定
        private void SetControl()
        {
            if (this._txtNo != null &&
                this._cmbBreakdown != null &&
                this._txtDeliverDivision != null &&
                this._txtGoodsId != null &&
                this._txtGoodsNm != null &&
                this._cboUnit != null &&
                this._txtEnterNum != null &&
                this._txtCaseNum != null &&
                this._txtNumber != null &&
                this._txtUnitPrice != null &&
                this._txtPrice != null &&
                this._cboTaxDivision != null &&
                this._txtDetailMemo != null)
            {
                SetFocusOn();
            }

            string[] _name = new string[13];
            _name[0]  = "txtNo";
            _name[1]  = "cmbBreakdown";
            _name[2]  = "txtDeliverDivision";
            _name[3]  = "txtGoodsId";
            _name[4]  = "txtGoodsNm";
            _name[5]  = "cboUnit";
            _name[6]  = "txtCaseNum";
            _name[7]  = "txtEnterNum";
            _name[8]  = "txtNumber";
            _name[9]  = "txtUnitPrice";
            _name[10] = "txtPrice";
            _name[11] = "cboTaxDivision";
            _name[12] = "txtDetailMemo";
            List <SlvHanbaiClient.Class.UI.ListControl> lst = ExVisualTreeHelper.FindControlList(this.DataForm, _name);

            for (int i = 0; i < lst.Count; i++)
            {
                switch (lst[i].ctlName)
                {
                case "txtNo":
                    if (this._txtNo == null)
                    {
                        this._txtNo = (ExTextBox)lst[i].ctl;
                    }
                    break;

                case "cmbBreakdown":
                    if (this._cmbBreakdown == null)
                    {
                        this._cmbBreakdown = (ComboBox)lst[i].ctl;
                    }
                    break;

                case "txtDeliverDivision":
                    if (this._txtDeliverDivision == null)
                    {
                        this._txtDeliverDivision = (ExTextBox)lst[i].ctl;
                    }
                    break;

                case "txtGoodsId":
                    if (this._txtGoodsId == null)
                    {
                        this._txtGoodsId = (ExTextBox)lst[i].ctl;
                    }
                    break;

                case "txtGoodsNm":
                    if (this._txtGoodsNm == null)
                    {
                        this._txtGoodsNm = (ExTextBox)lst[i].ctl;
                    }
                    break;

                case "cboUnit":
                    if (this._cboUnit == null)
                    {
                        this._cboUnit = (ComboBox)lst[i].ctl;
                    }
                    break;

                case "txtCaseNum":
                    if (this._txtCaseNum == null)
                    {
                        this._txtCaseNum = (ExTextBox)lst[i].ctl;
                    }
                    break;

                case "txtEnterNum":
                    if (this._txtEnterNum == null)
                    {
                        this._txtEnterNum = (ExTextBox)lst[i].ctl;
                    }
                    break;

                case "txtNumber":
                    if (this._txtNumber == null)
                    {
                        this._txtNumber = (ExTextBox)lst[i].ctl;
                    }
                    break;

                case "txtUnitPrice":
                    if (this._txtUnitPrice == null)
                    {
                        this._txtUnitPrice = (ExTextBox)lst[i].ctl;
                    }
                    break;

                case "txtPrice":
                    if (this._txtPrice == null)
                    {
                        this._txtPrice = (ExTextBox)lst[i].ctl;
                    }
                    break;

                case "cboTaxDivision":
                    if (this._cboTaxDivision == null)
                    {
                        this._cboTaxDivision = (ComboBox)lst[i].ctl;
                    }
                    break;

                case "txtDetailMemo":
                    if (this._txtDetailMemo == null)
                    {
                        this._txtDetailMemo = (ExTextBox)lst[i].ctl;
                    }
                    break;
                }
            }

            SetFocusOn();
        }
Beispiel #19
0
 public TextEntryBackend()
 {
     Widget = new ExTextBox();
     TextBox.IsReadOnlyCaretVisible = true;
 }
Beispiel #20
0
        private void txt_LostFocus(object sender, RoutedEventArgs e)
        {
            Control   ctl = (Control)sender;
            ExTextBox txt = null;
            ComboBox  cmb = null;
            int       i   = beforeSelectedIndex;

            switch (ctl.Name)
            {
            case "cmbBreakdown":
                cmb = (ComboBox)sender;
                if (_entityListD.Count > i && i != -1)
                {
                    // コンボボックスID連携
                    _entityListD[i]._breakdown_id = MeiNameList.GetID(MeiNameList.geNameKbn.BREAKDOWN_ID, ExCast.zCStr(cmb.SelectedValue));
                    // 消費税
                    if (_entityListD[i]._breakdown_id == 5)
                    {
                        _entityListD[i]._tax_division_nm = "非課税";
                        _entityListD[i]._tax_division_id = MeiNameList.GetID(MeiNameList.geNameKbn.TAX_DIVISION_ID, ExCast.zCStr(_entityListD[i]._tax_division_nm));
                    }
                }
                break;

            case "txtGoodsId":
                txt = (ExTextBox)sender;
                if (beforeValue == ExCast.zCStr(txt.Text))
                {
                    return;
                }
                MstData _mstData = new MstData();
                _mstData.GetMData(MstData.geMDataKbn.Commodity, new string[] { ExCast.zCStr(txt.Text), ExCast.zCStr(i) }, this);
                break;

            case "cboUnit":
                cmb = (ComboBox)sender;
                if (_entityListD.Count > i && i != -1)
                {
                    // コンボボックスID連携
                    _entityListD[i]._unit_id = MeiNameList.GetID(MeiNameList.geNameKbn.UNIT_ID, ExCast.zCStr(cmb.SelectedValue));
                }
                break;

            case "txtEnterNum":
                // 明細入数計算
                txt = (ExTextBox)sender;
                if (_entityListD.Count > i && i != -1)
                {
                    if (beforeValue == ExCast.zCStr(txt.Text))
                    {
                        return;
                    }
                    _entityListD[i]._enter_number = ExCast.zCDbl(txt.Text);
                    DataDetail.CalcDetailNumber(i, _entityH, _entityListD);
                }
                break;

            case "txtCaseNum":
                // 明細ケース数計算
                txt = (ExTextBox)sender;
                if (_entityListD.Count > i && i != -1)
                {
                    if (beforeValue == ExCast.zCStr(txt.Text))
                    {
                        return;
                    }
                    _entityListD[i]._case_number = ExCast.zCDbl(txt.Text);
                    DataDetail.CalcDetailNumber(i, _entityH, _entityListD);
                }
                break;

            case "txtNumber":
                // 明細数量計算
                txt = (ExTextBox)sender;
                if (_entityListD.Count > i && i != -1)
                {
                    if (beforeValue == ExCast.zCStr(txt.Text))
                    {
                        return;
                    }
                    //OrderDetailData.CalcDetailNumber(i, _entityH, _entityListD);
                    _entityListD[i]._number = ExCast.zCDbl(txt.Text);
                    DataDetail.CalcDetail(i, _entityH, _entityListD);
                }
                break;

            case "txtUnitPrice":
                // 明細計算
                txt = (ExTextBox)sender;
                if (_entityListD.Count > i && i != -1)
                {
                    if (beforeValue == ExCast.zCStr(txt.Text))
                    {
                        return;
                    }
                    _entityListD[i]._unit_price = ExCast.zCDbl(txt.Text);
                    DataDetail.CalcDetail(i, _entityH, _entityListD);
                }
                break;

            case "txtPrice":
                // 明細計算
                txt = (ExTextBox)sender;
                if (_entityListD.Count > i && i != -1)
                {
                    if (beforeValue == ExCast.zCStr(txt.Text))
                    {
                        return;
                    }
                    _entityListD[i]._price = ExCast.zCDbl(txt.Text);
                    DataDetail.IsCalcPrice = false;
                    DataDetail.CalcDetail(i, _entityH, _entityListD);
                    DataDetail.IsCalcPrice = true;
                }
                break;

            case "cboTaxDivision":
                cmb = (ComboBox)sender;
                if (_entityListD.Count > i && i != -1)
                {
                    // コンボボックスID連携
                    _entityListD[i]._tax_division_id = MeiNameList.GetID(MeiNameList.geNameKbn.TAX_DIVISION_ID, ExCast.zCStr(cmb.SelectedValue));

                    // 課税区分が課税で内訳が消費税の場合
                    if (_entityListD[i]._tax_division_id == 1 && _entityListD[i]._breakdown_id == 5)
                    {
                        ExMessageBox.Show("内訳が消費税の場合、課税区分に課税を選択できません。");
                        _entityListD[i]._tax_division_nm = "非課税";
                        _entityListD[i]._tax_division_id = MeiNameList.GetID(MeiNameList.geNameKbn.TAX_DIVISION_ID, ExCast.zCStr(_entityListD[i]._tax_division_nm));
                    }

                    // 明細計算
                    DataDetail.CalcDetail(i, _entityH, _entityListD);
                }
                break;

            case "txtGoodsNm":
            case "txtDetailMemo":
                break;
            }
        }
        private void bw_DoSetIme(object sender, DoWorkEventArgs e)
        {
            BackgroundWorker worker = sender as BackgroundWorker;

            ExTextBox txt = (ExTextBox)ctl;

            txt.Dispatcher.BeginInvoke(
                () =>
            {
                InputMethod.SetIsInputMethodEnabled(txt, true);
            }
                );

            switch (this.InputMode)
            {
            case ExTextBox.geInputMode.Number:
                txt.Dispatcher.BeginInvoke(
                    () =>
                {
                    InputMethod.SetPreferredImeState(txt, InputMethodState.Off);
                }
                    );
                txt.Dispatcher.BeginInvoke(
                    () =>
                {
                    txt.TextAlignment = System.Windows.TextAlignment.Right;
                }
                    );
                break;

            case ExTextBox.geInputMode.Alphanumeric:
                txt.Dispatcher.BeginInvoke(
                    () =>
                {
                    InputMethod.SetPreferredImeState(txt, InputMethodState.Off);
                }
                    );
                txt.Dispatcher.BeginInvoke(
                    () =>
                {
                    txt.TextAlignment = System.Windows.TextAlignment.Left;
                }
                    );
                break;

            case ExTextBox.geInputMode.Date:
                txt.Dispatcher.BeginInvoke(
                    () =>
                {
                    InputMethod.SetPreferredImeState(txt, InputMethodState.Off);
                }
                    );
                txt.Dispatcher.BeginInvoke(
                    () =>
                {
                    txt.TextAlignment = System.Windows.TextAlignment.Center;
                }
                    );
                break;

            case ExTextBox.geInputMode.FullShapeNative:
                txt.Dispatcher.BeginInvoke(
                    () =>
                {
                    InputMethod.SetPreferredImeState(txt, InputMethodState.On);
                }
                    );
                txt.Dispatcher.BeginInvoke(
                    () =>
                {
                    InputMethod.SetPreferredImeConversionMode(txt, ImeConversionModeValues.FullShape | ImeConversionModeValues.Native | ImeConversionModeValues.Roman);
                }
                    );
                txt.Dispatcher.BeginInvoke(
                    () =>
                {
                    txt.TextAlignment = System.Windows.TextAlignment.Left;
                }
                    );
                break;

            case ExTextBox.geInputMode.HalfKana:
                txt.Dispatcher.BeginInvoke(
                    () =>
                {
                    InputMethod.SetPreferredImeState(txt, InputMethodState.On);
                }
                    );
                txt.Dispatcher.BeginInvoke(
                    () =>
                {
                    InputMethod.SetPreferredImeConversionMode(txt, ImeConversionModeValues.FullShape | ImeConversionModeValues.Native | ImeConversionModeValues.Katakana);
                }
                    );
                txt.Dispatcher.BeginInvoke(
                    () =>
                {
                    txt.TextAlignment = System.Windows.TextAlignment.Left;
                }
                    );
                break;
            }
        }