public void ShowXML(string xml) { XMLViewer viewer = new XMLViewer(); viewer.SetText(xml); viewer.ShowDialog(); }
public void ApplyToControl(XMLViewer viewer) { viewer.Settings.AttributeKey = AttributeKey; viewer.Settings.AttributeValue = AttributeValue; viewer.Settings.Comment = Comment; viewer.Settings.Element = Element; viewer.Settings.Tag = Tag; viewer.Settings.Value = Value; }
public Form1() { InitializeComponent(); InitializeComponent(); string current = Directory.GetParent(Environment.CurrentDirectory).Parent.FullName; WorkDirectory.Text = current; if (!File.Exists(current + "/Log.txt")) { var myFile = File.Create(current + "/Log.txt"); myFile.Close(); XMLViewer.AppendText("Aloha"); } Log("Application launched!"); }
public MainForm() { InitializeComponent(); // Load global settings this.mGlobalSettings = new GlobalSettings(); this.mLocalSettings = LocalSettings.GetInstance(); // Restore the size Size = mLocalSettings.m_size; if ((Size.Height < 100) || (Size.Width < 200)) { Size lsize = new Size(); lsize.Height = 500; lsize.Width = 800; this.Size = lsize; } //register the viewer manager classes //qq there must be a better way of doing this, it seems a bit // odd. Could use reflection. Might be a little slow or have // unexpected side-effects. It's nice to be able to control // the order the tabs appear in, too. ViewTabActions.Tag = ActionsViewer.InitialiseViewer(this); ViewTabXML.Tag = XMLViewer.InitialiseViewer(this); ViewTabFlat.Tag = FlatViewer.InitialiseViewer(this); ViewTabImg.Tag = ImageViewer.InitialiseViewer(this); ViewTabBump.Tag = BumpViewer.InitialiseViewer(this); ViewTabSteering.Tag = SteeringViewer.InitialiseViewer(this); ViewTabCamera.Tag = CameraViewer.InitialiseViewer(this); ViewTabGrid.Tag = GridViewer.InitialiseViewer(this); ViewTab3D.Tag = ThreeDeeViewer.InitialiseViewer(this); ViewTabVRAM.Tag = VRAMViewer.InitialiseViewer(this); ViewTab3dEditor.Tag = ThreeDeeEditor.InitialiseViewer(this); ViewTabHistory.Tag = HistoryViewer.InitialiseViewer(this); //auto-load last level if (mLocalSettings.LastOpenedFile != null) { LoadInternal(mLocalSettings.LastOpenedType, mLocalSettings.LastOpenedFile); } }