Exemplo n.º 1
0
        private void UseSelectedTemplateExecute()
        {
            var templateName = m_selectedTemplatesfileName;

            var settings = SettingsHelper.GetTemplateSettings(templateName);

            if (settings.OrionSetting != null)
            {
                MainOrionViewModel = settings.OrionSetting;
            }
            else
            {
                if (SettingsHelper.IsTemplateAvaliable())
                {
                    var names = SettingsHelper.GetTemplatesNames();
                    foreach (var tempName in names)
                    {
                        CheckTemplate(tempName);
                    }
                }

                MainOrionViewModel = new OrionSetupViewModel();
            }

            MainOrionViewModel.Parent = this;

            if (settings.LeonCommunicationSetting != null)
            {
                LeonCommunication = settings.LeonCommunicationSetting;
            }
            else
            {
                LeonCommunication = new LeonCommunication();
            }
        }
Exemplo n.º 2
0
        void DatabaseSetup_DbSelected(object sender)
        {
            this.InitDatabaseMode = false;
            if (DisableDb != null)
            {
                DisableDb(this);
            }

            var settings = SettingsHelper.GetSettings();

            if (settings.OrionSetting != null)
            {
                MainOrionViewModel = settings.OrionSetting;
            }
            else
            {
                MainOrionViewModel = new OrionSetupViewModel();
            }

            MainOrionViewModel.Parent = this;

            if (settings.LeonCommunicationSetting != null)
            {
                LeonCommunication = settings.LeonCommunicationSetting;
            }
            else
            {
                LeonCommunication = new LeonCommunication();
            }
        }
Exemplo n.º 3
0
        void TemplateSetup_SelectTemplate(object sender)
        {
            var setupTemplate = sender as DatabaseSetup;

            m_selectedTemplatesfileName = setupTemplate.ChoosenTemplateName;
            this.InitTemplateMode       = false;
            this.InitDatabaseMode       = false;
            LeonCommunication           = new LeonCommunication();
            MainOrionViewModel          = new OrionSetupViewModel();
            MainOrionViewModel.Parent   = this;


            if (DisableDb != null)
            {
                DisableDb(this);
            }
        }
Exemplo n.º 4
0
        ////public class NewRegistrationEventArgs : EventArgs
        ////{
        ////    public List<LeonPerson> NewRegistrations { get; set; }
        ////}

        ////public delegate void NewLeonRegistrationsEventHandler(object sender, NewRegistrationEventArgs e);

        ////public event NewLeonRegistrationsEventHandler NewLeonRegistrations;

        public OrionTeamsSetupViewModel(LeonViewModel leonViewModel, OrionSetupViewModel orionSetupViewModel)
        {
            m_leonViewModel       = leonViewModel;
            m_orionSetupViewModel = orionSetupViewModel;
        }
Exemplo n.º 5
0
 public OrionResultViewModel(OrionSetupViewModel orionSetupViewModel)
 {
     this.m_orionSetupViewModel = orionSetupViewModel;
 }
Exemplo n.º 6
0
 public OrionCommunicationViewModel(OrionTeamsSetupViewModel orionTeamsSetupViewModel, OrionSetupViewModel orionSetupViewModel)
 {
     m_orionSetup      = orionSetupViewModel;
     m_orionTeamsSetup = orionTeamsSetupViewModel;
 }