void closeWindow(string path) { GraphicObject g = CrowInterface.FindByName(path); if (g != null) { CrowInterface.DeleteWidget(g); } }
void onAddTabButClick(object sender, MouseButtonEventArgs e) { TabView tv = CrowInterface.FindByName("tabview1") as TabView; if (tv == null) { return; } tv.AddChild(new TabItem() { Caption = "NewTab" }); }
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)); } }
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()); } }
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(); } } }