Inheritance: System.Windows.Forms.Form
コード例 #1
0
        private void synchronizeMenuItem_Click(object sender, EventArgs e)
        {
            SynchronizePOs dialog = new SynchronizePOs();

            if (dialog.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }

            PoAttributesDialog attributesDialog = new PoAttributesDialog();

            if (attributesDialog.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }

            PoWriterAttributes attributes = new PoWriterAttributes()
            {
                Name     = attributesDialog.nameTextBox.Text,
                Email    = attributesDialog.emailTextBox.Text,
                Version  = attributesDialog.versionTextBox.Text,
                writePOT = true
            };


            SynchronizePoFiles(dialog.ResXDirectory, dialog.PODirectory,
                               attributesDialog.nameTextBox.Text, attributesDialog.emailTextBox.Text, attributesDialog.versionTextBox.Text);
        }
コード例 #2
0
        private void createPOTToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PoAttributesDialog attributesDialog = new PoAttributesDialog();

            if (attributesDialog.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }

            PoWriterAttributes attributes = new PoWriterAttributes()
            {
                Name     = attributesDialog.nameTextBox.Text,
                Email    = attributesDialog.emailTextBox.Text,
                Version  = attributesDialog.versionTextBox.Text,
                writePOT = true
            };

            attributesDialog.Dispose();

            SaveFileDialog dialog = new SaveFileDialog();

            dialog.DefaultExt = ".pot";

            if (dialog.ShowDialog(this) == DialogResult.OK)
            {
                PoWriter potWriter = new PoWriter(dialog.FileName, attributes);
                potWriter.WritePot(resourceDirectory);
            }
        }
コード例 #3
0
ファイル: MainWindow.cs プロジェクト: petergolde/PurplePen
        private void createPOTToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PoAttributesDialog attributesDialog = new PoAttributesDialog();
            if (attributesDialog.ShowDialog(this) != DialogResult.OK)
                return;

            PoWriterAttributes attributes = new PoWriterAttributes() {
                Name = attributesDialog.nameTextBox.Text,
                Email = attributesDialog.emailTextBox.Text,
                Version = attributesDialog.versionTextBox.Text,
                writePOT = true};

            attributesDialog.Dispose();

            SaveFileDialog dialog = new SaveFileDialog();
            dialog.DefaultExt = ".pot";

            if (dialog.ShowDialog(this) == DialogResult.OK) {
                PoWriter potWriter = new PoWriter(dialog.FileName, attributes);
                potWriter.WritePot(resourceDirectory);
            }
        }
コード例 #4
0
ファイル: MainWindow.cs プロジェクト: petergolde/PurplePen
        private void synchronizeMenuItem_Click(object sender, EventArgs e)
        {
            SynchronizePOs dialog = new SynchronizePOs();
            if (dialog.ShowDialog(this) != DialogResult.OK) {
                return;
            }

            PoAttributesDialog attributesDialog = new PoAttributesDialog();
            if (attributesDialog.ShowDialog(this) != DialogResult.OK)
                return;

            PoWriterAttributes attributes = new PoWriterAttributes() {
                Name = attributesDialog.nameTextBox.Text,
                Email = attributesDialog.emailTextBox.Text,
                Version = attributesDialog.versionTextBox.Text,
                writePOT = true
            };

            SynchronizePoFiles(dialog.ResXDirectory, dialog.PODirectory,
                attributesDialog.nameTextBox.Text, attributesDialog.emailTextBox.Text, attributesDialog.versionTextBox.Text);
        }