I stepped through the FormMain() and when it was done it went back to
"Application.Run(new FormMain());" and gave the "System.OutofMemory Exception"
Thanks .
public FormMain()
{
InitializeComponent();
// Create an instance of a ListView column sorter and assign it
// to the ListView control.
lvwColumnSorter = new ListViewColumnSorter();
this.NodeDetail.ListViewItemSorter = lvwColumnSorter;
//XslTransform xslt = new XslTransform();
//xslt.Load(someStylesheet);
//util = DirectoryUtil.instance;
//util.OnBind += new
DirectoryUtilEventHandler(RefreshDirectoryHandler) ;
utilContexts = DirectoryUtil.instance;
utilContexts.OnBind += new
DirectoryUtilEventHandler(RefreshDirectoryHandler) ;
//FormMain.ActiveForm.Text = "PowerPassword [" +
util.rootContainer.Name + "]";
//XmlTranslationReader msgRader = new
XmlTranslationReader(@"C:\PROJECTS\PPGLOBAL\UnityM essages.xml");
//XmlTextReader msgReader = null;
string m1 = "test";
try
{
//unityMessages = new XPathDocument(@"C:\Program Files\Symark
Software\UnityAdminSetUp\UnityMessages.xml");
string applPath = Application.StartupPath;
unityMessages = new XPathDocument(applPath +
@"\UnityMessages.xml");
unityMsgNavigator = unityMessages.CreateNavigator();
string query =
@"xliff/trans-unit[@id=""m1""]/target[lang(""fr"")](/root/element)";
//XPathExpression queryM1 = unityMsgNavigator.Compile(query);
//m1 = (string)unityMsgNavigator.Evaluate(queryM1);
//XPathNodeIterator ni =
(XPathNodeIterator)unityMsgNavigator.Evaluate(quer yM1);
//int count = ni.Count;
//while (ni.MoveNext())
//{
// MessageBox.Show(ni.Current.ToString());
//}
//string query = @"/trans-unit[@id=""m1""]/target[lang(""fr"")]";
//@"/xliff/trans-unit[@id=""m1""]/target[lang(""fr"")]"
//m1 = (string)unityMsgNavigator.Evaluate(queryM1);
//Load the reader with the XML file.
//reader = new XmlTextReader("UnityMessages.xml");
//Read the m1 message
//reader.MoveToContent();
//m1 = reader.GetAttribute("m2.en-us");
//string query =
@"xliff/trans-unit[@id=""m1""]/target[@xml:lang=""fr""]";
//string query =
@"/error-messages[@xml:lang=""en""]/msg[@myId=""2""]/text";
//m1 = msgReader.GetTranslations("m1", "en-us");
//m1 = reader.GetAttribute("id");
}
catch (Exception e)
{
MessageBox.Show(e.ToString(), "Unity", MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
NodeDetail.LargeImageList = unityImageList;
NodeDetail.SmallImageList = unityImageList;
NodeDetail.StateImageList = unityImageList;
this.CreateUnityListView();
//Connect to the Global Directory
adRoot = new DirectoryEntry("GC://" +
rootDSE.Properties["defaultNamingContext"].Value.ToString());
curDomain =
rootDSE.Properties["defaultNamingContext"].Value.ToString();
serverName = rootDSE.Properties["dnsHostName"].Value.ToString();
DNSDomain = CUnityDS.GetDNSDomainName(curDomain);
this.Text = "Unity Admin Console - [" + DNSDomain + "]";
InitTree(curDomain);
}
--
Thanks.
"Vadym Stetsyak" wrote:
Hello, Pucca!
Without more code it is hard to tell where the error is.
Can you provide/describe the code in the FormMain constructor?
PI'm gettting this error at "Application.Run" in the code below. The
Perror
Pmessage also says "Out of Memory". How can I find out more about
Pwhat's
Pcausing this error? It just breaks there with no further
Pinformation.
P static void Main()
P {
P Application.EnableVisualStyles();
P Application.SetCompatibleTextRenderingDefault(fals e);
P Application.Run(new FormMain());
P }
P--
PThanks.
P--
PThanks.
--
With best regards, Vadym Stetsyak.
Blog: http://vadmyst.blogspot.com