using System; using System.ComponentModel; using System.Drawing; using System.IO; using System.Windows.Forms; using FastReport; using FastReport.Data; using FastReport.Utils; namespace Navigator { // Token: 0x0200001A RID: 26 public partial class Flyout : Form { // Token: 0x06000140 RID: 320 RVA: 0x00056890 File Offset: 0x00054A90 private void btnUsersCheckAll_Click(object sender, EventArgs e) { for (int i = 0; i <= this.lstConfUsersProgramOptions.Items.Count - 1; i++) { this.lstConfUsersProgramOptions.SetItemChecked(i, true); } } // Token: 0x06000141 RID: 321 RVA: 0x000568D4 File Offset: 0x00054AD4 private void btnUsersUncheckAll_Click(object sender, EventArgs e) { foreach (object obj in this.lstConfUsersProgramOptions.CheckedIndices) { int index = (int)obj; this.lstConfUsersProgramOptions.SetItemChecked(index, false); } } // Token: 0x06000142 RID: 322 RVA: 0x0005694C File Offset: 0x00054B4C public void ConfigureCompanies() { this.mainForm.changingCompany = false; this.mainForm.lblCompanies_Current.Visible = false; this.mainForm.SetButtonBarState(frm.btnBarStates.Companies); this.mainForm.LoadCompanies(); base.Hide(); } // Token: 0x06000143 RID: 323 RVA: 0x00056998 File Offset: 0x00054B98 public void ConfigureUsers() { this.mainForm.SetButtonBarState(frm.btnBarStates.UserOptions); base.Hide(); } // Token: 0x06000144 RID: 324 RVA: 0x000569B0 File Offset: 0x00054BB0 private void btnLicence_Print_Click(object sender, EventArgs e) { RegisteredObjects.AddConnection(typeof(MySqlDataConnection)); this.report.Load(AppDomain.CurrentDomain.BaseDirectory + "\\Documents\\Licence_Renewal.frx"); this.report.Dictionary.Connections[0].ConnectionString = string.Format("server={0};port={1};User Id={2};password={3};database={4}", new object[] { this.mainForm.serverName, this.mainForm.portName, this.mainForm.userName, this.mainForm.passWord, this.mainForm.databaseName }); this.report.SetParameterValue("CompanyID", this.mainForm.currentCompanyID); this.report.ReportInfo.Name = "PPOS Licence Activation / Renewal"; this.report.Show(false, this.mainForm); } // Token: 0x06000145 RID: 325 RVA: 0x00056AAC File Offset: 0x00054CAC private void btnFlyOutLicenceClose_Click(object sender, EventArgs e) { this.mainForm.Close(); } // Token: 0x06000146 RID: 326 RVA: 0x00056ABC File Offset: 0x00054CBC private void txtFlyOutLicenceKey3_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == '\b') { if (this.txtFlyOutLicenceKey3.Text.Length == 1) { this.txtFlyOutLicenceKey2.Focus(); this.txtFlyOutLicenceKey2.SelectionStart = this.txtFlyOutLicenceKey2.Text.Length; } e.Handled = false; } else if (!char.IsDigit(e.KeyChar)) { e.Handled = true; } } // Token: 0x06000147 RID: 327 RVA: 0x00056B44 File Offset: 0x00054D44 private void txtFlyOutLicenceKey2_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == '\b') { if (this.txtFlyOutLicenceKey2.Text.Length <= 1) { this.txtFlyOutLicenceKey.Focus(); this.txtFlyOutLicenceKey.SelectionStart = this.txtFlyOutLicenceKey.Text.Length; } e.Handled = false; } else if (!char.IsDigit(e.KeyChar)) { e.Handled = true; } else if (this.txtFlyOutLicenceKey2.Text.Length >= 3 && this.txtFlyOutLicenceKey2.SelectionLength != this.txtFlyOutLicenceKey2.Text.Length) { this.txtFlyOutLicenceKey3.Focus(); this.txtFlyOutLicenceKey3.SelectAll(); } } // Token: 0x06000148 RID: 328 RVA: 0x00056C1C File Offset: 0x00054E1C private void txtFlyOutLicenceKey_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == '\b') { e.Handled = false; } else if (!char.IsDigit(e.KeyChar)) { e.Handled = true; } else if (this.txtFlyOutLicenceKey.Text.Length >= 3 && this.txtFlyOutLicenceKey.SelectionLength != this.txtFlyOutLicenceKey.Text.Length) { this.txtFlyOutLicenceKey2.Focus(); this.txtFlyOutLicenceKey2.SelectAll(); } } // Token: 0x06000149 RID: 329 RVA: 0x00056CB2 File Offset: 0x00054EB2 private void lblFlyOutLicenceRegCode_MouseDoubleClick(object sender, MouseEventArgs e) { this.lblFlyOutLicenceRegCode.Text = this.mainForm.GenerateRegistrationCode(); } // Token: 0x0600014A RID: 330 RVA: 0x00056CCC File Offset: 0x00054ECC public void Backup() { this.mainForm.SetButtonBarState(frm.btnBarStates.Backup); base.Hide(); } // Token: 0x0600014B RID: 331 RVA: 0x00056CE4 File Offset: 0x00054EE4 public void Designer() { string str = string.Empty; try { using (OpenFileDialog openFileDialog = new OpenFileDialog()) { string text = string.Empty; openFileDialog.DefaultExt = ".frx"; openFileDialog.Filter = "Reports or Slips (.frx)|*.frx"; if (openFileDialog.ShowDialog() == DialogResult.OK) { this.Cursor = Cursors.WaitCursor; text = openFileDialog.FileName; str = Path.GetFileName(openFileDialog.FileName); Report report = new Report(); RegisteredObjects.AddConnection(typeof(MySqlDataConnection)); report.Load(text); report.Dictionary.Connections[0].ConnectionString = string.Format("server={0};port={1};User Id={2};password={3};database={4}", new object[] { this.mainForm.serverName, this.mainForm.portName, this.mainForm.userName, this.mainForm.passWord, this.mainForm.databaseName }); report.SetParameterValue("CompanyID", this.mainForm.currentCompanyID); report.Design(false); } this.Cursor = Cursors.Default; } } catch (Exception ex) { this.Cursor = Cursors.Default; this.mainForm.ShowMessage("Could not open report", "The report: " + str + " failed to open with the following message:\n" + ex.Message, "&OK", string.Empty, true, false, false, frm.MessageColor.Blue); } finally { this.Cursor = Cursors.Default; } } // Token: 0x0600014C RID: 332 RVA: 0x00056ED8 File Offset: 0x000550D8 public void ChangeCompany() { this.mainForm.LoadCompanies(); if (this.mainForm.lvCompanies.Items.Count > 1) { this.mainForm.SetButtonBarState(frm.btnBarStates.ChangeCompany); this.mainForm.changingCompany = true; this.mainForm.lblCompanies_Current.Visible = true; this.mainForm.lblCompanies_Current.Text = "Current company: " + this.mainForm.currentCompanyName; } else if (this.mainForm.ShowMessage("Add more companies", "There is currently only 1 company to choose from. Would you like to add more?", "&Yes", "&No", true, true, false, frm.MessageColor.Blue) == frm.MessageReturn.OK) { this.mainForm.recordStatus = frm.operationMode.Add; this.mainForm.ClearCompanyDetails(); this.mainForm.SetButtonBarState(frm.btnBarStates.ConfCompany); this.mainForm.optConfCompanyInfo.PerformClick(); this.mainForm.txtCompanyName.Focus(); this.mainForm.changingCompany = true; } else { this.mainForm.SetButtonBarState(frm.btnBarStates.MainMenu); } base.Hide(); } // Token: 0x0600014D RID: 333 RVA: 0x00057006 File Offset: 0x00055206 public void RunAddIn(string path) { this.mainForm.StartProgram(Path.GetFileNameWithoutExtension(path), path); } // Token: 0x0600014E RID: 334 RVA: 0x0005701C File Offset: 0x0005521C public Flyout() { this.InitializeComponent(); } // Token: 0x0600014F RID: 335 RVA: 0x00057094 File Offset: 0x00055294 public Flyout(Form callingForm) { this.mainForm = (callingForm as frm); this.InitializeComponent(); } // Token: 0x06000150 RID: 336 RVA: 0x00057118 File Offset: 0x00055318 private void frmFlyOut_Activated(object sender, EventArgs e) { if (!this.t1.Enabled) { this.t1.Start(); } } // Token: 0x06000151 RID: 337 RVA: 0x00057144 File Offset: 0x00055344 private void frmFlyOut_KeyDown(object sender, KeyEventArgs e) { Keys keyCode = e.KeyCode; if (keyCode != Keys.Escape) { if (keyCode == Keys.F9) { this.btnOK.PerformClick(); } } else if (this.tabFlyOut.SelectedTab != this.pFlyOutLicence) { base.Hide(); } } // Token: 0x06000152 RID: 338 RVA: 0x000571A0 File Offset: 0x000553A0 private void btnOK_Click(object sender, EventArgs e) { if (this.tabFlyOut.SelectedTab == this.pFlyOutLicence) { if (this.txtFlyOutLicenceKey.Text.Length > 0 && this.txtFlyOutLicenceKey2.Text.Length > 0 && this.txtFlyOutLicenceKey3.Text.Length > 0) { string text = this.mainForm.RenewLicence(); if (text.Length == 0) { base.Hide(); this.mainForm.ShowNotification("Activation successful", string.Empty, frm.NotificationColor.Green); Application.DoEvents(); this.mainForm.ContinueLoadingProgram(); } else { this.mainForm.ShowMessage("Problem with activation", text, "OK", string.Empty, true, false, true, frm.MessageColor.Red); base.Hide(); base.Show(this.mainForm); this.txtFlyOutLicenceKey.Focus(); this.txtFlyOutLicenceKey.SelectAll(); } } else { this.mainForm.ShowMessage("Incomplete activation code", "Some of the text boxes are still empty.\nProvide the full activation code then try again.", "OK", string.Empty, true, false, false, frm.MessageColor.Red); base.Hide(); base.Show(this.mainForm); } } else if (this.tabFlyOut.SelectedTab == this.pFlyOutUserDetails) { this.mainForm.lvConfUsers.SelectedItems[0].SubItems[this.mainForm.cUserRights.Index].Text = this.mainForm.UpdateSelectedProgramOptions(); base.Hide(); this.mainForm.Focus(); } } // Token: 0x06000153 RID: 339 RVA: 0x00057364 File Offset: 0x00055564 private void t1_Tick(object sender, EventArgs e) { if (base.Left <= this.mainForm.Width - base.Width) { this.t1.Stop(); if (this.tabFlyOut.SelectedTab == this.pFlyOutLicence) { this.txtFlyOutLicenceKey.Focus(); } this.hideFlyout = true; } else { base.Left -= 60; } } // Token: 0x06000154 RID: 340 RVA: 0x000573E4 File Offset: 0x000555E4 private void btnStyleNext_Click(object sender, EventArgs e) { if (!this.btnStylePrevious.Enabled) { this.btnStylePrevious.Enabled = true; } if (this.currControl != this.flpStyles.Controls.Count - 1) { this.flpStyles.SelectNextControl(this.flpStyles.Controls[this.currControl], true, true, false, false); this.currControl++; } else { this.btnStyleNext.Enabled = false; } } // Token: 0x06000155 RID: 341 RVA: 0x00057478 File Offset: 0x00055678 private void btnStylePrevious_Click(object sender, EventArgs e) { if (!this.btnStyleNext.Enabled) { this.btnStyleNext.Enabled = true; } if (this.currControl > 0) { this.flpStyles.SelectNextControl(this.flpStyles.Controls[this.currControl], false, true, false, false); this.currControl--; } else { this.btnStylePrevious.Enabled = false; } } // Token: 0x04000357 RID: 855 private Report report = new Report(); // Token: 0x04000358 RID: 856 public bool hideFlyout = true; // Token: 0x04000359 RID: 857 public Flyout.Caller flyOutReason = Flyout.Caller.NA; // Token: 0x0400035A RID: 858 public Color backColor = Color.FromArgb(1, 65, 81); // Token: 0x0400035B RID: 859 public Color mouseOverColor = Color.FromArgb(21, 85, 101); // Token: 0x0400035C RID: 860 public Color mouseDownColor = Color.FromArgb(0, 45, 61); // Token: 0x0400035D RID: 861 private int currControl; // Token: 0x0400035E RID: 862 private frm mainForm = null; // Token: 0x0200001B RID: 27 public enum Caller { // Token: 0x04000360 RID: 864 MenuConfProgram, // Token: 0x04000361 RID: 865 MenuConfUsers, // Token: 0x04000362 RID: 866 MenuTools, // Token: 0x04000363 RID: 867 ConfStyles, // Token: 0x04000364 RID: 868 Import, // Token: 0x04000365 RID: 869 UserDetails, // Token: 0x04000366 RID: 870 ImportOptions, // Token: 0x04000367 RID: 871 Licence, // Token: 0x04000368 RID: 872 WSbuilder, // Token: 0x04000369 RID: 873 Backup_Restore, // Token: 0x0400036A RID: 874 NA } } }