//https://www.mztools.com/articles/2015/MZ2015005.aspx private void ShowToolWindow() { const string TOOLWINDOW_GUID = "{7C23E551-2E95-40A8-B783-3753D4E3DEAB}"; if (_windowFrame == null) { _uglyUsefuleDogFace = new ucHost(); _windowFrame = CreateToolWindow(Caption, TOOLWINDOW_GUID, _uglyUsefuleDogFace); HuntingDog.DogEngine.Impl.DiConstruct.Instance.HideYourself += Instance_HideYourself; ReadConfiguration(); if (_cfg.ShowAfterOpen) { _windowFrame.Show(); HuntingDog.DogEngine.Impl.DiConstruct.Instance.ForceShowYourself(); } // additional init could be done after this line for the user control return; } _windowFrame.Show(); HuntingDog.DogEngine.Impl.DiConstruct.Instance.ForceShowYourself(); }
//https://www.mztools.com/articles/2015/MZ2015005.aspx private void ShowToolWindow() { const string TOOLWINDOW_GUID = "{7C23E551-2E95-40A8-B783-3753D4E3DEAB}"; if (_windowFrame == null) { _uglyUsefuleDogFace = new ucHost(); _windowFrame = CreateToolWindow(Caption, TOOLWINDOW_GUID, _uglyUsefuleDogFace); // additional init could be done after this line for the user control } _windowFrame.Show(); }
private void Form1_Load(object sender, EventArgs e) { // Fill fake controller with fake data _fakeCtrl.EmptyDataBase = "Backup"; _fakeCtrl.SmallDataBase = "Restoration_from_big_storage"; _fakeCtrl.OnAction += new Action <string>(_fakeCtrl_OnAction); _fakeCtrl.FakeServers = new List <TestServer> { new TestServer("Ignorance"), new TestServer("Greed"), new TestServer("Arrogance") }; _fakeCtrl.FakeDatabases = new List <string> { "All Human Sins", "Good Humans", "Backup", "Restoration_from_big_storage" }; _fakeCtrl.FakeFindList = new List <Entity> { new Entity { IsTable = true, Name = "Special Table1" }, new Entity { IsTable = true, Name = "ThisYearGoals" }, new Entity { IsTable = true, Name = "Unfinished" }, new Entity { IsTable = true, Name = "Wishes" }, new Entity { IsTable = true, Name = "Prerequisutes" }, new Entity { IsTable = true, Name = "Dedication" }, new Entity { IsTable = true, Name = "ChickenCurry" }, new Entity { IsProcedure = true, Name = "AddGoal" }, new Entity { IsProcedure = true, Name = "CreateOrUpdateLastGoal" }, new Entity { IsProcedure = true, Name = "RemoveGoal" }, new Entity { IsProcedure = true, Name = "DeleteWishCompletelyFromTable" }, new Entity { IsProcedure = true, Name = "ListUnfinished" }, new Entity { IsView = true, Name = "Sophisticated View1" }, new Entity { IsView = true, Name = "AnotherPoint" }, new Entity { IsView = true, Name = "CombinedDataFromYear" }, new Entity { IsFunction = true, Name = "AddWishAndCheck" }, new Entity { IsFunction = true, Name = "ParseGoalListBeforeAdding" }, new Entity { IsFunction = true, Name = "CaluclatePoint" }, }; _fakeCtrl.DuplicateFakeList(); _fakeCtrl.DuplicateFakeList(); _fakeCtrl.DuplicateFakeList(); // load wpf control _wpf = new HuntingDog.ucHost(); _wpf.DogFace.StudioController = _fakeCtrl; _wpf.Dock = DockStyle.Fill; this.splitContainer1.Panel1.Controls.Add(_wpf); }