public static void Init(Form mainform, PropertiesWindow prp, Toolbox tb) { workspace = mainform; prop = prp; toolbox = tb; toolbox.controlPanel.LargeImageList = new ImageList(); toolbox.controlPanel.LargeImageList.ImageSize = new Size(32, 32); Tick.Interval = 20; Tick.Tick += TickEvent; Tick.Tick += new EventHandler(RepaintTick); Tick.Start(); // for big logo colMatrix.Matrix33 = .2F; imAttr.SetColorMatrix(colMatrix); // For panel dragging workspace.MouseMove += PanelDrag; // Draw all the panels workspace.Paint += Paint; // Draw the resizer thing on the active panel workspace.Paint += ResizeGrip.Paint; // Resizer mouse events workspace.MouseUp += ResizeGrip.Resize_MouseUp; workspace.MouseMove += ResizeGrip.Resize_MouseMove; // Create our mouse event handlers for derma controls workspace.MouseClick += MouseClick; workspace.MouseDoubleClick += MouseDoubleClick; workspace.MouseDown += MouseDown; workspace.MouseMove += MouseMove; workspace.MouseUp += MouseUp; workspace.MouseWheel += MouseWheel; // Set up the "Default" font fontCollection.AddFontFile("Marlett.ttf"); fontCollection.AddFontFile(Application.StartupPath + "\\" + "resources/defaultFont.ttf"); DefaultFontFamily = fontCollection.Families[1]; DefaultFont = new Font(DefaultFontFamily, 6); MarlettFontFamily = fontCollection.Families[0]; MarlettFont = new Font(MarlettFontFamily, 10); DSave.SetEnvironment("Untitled.ddproj"); }