コード例 #1
0
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            //// TODO Command editor binary, hex, dec
            ScriptItem item = new ScriptItem(DI.Wrapper.GetText(MsgCode.Default), "0");

            if (BLECmdEdit.ShowBox(this, this.dataType, item))
            {
                this.lbxCmds.ItemsSource = null;
                this.copy.Items.Add(item);
                this.lbxCmds.ItemsSource = this.copy.Items;
            }
        }
コード例 #2
0
        private void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            ScriptItem item = this.lbxCmds.SelectedItem as ScriptItem;

            if (item != null)
            {
                // TODO - determine if we need to get it from the actual List<>
                if (BLECmdEdit.ShowBox(this, this.dataType, item))
                {
                    this.lbxCmds.ItemsSource = null;
                    this.lbxCmds.ItemsSource = this.copy.Items;
                }
            }
            else
            {
                App.ShowMsg(DI.Wrapper.GetText(MsgCode.NothingSelected));
            }
        }