Пример #1
0
        private void fmEditGroups_Load(object sender, EventArgs e)
        {
            this.Text = this.appManager.m_strApplicationName + " Edit Groups " + this.appManager.FormatPhone(this.appManager.m_strUserName);
            base.Icon = this.appManager.iTextApp;
            int         num     = 0;
            int         num2    = 0;
            RegistryKey rootKey = AppRegistry.GetRootKey(ref this.strError);

            AppRegistry.GetValue(rootKey, "local_FormEditGroupsWidth", ref num, ref this.strError);
            AppRegistry.GetValue(rootKey, "local_FormEditGroupsHeight", ref num2, ref this.strError);
            if (num2 != 0)
            {
                base.Height = num2;
            }
            if (num != 0)
            {
                base.Width = num;
            }
            this.textBoxGroupTag.Text              = "";
            this.comboBoxContactList.ValueMember   = "id";
            this.comboBoxContactList.DisplayMember = "contact";
            this.comboBoxContactList_Load(string.Empty);
            this.comboBoxGroups_Load(string.Empty);
            this.listBoxSelectedContacts.DrawMode      = DrawMode.OwnerDrawVariable;
            this.listBoxSelectedContacts.MeasureItem  += new MeasureItemEventHandler(this.listBoxSelectedContacts_MeasureItem);
            this.listBoxSelectedContacts.DrawItem     += new DrawItemEventHandler(this.listBoxSelectedContacts_DrawItem);
            this.listBoxSelectedContacts.ValueMember   = "id";
            this.listBoxSelectedContacts.DisplayMember = "contact";
            if (!this.appManager.m_bAllowDelete)
            {
                this.buttonDelete.Visible = false;
            }
        }
Пример #2
0
        private void fmEditAccounts_Load(object sender, EventArgs e)
        {
            this.Text = this.appManager.m_strApplicationName + " Edit Accounts";
            base.Icon = this.appManager.iTextApp;
            int         num     = 0;
            int         num2    = 0;
            RegistryKey rootKey = AppRegistry.GetRootKey(ref this.strError);

            AppRegistry.GetValue(rootKey, "local_FormEditAccountsWidth", ref num, ref this.strError);
            AppRegistry.GetValue(rootKey, "local_FormEditAccountsHeight", ref num2, ref this.strError);
            if (num2 != 0)
            {
                base.Height = num2;
            }
            if (num != 0)
            {
                base.Width = num;
            }
            this.comboBoxAccountList.ValueMember   = "phoneNumber";
            this.comboBoxAccountList.DisplayMember = "display";
            this.comboBoxAccountList_Load(string.Empty);
            this.LoadCountryDDL();
            this.comboBoxCountry.SelectedValue = "USA";
            if (this.bNewAccount)
            {
                this.textBoxPhoneNumber.Enabled = true;
                this.textBoxPhoneNumber.Focus();
            }
            else
            {
                try
                {
                    this.DisplayAccount();
                    this.textBoxPassword.Focus();
                }
                catch (Exception exception)
                {
                    this.strError = "Error getting current contact information: " + exception.Message;
                }
            }
            if (!string.IsNullOrEmpty(this.strError))
            {
                this.appManager.ShowBalloon(this.strError, 5);
                this.strError = string.Empty;
            }
            if (this.appManager.m_bValidateMobileNumbers && this.bNewAccount)
            {
                this.textBoxPhoneNumber.Mask = "(000) 000-0000";
            }
            else
            {
                this.textBoxPhoneNumber.Mask = null;
            }
        }
Пример #3
0
 private void GroupSchedule_Load(object sender, EventArgs e)
 {
     try
     {
         this.Text = this.appManager.m_strApplicationName + " Group Schedule";
         base.Icon = this.appManager.iTextApp;
         int         num     = 0;
         int         num2    = 0;
         RegistryKey rootKey = AppRegistry.GetRootKey(ref this.strError);
         AppRegistry.GetValue(rootKey, "local_FormGroupScheduleWidth", ref num, ref this.strError);
         AppRegistry.GetValue(rootKey, "local_FormGroupScheduleHeight", ref num2, ref this.strError);
         if (num2 != 0)
         {
             base.Height = num2;
         }
         if (num != 0)
         {
             base.Width = num;
         }
         this.labelProcessing.BackColor = ColorTranslator.FromHtml("#93FF14");
         this.labelProcessing.Visible   = false;
         this.dataGridViewGroupScheduleFile.ClipboardCopyMode = DataGridViewClipboardCopyMode.EnableWithoutHeaderText;
         this.dataGridViewGroupScheduleFile.DefaultCellStyle.SelectionBackColor = ColorTranslator.FromHtml("#E8FFCC");
         this.dataGridViewGroupScheduleFile.DefaultCellStyle.SelectionForeColor = System.Drawing.Color.Black;
         if (this.appManager.m_bGroupScheduleProcessing)
         {
             this.labelProcessing.Visible = true;
             this.buttonOpenFile.Enabled  = false;
             this.buttonSave.Enabled      = false;
         }
         else
         {
             this.labelProcessing.Visible = false;
             this.buttonOpenFile.Enabled  = true;
             this.buttonSave.Enabled      = true;
         }
         if (this.appManager.m_bEnableGroupScheduleProcessing)
         {
             this.checkBoxEnableGroupSchedule.Checked = true;
         }
         this.dataGridViewGroupScheduleFile_Load();
     }
     catch (Exception exception)
     {
         this.appManager.ShowBalloon("Exception creating Group Schedule form: " + exception.Message, 5);
     }
 }
Пример #4
0
 private void fmAccountDashboard_Load(object sender, EventArgs e)
 {
     try
     {
         int         num     = 0;
         int         num2    = 0;
         RegistryKey rootKey = AppRegistry.GetRootKey(ref this.strError);
         AppRegistry.GetValue(rootKey, "local_FormAccountDashboardWidth", ref num, ref this.strError);
         AppRegistry.GetValue(rootKey, "local_FormAccountDashboardHeight", ref num2, ref this.strError);
         if (num2 != 0)
         {
             base.Height = num2;
         }
         if (num != 0)
         {
             base.Width = num;
         }
         this.versionToolStripMenuItem.Text = this.appManager.m_AssemblyVersion + " (Update)";
         if (this.appManager.m_bIsBranded)
         {
             this.versionToolStripMenuItem.Text    = this.appManager.m_AssemblyVersion;
             this.versionToolStripMenuItem.Enabled = false;
             this.tryBETAToolStripMenuItem.Visible = false;
         }
         this.Text = this.appManager.m_strApplicationName + " Account Dashboard";
         base.Icon = this.appManager.iTextApp;
         this.LoadGridViewAccounts();
     }
     catch (Exception exception)
     {
         this.strError = "Unexpected application error while loading Account Dashboard window: " + exception.Message;
     }
     if (this.strError.Length > 0)
     {
         this.appManager.ShowBalloon(this.strError, 5);
     }
 }
Пример #5
0
        private void fmEditContact_Load(object sender, EventArgs e)
        {
            this.Text = this.appManager.m_strApplicationName + " Edit Contacts " + this.appManager.FormatPhone(this.appManager.m_strUserName);
            base.Icon = this.appManager.iTextApp;
            int         num     = 0;
            int         num2    = 0;
            RegistryKey rootKey = AppRegistry.GetRootKey(ref this.strError);

            AppRegistry.GetValue(rootKey, "local_FormEditContactWidth", ref num, ref this.strError);
            AppRegistry.GetValue(rootKey, "local_FormEditContactHeight", ref num2, ref this.strError);
            if (num2 != 0)
            {
                base.Height = num2;
            }
            if (num != 0)
            {
                base.Width = num;
            }
            if (!this.appManager.m_bAllowDelete)
            {
                this.buttonDelete.Visible = false;
            }
            if (!this.appManager.m_bAllowBlock)
            {
                this.buttonBlock.Visible = false;
            }
            this.comboBoxContactList.ValueMember   = "id";
            this.comboBoxContactList.DisplayMember = "contact";
            this.comboBoxContactList_Load(string.Empty);
            this.comboBoxGroups_Load(string.Empty);
            this.listBoxSelectedGroups.DrawMode     = DrawMode.OwnerDrawVariable;
            this.listBoxSelectedGroups.MeasureItem += new MeasureItemEventHandler(this.listBoxSelectedGroups_MeasureItem);
            this.listBoxSelectedGroups.DrawItem    += new DrawItemEventHandler(this.listBoxSelectedGroups_DrawItem);
            if (this.bNewContact)
            {
                this.textBoxPhoneNumber.Enabled = true;
                this.textBoxPhoneNumber.Select();
            }
            else
            {
                try
                {
                    this.DisplayContact();
                    this.textBoxFirstName.Select();
                }
                catch (Exception exception)
                {
                    this.strError = "Error getting current contact information: " + exception.Message;
                }
            }
            if (!string.IsNullOrEmpty(this.strError))
            {
                this.appManager.ShowBalloon(this.strError, 5);
                this.strError = string.Empty;
            }
            if (this.appManager.m_bValidateMobileNumbers && this.bNewContact)
            {
                this.textBoxPhoneNumber.Mask = "(000) 000-0000";
            }
            else
            {
                this.textBoxPhoneNumber.Mask = null;
            }
        }