Ejemplo n.º 1
0
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                appConfig.SaveValue("OrganisationName", txtOrganisationName.Text.Trim());
                appConfig.SaveValue("OrganisationLogo", txtOrganisationLogo.Text.Trim());

                if (ckDefaultLogo.IsChecked.Value)
                {
                    appConfig.SaveValue("DefaultLogo", "yes");
                }
                else
                {
                    appConfig.SaveValue("DefaultLogo", "no");
                }

                string hexColor = currentColor.Fill.ToString();
                appConfig.SaveValue("Background", hexColor);

                MessageBox.Show("Save Successful!");
            }
            catch (Exception ex)
            {
                MessageBox.Show("Options - Look And Feel " + ex.Message);
                CommonLibrary.Utilities.Log.Create("Options - Look And Feel " + ex.Message);
            }
        }
Ejemplo n.º 2
0
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (ckAcctiveDirectory.IsChecked.Value)
                {
                    appConfig.SaveValue("ActiveDirectory", "yes");
                }
                else
                {
                    appConfig.SaveValue("ActiveDirectory", "no");
                }

                if (ckOutlook.IsChecked.Value)
                {
                    appConfig.SaveValue("Outlook", "yes");
                }
                else
                {
                    appConfig.SaveValue("Outlook", "no");
                }

                appConfig.SaveValue("DomainName", txtDomainName.Text.Trim());

                MessageBox.Show("Save Successful!");
            }
            catch (Exception ex)
            {
                MessageBox.Show("Options - Search Application " + ex.Message);
            }
        }
Ejemplo n.º 3
0
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            appConfig.SaveValue("OrganisationName", txtOrganisationName.Text.Trim());
            appConfig.SaveValue("OrganisationLogo", txtOrganisationLogo.Text.Trim());

            MessageBox.Show("Save Successful!");
        }
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            if (ckWindowService.IsChecked.Value)
            {
                //MessageBox.Show(Environment.CurrentDirectory + "/PhoneDirectory.exe");
                appConfig.SaveValue("WindowsService", "yes");
                BusinessLayer.ApplicationStartUp.Save(Environment.CurrentDirectory + @"\PhoneDirectory.exe");
            }
            else
            {
                appConfig.SaveValue("WindowsService", "no");
                BusinessLayer.ApplicationStartUp.Delete();
            }

            MessageBox.Show("Save Successful!");
        }
        private void btnExport_Click(object sender, RoutedEventArgs e)
        {
            Parameters.ImportandExportParamters _Parameters = new ControlPanel.Parameters.ImportandExportParamters();
            _Parameters.SetDisplayText("Export contacts to *.csv file");
            _Parameters.SetFilePath("C:/export.csv");
            _Parameters.SetServerName(appConfig.GetValue("ServerName"));
            _Parameters.ShowDialog();

            string serverName = _Parameters.GetServerName();
            string File       = _Parameters.GetFilePath();

            if (!serverName.Equals(""))
            {
                string toolsPath = Environment.CurrentDirectory + "/Tools";
                System.Diagnostics.Process.Start(toolsPath + "/export.bat", " " + File + " " + serverName);
                appConfig.SaveValue("ServerName", serverName);
            }

            _Parameters.Close();
        }
Ejemplo n.º 6
0
        private void btnEditColor_Click(object sender, RoutedEventArgs e)
        {
            SolidColorBrush solidColorBrush = SelectColorDialog();

            if (solidColorBrush != null)
            {
                currentColor.Fill = solidColorBrush;

                try
                {
                    string hexColor = solidColorBrush.ToString();
                    appConfig.SaveValue("Background", hexColor);
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Options - Look And Feel " + ex.Message);
                    CommonLibrary.Utilities.Log.Create("Options - Look And Feel " + ex.Message);
                }
            }
        }
Ejemplo n.º 7
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     try
     {
         CommonLibrary.AppConfig appConfig = new CommonLibrary.AppConfig(BusinessLayer.Constants.CONGIF_FILE);
         if (appConfig.GetValue("FirstRun").Equals("yes"))
         {
             appConfig.SaveValue("FirstRun", "No");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Options - closing  " + ex.Message);
     }
 }
Ejemplo n.º 8
0
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            if (ckAcctiveDirectory.IsChecked.Value)
            {
                appConfig.SaveValue("ActiveDirectory", "yes");
            }
            else
            {
                appConfig.SaveValue("ActiveDirectory", "no");
            }

            if (ckOutlook.IsChecked.Value)
            {
                appConfig.SaveValue("Outlook", "yes");
            }
            else
            {
                appConfig.SaveValue("Outlook", "no");
            }

            appConfig.SaveValue("DomainName", txtDomainName.Text.Trim());

            MessageBox.Show("Save Successful!");
        }
Ejemplo n.º 9
0
 private void btnCheckDomain_Click(object sender, RoutedEventArgs e)
 {
     if (CommonLibrary.Constants.IsValidDomainName(txtDomainName.Text))
     {
         imgCheck.Visibility       = Visibility.Visible;
         imgFail.Visibility        = Visibility.Hidden;
         lbDomainStatus.Visibility = Visibility.Visible;
         lbDomainStatus.Text       = "OK";
         appConfig.SaveValue("DomainName", txtDomainName.Text.Trim());
     }
     else
     {
         imgCheck.Visibility       = Visibility.Hidden;
         imgFail.Visibility        = Visibility.Visible;
         lbDomainStatus.Visibility = Visibility.Visible;
         lbDomainStatus.Text       = "Fail";
     }
 }
Ejemplo n.º 10
0
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (ckHomePhone.IsChecked.Value)
                {
                    appConfig.SaveValue("HomePhone", "yes");
                }
                else
                {
                    appConfig.SaveValue("HomePhone", "no");
                }

                if (ckMobilePhone.IsChecked.Value)
                {
                    appConfig.SaveValue("MobilePhone", "yes");
                }
                else
                {
                    appConfig.SaveValue("MobilePhone", "no");
                }

                if (ckBusinessPhone.IsChecked.Value)
                {
                    appConfig.SaveValue("BusinessPhone", "yes");
                }
                else
                {
                    appConfig.SaveValue("BusinessPhone", "no");
                }

                if (ckBusinessFax.IsChecked.Value)
                {
                    appConfig.SaveValue("BusinessFax", "yes");
                }
                else
                {
                    appConfig.SaveValue("BusinessFax", "no");
                }

                if (ckAddress.IsChecked.Value)
                {
                    appConfig.SaveValue("Address", "yes");
                }
                else
                {
                    appConfig.SaveValue("Address", "no");
                }

                if (ckEmail.IsChecked.Value)
                {
                    appConfig.SaveValue("Email", "yes");
                }
                else
                {
                    appConfig.SaveValue("Email", "no");
                }

                MessageBox.Show("Save Successful!");
            }
            catch (Exception ex)
            {
                MessageBox.Show("Options - DisplayResult " + ex.Message);
                CommonLibrary.Utilities.Log.Create("Options - DisplayResult " + ex.Message);
            }
        }
Ejemplo n.º 11
0
 private void ckHomePhone_Checked(object sender, RoutedEventArgs e)
 {
     try
     {
         appConfig.SaveValue("HomePhone", "yes");
     }
     catch (Exception ex)
     {
         MessageBox.Show("Options - DisplayResult " + ex.Message);
         CommonLibrary.Utilities.Log.Create("Options - DisplayResult " + ex.Message);
     }
 }
Ejemplo n.º 12
0
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            if (ckHomePhone.IsChecked.Value)
            {
                appConfig.SaveValue("HomePhone", "yes");
            }
            else
            {
                appConfig.SaveValue("HomePhone", "no");
            }

            if (ckMobilePhone.IsChecked.Value)
            {
                appConfig.SaveValue("MobilePhone", "yes");
            }
            else
            {
                appConfig.SaveValue("MobilePhone", "no");
            }

            if (ckBusinessPhone.IsChecked.Value)
            {
                appConfig.SaveValue("BusinessPhone", "yes");
            }
            else
            {
                appConfig.SaveValue("BusinessPhone", "no");
            }

            if (ckBusinessFax.IsChecked.Value)
            {
                appConfig.SaveValue("BusinessFax", "yes");
            }
            else
            {
                appConfig.SaveValue("BusinessFax", "no");
            }

            if (ckAddress.IsChecked.Value)
            {
                appConfig.SaveValue("Address", "yes");
            }
            else
            {
                appConfig.SaveValue("Address", "no");
            }

            if (ckEmail.IsChecked.Value)
            {
                appConfig.SaveValue("Email", "yes");
            }
            else
            {
                appConfig.SaveValue("Email", "no");
            }

            MessageBox.Show("Save Successful!");
        }
Ejemplo n.º 13
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (ckActiveDirectory.Checked)
            {
                appConfig.SaveValue("ActiveDirectory", "yes");
            }
            else
            {
                appConfig.SaveValue("ActiveDirectory", "no");
            }

            if (ckOutlook.Checked)
            {
                appConfig.SaveValue("Outlook", "yes");
            }
            else
            {
                appConfig.SaveValue("Outlook", "no");
            }

            if (ckHomePhone.Checked)
            {
                appConfig.SaveValue("HomePhone", "yes");
            }
            else
            {
                appConfig.SaveValue("HomePhone", "no");
            }

            if (ckMobilePhone.Checked)
            {
                appConfig.SaveValue("MobilePhone", "yes");
            }
            else
            {
                appConfig.SaveValue("MobilePhone", "no");
            }

            if (ckBusinessPhone.Checked)
            {
                appConfig.SaveValue("BusinessPhone", "yes");
            }
            else
            {
                appConfig.SaveValue("BusinessPhone", "no");
            }

            if (ckBusinessFax.Checked)
            {
                appConfig.SaveValue("BusinessFax", "yes");
            }
            else
            {
                appConfig.SaveValue("BusinessFax", "no");
            }

            if (ckAddress.Checked)
            {
                appConfig.SaveValue("Address", "yes");
            }
            else
            {
                appConfig.SaveValue("Address", "no");
            }

            if (ckEmail.Checked)
            {
                appConfig.SaveValue("Email", "yes");
            }
            else
            {
                appConfig.SaveValue("Email", "no");
            }

            if (ckWindowService.Checked)
            {
                appConfig.SaveValue("WindowsService", "yes");
                BusinessLayer.ApplicationStartUp.Save(Application.ExecutablePath.ToString());
            }
            else
            {
                appConfig.SaveValue("WindowsService", "no");
                BusinessLayer.ApplicationStartUp.Delete();
            }

            appConfig.SaveValue("DomainName", txtDomain.Text.Trim());

            this.Close();
        }