コード例 #1
0
        private void btnOptions_ButtonClick(object sender, EventArgs e)
        {
            var form = new optionsForm();

            form.firstRun       = firstRun;
            form.cscPath        = cscPath;
            form.gnugettextPath = GettextPath;
            form.poeditPath     = poEditor;
            form.poTranslator   = poTranslator;
            form.poTeam         = poTeam;

            DialogResult dlgResult = form.ShowDialog();

            //form.StartPosition = FormStartPosition.CenterParent;
            //form.AutoSize = true;
            //form.Location = new Point(
            //    this.Location.X + ( this.Height - form.Height ) / 2,
            //    this.Location.Y + ( this.Width - form.Width ) / 2 );
            if (dlgResult == DialogResult.OK)
            {
                firstRun     = form.firstRun;
                cscPath      = form.cscPath;
                GettextPath  = form.gnugettextPath;
                poEditor     = form.poeditPath;
                poTranslator = form.poTranslator;
                poTeam       = form.poTeam;

                msgidCollector.cscPath      = cscPath;
                msgidCollector.GettextPath  = GettextPath;
                msgidCollector.PoEditor     = poEditor;
                msgidCollector.PoTranslator = poTranslator;
                msgidCollector.PoTeam       = poTeam;
            }
            form.Dispose();
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: netcharm/NGettextUtils
        private void btnOptions_ButtonClick( object sender, EventArgs e )
        {
            var form = new optionsForm();
            form.firstRun = firstRun;
            form.cscPath = cscPath;
            form.gnugettextPath = GettextPath;
            form.poeditPath = poEditor;
            form.poTranslator = poTranslator;
            form.poTeam = poTeam;

            DialogResult dlgResult = form.ShowDialog();
            //form.StartPosition = FormStartPosition.CenterParent;
            //form.AutoSize = true;
            //form.Location = new Point(
            //    this.Location.X + ( this.Height - form.Height ) / 2,
            //    this.Location.Y + ( this.Width - form.Width ) / 2 );
            if(dlgResult == DialogResult.OK)
            {
                firstRun = form.firstRun;
                cscPath = form.cscPath;
                GettextPath = form.gnugettextPath;
                poEditor = form.poeditPath;
                poTranslator = form.poTranslator;
                poTeam = form.poTeam;

                msgidCollector.cscPath = cscPath;
                msgidCollector.GettextPath = GettextPath;
                msgidCollector.PoEditor = poEditor;
                msgidCollector.PoTranslator = poTranslator;
                msgidCollector.PoTeam = poTeam;
            }
            form.Dispose();
        }