/**************/ /* MainWindow */ /**************/ public MainWindow() { InitializeComponent(); preferences = new IDEPreferences(); String currentDirectory = preferences.GetCurrentDirectory(); if (Directory.Exists(currentDirectory)) { this.SetDirectory(currentDirectory); } else { this.SetDirectory(Directory.GetCurrentDirectory()); } }
/**************/ /* MainWindow */ /**************/ public MainWindow() { InitializeComponent(); preferences = new IDEPreferences(); String currentDirectory = preferences.GetCurrentDirectory(); if (Directory.Exists(currentDirectory)) { this.SetCurrentDirectory(currentDirectory); } else { this.SetCurrentDirectory(Directory.GetCurrentDirectory()); } agendaBrowserManager = new AgendaBrowserManager(this); factBrowserManager = new FactBrowserManager(this); instanceBrowserManager = new InstanceBrowserManager(this); IDEPeriodicCallback theCB = new IDEPeriodicCallback(this); this.dialog.GetEnvironment().AddPeriodicCallback("IDECallback", 0, theCB); this.dialog.GetEnvironment().EnablePeriodicFunctions(true); this.dialog.GetEnvironment().AddUserFunction("clear-window", "v", 0, 0, null, new ClearWindowFunction(this)); this.dialog.StartCommandEvent += new StartCommandDelegate(StartExecutionEventOccurred); this.dialog.FinishCommandEvent += new FinishCommandDelegate(FinishExecutionEventOccurred); System.Windows.Threading.DispatcherTimer dispatcherTimer = new System.Windows.Threading.DispatcherTimer(); dispatcherTimer.Tick += IDEPeriodicTimer; dispatcherTimer.Interval = TimeSpan.FromMilliseconds(500); dispatcherTimer.Start(); }