コード例 #1
0
        private static void RemoveDoFile_Executed(object target, ExecutedRoutedEventArgs e)
        {
            F14BInterfaceEditor editor = target as F14BInterfaceEditor;
            string file = e.Parameter as string;

            if (editor != null && !string.IsNullOrWhiteSpace(file) && editor.Configuration.DoFiles.Contains(file))
            {
                editor.Configuration.DoFiles.Remove(file);
            }
        }
コード例 #2
0
        private static void AddDoFile_Executed(object target, ExecutedRoutedEventArgs e)
        {
            F14BInterfaceEditor editor = target as F14BInterfaceEditor;
            string file = e.Parameter as string;

            if (editor != null && !string.IsNullOrWhiteSpace(file) && !editor.Configuration.DoFiles.Contains(file))
            {
                editor.Configuration.DoFiles.Add((string)e.Parameter);
                editor.NewDoFile.Text = "";
            }
        }