Example #1
0
 internal Form1(String path)
 {
     InitializeComponent();
     executablePath = path;
     LookFeelUtil.SetLookAndFeel(contentContextMenuStrip, executablePath);
     SetLanguage();
 }
Example #2
0
 internal void InitializeForm(String culture)
 {
     InitializeComponent();
     LookFeelUtil.SetLookAndFeel((Form1)Owner, contentContextMenuStrip);
     cultureInternal = culture;
     LanguageUtil.SetCurrentLanguage(this, cultureInternal);
 }
Example #3
0
        internal void InitializeForm()
        {
            InitializeComponent();
            LookFeelUtil.SetLookAndFeel(contentContextMenuStrip);
            SetLanguage();

            Form1 form = (Form1)Owner;

            String            filename    = ProgramUtil.GetFilenameTabPage(form.pagesTabControl.SelectedTabPage);
            CustomRichTextBox pageTextBox = ProgramUtil.GetPageTextBox(form.pagesTabControl.SelectedTabPage);
            String            xmlString   = pageTextBox.Text;

            //XmlUrlResolver resolver = new XmlUrlResolver();
            //resolver.Credentials = CredentialCache.DefaultCredentials;
            XmlDocument       xmldoc   = new XmlDocument();
            XmlReaderSettings settings = new XmlReaderSettings
            {
                IgnoreWhitespace = true,
                //XmlResolver = resolver,
                IgnoreComments = true,
                DtdProcessing  = DtdProcessing.Parse                                 //ProhibitDtd = false
            };
            StringReader reader = new StringReader(xmlString);
            XmlReader    render = !String.IsNullOrEmpty(filename) ? XmlReader.Create(reader, settings, filename) : XmlReader.Create(reader, settings);

            try
            {
                xmldoc.Load(render);
            }
            catch (Exception exception)
            {
                String error = String.Format(LanguageUtil.GetCurrentLanguageString("Error", Name), exception.Message);
                WindowManager.ShowAlertBox(form, error);

                reader.Dispose();
                render.Close();
                return;
            }

            reader.Dispose();
            render.Close();

            GridBuilder   builder  = new GridBuilder();
            GridCellGroup xmlgroup = new GridCellGroup {
                Flags = GroupFlags.Overlapped | GroupFlags.Expanded
            };

            builder.ParseNodes(xmlgroup, null, xmldoc.ChildNodes);
            root = new GridCellGroup();
            root.Table.SetBounds(1, 2);
            root.Table[0, 0] = new GridHeadLabel {
                Text = "XML"
            };
            root.Table[0, 1] = xmlgroup;
            xmlGridView.Cell = root;

            xmlGridView.Font      = pageTextBox.Font;
            xmlGridView.ForeColor = pageTextBox.ForeColor;
            xmlGridView.BackColor = pageTextBox.BackColor;
        }
Example #4
0
        internal void InitializeForm(String culture)
        {
            InitializeComponent();
            LookFeelUtil.SetLookAndFeel((Form1)Owner, contentContextMenuStrip);
            cultureInternal = culture;
            SetLanguage();

            versionLabel.Text = String.Format("{0} - build {1}", AssemblyUtil.AssemblyVersion, AssemblyUtil.AssemblyConfiguration);
            closeButton.Focus();

            SetFamilyEdition();
        }
Example #5
0
        internal void InitializeForm()
        {
            InitializeComponent();
            LookFeelUtil.SetLookAndFeel(new[] { customContextMenuStrip, gridViewContextMenuStrip });
            SetLanguage();
            ControlUtil.SetContextMenuStrip(this, new[] { delimiterComboBox, quoteComboBox });

            currentDelimiter = standardDelimiter;
            currentQuote     = standardQuote;

            noAutomaticalActionForControls = true; //Needed until show event has ended

            delimiterComboBox.SelectedIndex = 0;
            quoteComboBox.SelectedIndex     = 0;
            CsvManager.ReadCsv(this, headerCheckBox.Checked, currentDelimiter, currentQuote);

            startingData = ((DataTable)csvGridView.DataSource).Copy();
        }
Example #6
0
        private void nextButton_Click(object sender, EventArgs e)
        {
            if (introPanel.Visible)
            {
                introPanel.Visible = false;
                backButton.Visible = true;

                if (skipSettingsCheckBox.Checked)
                {
                    installPanel.Visible = true;
                    nextButton.Text      = LanguageUtil.GetCurrentLanguageString("nextButtonInstall", Name, OptionManager.GetLanguage(this));
                    stepLabel.Text       = LanguageUtil.GetCurrentLanguageString("InstallPhase", Name, OptionManager.GetLanguage(this));
                    stepPictureBox.Image = ImageResource.install_step_6;
                    InstallManager.InitInstallPanel(destinationPathTextBox, availableSpaceLabel1, requiredSpaceLabel1, languageComboBox, OptionManager.GetLanguage(this));
                }
                else
                {
                    languagePanel.Visible = true;
                    stepLabel.Text        = LanguageUtil.GetCurrentLanguageString("LanguagePhase", Name, OptionManager.GetLanguage(this));
                    stepPictureBox.Image  = ImageResource.install_step_2;
                }
            }
            else if (languagePanel.Visible)
            {
                languagePanel.Visible    = false;
                lookAndFeelPanel.Visible = true;
                stepLabel.Text           = LanguageUtil.GetCurrentLanguageString("LookAndFeelPhase", Name, OptionManager.GetLanguage(this));
                stepPictureBox.Image     = ImageResource.install_step_3;
            }
            else if (lookAndFeelPanel.Visible)
            {
                lookAndFeelPanel.Visible = false;
                windowPanel.Visible      = true;
                LookFeelUtil.SetLookAndFeel(this, contentContextMenuStrip);
                LookFeelUtil.SetLookAndFeel(this, contentContextMenuStrip1);
                stepLabel.Text       = LanguageUtil.GetCurrentLanguageString("WindowPhase", Name, OptionManager.GetLanguage(this));
                stepPictureBox.Image = ImageResource.install_step_4;
            }
            else if (windowPanel.Visible)
            {
                windowPanel.Visible   = false;
                internetPanel.Visible = true;
                stepLabel.Text        = LanguageUtil.GetCurrentLanguageString("InternetPhase", Name, OptionManager.GetLanguage(this));
                stepPictureBox.Image  = ImageResource.install_step_5;
            }
            else if (internetPanel.Visible)
            {
                internetPanel.Visible = false;
                installPanel.Visible  = true;
                nextButton.Text       = LanguageUtil.GetCurrentLanguageString("nextButtonInstall", Name, OptionManager.GetLanguage(this));
                stepLabel.Text        = LanguageUtil.GetCurrentLanguageString("InstallPhase", Name, OptionManager.GetLanguage(this));
                stepPictureBox.Image  = ImageResource.install_step_6;
                InstallManager.InitInstallPanel(destinationPathTextBox, availableSpaceLabel1, requiredSpaceLabel1, languageComboBox, OptionManager.GetLanguage(this));
            }
            else if (installPanel.Visible)
            {
                installPanel.Visible = false;
                endPanel.Visible     = true;
                backButton.Visible   = false;
                nextButton.Visible   = false;
                cancelButton.Enabled = false;
                stepLabel.Text       = LanguageUtil.GetCurrentLanguageString("EndPhase", Name, OptionManager.GetLanguage(this));
                stepPictureBox.Image = ImageResource.install_step_7;
                Refresh();

                if (InstallManager.InstallProcedure(this, installProgressBar, installTextBox, OptionManager.GetLanguage(this)))
                {
                    nextButton.Text    = LanguageUtil.GetCurrentLanguageString("nextButtonStart", Name, OptionManager.GetLanguage(this));
                    nextButton.Visible = true;
                    nextButton.Click  += nextButton_ClickEnd;
                    nextButton.Focus();
                }
                else
                {
                    backButton.Visible = true;
                }

                cancelButton.Text    = LanguageUtil.GetCurrentLanguageString("cancelButtonExit", Name, OptionManager.GetLanguage(this));
                cancelButton.Enabled = true;
            }
        }
Example #7
0
 internal SearchInFilesPanel()
 {
     InitializeComponent();
     LookFeelUtil.SetLookAndFeel(searchInFilesContextMenuStrip);
 }