コード例 #1
0
        private void AddButton_Click(object sender, RoutedEventArgs e)
        {
            TextLogEditor      w = new TextLogEditor();
            TextLogEditorModel m = new TextLogEditorModel();

            w.ViewModel = m;

            if (w.ShowDialog() == true)
            {
                LogFile nel = w.ViewModel.GetValues();
                this.Logs.Add(nel);
                this.parserLogsGrid.SelectedItem = nel;
            }
        }
コード例 #2
0
        private void EditButton_Click(object sender, RoutedEventArgs e)
        {
            if (this.parserLogsGrid.SelectedItem == null)
            {
                return;
            }

            TextLogEditor      w = new TextLogEditor();
            TextLogEditorModel m = new TextLogEditorModel();

            w.ViewModel = m;

            LogFile c = (LogFile)this.parserLogsGrid.SelectedItem;

            w.ViewModel.SetValues(c);

            if (w.ShowDialog() == true)
            {
                LogFile nc = w.ViewModel.GetValues();
                this.Logs.Remove(c);
                this.Logs.Add(nc);
                this.parserLogsGrid.SelectedItem = nc;
            }
        }
コード例 #3
0
        private void EditButton_Click(object sender, RoutedEventArgs e)
        {
            if (this.parserLogsGrid.SelectedItem == null)
                return;

            TextLogEditor w = new TextLogEditor();
            TextLogEditorModel m = new TextLogEditorModel();
            w.ViewModel = m;

            LogFile c = (LogFile)this.parserLogsGrid.SelectedItem;
            w.ViewModel.SetValues(c);

            if (w.ShowDialog() == true)
            {
                LogFile nc = w.ViewModel.GetValues();
                this.Logs.Remove(c);
                this.Logs.Add(nc);
                this.parserLogsGrid.SelectedItem = nc;
            }
        }
コード例 #4
0
        private void AddButton_Click(object sender, RoutedEventArgs e)
        {
            TextLogEditor w = new TextLogEditor();
            TextLogEditorModel m = new TextLogEditorModel();
            w.ViewModel = m;

            if (w.ShowDialog() == true)
            {
                LogFile nel = w.ViewModel.GetValues();
                this.Logs.Add(nel);
                this.parserLogsGrid.SelectedItem = nel;
            }
        }