public RV2Main() { InitializeComponent(); currentRules = new ruleList(); fList = new fileList(); lastOpenDir = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments); updateRuleList(); }
public MainWindow() { InitializeComponent(); string UserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "RenameItV2"); if (!Directory.Exists(UserPath)) { Directory.CreateDirectory(UserPath); } defFilePath = System.IO.Path.Combine(UserPath, defFileName); dispatcherTimer = new DispatcherTimer(); dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick); dispatcherTimer.Interval = new TimeSpan(0, 0, 1); dispatcherTimer.Stop(); currentRules = new ruleList(); FileLoad(defFilePath); fList = new fileList(); lastOpenDir = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments); lbRules.ItemsSource = currentRules; lvFiles.ItemsSource = fList; gridRules.DataContext = currentRules; }