Ejemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();
            Recogniser = new CodeRecognition(this);
            Recogniser.StartRecognition(false);
            //Recogniser.Identified += new EventHandler<IdentifiedArgs>(IdentifiedOK);

            textEditor.LostKeyboardFocus      += new KeyboardFocusChangedEventHandler(OnLostKeyboardFocus);
            textEditor.TextArea.Caret.Location = new ICSharpCode.AvalonEdit.Document.TextLocation(1, 1);
            this.Closing += new CancelEventHandler(OnExitEvent);
        }
Ejemplo n.º 2
0
        public MainWindow()
        {
            InitializeComponent();
            //Set window to the bottom right corner
            Left = SystemParameters.WorkArea.Width - Width - 10;
            Top  = SystemParameters.WorkArea.Height - Height - 10;

            rec = new CodeRecognition();
            rec.StartRecognition(false);
            rec.ExitEvent += new EventHandler(ExitApp);

#if Notify
            notifyIcon = new TrayIcon();
            notifyIcon.SettingClicked += new EventHandler(OpenSettingsMenu);
            notifyIcon.ExitCommand    += new EventHandler(ExitApp);
#endif
            this.Closing += new CancelEventHandler(ClosingWindow);

            XmlDocument doc = new XmlDocument();
#if debug
            doc.Load(@"D:\MY PROJECTS\8th sem project\Voice-Coding-EditChanges\res\MainResource.xml");
#else
            doc.Load(@"Resources\MainResource.xml");
#endif

            XmlNodeList nodes = doc.GetElementsByTagName("HeaderFiles");

            foreach (XmlNode node in nodes)
            {
                if (node.Attributes["type"].Value == "custom")
                {
                    IncluedPath.Text = node.Attributes["value"].Value;
                    break;
                }
            }

            IncluedPath.KeyUp += new KeyEventHandler(OnKeyUp);

            ReloadBtn.Click += new RoutedEventHandler(OnReloadClick);
        }