예제 #1
0
        private void loadIcons()
        {
            Uri    uri         = null;
            string installPath = AsmDudeToolsStatic.getInstallPath();

            try {
                uri = new Uri(installPath + "Resources/images/icon-R-blue.png");
                this._icons[TokenType.Register] = AsmDudeToolsStatic.bitmapFromUri(uri);
            } catch (FileNotFoundException) {
                //MessageBox.Show("ERROR: AsmCompletionSource: could not find file \"" + uri.AbsolutePath + "\".");
            }
            try {
                uri = new Uri(installPath + "Resources/images/icon-M.png");
                this._icons[TokenType.Mnemonic] = AsmDudeToolsStatic.bitmapFromUri(uri);
                this._icons[TokenType.Jump]     = this._icons[TokenType.Mnemonic];
            } catch (FileNotFoundException) {
                //MessageBox.Show("ERROR: AsmCompletionSource: could not find file \"" + uri.AbsolutePath + "\".");
            }
            try {
                uri = new Uri(installPath + "Resources/images/icon-question.png");
                this._icons[TokenType.Misc]      = AsmDudeToolsStatic.bitmapFromUri(uri);
                this._icons[TokenType.Directive] = this._icons[TokenType.Misc];
            } catch (FileNotFoundException) {
                //MessageBox.Show("ERROR: AsmCompletionSource: could not find file \"" + uri.AbsolutePath + "\".");
            }
            try {
                uri = new Uri(installPath + "Resources/images/icon-L.png");
                this._icons[TokenType.Label] = AsmDudeToolsStatic.bitmapFromUri(uri);
            } catch (FileNotFoundException) {
                //MessageBox.Show("ERROR: AsmCompletionSource: could not find file \"" + uri.AbsolutePath + "\".");
            }
        }