Esempio n. 1
0
        static void OnTreeView_MouseRightButtonUp(object sender, MouseButtonEventArgs e)
        {
            TreeViewItem i = sender as TreeViewItem;

            if (i != null)
            {
                var pf = i.Tag as ProjectFile;
                if (pf != null)
                {
                    var w = new CompileWindow();
                    w.SetText(pf.Filename);
                    w.ShowDialog();
                }
            }
        }
Esempio n. 2
0
        public static void ShowException(Exception ex, Controller controller)
        {
            if (ex is SexyDotNet.Host.CompileError)
            {
                var ce         = ex as SexyDotNet.Host.CompileError;
                var compileBox = new CompileWindow();
                compileBox.SetSource(ce.SourceFile);
                compileBox.SetText(ex.Message);
                compileBox.SetSourceLocation(ce.Start, ce.End);
                compileBox.ShowDialog();

                if (controller != null)
                {
                    controller.SetEmphasis(ce);
                }
            }
            else
            {
                var errBox = new ExceptionWindow();
                errBox.SetException(ex);
                errBox.ShowDialog();
            }
        }