示例#1
0
 /// <summary>
 /// The constructor accepts the main window as an argument. 
 /// It initializes some variables and connects events from 
 /// the main window to functions.
 /// </summary>
 /// <param name="mainwin">
 ///  The main window of the application.
 /// </param>
 public Presenter(MainWindow mainwin)
 {
     this.mainwin = mainwin;
     this.resultString = new StringBuilder();
     //this.results = new List<string> ();
     mainwin.EventStartCalculation += StartCalculation;
     mainwin.EventViewResults += ViewResults;
 }
示例#2
0
        /// <summary>
        /// The constructor accepts the main window as an argument. 
        /// It initializes some variables and connects events from 
        /// the main window to functions.
        /// </summary>
        /// <param name="mainwin">
        ///  The main window of the application.
        /// </param>
        public Presenter(MainWindow mainwin, ResultViewWin resWin)
        {
            this.mainwin = mainwin;
            this.resWin = resWin;
            this.resultString = new StringBuilder ();

            this.mainwin.EventStartCalculation += StartCalculation;
            this.mainwin.EventViewResults += ViewResults;
            this.mainwin.EventFileIsOpened += InvalidateResult;

            this.resWin.EventSaveToFile += SaveToFile;

            this.resultIsCurrent = false;
        }
示例#3
0
文件: Main.cs 项目: aelinden/OruStuff
 public static void Main(string[] args)
 {
     /*
      * We only create the main window and the presenter here
      * since for some reason if we create them all here and pass them along
      * as arguments to the presenter, they all show up right away. It's
      * probably an issue on my end, but it's not really a biggie to create
      * the windows in the presenter when needed.
      */
     Application.Init ();
     MainWindow mainWin = new MainWindow ();
     Presenter presenter = new Presenter(mainWin);
     mainWin.Show ();
     Application.Run ();
 }