Esempio n. 1
0
        private void VariablesListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if(VariablesListView.SelectedItem != null) {
                currentVariable = VariablesListView.SelectedItem as VariableInfo;
                NameTextBox.Text = currentVariable.Name;
                ValueTextBox.Text = currentVariable.Value.ToString();

                if(string.IsNullOrEmpty(currentVariable.Name)) {
                    NameTextBox.Text = "Untitled";
                    NameTextBox.Focus();
                    NameTextBox.SelectAll();
                }
            }
        }
Esempio n. 2
0
        private bool ContainsVariable(string name, VariableInfo currentInfo)
        {
            foreach(VariableInfo vi in userVariables) {
                if((vi.Name == name) && (vi != currentInfo)) return true;
            }

            return false;
        }