Example #1
0
        private void LoadSettings()
        {
            ConfigManager = ConfigManager.NewInstance("dispathcer.cfg");

            _generalSetting = ConfigManager.GetSetting(typeof(GeneralSetting), true) as GeneralSetting;
            _spnvSetting    = ConfigManager.GetSetting(typeof(SupernovaSetting), true) as SupernovaSetting;
        }
Example #2
0
        public bool Initialize(string uafile, SupernovaSetting spnvSetting)
        {
            SipuaExecPath = uafile;

            if (!KillProcesses(SipuaExecPath))
            {
                return(false);
            }

            HandsetLeft = new Handset(0, SipuaExecPath, LeftGpio,
                                      spnvSetting.RecordingFileDir)
            {
                CaptureDevice = LeftCaptureDevice, PlaybakDevice = LeftPlaybackDevice
            };
            if (HandsetLeft.IsEnabled)
            {
                HandsetLeft.Run();
            }

            HandsetRight = new Handset(1, SipuaExecPath, RightGpio,
                                       spnvSetting.RecordingFileDir)
            {
                CaptureDevice = RightCaptureDevice, PlaybakDevice = RightPlaybackDevice
            };
            if (HandsetRight.IsEnabled)
            {
                HandsetRight.Run();
            }

            InitGpioDetectThread();

            IsInitialized = true;
            return(true);
        }
        public OptionsWindow(SpnvSubSystem system)
        {
            InitializeComponent();

            App app = Application.Current as App;

            if (app != null && app.AppBkBrush != null)
            {
                Background = app.AppBkBrush;
            }

            _system = system;

            _supernova = _system.Setting.Clone() as SupernovaSetting;
            if (app != null)
            {
                _general = app.GeneralSetting.Clone() as GeneralSetting;
            }

            InitializeGeneralPage();
            InitializeAccountPage();
            InitializeSystemPage();
            InitializeCodecsPage();

            _adminUser = (app.LoginRole.Charater == LoginUserRole.Role.Admin);
            if (!_adminUser)
            {
                tabControl.IsEnabled = false;
            }
        }