private void buttonInstances_Click(object sender, EventArgs e) { //GraphicsWindow.Show(); Primitive win = new Primitive(); for (int i = 0; i < 3; i++) { win[i] = LDWindows.Create(); GraphicsWindow.Title = i.ToString(); //Shapes.AddEllipse(100, 100); } LDWindows.CurrentID = win[0]; Primitive ball = Shapes.AddEllipse(100, 100); LDWindows.CurrentID = win[1]; Shapes.AddEllipse(100, 100); GraphicsWindow.BackgroundColor = "Red"; GraphicsWindow.Hide(); LDWindows.CurrentID = 0; GraphicsWindow.Show(); LDWindows.CurrentID = win[0]; Shapes.Move(ball, 200, 200); LDWindows.CurrentID = 0; Shapes.Move(ball, 300, 300); //LDWindow.Hide(win[0]); //LDWindow.Close(win[1]); //Program.Delay(5000); //LDWindow.Hide(win[2]); }
public void Handler([CallerMemberName] string memberName = "") { string message = "Exception has occurred with:" + Environment.NewLine + memberName; GraphicsWindow.Hide(); System.Media.SystemSounds.Exclamation.Play(); GraphicsWindow.ShowMessage(message, "Exception"); Program.End(); }
public static void Closing() { int StackPointer = Stack.Add("Events.Closing()"); if (string.IsNullOrEmpty(Engines.CurrentDatabase)) { LogMessage("Program Closing", Language.Localization["Application"]); //Localize } else { LogMessage("Program Closing - Closing : " + Engines.DatabaseShortname, Language.Localization["Application"]); //Localize } GraphicsWindow.Clear(); GraphicsWindow.Hide(); Stack.Exit(StackPointer); Environment.Exit(0); }
public Win(int _id) { id = _id; if (id > 0) { mCreateWindow.Invoke(null, new object[] { }); GraphicsWindow.Show(); } else { bool _windowCreated = (bool)GraphicsWindowType.GetField("_windowCreated", BindingFlags.IgnoreCase | BindingFlags.Static | BindingFlags.NonPublic).GetValue(null); if (!_windowCreated) { GraphicsWindow.Show(); GraphicsWindow.Hide(); } } InvokeHelper ret = delegate { try { window = (Window)GraphicsWindowType.GetField("_window", BindingFlags.IgnoreCase | BindingFlags.Static | BindingFlags.NonPublic).GetValue(null); window.Activated += new EventHandler(ActivatedHandler); FieldInfo[] fields = GraphicsWindowType.GetFields(BindingFlags.IgnoreCase | BindingFlags.Static | BindingFlags.NonPublic); foreach (FieldInfo i in fields) { obj.Add(GraphicsWindowType.GetField(i.Name, BindingFlags.IgnoreCase | BindingFlags.Static | BindingFlags.NonPublic).GetValue(null)); } } catch (Exception ex) { Utilities.OnError(Utilities.GetCurrentMethod(), ex); } }; FastThread.Invoke(ret); }