tgjones / gemini

Gemini is an IDE framework similar in concept to the Visual Studio Shell. It uses AvalonDock and has an MVVM architecture based on Caliburn Micro.
Other
1.1k stars 299 forks source link

How i can add a Tool with more instances? #267

Open gerry100 opened 7 years ago

gerry100 commented 7 years ago

How i can add a Tool with more instances?

Thanks

luferau commented 7 years ago

gerry100, Please write in detail what you want to do?

gerry100 commented 7 years ago

I found this way for my solution. Thanks

Example: bool found; foreach (var item in _ICNCModule.ICNC.AktiveCNCChannelList) { found = false; foreach (var itemTool in _shell.Tools) { if (itemTool is CNCChannelViewModel) { CNCChannelViewModel itemToolCNCChannelView; itemToolCNCChannelView = (CNCChannelViewModel)itemTool; if (itemToolCNCChannelView.ICNCChannel.ID == item.ID) { found = true; } } } if (found == false) { _shell.ShowTool(new CNCChannelViewModel(_shell, _IOutput, _ErrorList, _ICNCModule, item.ID)); }

        }