コード例 #1
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (args.Length > 0)
            {
                var cl = CommandLine.Parse(args);
                if (cl != null && RunTools(cl))
                {
                    return;
                }
            }

            Tests();

            //NOTE: This flag is used to optimize loading of QAForm.
            //QA.LoadNUnitTests = false;
            //QA.ProtectNUnitTest = false;

            GlobalOptions.Load();

            using (var form = new QAForm())
                form.ShowDialog();

            GlobalOptions.Save();
        }
コード例 #2
0
 private void mBtnOK_Click(object sender, EventArgs e)
 {
     DialogResult = DialogResult.OK;
     GlobalOptions.Save();
     UserCredentials.Save();
     SaveRepoList();
     Close();
 }
コード例 #3
0
        public void Apply()
        {
            string path = tbQaBaseDir.Text;

            //TODO: Check path
            //if (Path.)
            GlobalOptions.BaseDir       = path;
            GlobalOptions.OptimizeCode  = cbOptimizeCode.Checked;
            GlobalOptions.EmitDebugInfo = cbDebug.Checked;

            GlobalOptions.Save();
        }
コード例 #4
0
        private void mBtnCancel_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;

            GlobalOptions.Instance   = _storedOptions;
            UserCredentials.Instance = _storedCredentials;

            GlobalOptions.Save();
            UserCredentials.Save();

            Close();
        }
コード例 #5
0
        public static void AssociateAll()
        {
            if (GlobalOptions.IgnoreRegisterExtentions)
            {
                return;
            }
            List <bool> Unidentified = GetUnidentifiedAssoc();

            if (Unidentified.Contains(true))
            {
                List <string> ErrorList = new List <string>();
                if (Unidentified[(int)FileFormats.PCV])
                {
                    ErrorList.Add(".PCV (" + TB.L.Phrase["Core.UnSetted.MainVectorFiles"] + ")");
                }
                if (Unidentified[(int)FileFormats.PCGRAPH])
                {
                    ErrorList.Add(".PCGRAPH (" + TB.L.Phrase["Core.UnSetted.MainVectorFiles"] + ")");
                }
                if (Unidentified[(int)FileFormats.PCVDOC])
                {
                    ErrorList.Add(".VDOC (" + TB.L.Phrase["Core.UnSetted.VectorDocument"] + ")");
                }
                if (Unidentified[(int)FileFormats.PRRES])
                {
                    ErrorList.Add(".PRRES (" + TB.L.Phrase["Core.UnSetted.OldVectorFiles"] + ")");
                }
                if (Unidentified[(int)FileFormats.PCMACROS])
                {
                    ErrorList.Add(".PCMACROS (" + TB.L.Phrase["Core.UnSetted.Macros"] + ")");
                }
                if (Unidentified[(int)FileFormats.PCMPACK])
                {
                    ErrorList.Add(".PCMPACK (" + TB.L.Phrase["Core.UnSetted.MacroPacks"] + ")");
                }
                var a = MessageBox.Show(string.Format(TB.L.Phrase["Core.SetAssociation"], string.Join("; ", ErrorList)), TB.L.Phrase["Core.Word.Association"], MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
                if (a == DialogResult.Cancel)
                {
                    GlobalOptions.IgnoreRegisterExtentions = true; GlobalOptions.Save(); return;
                }
                else if (a == DialogResult.No)
                {
                    return;
                }
            }
            else
            {
                return;
            }
            if (!CanWriteRegistry)
            {
                AllertAboutAdmin();
                return;
            }
            if (Unidentified[(int)FileFormats.PCGRAPH])
            {
                RegPCGRAPH();
            }
            if (Unidentified[(int)FileFormats.PCV])
            {
                RegPCV();
            }
            if (Unidentified[(int)FileFormats.PCVDOC])
            {
                RegPCVDOC();
            }
            if (Unidentified[(int)FileFormats.PRRES])
            {
                RegPRRES();
            }
            if (Unidentified[(int)FileFormats.PCMACROS])
            {
                RegPCMACROS();
            }
            if (Unidentified[(int)FileFormats.PCMPACK])
            {
                RegPCMPACK();
            }
            BrendanGrant.FileAssociation.ShellNotification.NotifyOfChange();
        }