Example #1
0
        void closeWindow(string path)
        {
            GraphicObject g = CrowInterface.FindByName(path);

            if (g != null)
            {
                CrowInterface.DeleteWidget(g);
            }
        }
Example #2
0
        void onAddTabButClick(object sender, MouseButtonEventArgs e)
        {
            TabView tv = CrowInterface.FindByName("tabview1") as TabView;

            if (tv == null)
            {
                return;
            }
            tv.AddChild(new TabItem()
            {
                Caption = "NewTab"
            });
        }
Example #3
0
        void onImlSourceChanged(Object sender, TextChangeEventArgs e)
        {
            Instantiator i;

            try {
                i = Instantiator.CreateFromImlFragment(e.Text);
            } catch (Exception ex) {
                Debug.WriteLine(ex);
                return;
            }
            lock (CrowInterface.UpdateMutex) {
                (CrowInterface.FindByName("crowContainer") as Container).SetChild
                    (i.CreateInstance(CrowInterface));
            }
        }
Example #4
0
 void loadWindow(string path)
 {
     try {
         GraphicObject g = CrowInterface.FindByName(path);
         if (g != null)
         {
             return;
         }
         g            = CrowInterface.LoadInterface(path);
         g.Name       = path;
         g.DataSource = imlVE;
     } catch (Exception ex) {
         System.Diagnostics.Debug.WriteLine(ex.ToString());
     }
 }
Example #5
0
        void Tv_SelectedItemChanged(object sender, SelectionChangeEventArgs e)
        {
            FileInfo fi = e.NewValue as FileInfo;

            if (fi == null)
            {
                return;
            }
            if (fi.Extension == ".crow" || fi.Extension == ".goml")
            {
                Instantiator i = new Instantiator(fi.FullName);
                lock (CrowInterface.UpdateMutex) {
                    (CrowInterface.FindByName("crowContainer") as Container).SetChild
                        (i.CreateInstance(CrowInterface));
                    CurSources = i.GetImlSourcesCode();
                }
            }
        }