本文整理汇总了C#中IAppWindow类的典型用法代码示例。如果您正苦于以下问题:C# IAppWindow类的具体用法?C# IAppWindow怎么用?C# IAppWindow使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IAppWindow类属于命名空间,在下文中一共展示了IAppWindow类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: FileListLoader
FileListLoader(IAppWindow appWindow, FileListManager fileListManager, FileTabManager fileTabManager, FileTabSerializer fileTabSerializer, [ImportMany] IEnumerable<Lazy<IFileListListener, IFileListListenerMetadata>> mefListeners) {
this.fileListManager = fileListManager;
this.fileTabManager = fileTabManager;
this.fileTabSerializer = fileTabSerializer;
this.listeners = mefListeners.OrderBy(a => a.Metadata.Order).ToArray();
appWindow.MainWindowClosed += AppWindow_MainWindowClosed;
}
开发者ID:GreenDamTan,项目名称:dnSpy,代码行数:7,代码来源:FileListLoader.cs
示例2: NavigationCommandInstaller
NavigationCommandInstaller(IDocumentTabService documentTabService, IAppWindow appWindow) {
this.documentTabService = documentTabService;
Debug.Assert(Application.Current != null && Application.Current.MainWindow != null);
var cmds = appWindow.MainWindowCommands;
cmds.Add(NavigationCommands.BrowseBack, new RelayCommand(a => BrowseBack(), a => CanBrowseBack));
cmds.Add(NavigationCommands.BrowseForward, new RelayCommand(a => BrowseForward(), a => CanBrowseForward));
}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:7,代码来源:NavigationCommands.cs
示例3: AboutScreenMenuItem
AboutScreenMenuItem(IDocumentViewerContentFactoryProvider documentViewerContentFactoryProvider, IDocumentTabService documentTabService, IAppWindow appWindow, IExtensionService extensionService, IContentTypeRegistryService contentTypeRegistryService) {
this.documentViewerContentFactoryProvider = documentViewerContentFactoryProvider;
this.documentTabService = documentTabService;
this.appWindow = appWindow;
this.extensionService = extensionService;
aboutContentType = contentTypeRegistryService.GetContentType(ContentTypes.AboutDnSpy);
}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:7,代码来源:AboutScreen.cs
示例4: DocumentListLoader
DocumentListLoader(IAppWindow appWindow, DocumentListService documentListService, DocumentTabService documentTabService, DocumentTabSerializer documentTabSerializer, [ImportMany] IEnumerable<Lazy<IDocumentListListener, IDocumentListListenerMetadata>> documentListListeners) {
this.documentListService = documentListService;
this.documentTabService = documentTabService;
this.documentTabSerializer = documentTabSerializer;
this.documentListListeners = documentListListeners.OrderBy(a => a.Metadata.Order).ToArray();
appWindow.MainWindowClosed += AppWindow_MainWindowClosed;
}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:7,代码来源:DocumentListLoader.cs
示例5: NavigationCommandInstaller
NavigationCommandInstaller(IFileTabManager fileTabManager, IAppWindow appWindow)
{
this.fileTabManager = fileTabManager;
Debug.Assert(Application.Current != null && Application.Current.MainWindow != null);
var cmds = appWindow.MainWindowCommands;
cmds.Add(NavigationCommands.BrowseBack, new RelayCommand(a => BrowseBack(), a => CanBrowseBack));
cmds.Add(NavigationCommands.BrowseForward, new RelayCommand(a => BrowseForward(), a => CanBrowseForward));
}
开发者ID:lovebanyi,项目名称:dnSpy,代码行数:8,代码来源:NavigationCommands.cs
示例6: ExportProjectCommand
ExportProjectCommand(IAppWindow appWindow, IFileTreeView fileTreeView, ILanguageManager languageManager, IFileTreeViewSettings fileTreeViewSettings, IExportToProjectSettings exportToProjectSettings, [ImportMany] IEnumerable<Lazy<IBamlDecompiler>> bamlDecompilers) {
this.appWindow = appWindow;
this.fileTreeView = fileTreeView;
this.languageManager = languageManager;
this.fileTreeViewSettings = fileTreeViewSettings;
this.exportToProjectSettings = exportToProjectSettings;
this.bamlDecompiler = bamlDecompilers.FirstOrDefault();
}
开发者ID:GreenDamTan,项目名称:dnSpy,代码行数:8,代码来源:SaveCommands.cs
示例7: MouseEvent
public MouseEvent(IAppWindow window, int wheelDelta, int x, int y)
{
Type = MouseEventType.Wheel;
Window = window;
WheelDelta = wheelDelta;
X = x;
Y = y;
}
开发者ID:gitter-badger,项目名称:Grasshopper,代码行数:8,代码来源:MouseEvent.cs
示例8: InMemoryModuleManager
InMemoryModuleManager(ITheDebugger theDebugger, IFileTabManager fileTabManager, Lazy<IMethodAnnotations> methodAnnotations, IAppWindow appWindow) {
this.fileTabManager = fileTabManager;
this.fileTreeView = fileTabManager.FileTreeView;
this.fileManager = this.fileTreeView.FileManager;
this.appWindow = appWindow;
this.methodAnnotations = methodAnnotations;
this.theDebugger = theDebugger;
theDebugger.OnProcessStateChanged_First += TheDebugger_OnProcessStateChanged_First;
}
开发者ID:GreenDamTan,项目名称:dnSpy,代码行数:9,代码来源:InMemoryModuleManager.cs
示例9: ExportProjectCommand
ExportProjectCommand(IAppWindow appWindow, IDocumentTreeView documentTreeView, IDecompilerService decompilerService, IDocumentTreeViewSettings documentTreeViewSettings, IExportToProjectSettings exportToProjectSettings, [ImportMany] IEnumerable<Lazy<IBamlDecompiler>> bamlDecompilers, [ImportMany] IEnumerable<Lazy<IXamlOutputOptionsProvider>> xamlOutputOptionsProviders) {
this.appWindow = appWindow;
this.documentTreeView = documentTreeView;
this.decompilerService = decompilerService;
this.documentTreeViewSettings = documentTreeViewSettings;
this.exportToProjectSettings = exportToProjectSettings;
bamlDecompiler = bamlDecompilers.FirstOrDefault();
xamlOutputOptionsProvider = xamlOutputOptionsProviders.FirstOrDefault();
}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:9,代码来源:SaveCommands.cs
示例10: CloseWindowController
public CloseWindowController(IAppWindow win, IIOPortHandler[] portHandlers)
{
_win = win;
_state = ClosingState.NoClosing;
_portHandlers = portHandlers;
_portHandlerClosedStates = new Dictionary<IIOPortHandler, bool>();
foreach (IIOPortHandler handler in portHandlers)
_portHandlerClosedStates[handler] = false;
}
开发者ID:x893,项目名称:WDS,代码行数:9,代码来源:CloseWindowController.cs
示例11: UndoRedoCommmandLoader
UndoRedoCommmandLoader(IWpfCommandManager wpfCommandManager, Lazy<IUndoCommandManager> undoCommandManager, IAppWindow appWindow, IMessageBoxManager messageBoxManager) {
this.undoCommandManager = undoCommandManager;
this.messageBoxManager = messageBoxManager;
var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW);
cmds.Add(UndoRoutedCommands.Undo, (s, e) => undoCommandManager.Value.Undo(), (s, e) => e.CanExecute = undoCommandManager.Value.CanUndo);
cmds.Add(UndoRoutedCommands.Redo, (s, e) => undoCommandManager.Value.Redo(), (s, e) => e.CanExecute = undoCommandManager.Value.CanRedo);
appWindow.MainWindowClosing += AppWindow_MainWindowClosing;
}
开发者ID:lovebanyi,项目名称:dnSpy,代码行数:10,代码来源:Commands.cs
示例12: InMemoryModuleService
InMemoryModuleService(ITheDebugger theDebugger, IDocumentTabService documentTabService, Lazy<IMethodAnnotations> methodAnnotations, IAppWindow appWindow, SimpleProcessReader simpleProcessReader) {
this.documentTabService = documentTabService;
documentTreeView = documentTabService.DocumentTreeView;
documentService = documentTreeView.DocumentService;
this.appWindow = appWindow;
this.methodAnnotations = methodAnnotations;
this.theDebugger = theDebugger;
this.simpleProcessReader = simpleProcessReader;
theDebugger.OnProcessStateChanged_First += TheDebugger_OnProcessStateChanged_First;
}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:10,代码来源:InMemoryModuleService.cs
示例13: UndoRedoCommmandLoader
UndoRedoCommmandLoader(IWpfCommandService wpfCommandService, Lazy<IUndoCommandService> undoCommandService, IAppWindow appWindow, IMessageBoxService messageBoxService) {
this.undoCommandService = undoCommandService;
this.messageBoxService = messageBoxService;
var cmds = wpfCommandService.GetCommands(ControlConstants.GUID_MAINWINDOW);
cmds.Add(UndoRoutedCommands.Undo, (s, e) => undoCommandService.Value.Undo(), (s, e) => e.CanExecute = undoCommandService.Value.CanUndo);
cmds.Add(UndoRoutedCommands.Redo, (s, e) => undoCommandService.Value.Redo(), (s, e) => e.CanExecute = undoCommandService.Value.CanRedo);
appWindow.MainWindowClosing += AppWindow_MainWindowClosing;
}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:10,代码来源:Commands.cs
示例14: AppSettingsService
AppSettingsService(IClassificationFormatMapService classificationFormatMapService, ITextElementProvider textElementProvider, IAppWindow appWindow, ITreeViewService treeViewService, ITreeViewNodeTextElementProvider treeViewNodeTextElementProvider, [ImportMany] IEnumerable<Lazy<IAppSettingsPageContainer, IAppSettingsPageContainerMetadata>> appSettingsPageContainers, [ImportMany] IEnumerable<Lazy<IAppSettingsPageProvider>> appSettingsPageProviders, [ImportMany] IEnumerable<Lazy<IAppSettingsModifiedListener, IAppSettingsModifiedListenerMetadata>> appSettingsModifiedListeners) {
classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.UIMisc);
this.textElementProvider = textElementProvider;
this.appWindow = appWindow;
this.treeViewService = treeViewService;
this.treeViewNodeTextElementProvider = treeViewNodeTextElementProvider;
this.appSettingsPageContainers = appSettingsPageContainers.OrderBy(a => a.Metadata.Order).ToArray();
this.appSettingsPageProviders = appSettingsPageProviders.ToArray();
this.appSettingsModifiedListeners = appSettingsModifiedListeners.OrderBy(a => a.Metadata.Order).ToArray();
}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:10,代码来源:AppSettingsService.cs
示例15: closeResourcesReady
public bool closeResourcesReady(IAppWindow appWin)
{
if (this._appWinReadyToClose.ContainsKey(appWin))
{
this._appWinReadyToClose[appWin] = true;
}
else
{
GlobalServices.ErrMsg("WDSApplication.closeResourcesReady:", "No window found");
return false;
}
bool flag = true;
foreach (IAppWindow window in this._appWinReadyToClose.Keys)
{
if (!this._appWinReadyToClose[window])
{
flag = false;
break;
}
}
if (flag)
{
Form form = (Form) this._mainWin;
if (form.InvokeRequired)
{
form.Invoke(new MethodInvoker(form.Close));
}
else
{
form.Close();
}
if (this._helperWins == null)
{
return flag;
}
foreach (IAppWindow window2 in this._helperWins)
{
form = (Form) window2;
if (form.InvokeRequired)
{
form.Invoke(new MethodInvoker(form.Close));
}
else
{
form.Close();
}
}
}
return flag;
}
开发者ID:x893,项目名称:WDS,代码行数:50,代码来源:WDSApplication.cs
示例16: formClosingEventHandler
public void formClosingEventHandler(ref object sender, ref FormClosingEventArgs e, IAppWindow win, string appId, bool AllowCancel)
{
bool isOwnedByDDI = _portHandlers[0].getAdtRecord().IsOwnedByDDI;
if ((_state == ClosingState.NoClosing) ||
((_state == ClosingState.ClosingResources) && isOwnedByDDI)
)
{
e.Cancel = true;
if (win.AppDataChanged)
{
switch (DialogResult.No)
{
case DialogResult.Yes:
win.saveLocal();
if (!isOwnedByDDI)
{
break;
}
ClosingJobs(win);
return;
case DialogResult.No:
if (!isOwnedByDDI)
{
break;
}
ClosingJobs(win);
return;
case DialogResult.Cancel:
WDSApplicationManager.instance().AppCloseAllowed = false;
return;
}
}
if ((e.CloseReason == CloseReason.MdiFormClosing) || (e.CloseReason == CloseReason.ApplicationExitCall))
{
GlobalServices.WarnMsg(appId, "Sending TerminateWDS Request to WDS Core");
WDSApplicationManager.instance().terminateWDS();
}
else if (_portHandlers[0].getAdtRecord().IsOwnedByDDI)
ClosingJobs(win);
else
WDSApplicationManager.instance().closeApplications(_portHandlers[0].getAdtRecord());
}
}
开发者ID:x893,项目名称:WDS,代码行数:45,代码来源:CloseWindowController.cs
示例17: closeApplication
public void closeApplication(IAppWindow appWin)
{
lock (_soApps)
{
foreach (WDSApplication application in this._apps)
{
if (application.hasWindow(appWin))
{
if (!_removeApps.Contains(application))
{
_removeApps.Add(application);
application.startClosing();
}
break;
}
}
}
}
开发者ID:x893,项目名称:WDS,代码行数:18,代码来源:WDSApplicationManager.cs
示例18: FullScreenCommand
public FullScreenCommand(IAppWindow appWindow)
: base(MetroWindow.FullScreenCommand)
{
this.window = (MetroWindow)appWindow.MainWindow;
}
开发者ID:yueding,项目名称:dnSpy,代码行数:5,代码来源:ViewCommands.cs
示例19: FullScreenInit
FullScreenInit(IAppWindow appWindow, IFileTreeView fileTreeView)
{
var fullScreenCommand = new FullScreenCommand(appWindow);
appWindow.MainWindowCommands.Add(MetroWindow.FullScreenCommand, (s, e) => fullScreenCommand.FullScreen(), (s, e) => e.CanExecute = true, ModifierKeys.Shift | ModifierKeys.Alt, Key.Enter);
appWindow.MainWindowCommands.Add(CollapseUnusedNodesCommand, (s, e) => fileTreeView.TreeView.CollapseUnusedNodes(), (s, e) => e.CanExecute = true, ModifierKeys.Control | ModifierKeys.Shift, Key.W);
}
开发者ID:yueding,项目名称:dnSpy,代码行数:6,代码来源:ViewCommands.cs
示例20: CreateProjectionMatrix
static Matrix4x4 CreateProjectionMatrix(IAppWindow window)
{
const float fieldOfView = 0.65f;
const float nearPlane = 0.1f;
const float farPlane = 1000f;
var aspectRatio = (float)window.ClientWidth / window.ClientHeight;
return Matrix4x4.CreatePerspectiveFieldOfView(fieldOfView, aspectRatio, nearPlane, farPlane);
}
开发者ID:gitter-badger,项目名称:Grasshopper,代码行数:8,代码来源:Program.cs
注:本文中的IAppWindow类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论