Esempio n. 1
0
 // This is the main entry point of the application.
 static void Main(string[] args)
 {
     // if you want to use a different Application Delegate class from "AppDelegate"
     // you can specify it here.
     GTXAMInfo.SetPlatform("IOS_Xamarin");
     UIApplication.Main(args, null, "AppDelegate");
 }
Esempio n. 2
0
        public MainWindow()
        {
            InitializeComponent();
            XmlDocument xmlDocument = new XmlDocument();

            xmlDocument.Load("d:\\projects\\freestudio\\FreeStudio\\FreeStudio\\source\\code.xml");
            GTXAMInfo.Codes.Add(xmlDocument);
            GTXAMInfo.SetPlatform("WPF_Xamarin");


            Xamarin.Forms.Forms.Init();
            LoadApplication(new GTXAM.App());
        }
Esempio n. 3
0
        public static void Main(string[] args)
        {
            XmlDocument xmlDocument = new XmlDocument();

            xmlDocument.LoadXml(@"<?xml version=""1.0"" encoding=""utf-8""?>
<code minversion=""1902"">
  <get value=""Page"" />
  <get value=""IO"" />
  <get value=""Math"" />
  <get value=""Control"" />
  <get value=""System"" />
  <get value=""String"" />
  <get value=""List"" />
  <deffun funname=""Main"" params=""args"" isref=""False"">
    <var_s varname=""page"" str=""var page = Page.Creat(&quot;page1&quot;);"" />
    <getres_s str=""var page = Page.Creat(&quot;page1&quot;);"">
      <arg value=""page"" con=""var"" />
      <arg con=""fun"">
        <fun>
          <arg value=""Page.Creat"" con=""var"" />
        </fun>
        <params>
          <arg value=""page1"" con=""str"" />
        </params>
      </arg>
    </getres_s>
    <var_s varname=""bubble"" str=""var bubble = Control.Bubble.Creat(&quot;b&quot;);"" />
    <getres_s str=""var bubble = Control.Bubble.Creat(&quot;b&quot;);"">
      <arg value=""bubble"" con=""var"" />
      <arg con=""fun"">
        <fun>
          <arg value=""Control.Bubble.Creat"" con=""var"" />
        </fun>
        <params>
          <arg value=""b"" con=""str"" />
        </params>
      </arg>
    </getres_s>
    <usefun_s str=""bubble(&quot;text&quot;,&quot;clickme!&quot;);"">
      <arg con=""fun"">
        <fun>
          <arg value=""bubble"" con=""var"" />
        </fun>
        <params>
          <arg value=""text"" con=""str"" />
          <arg value=""clickme!"" con=""str"" />
        </params>
      </arg>
    </usefun_s>
    <var_s varname=""gd"" str=""var gd = Control.GridFlat.Creat(&quot;gf&quot;);"" />
    <getres_s str=""var gd = Control.GridFlat.Creat(&quot;gf&quot;);"">
      <arg value=""gd"" con=""var"" />
      <arg con=""fun"">
        <fun>
          <arg value=""Control.GridFlat.Creat"" con=""var"" />
        </fun>
        <params>
          <arg value=""gf"" con=""str"" />
        </params>
      </arg>
    </getres_s>
    <usefun_s str=""bubble(&quot;clickevent&quot;,Click);"">
      <arg con=""fun"">
        <fun>
          <arg value=""bubble"" con=""var"" />
        </fun>
        <params>
          <arg value=""clickevent"" con=""str"" />
          <arg value=""Click"" con=""var"" />
        </params>
      </arg>
    </usefun_s>
    <usefun_s str=""gd()(bubble,0,0);"">
      <arg con=""fun"">
        <fun>
          <arg con=""fun"">
            <fun>
              <arg value=""gd"" con=""var"" />
            </fun>
            <params />
          </arg>
        </fun>
        <params>
          <arg value=""bubble"" con=""var"" />
          <arg value=""0"" con=""num"" />
          <arg value=""0"" con=""num"" />
        </params>
      </arg>
    </usefun_s>
    <usefun_s str=""page()(gd);"">
      <arg con=""fun"">
        <fun>
          <arg con=""fun"">
            <fun>
              <arg value=""page"" con=""var"" />
            </fun>
            <params />
          </arg>
        </fun>
        <params>
          <arg value=""gd"" con=""var"" />
        </params>
      </arg>
    </usefun_s>
    <usefun_s str=""Page.Load(page);"">
      <arg con=""fun"">
        <fun>
          <arg value=""Page.Load"" con=""var"" />
        </fun>
        <params>
          <arg value=""page"" con=""var"" />
        </params>
      </arg>
    </usefun_s>
  </deffun>
  <deffun funname=""Click"" params=""page,e"" isref=""False"">
    <usefun_s str=""IO.Input();"">
      <arg con=""fun"">
        <fun>
          <arg value=""IO.Input"" con=""var"" />
        </fun>
        <params />
      </arg>
    </usefun_s>
  </deffun>
</code>");
            GTXAMInfo.Codes.Add(xmlDocument);
            GTXAMInfo.SetPlatform("WPF_Xamarin");

            Gtk.Application.Init();
            Forms.Init();

            var app    = new App();
            var window = new FormsWindow();

            window.LoadApplication(app);
            window.SetApplicationTitle("Game of Life");

            window.Show();

            Gtk.Application.Run();
        }
Esempio n. 4
0
        public override void DidFinishLaunching(NSNotification notification)
        {
            XmlDocument xmlDocument = new XmlDocument();

            xmlDocument.LoadXml(@"<code minversion=""2007"">
  <lib name=""FreeStudio"">
    <get value=""IO"" />
    <get value=""Control"" />
    <get value=""Page"" />
    <get value=""List"" />
    <get value=""File"" />
    <get value=""String"" />
    <deffun funname=""Main"" params=""args"" isref=""False"">
      <usefun_s str=""WriteLine(&quot;hello,world&quot;);"">
        <arg con=""fun"">
          <fun>
            <arg value=""WriteLine"" con=""var"" />
          </fun>
          <params>
            <arg value=""hello,world"" con=""str"" />
          </params>
        </arg>
      </usefun_s>
      <var_s varname=""mp"" str=""var mp = MainPage(&quot;FreeStudio&quot;);"" />
      <getres_s str=""var mp = MainPage(&quot;FreeStudio&quot;);"">
        <arg value=""mp"" con=""var"" />
        <arg con=""fun"">
          <fun>
            <arg value=""MainPage"" con=""var"" />
          </fun>
          <params>
            <arg value=""FreeStudio"" con=""str"" />
          </params>
        </arg>
      </getres_s>
      <usefun_s str=""PageLoad(mp);"">
        <arg con=""fun"">
          <fun>
            <arg value=""PageLoad"" con=""var"" />
          </fun>
          <params>
            <arg value=""mp"" con=""var"" />
          </params>
        </arg>
      </usefun_s>
    </deffun>
    <cls name=""MainPage"" parent=""Page"">
      <member value=""gf1"" />
      <memfun funname=""init"" params=""title"" isref=""False"" isstatic=""False"">
        <var_s varname=""tip_title"" str=""var tip_title = Tip(&quot;title&quot;);"" />
        <getres_s str=""var tip_title = Tip(&quot;title&quot;);"">
          <arg value=""tip_title"" con=""var"" />
          <arg con=""fun"">
            <fun>
              <arg value=""Tip"" con=""var"" />
            </fun>
            <params>
              <arg value=""title"" con=""str"" />
            </params>
          </arg>
        </getres_s>
        <getres_s str=""tip_title:Text = &quot;FreeStudio&quot;;"">
          <arg value=""Text"" con=""mem"">
            <arg value=""tip_title"" con=""var"" />
          </arg>
          <arg value=""FreeStudio"" con=""str"" />
        </getres_s>
        <getres_s str=""tip_title:FontSize = 60;"">
          <arg value=""FontSize"" con=""mem"">
            <arg value=""tip_title"" con=""var"" />
          </arg>
          <arg value=""60"" con=""num"" />
        </getres_s>
        <getres_s str=""tip_title:Horizontal = &quot;center&quot;;"">
          <arg value=""Horizontal"" con=""mem"">
            <arg value=""tip_title"" con=""var"" />
          </arg>
          <arg value=""center"" con=""str"" />
        </getres_s>
        <getres_s str=""tip_title:Vertical = &quot;center&quot;;"">
          <arg value=""Vertical"" con=""mem"">
            <arg value=""tip_title"" con=""var"" />
          </arg>
          <arg value=""center"" con=""str"" />
        </getres_s>
        <getres_s str=""tip_title:Margin = List(0,0,0,450);"">
          <arg value=""Margin"" con=""mem"">
            <arg value=""tip_title"" con=""var"" />
          </arg>
          <arg con=""fun"">
            <fun>
              <arg value=""List"" con=""var"" />
            </fun>
            <params>
              <arg value=""0"" con=""num"" />
              <arg value=""0"" con=""num"" />
              <arg value=""0"" con=""num"" />
              <arg value=""450"" con=""num"" />
            </params>
          </arg>
        </getres_s>
        <getres_s str=""tip_title:Foreground = &quot;white&quot;;"">
          <arg value=""Foreground"" con=""mem"">
            <arg value=""tip_title"" con=""var"" />
          </arg>
          <arg value=""white"" con=""str"" />
        </getres_s>
        <var_s varname=""bu_1"" str=""var bu_1 = Bubble(&quot;bu_1&quot;);"" />
        <getres_s str=""var bu_1 = Bubble(&quot;bu_1&quot;);"">
          <arg value=""bu_1"" con=""var"" />
          <arg con=""fun"">
            <fun>
              <arg value=""Bubble"" con=""var"" />
            </fun>
            <params>
              <arg value=""bu_1"" con=""str"" />
            </params>
          </arg>
        </getres_s>
        <getres_s str=""bu_1:Text = &quot;创建一个项目&quot;;"">
          <arg value=""Text"" con=""mem"">
            <arg value=""bu_1"" con=""var"" />
          </arg>
          <arg value=""创建一个项目"" con=""str"" />
        </getres_s>
        <getres_s str=""bu_1:FontSize = 30;"">
          <arg value=""FontSize"" con=""mem"">
            <arg value=""bu_1"" con=""var"" />
          </arg>
          <arg value=""30"" con=""num"" />
        </getres_s>
        <getres_s str=""bu_1:Height = 60;"">
          <arg value=""Height"" con=""mem"">
            <arg value=""bu_1"" con=""var"" />
          </arg>
          <arg value=""60"" con=""num"" />
        </getres_s>
        <getres_s str=""bu_1:Width = 220;"">
          <arg value=""Width"" con=""mem"">
            <arg value=""bu_1"" con=""var"" />
          </arg>
          <arg value=""220"" con=""num"" />
        </getres_s>
        <getres_s str=""bu_1:Margin = List(0,0,0,230);"">
          <arg value=""Margin"" con=""mem"">
            <arg value=""bu_1"" con=""var"" />
          </arg>
          <arg con=""fun"">
            <fun>
              <arg value=""List"" con=""var"" />
            </fun>
            <params>
              <arg value=""0"" con=""num"" />
              <arg value=""0"" con=""num"" />
              <arg value=""0"" con=""num"" />
              <arg value=""230"" con=""num"" />
            </params>
          </arg>
        </getres_s>
        <getres_s str=""bu_1:Foreground = &quot;white&quot;;"">
          <arg value=""Foreground"" con=""mem"">
            <arg value=""bu_1"" con=""var"" />
          </arg>
          <arg value=""white"" con=""str"" />
        </getres_s>
        <var_s varname=""bu_2"" str=""var bu_2 = Bubble(&quot;bu_2&quot;);"" />
        <getres_s str=""var bu_2 = Bubble(&quot;bu_2&quot;);"">
          <arg value=""bu_2"" con=""var"" />
          <arg con=""fun"">
            <fun>
              <arg value=""Bubble"" con=""var"" />
            </fun>
            <params>
              <arg value=""bu_2"" con=""str"" />
            </params>
          </arg>
        </getres_s>
        <getres_s str=""bu_2:Text = &quot;打开一个项目&quot;;"">
          <arg value=""Text"" con=""mem"">
            <arg value=""bu_2"" con=""var"" />
          </arg>
          <arg value=""打开一个项目"" con=""str"" />
        </getres_s>
        <getres_s str=""bu_2:FontSize = 30;"">
          <arg value=""FontSize"" con=""mem"">
            <arg value=""bu_2"" con=""var"" />
          </arg>
          <arg value=""30"" con=""num"" />
        </getres_s>
        <getres_s str=""bu_2:Height = 60;"">
          <arg value=""Height"" con=""mem"">
            <arg value=""bu_2"" con=""var"" />
          </arg>
          <arg value=""60"" con=""num"" />
        </getres_s>
        <getres_s str=""bu_2:Width = 220;"">
          <arg value=""Width"" con=""mem"">
            <arg value=""bu_2"" con=""var"" />
          </arg>
          <arg value=""220"" con=""num"" />
        </getres_s>
        <getres_s str=""bu_2:Margin = List(0,0,0,110);"">
          <arg value=""Margin"" con=""mem"">
            <arg value=""bu_2"" con=""var"" />
          </arg>
          <arg con=""fun"">
            <fun>
              <arg value=""List"" con=""var"" />
            </fun>
            <params>
              <arg value=""0"" con=""num"" />
              <arg value=""0"" con=""num"" />
              <arg value=""0"" con=""num"" />
              <arg value=""110"" con=""num"" />
            </params>
          </arg>
        </getres_s>
        <getres_s str=""bu_2:Foreground = &quot;white&quot;;"">
          <arg value=""Foreground"" con=""mem"">
            <arg value=""bu_2"" con=""var"" />
          </arg>
          <arg value=""white"" con=""str"" />
        </getres_s>
        <var_s varname=""bu_3"" str=""var bu_3 = Bubble(&quot;bu_3&quot;);"" />
        <getres_s str=""var bu_3 = Bubble(&quot;bu_3&quot;);"">
          <arg value=""bu_3"" con=""var"" />
          <arg con=""fun"">
            <fun>
              <arg value=""Bubble"" con=""var"" />
            </fun>
            <params>
              <arg value=""bu_3"" con=""str"" />
            </params>
          </arg>
        </getres_s>
        <getres_s str=""bu_3:Text = &quot;帮助&quot;;"">
          <arg value=""Text"" con=""mem"">
            <arg value=""bu_3"" con=""var"" />
          </arg>
          <arg value=""帮助"" con=""str"" />
        </getres_s>
        <getres_s str=""bu_3:FontSize = 30;"">
          <arg value=""FontSize"" con=""mem"">
            <arg value=""bu_3"" con=""var"" />
          </arg>
          <arg value=""30"" con=""num"" />
        </getres_s>
        <getres_s str=""bu_3:Height = 60;"">
          <arg value=""Height"" con=""mem"">
            <arg value=""bu_3"" con=""var"" />
          </arg>
          <arg value=""60"" con=""num"" />
        </getres_s>
        <getres_s str=""bu_3:Width = 220;"">
          <arg value=""Width"" con=""mem"">
            <arg value=""bu_3"" con=""var"" />
          </arg>
          <arg value=""220"" con=""num"" />
        </getres_s>
        <getres_s str=""bu_3:Margin = List(0,10,0,0);"">
          <arg value=""Margin"" con=""mem"">
            <arg value=""bu_3"" con=""var"" />
          </arg>
          <arg con=""fun"">
            <fun>
              <arg value=""List"" con=""var"" />
            </fun>
            <params>
              <arg value=""0"" con=""num"" />
              <arg value=""10"" con=""num"" />
              <arg value=""0"" con=""num"" />
              <arg value=""0"" con=""num"" />
            </params>
          </arg>
        </getres_s>
        <getres_s str=""bu_3:Foreground = &quot;white&quot;;"">
          <arg value=""Foreground"" con=""mem"">
            <arg value=""bu_3"" con=""var"" />
          </arg>
          <arg value=""white"" con=""str"" />
        </getres_s>
        <var_s varname=""bu_4"" str=""var bu_4 = Bubble(&quot;bu_4&quot;);"" />
        <getres_s str=""var bu_4 = Bubble(&quot;bu_4&quot;);"">
          <arg value=""bu_4"" con=""var"" />
          <arg con=""fun"">
            <fun>
              <arg value=""Bubble"" con=""var"" />
            </fun>
            <params>
              <arg value=""bu_4"" con=""str"" />
            </params>
          </arg>
        </getres_s>
        <getres_s str=""bu_4:Text = &quot;设置&quot;;"">
          <arg value=""Text"" con=""mem"">
            <arg value=""bu_4"" con=""var"" />
          </arg>
          <arg value=""设置"" con=""str"" />
        </getres_s>
        <getres_s str=""bu_4:FontSize = 30;"">
          <arg value=""FontSize"" con=""mem"">
            <arg value=""bu_4"" con=""var"" />
          </arg>
          <arg value=""30"" con=""num"" />
        </getres_s>
        <getres_s str=""bu_4:Height = 60;"">
          <arg value=""Height"" con=""mem"">
            <arg value=""bu_4"" con=""var"" />
          </arg>
          <arg value=""60"" con=""num"" />
        </getres_s>
        <getres_s str=""bu_4:Width = 220;"">
          <arg value=""Width"" con=""mem"">
            <arg value=""bu_4"" con=""var"" />
          </arg>
          <arg value=""220"" con=""num"" />
        </getres_s>
        <getres_s str=""bu_4:Margin = List(0,130,0,0);"">
          <arg value=""Margin"" con=""mem"">
            <arg value=""bu_4"" con=""var"" />
          </arg>
          <arg con=""fun"">
            <fun>
              <arg value=""List"" con=""var"" />
            </fun>
            <params>
              <arg value=""0"" con=""num"" />
              <arg value=""130"" con=""num"" />
              <arg value=""0"" con=""num"" />
              <arg value=""0"" con=""num"" />
            </params>
          </arg>
        </getres_s>
        <getres_s str=""bu_4:Foreground = &quot;white&quot;;"">
          <arg value=""Foreground"" con=""mem"">
            <arg value=""bu_4"" con=""var"" />
          </arg>
          <arg value=""white"" con=""str"" />
        </getres_s>
        <getres_s str=""this:gf1 = GridFlat(&quot;gf1&quot;);"">
          <arg value=""gf1"" con=""mem"">
            <arg value=""this"" con=""var"" />
          </arg>
          <arg con=""fun"">
            <fun>
              <arg value=""GridFlat"" con=""var"" />
            </fun>
            <params>
              <arg value=""gf1"" con=""str"" />
            </params>
          </arg>
        </getres_s>
        <getres_s str=""this:gf1:Background = &quot;#323232&quot;;"">
          <arg value=""Background"" con=""mem"">
            <arg value=""gf1"" con=""mem"">
              <arg value=""this"" con=""var"" />
            </arg>
          </arg>
          <arg value=""#323232"" con=""str"" />
        </getres_s>
        <usefun_s str=""this:gf1:Add(tip_title,0,0);"">
          <arg con=""fun"">
            <fun>
              <arg value=""Add"" con=""mem"">
                <arg value=""gf1"" con=""mem"">
                  <arg value=""this"" con=""var"" />
                </arg>
              </arg>
            </fun>
            <params>
              <arg value=""tip_title"" con=""var"" />
              <arg value=""0"" con=""num"" />
              <arg value=""0"" con=""num"" />
            </params>
          </arg>
        </usefun_s>
        <usefun_s str=""this:gf1:Add(bu_1,0,0);"">
          <arg con=""fun"">
            <fun>
              <arg value=""Add"" con=""mem"">
                <arg value=""gf1"" con=""mem"">
                  <arg value=""this"" con=""var"" />
                </arg>
              </arg>
            </fun>
            <params>
              <arg value=""bu_1"" con=""var"" />
              <arg value=""0"" con=""num"" />
              <arg value=""0"" con=""num"" />
            </params>
          </arg>
        </usefun_s>
        <usefun_s str=""this:gf1:Add(bu_2,0,0);"">
          <arg con=""fun"">
            <fun>
              <arg value=""Add"" con=""mem"">
                <arg value=""gf1"" con=""mem"">
                  <arg value=""this"" con=""var"" />
                </arg>
              </arg>
            </fun>
            <params>
              <arg value=""bu_2"" con=""var"" />
              <arg value=""0"" con=""num"" />
              <arg value=""0"" con=""num"" />
            </params>
          </arg>
        </usefun_s>
        <usefun_s str=""this:gf1:Add(bu_3,0,0);"">
          <arg con=""fun"">
            <fun>
              <arg value=""Add"" con=""mem"">
                <arg value=""gf1"" con=""mem"">
                  <arg value=""this"" con=""var"" />
                </arg>
              </arg>
            </fun>
            <params>
              <arg value=""bu_3"" con=""var"" />
              <arg value=""0"" con=""num"" />
              <arg value=""0"" con=""num"" />
            </params>
          </arg>
        </usefun_s>
        <usefun_s str=""this:gf1:Add(bu_4,0,0);"">
          <arg con=""fun"">
            <fun>
              <arg value=""Add"" con=""mem"">
                <arg value=""gf1"" con=""mem"">
                  <arg value=""this"" con=""var"" />
                </arg>
              </arg>
            </fun>
            <params>
              <arg value=""bu_4"" con=""var"" />
              <arg value=""0"" con=""num"" />
              <arg value=""0"" con=""num"" />
            </params>
          </arg>
        </usefun_s>
        <usefun_s str=""this:SetContent(this:gf1);"">
          <arg con=""fun"">
            <fun>
              <arg value=""SetContent"" con=""mem"">
                <arg value=""this"" con=""var"" />
              </arg>
            </fun>
            <params>
              <arg value=""gf1"" con=""mem"">
                <arg value=""this"" con=""var"" />
              </arg>
            </params>
          </arg>
        </usefun_s>
      </memfun>
    </cls>
  </lib>
</code>");
            GTXAMInfo.Codes.Add(xmlDocument);
            GTXAMInfo.SetPlatform("Mac_Xamarin");

            Forms.Init();
            LoadApplication(new GTXAM.App());
            base.DidFinishLaunching(notification);
        }
Esempio n. 5
0
        public MainPage()
        {
            this.InitializeComponent();
            XmlDocument xmlDocument = new XmlDocument();

            xmlDocument.LoadXml(@"<code minversion=""2007"">
  <lib name=""App1"">
    <get value=""IO"" />
    <get value=""Control"" />
    <get value=""Page"" />
    <get value=""List"" />
    <get value=""File"" />
    <var value=""web"" />
    <get value=""Xml"" />
    <get value=""System"" />
    <get value=""Thread"" />
    <deffun funname=""Main"" params=""args"" isref=""False"">
      <var_s varname=""s"" str=""var s = PickFile(&quot;文本文档|*.txt&quot;);"" />
      <getres_s str=""var s = PickFile(&quot;文本文档|*.txt&quot;);"">
        <arg value=""s"" con=""var"" />
        <arg con=""fun"">
          <fun>
            <arg value=""PickFile"" con=""var"" />
          </fun>
          <params>
            <arg value=""文本文档|*.txt"" con=""str"" />
          </params>
        </arg>
      </getres_s>
      <usefun_s str=""WriteLine(s:ReadText());"">
        <arg con=""fun"">
          <fun>
            <arg value=""WriteLine"" con=""var"" />
          </fun>
          <params>
            <arg con=""fun"">
              <fun>
                <arg value=""ReadText"" con=""mem"">
                  <arg value=""s"" con=""var"" />
                </arg>
              </fun>
              <params />
            </arg>
          </params>
        </arg>
      </usefun_s>
    </deffun>
    <deffun funname=""Mainad"" params=""aargs"" isref=""False"">
      <var_s varname=""stackflat"" str=""var stackflat = StackFlat(&quot;sf&quot;);"" />
      <getres_s str=""var stackflat = StackFlat(&quot;sf&quot;);"">
        <arg value=""stackflat"" con=""var"" />
        <arg con=""fun"">
          <fun>
            <arg value=""StackFlat"" con=""var"" />
          </fun>
          <params>
            <arg value=""sf"" con=""str"" />
          </params>
        </arg>
      </getres_s>
      <var_s varname=""tip1"" str=""var tip1 = Tip(&quot;tip1&quot;);"" />
      <getres_s str=""var tip1 = Tip(&quot;tip1&quot;);"">
        <arg value=""tip1"" con=""var"" />
        <arg con=""fun"">
          <fun>
            <arg value=""Tip"" con=""var"" />
          </fun>
          <params>
            <arg value=""tip1"" con=""str"" />
          </params>
        </arg>
      </getres_s>
      <getres_s str=""tip1:Text = &quot;tip1&quot;;"">
        <arg value=""Text"" con=""mem"">
          <arg value=""tip1"" con=""var"" />
        </arg>
        <arg value=""tip1"" con=""str"" />
      </getres_s>
      <var_s varname=""tip2"" str=""var tip2 = Tip(&quot;tip2&quot;);"" />
      <getres_s str=""var tip2 = Tip(&quot;tip2&quot;);"">
        <arg value=""tip2"" con=""var"" />
        <arg con=""fun"">
          <fun>
            <arg value=""Tip"" con=""var"" />
          </fun>
          <params>
            <arg value=""tip2"" con=""str"" />
          </params>
        </arg>
      </getres_s>
      <getres_s str=""tip2:Text = &quot;tip2&quot;;"">
        <arg value=""Text"" con=""mem"">
          <arg value=""tip2"" con=""var"" />
        </arg>
        <arg value=""tip2"" con=""str"" />
      </getres_s>
      <usefun_s str=""stackflat:Add(tip1);"">
        <arg con=""fun"">
          <fun>
            <arg value=""Add"" con=""mem"">
              <arg value=""stackflat"" con=""var"" />
            </arg>
          </fun>
          <params>
            <arg value=""tip1"" con=""var"" />
          </params>
        </arg>
      </usefun_s>
      <usefun_s str=""stackflat:Add(tip2);"">
        <arg con=""fun"">
          <fun>
            <arg value=""Add"" con=""mem"">
              <arg value=""stackflat"" con=""var"" />
            </arg>
          </fun>
          <params>
            <arg value=""tip2"" con=""var"" />
          </params>
        </arg>
      </usefun_s>
      <getres_s str=""stackflat:Orientation = &quot;horizontal&quot;;"">
        <arg value=""Orientation"" con=""mem"">
          <arg value=""stackflat"" con=""var"" />
        </arg>
        <arg value=""horizontal"" con=""str"" />
      </getres_s>
      <var_s varname=""page"" str=""var page = Page(&quot;title&quot;);"" />
      <getres_s str=""var page = Page(&quot;title&quot;);"">
        <arg value=""page"" con=""var"" />
        <arg con=""fun"">
          <fun>
            <arg value=""Page"" con=""var"" />
          </fun>
          <params>
            <arg value=""title"" con=""str"" />
          </params>
        </arg>
      </getres_s>
      <usefun_s str=""page:SetContent(stackflat);"">
        <arg con=""fun"">
          <fun>
            <arg value=""SetContent"" con=""mem"">
              <arg value=""page"" con=""var"" />
            </arg>
          </fun>
          <params>
            <arg value=""stackflat"" con=""var"" />
          </params>
        </arg>
      </usefun_s>
      <usefun_s str=""PageLoad(page);"">
        <arg con=""fun"">
          <fun>
            <arg value=""PageLoad"" con=""var"" />
          </fun>
          <params>
            <arg value=""page"" con=""var"" />
          </params>
        </arg>
      </usefun_s>
      <usefun_s str=""WriteLine(stackflat);"">
        <arg con=""fun"">
          <fun>
            <arg value=""WriteLine"" con=""var"" />
          </fun>
          <params>
            <arg value=""stackflat"" con=""var"" />
          </params>
        </arg>
      </usefun_s>
    </deffun>
    <deffun funname=""Mainss"" params=""args"" isref=""False"">
      <var_s varname=""file"" str=""var file = FileOpen(&quot;X:\\projects\\freestudio\\App1\\App1.gca&quot;,&quot;open&quot;);"" />
      <getres_s str=""var file = FileOpen(&quot;X:\\projects\\freestudio\\App1\\App1.gca&quot;,&quot;open&quot;);"">
        <arg value=""file"" con=""var"" />
        <arg con=""fun"">
          <fun>
            <arg value=""FileOpen"" con=""var"" />
          </fun>
          <params>
            <arg value=""X:\projects\freestudio\App1\App1.gca"" con=""str"" />
            <arg value=""open"" con=""str"" />
          </params>
        </arg>
      </getres_s>
      <var_s varname=""xml"" str=""var xml = XmlDocument();"" />
      <getres_s str=""var xml = XmlDocument();"">
        <arg value=""xml"" con=""var"" />
        <arg con=""fun"">
          <fun>
            <arg value=""XmlDocument"" con=""var"" />
          </fun>
          <params />
        </arg>
      </getres_s>
      <usefun_s str=""WriteLine(xml);"">
        <arg con=""fun"">
          <fun>
            <arg value=""WriteLine"" con=""var"" />
          </fun>
          <params>
            <arg value=""xml"" con=""var"" />
          </params>
        </arg>
      </usefun_s>
      <usefun_s str=""xml:Load(file);"">
        <arg con=""fun"">
          <fun>
            <arg value=""Load"" con=""mem"">
              <arg value=""xml"" con=""var"" />
            </arg>
          </fun>
          <params>
            <arg value=""file"" con=""var"" />
          </params>
        </arg>
      </usefun_s>
      <usefun_s str=""file:Close();"">
        <arg con=""fun"">
          <fun>
            <arg value=""Close"" con=""mem"">
              <arg value=""file"" con=""var"" />
            </arg>
          </fun>
          <params />
        </arg>
      </usefun_s>
      <usefun_s str=""xml:Content:SetAttribute(&quot;text&quot;,&quot;helloworld&quot;);"">
        <arg con=""fun"">
          <fun>
            <arg value=""SetAttribute"" con=""mem"">
              <arg value=""Content"" con=""mem"">
                <arg value=""xml"" con=""var"" />
              </arg>
            </arg>
          </fun>
          <params>
            <arg value=""text"" con=""str"" />
            <arg value=""helloworld"" con=""str"" />
          </params>
        </arg>
      </usefun_s>
      <var_s varname=""child1"" str=""var child1 = xml:Content:GetChild(0);"" />
      <getres_s str=""var child1 = xml:Content:GetChild(0);"">
        <arg value=""child1"" con=""var"" />
        <arg con=""fun"">
          <fun>
            <arg value=""GetChild"" con=""mem"">
              <arg value=""Content"" con=""mem"">
                <arg value=""xml"" con=""var"" />
              </arg>
            </arg>
          </fun>
          <params>
            <arg value=""0"" con=""num"" />
          </params>
        </arg>
      </getres_s>
      <usefun_s str=""xml:Content:RemoveChild(child1);"">
        <arg con=""fun"">
          <fun>
            <arg value=""RemoveChild"" con=""mem"">
              <arg value=""Content"" con=""mem"">
                <arg value=""xml"" con=""var"" />
              </arg>
            </arg>
          </fun>
          <params>
            <arg value=""child1"" con=""var"" />
          </params>
        </arg>
      </usefun_s>
      <usefun_s str=""xml:Save(FileOpen(&quot;X:\\projects\\freestudio\\App1\\App1.gca&quot;,&quot;creat&quot;));"">
        <arg con=""fun"">
          <fun>
            <arg value=""Save"" con=""mem"">
              <arg value=""xml"" con=""var"" />
            </arg>
          </fun>
          <params>
            <arg con=""fun"">
              <fun>
                <arg value=""FileOpen"" con=""var"" />
              </fun>
              <params>
                <arg value=""X:\projects\freestudio\App1\App1.gca"" con=""str"" />
                <arg value=""creat"" con=""str"" />
              </params>
            </arg>
          </params>
        </arg>
      </usefun_s>
    </deffun>
    <deffun funname=""Mains"" params=""args"" isref=""False"">
      <var_s varname=""page"" str=""var page = Page(&quot;page&quot;);"" />
      <getres_s str=""var page = Page(&quot;page&quot;);"">
        <arg value=""page"" con=""var"" />
        <arg con=""fun"">
          <fun>
            <arg value=""Page"" con=""var"" />
          </fun>
          <params>
            <arg value=""page"" con=""str"" />
          </params>
        </arg>
      </getres_s>
      <usefun_s str=""page:AddTool(&quot;click&quot;,Click);"">
        <arg con=""fun"">
          <fun>
            <arg value=""AddTool"" con=""mem"">
              <arg value=""page"" con=""var"" />
            </arg>
          </fun>
          <params>
            <arg value=""click"" con=""str"" />
            <arg value=""Click"" con=""var"" />
          </params>
        </arg>
      </usefun_s>
      <getres_s str=""web  = WebView(&quot;wb&quot;);"">
        <arg value=""web"" con=""var"" />
        <arg con=""fun"">
          <fun>
            <arg value=""WebView"" con=""var"" />
          </fun>
          <params>
            <arg value=""wb"" con=""str"" />
          </params>
        </arg>
      </getres_s>
      <getres_s str=""web:Url = &quot;\\\\Mac\Home\Downloads\codemirror-5.59.1\gasoline\zzzz.html&quot;;"">
        <arg value=""Url"" con=""mem"">
          <arg value=""web"" con=""var"" />
        </arg>
        <arg value=""\\Mac\Home\Downloads\codemirror-5.59.1\gasoline\zzzz.html"" con=""str"" />
      </getres_s>
      <getres_s str=""web:Margin = List(0,100,0,0);"">
        <arg value=""Margin"" con=""mem"">
          <arg value=""web"" con=""var"" />
        </arg>
        <arg con=""fun"">
          <fun>
            <arg value=""List"" con=""var"" />
          </fun>
          <params>
            <arg value=""0"" con=""num"" />
            <arg value=""100"" con=""num"" />
            <arg value=""0"" con=""num"" />
            <arg value=""0"" con=""num"" />
          </params>
        </arg>
      </getres_s>
      <usefun_s str=""page:SetContent(web);"">
        <arg con=""fun"">
          <fun>
            <arg value=""SetContent"" con=""mem"">
              <arg value=""page"" con=""var"" />
            </arg>
          </fun>
          <params>
            <arg value=""web"" con=""var"" />
          </params>
        </arg>
      </usefun_s>
      <usefun_s str=""PageLoad(page);"">
        <arg con=""fun"">
          <fun>
            <arg value=""PageLoad"" con=""var"" />
          </fun>
          <params>
            <arg value=""page"" con=""var"" />
          </params>
        </arg>
      </usefun_s>
      <usefun_s str=""WriteLine(web);"">
        <arg con=""fun"">
          <fun>
            <arg value=""WriteLine"" con=""var"" />
          </fun>
          <params>
            <arg value=""web"" con=""var"" />
          </params>
        </arg>
      </usefun_s>
    </deffun>
    <deffun funname=""Click"" params=""page,e"" isref=""False"">
      <usefun_s str=""web:InvokeJS(&quot;setValue&quot;,&quot;ok&quot;);"">
        <arg con=""fun"">
          <fun>
            <arg value=""InvokeJS"" con=""mem"">
              <arg value=""web"" con=""var"" />
            </arg>
          </fun>
          <params>
            <arg value=""setValue"" con=""str"" />
            <arg value=""ok"" con=""str"" />
          </params>
        </arg>
      </usefun_s>
    </deffun>
  </lib>
</code>");
            GTXAMInfo.Codes = xmlDocument;
            GTXAMInfo.SetPlatform("UWP_Xamarin");
            LoadApplication(new GTXAM.App());
        }
Esempio n. 6
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            XmlDocument xmlDocument = new XmlDocument();

            xmlDocument.LoadXml(@"<code minversion=""2007"">
  <lib name=""App1"">
    <get value=""Math"" />
    <get value=""IO"" />
    <get value=""Control"" />
    <get value=""Page"" />
    <get value=""List"" />
    <get value=""String"" />
    <deffun funname=""Main"" params=""args"" isref=""False"">
      <var_s varname=""listflat"" str=""var listflat = ListFlat(&quot;ft&quot;);"" />
      <getres_s str=""var listflat = ListFlat(&quot;ft&quot;);"">
        <arg value=""listflat"" con=""var"" />
        <arg con=""fun"">
          <fun>
            <arg value=""ListFlat"" con=""var"" />
          </fun>
          <params>
            <arg value=""ft"" con=""str"" />
          </params>
        </arg>
      </getres_s>
      <foreach_s var_togive=""i"" var_new=""True"" str=""foreach(var i , Range(1,5)):"">
        <from>
          <arg con=""fun"">
            <fun>
              <arg value=""Range"" con=""var"" />
            </fun>
            <params>
              <arg value=""1"" con=""num"" />
              <arg value=""5"" con=""num"" />
            </params>
          </arg>
        </from>
        <run>
          <usefun_s str=""WriteLine(i);"">
            <arg con=""fun"">
              <fun>
                <arg value=""WriteLine"" con=""var"" />
              </fun>
              <params>
                <arg value=""i"" con=""var"" />
              </params>
            </arg>
          </usefun_s>
          <var_s varname=""textcell"" str=""var textcell = TextCell(&quot;tc&quot;);"" />
          <getres_s str=""var textcell = TextCell(&quot;tc&quot;);"">
            <arg value=""textcell"" con=""var"" />
            <arg con=""fun"">
              <fun>
                <arg value=""TextCell"" con=""var"" />
              </fun>
              <params>
                <arg value=""tc"" con=""str"" />
              </params>
            </arg>
          </getres_s>
          <getres_s str=""textcell:Text = &quot;item&quot; &amp; i;"">
            <arg value=""Text"" con=""mem"">
              <arg value=""textcell"" con=""var"" />
            </arg>
            <arg con=""fun"">
              <fun>
                <arg value=""StringAdd"" con=""var"" />
              </fun>
              <params>
                <arg value=""item"" con=""str"" />
                <arg value=""i"" con=""var"" />
              </params>
            </arg>
          </getres_s>
          <getres_s str=""textcell:Detail = &quot;this is item&quot; &amp; i;"">
            <arg value=""Detail"" con=""mem"">
              <arg value=""textcell"" con=""var"" />
            </arg>
            <arg con=""fun"">
              <fun>
                <arg value=""StringAdd"" con=""var"" />
              </fun>
              <params>
                <arg value=""this is item"" con=""str"" />
                <arg value=""i"" con=""var"" />
              </params>
            </arg>
          </getres_s>
          <getres_s str=""textcell:Clickevent = Click;"">
            <arg value=""Clickevent"" con=""mem"">
              <arg value=""textcell"" con=""var"" />
            </arg>
            <arg value=""Click"" con=""var"" />
          </getres_s>
          <usefun_s str=""listflat:Add(textcell);"">
            <arg con=""fun"">
              <fun>
                <arg value=""Add"" con=""mem"">
                  <arg value=""listflat"" con=""var"" />
                </arg>
              </fun>
              <params>
                <arg value=""textcell"" con=""var"" />
              </params>
            </arg>
          </usefun_s>
        </run>
      </foreach_s>
      <var_s varname=""page"" str=""var page = Page(&quot;title&quot;);"" />
      <getres_s str=""var page = Page(&quot;title&quot;);"">
        <arg value=""page"" con=""var"" />
        <arg con=""fun"">
          <fun>
            <arg value=""Page"" con=""var"" />
          </fun>
          <params>
            <arg value=""title"" con=""str"" />
          </params>
        </arg>
      </getres_s>
      <usefun_s str=""page:SetContent(listflat);"">
        <arg con=""fun"">
          <fun>
            <arg value=""SetContent"" con=""mem"">
              <arg value=""page"" con=""var"" />
            </arg>
          </fun>
          <params>
            <arg value=""listflat"" con=""var"" />
          </params>
        </arg>
      </usefun_s>
      <usefun_s str=""PageLoad(page);"">
        <arg con=""fun"">
          <fun>
            <arg value=""PageLoad"" con=""var"" />
          </fun>
          <params>
            <arg value=""page"" con=""var"" />
          </params>
        </arg>
      </usefun_s>
    </deffun>
    <deffun funname=""Click"" params=""object,e"" isref=""False"">
      <usefun_s str=""Message(&quot;you have clicked me&quot;);"">
        <arg con=""fun"">
          <fun>
            <arg value=""Message"" con=""var"" />
          </fun>
          <params>
            <arg value=""you have clicked me"" con=""str"" />
          </params>
        </arg>
      </usefun_s>
    </deffun>
  </lib>
</code>");
            GTXAMInfo.Codes.Add(xmlDocument);
            GTXAMInfo.SetPlatform("IOS_Xamarin");

            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Esempio n. 7
0
        public static void Main(string[] args)
        {
            XmlDocument xmlDocument = new XmlDocument();

            xmlDocument.LoadXml(@"<?xml version=""1.0"" encoding=""utf-8""?>
<code minversion=""2007"">
  <lib name=""Program"">
    <get value=""IO"" />
    <get value=""Control"" />
    <get value=""Page"" />
    <deffun funname=""Main"" params=""args"" isref=""False"">
      <var_s varname=""page"" str=""var page = MainPage(&quot;MainPage&quot;);"" />
      <getres_s str=""var page = MainPage(&quot;MainPage&quot;);"">
        <arg value=""page"" con=""var"" />
        <arg con=""fun"">
          <fun>
            <arg value=""MainPage"" con=""var"" />
          </fun>
          <params>
            <arg value=""MainPage"" con=""str"" />
          </params>
        </arg>
      </getres_s>
      <usefun_s str=""PageLoad(page);"">
        <arg con=""fun"">
          <fun>
            <arg value=""PageLoad"" con=""var"" />
          </fun>
          <params>
            <arg value=""page"" con=""var"" />
          </params>
        </arg>
      </usefun_s>
    </deffun>
    <cls name=""MainPage"" parent=""Page"">
      <member value=""bubble"" />
      <member value=""tip"" />
      <memfun funname=""init"" params=""title"" isref=""False"" isstatic=""False"">
        <getres_s str=""this:bubble = Bubble(&quot;bu&quot;);"">
          <arg value=""bubble"" con=""mem"">
            <arg value=""this"" con=""var"" />
          </arg>
          <arg con=""fun"">
            <fun>
              <arg value=""Bubble"" con=""var"" />
            </fun>
            <params>
              <arg value=""bu"" con=""str"" />
            </params>
          </arg>
        </getres_s>
        <getres_s str=""this:bubble:Text = &quot;Click me!&quot;;"">
          <arg value=""Text"" con=""mem"">
            <arg value=""bubble"" con=""mem"">
              <arg value=""this"" con=""var"" />
            </arg>
          </arg>
          <arg value=""Click me!"" con=""str"" />
        </getres_s>
        <getres_s str=""this:bubble:Clickevent = this:BuClick;"">
          <arg value=""Clickevent"" con=""mem"">
            <arg value=""bubble"" con=""mem"">
              <arg value=""this"" con=""var"" />
            </arg>
          </arg>
          <arg value=""BuClick"" con=""mem"">
            <arg value=""this"" con=""var"" />
          </arg>
        </getres_s>
        <usefun_s str=""this:SetContent(this:bubble);"">
          <arg con=""fun"">
            <fun>
              <arg value=""SetContent"" con=""mem"">
                <arg value=""this"" con=""var"" />
              </arg>
            </fun>
            <params>
              <arg value=""bubble"" con=""mem"">
                <arg value=""this"" con=""var"" />
              </arg>
            </params>
          </arg>
        </usefun_s>
      </memfun>
      <memfun funname=""BuClick"" params=""page,e"" isref=""False"" isstatic=""False"">
        <usefun_s str=""Message(&quot;HHH&quot;);"">
          <arg con=""fun"">
            <fun>
              <arg value=""Message"" con=""var"" />
            </fun>
            <params>
              <arg value=""HHH"" con=""str"" />
            </params>
          </arg>
        </usefun_s>
      </memfun>
    </cls>
  </lib>
</code>");
            GTXAMInfo.Codes = xmlDocument;
            GTXAMInfo.SetPlatform("GTK_Xamarin");



            Gtk.Application.Init();
            Forms.Init();

            var app    = new GTXAM.App();
            var window = new FormsWindow();

            window.LoadApplication(app);
            window.SetApplicationTitle("Gasoline");
            window.Show();

            Gtk.Application.Run();
        }