private void AddToolStripMenuItem() { if (m_parent.Settings.RaffleRunLocation == 2) { //get the system settings string DisplayText = (m_parent.Settings.RaffleDrawingSetting == 2) ? "Drawing..." : "Raffle..."; string NewItem = "Player " + DisplayText; //"Raffle"; //This will be change base on system setting Raffle or Drawing lets use Raffle for now ToolStripItem RaffleToolStripMenuItem = new ToolStripMenuItem(); RaffleToolStripMenuItem.Text = NewItem; RaffleToolStripMenuItem.Click += new EventHandler(RaffleToolStripMenuItem_Click); viewToolStripMenuItem.DropDownItems.Add(RaffleToolStripMenuItem); } //see if we can purge player points (must be internal system) if (m_parent.Settings.ThirdPartyPlayerInterfaceID == 0) { ModuleComm modComm = null; m_staffID = 0; try { modComm = new ModuleComm(); m_staffID = modComm.GetStaffId(); } catch (Exception) { } if (m_staffID != 0) { // Get the Purge Points feature permission for Player Center for the staff. GetStaffModuleFeaturesMessage permMsg = new GetStaffModuleFeaturesMessage(m_staffID, (int)EliteModule.PlayerCenter, (int)ModuleFeature.PurgePlayerPoints); try { permMsg.Send(); if (permMsg.ModuleFeatureList.Length != 0) { viewToolStripMenuItem.DropDown.Items[2].Visible = true; } } catch (Exception) { } } } }
/// <summary> /// Creates the Security Center object and blocks until the Report Center is told to close /// or the user closes the Report Center. /// </summary> private void Run() { mReportMDI = new frmReportCenterMDIParent(); //ReportCenter(); try { if (mSplashScreen == null) { SetSplashScreen(); } mSplashScreen.Show(); mSplashScreen.Status = Resources.splashInfoLoadStationSettings; //get intial module level data ModuleComm comm = new ModuleComm(); Configuration.operatorID = comm.GetOperatorId(); Configuration.LoginStaffID = comm.GetStaffId(); Configuration.mMachineID = comm.GetMachineId(); GetGamingDate(); // Rally DE525 GetSettings(); Utilities.InitLog(); mSplashScreen.Status = Resources.infoCheckingReports; if (mReportMDI.LoadReports(mSplashScreen)) { // Listen for the event where something wants the Security Center to stop. StopMe += new EventHandler(mReportMDI.ExitReportCenter); BringToFront += new EventHandler(ComeToFrontEvent); mSplashScreen.CloseForm(); mSplashScreen.Dispose(); Utilities.Log("Start running...", LoggerLevel.Information); Application.Run(mReportMDI); } } catch (Exception e) { Utilities.Log("ReportCenterModule.Run()...Exception.Message =" + e.Message, LoggerLevel.Severe); Utilities.Log("Exception.Stack=" + e.StackTrace, LoggerLevel.Severe); MessageForm.Show(Resources.errorStart + "\n" + e.Message + "\n\n" + e.StackTrace, Resources.report_center); } finally { // Shutdown if (mSplashScreen != null) { mSplashScreen.Close(); mSplashScreen.Dispose(); } if (mReportMDI != null) { mReportMDI.Close(); mReportMDI = null; } OnStop(); lock (m_syncRoot) { // Mark the module as stopped. m_isStopped = true; } } }
/// <summary> /// Creates the Security Center object and blocks until the Security Center is told to close /// or the user closes the Security Center. /// </summary> private void Run() { //SecurityMDI sc = null; sc = new SecurityCenterMDIParent(); try { if (mSplashScreen == null) { SetSplashScreen(); } mSplashScreen.Show(); mSplashScreen.Status = Properties.Resources.splashInfoLoadStationSettings; //get intial module level data ModuleComm comm = new ModuleComm(); Configuration.operatorID = comm.GetOperatorId(); Configuration.LoginStaffID = comm.GetStaffId(); Configuration.mMachineID = comm.GetMachineId(); GetWorkstationSettings(); GetPasswordSettings(); // Create and initialize new object. mSplashScreen.Status = Properties.Resources.splashInfoLoadModuleLevelData; sc.LoadData(); // Listen for the event where something wants the Security Center to stop. StopMe += new EventHandler(sc.ExitSecurityCenter); BringToFront += new EventHandler(BringToFrontEvent); // Initialize Logger Utilities.InitLog(); Utilities.Log("SecurityCenter start running...", LoggerLevel.Information); //Start Fix RALY DE 2991 //// Get our current operator //try //{ // m_currentOp = GetOperator(comm.GetOperatorId()); //} //catch (Exception e) //{ // MessageForm.Show(mSplashScreen, string.Format(CultureInfo.CurrentCulture, Resources.GetOperatorDataFailed, e.Message), Resources.SecurityCenterName); // Utilities.Log("Get operator data failed: " + e.Message, LoggerLevel.Severe); // return; //} //End FIX RALLY DE 2991 // Get our Staff and module permissions try { m_currentStaff = GetStaff(comm.GetStaffId()); } catch (Exception e) { MessageForm.Show(mSplashScreen, string.Format(CultureInfo.CurrentCulture, Resources.GetStaffDataFailed, e.Message), Resources.SecurityCenterName); Utilities.Log("Get staff info failed: " + e.Message, LoggerLevel.Severe); return; } // Get our Permissions try { GetStaffPermissionList(); } catch (Exception e) { MessageForm.Show(mSplashScreen, string.Format(CultureInfo.CurrentCulture, Resources.GetStaffPermsFailed, e.Message), Resources.SecurityCenterName); Utilities.Log("Get staff module features failed: " + e.Message, LoggerLevel.Severe); return; } mSplashScreen.CloseForm(); mSplashScreen.Dispose(); sc.CurentStaff = m_currentStaff; Application.Run(sc); } catch (Exception e) { Utilities.Log("Exception.Message =" + e.Message, LoggerLevel.Severe); Utilities.Log("Exception.Stack=" + e.StackTrace, LoggerLevel.Severe); MessageForm.Show(Properties.Resources.errorStart, Properties.Resources.securityCenter); } finally { // Shutdown if (mSplashScreen != null) { mSplashScreen.Close(); mSplashScreen.Dispose(); } if (sc != null) { sc.Close(); sc = null; } OnStop(); lock (m_syncRoot) { // Mark the module as stopped. m_isStopped = true; } Utilities.Log("Leaving SecurityCenter...", LoggerLevel.Information); } }