Example #1
0
        public SnippetManager()
        {
            InitializeComponent();

            // Try to get mutex. This is because we want to prevent several instances of the Snippetmanager
            // to be open simultaneously, because the user might loose data by applying changes in both.
            myMutex = new System.Threading.Mutex(false, "SnippetManagerMutex");
            if (!myMutex.WaitOne(50))
            {
                MessageBox.Show("Cannot get a unique lock. \r\nPlease close other instances of the Snippetsmanager.\r\n(In order to avoid data corruption, only one Snippetmanager may be open at a time.)",
                                "Cannot get lock", MessageBoxButton.OK, MessageBoxImage.Warning);
                Close();
                return;
            }
            else
            {
                isSuccessfullyLoaded = true;
            }

            fact = TikzToBMPFactory.Instance;
            fact.BitmapGenerated += fact_BitmapGenerated;

            //string appPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().CodeBase);
            //xmldp.Source = new Uri(appPath + @"\Snippets.xml");
        }
Example #2
0
        public void TikzToBMPFactoryConstructorTest()
        {
            TikzToBMPFactory target = new TikzToBMPFactory();

            Assert.Inconclusive("TODO: Implement code to verify target");
        }