Пример #1
0
 public void marker_Click(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         Form form2 = new QuestionForm(this, sender);
         Console.WriteLine("test");
         form2.Show();
     }
 }
Пример #2
0
        private static MessageContainer ValidateStyleSheet(StyleSheet styleSheet, QuestionForm astForm)
        {
            var messages = new MessageContainer();

            messages.Add(QLSReferenceChecker.CheckQuestionReferences(styleSheet, astForm));
            if (AnyErrors(messages))
            {
                return(messages);
            }
            messages.Add(QLSTypeChecker.CheckTypes(styleSheet, astForm));
            return(messages);
        }
Пример #3
0
        public Presenter()
        {
            var listener = QLListener.ParseString(System.IO.File.ReadAllText("test.txt"));

            if (listener.FormHasErrors)
            {
                ReportFormErrors(listener.Errors);
            }
            else
            {
                _form = listener.Form;
                UpdateControls();
            }
        }
Пример #4
0
        public void panel1_MouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                Form form2 = new QuestionForm(this, sender);
                //textBox1.Text = string.Format("X: {0} , Y: {1}", Cursor.Position.X, Cursor.Position.Y);
                Point p = new Point(e.Location.X, e.Location.Y);

                //textBox1.Text = p.ToString();
                // PositionSystem.Instance().X = p.X;
                // PositionSystem.Instance().Y = p.Y;
                PointLatLng pp = gmap.FromLocalToLatLng(e.Location.X, e.Location.Y);

                // Point test = getPositionOnScreen(stuff.Longitude, stuff.Latitude);

                // Console.WriteLine("lat:" + stuff.Latitude.ToString() + "lng" +stuff.Longitude.ToString());
                //Console.WriteLine(stuff.ToString());
                ((QuestionForm)form2).AddCoords(pp);
                form2.Show();
            }
        }
Пример #5
0
        public static MessageContainer ValidateForm(QuestionForm astForm)
        {
            var messages = new MessageContainer();

            messages.Add(QLDuplicateChecker.CheckDuplicates(astForm));
            if (AnyErrors(messages))
            {
                return(messages);
            }
            messages.Add(QLScopeChecker.CheckReferenceScopes(astForm));
            if (AnyErrors(messages))
            {
                return(messages);
            }
            messages.Add(QLCyclicDependencyChecker.CheckForCycles(astForm));
            if (AnyErrors(messages))
            {
                return(messages);
            }
            messages.Add(QLTypeChecker.CheckTypes(astForm));
            return(messages);
        }