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(); }
private void mBtnOK_Click(object sender, EventArgs e) { DialogResult = DialogResult.OK; GlobalOptions.Save(); UserCredentials.Save(); SaveRepoList(); Close(); }
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(); }
private void mBtnCancel_Click(object sender, EventArgs e) { DialogResult = DialogResult.Cancel; GlobalOptions.Instance = _storedOptions; UserCredentials.Instance = _storedCredentials; GlobalOptions.Save(); UserCredentials.Save(); Close(); }
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(); }