Esempio n. 1
0
 public void ShowLogs(Tree tree)
 {
     if (tree.TrySave())
     {
         var dataService = new ILogDataService(tree, DataService.Region, DataService.DataStore);
         using (var view = new FormLogs(dataService))
         {
             view.ShowDialog();
         }
     }
     else
     {
         DialogService.ShowMessage("Unable to save tree. Ensure Tree Number, Sample Group and Stratum are valid"
                                   , null);
     }
 }
        public void ShowLogs(Tree tree)
        {
            if (tree.TrySave())
            {
                var dataService = new ILogDataService(tree, DataService.Region, DataService.DataStore);
                using (var view = new FormLogs(dataService))
                {
#if !NetCF
                    view.StartPosition = FormStartPosition.CenterParent;
                    view.ShowDialog(this);
#else
                    view.ShowDialog();
#endif
                }
            }
            else
            {
                DialogService.ShowMessage("Unable to save tree. Ensure Tree Number, Sample Group and Stratum are valid"
                                          , null);
            }
        }
        public FormLogs GetLogsView(StratumModel stratum)
        {
            if (_logViews.ContainsKey(stratum))
            {
                return _logViews[stratum];
            }
            FormLogs logView = new FormLogs(this.ApplicationController, stratum);
            _logViews.Add(stratum, logView);

            return logView;
        }