Esempio n. 1
0
        private void InsertParam_Click(object sender, RoutedEventArgs e)
        {
            if (SelectedParam == null)
            {
                return;
            }
            int index = ListDataParams.IndexOf(SelectedParam);

            AddParam(index);
        }
Esempio n. 2
0
        private void RemoveParam_Click(object sender, RoutedEventArgs e)
        {
            if (SelectedParam == null)
            {
                return;
            }
            int index = ListDataParams.IndexOf(SelectedParam);

            ListDataParams.Remove(SelectedParam);
            for (int i = index; i < ListDataParams.Count; i++)
            {
                ListDataParams[i].Address -= 2;
            }
            SelectedParam = null;
        }
Esempio n. 3
0
        private void InsertParam_Click(object sender, RoutedEventArgs e)
        {
            if (SelectedParam == null)
            {
                return;
            }
            int index = ListDataParams.IndexOf(SelectedParam);

            Service.DataParam addedParam = new Service.DataParam();
            if (new SelectDataParamOutput(SparkWindow.setting.GetListInputParams(), addedParam).ShowDialog() == true)
            {
                Service.DataParamOutput addParam = new Service.DataParamOutput()
                {
                    ID             = addedParam.ID,
                    Title          = addedParam.Title,
                    ParamUnitTitle = addedParam.ParamUnit.Title
                };
                AddParam(index, addParam);
            }
        }