private void toolStripMenuItemEditMeta_Click(object sender, EventArgs e) { string PkgName = listViewPckg.SelectedItems[0].Text; XmlEditor EdFrm = new MonoOSC.XmlEditor(); string TmpFs = Path.GetTempFileName(); File.Delete(TmpFs); TmpFs = TmpFs.Replace(".tmp", ".xml"); string XmlTemplate = SourceProjectPackageMeta.GetSourceProjectPackageMeta(PkgName).ToString(); File.WriteAllText(TmpFs, XmlTemplate); EdFrm.XmlFs = TmpFs; EdFrm.ShowDialog(); if (MessageBox.Show("Update informations on the server ?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { try { MessageBox.Show(PutSourceProjectPkgMeta.PutProjectPkgMeta(PkgName, TmpFs).ToString(), "Result Info", MessageBoxButtons.OK, MessageBoxIcon.Information); File.Delete(TmpFs); } catch (Exception Ex) { if (!VarGlobal.LessVerbose) { Console.WriteLine(Ex.Message + Environment.NewLine + Ex.StackTrace); } } finally { File.Delete(TmpFs); } } }
private void BtnEditMetaPkg_Click(object sender, EventArgs e) { XmlEditor EdFrm = new MonoOSC.XmlEditor(); EdFrm.XmlFs = MetaPkgXmlFs; EdFrm.ShowDialog(); if (MessageBox.Show("Update informations on the server ?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { try { MessageBox.Show(PutSourceProjectPkgMeta.PutProjectPkgMeta(Package, MetaPkgXmlFs).ToString(), "Result Info", MessageBoxButtons.OK, MessageBoxIcon.Information); if (backgroundWorkerPkgFlags.IsBusy == false) { backgroundWorkerPkgFlags.RunWorkerAsync(); } } catch (Exception Ex) { if (!VarGlobal.LessVerbose) { Console.WriteLine(Ex.Message + Environment.NewLine + Ex.StackTrace); } } } }
private void editPrjMetaToolStripMenuItem_Click(object sender, EventArgs e) { XmlEditor EdFrm = new MonoOSC.XmlEditor(); /*string TmpFs = Path.GetTempFileName(); * File.Delete(TmpFs); * TmpFs = TmpFs.Replace(".tmp", ".xml"); * string XmlTemplate = GetSourceProjectMeta.GetProjectMeta().ToString(); * File.WriteAllText(TmpFs, XmlTemplate); * EdFrm.XmlFs = TmpFs;*/ EdFrm.XmlFs = VarGlobale.MetaPrjXmlFs; EdFrm.ShowDialog(); if (MessageBox.Show("Update informations on the server ?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { try { //MessageBox.Show(PutSourceProjectMeta.PutProjectMeta(VarGlobale.MetaPrjXmlFs).ToString(), "Result Info", MessageBoxButtons.OK, MessageBoxIcon.Information); //File.Delete(TmpFs); WritePrjMeta(); } catch (Exception Ex) { if (!VarGlobal.LessVerbose) { Console.WriteLine(Ex.Message + Environment.NewLine + Ex.StackTrace); } } finally { //File.Delete(TmpFs); } } }