Example #1
0
 public frmSPAzCtrl()
 {
     this.cpGuiCtrl = new ObjectInterface();
     this._SPAzMgr = new SPAzMgr(0x378);
     this.InitializeComponent();
 }
Example #2
0
 public frmSPAzCtrl(int address)
 {
     this.cpGuiCtrl = new ObjectInterface();
     this._SPAzMgr = new SPAzMgr(address);
     this.InitializeComponent();
 }
Example #3
0
        public frmMDIMain()
        {
            InitializeComponent();

            Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", false);
            clsGlobal.MyCulture = Thread.CurrentThread.CurrentCulture;
            clsGlobal.SiRFLiveAppConfig = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
            clsGlobal.InstalledDirectory = Directory.GetParent(AppDomain.CurrentDomain.BaseDirectory).Parent.FullName;
            clsGlobal.SiRFLiveAppConfig.AppSettings.Settings.Remove("InstalledDirectory");
            clsGlobal.SiRFLiveAppConfig.AppSettings.Settings.Add("InstalledDirectory", clsGlobal.InstalledDirectory);
            clsGlobal.SiRFLiveAppConfig.Save(ConfigurationSaveMode.Modified);
            ConfigurationManager.RefreshSection("appSettings");
            string xmlFile = clsGlobal.InstalledDirectory + @"\Config\UserAccessConfig.xml";

            UserAccess = new UserAccessMgr(xmlFile);
            CurrentUser = UserAccess.GetCurrentUser();
            clsGlobal.CurrentUser = CurrentUser;
            clsGlobal.userAccessNum = UserAccess.GetAccessNum();
            clsGlobal.SiRFLiveVersion = "SiRFLive " + SiRFLiveVersion.VersionNum + " " + CurrentUser;
            clsGlobal.SiRFLiveChangeNum = StripDollarSigns(SiRFLiveVersion.ChangeNum);
            clsGlobal.SiRFLiveChangeDate = StripDollarSigns(SiRFLiveVersion.DateTime);
            Text = clsGlobal.SiRFLiveVersion;
            _defaultWindowsRestoredFilePath = clsGlobal.InstalledDirectory + @"\Config\DefaultWindowsRestore.xml";
            _lastWindowsRestoredFilePath = clsGlobal.InstalledDirectory + @"\Config\LastWindowsRestore.xml";
            SearchMenu(CurrentUser);
            SearchToolStrip(CurrentUser);
            try
            {
                IniHelper helper = new IniHelper(clsGlobal.InstalledDirectory + @"\Config\SiRFLiveAutomation.cfg");
                clsGlobal.ResetPeriodRandomizationSec = int.Parse(helper.GetIniFileString("SETUP", "RESET_PERIOD_RANDOMIZATION_SEC", "5"));
            }
            catch
            {
                clsGlobal.ResetPeriodRandomizationSec = 5;
            }
            ReportCtrl = new Report();
            HostAppCtrl = new sysCmdExec();
            SpazCtrl = new SPAzMgr(0x378);
            SimCtrl = new Simplex();
            gcTimer.Elapsed += new ElapsedEventHandler(OnGCTimerEvent);
            gcTimer.Interval = 1800000.0;
            gcTimer.AutoReset = true;
            setDefaultWindowsLocation();
        }