예제 #1
0
        public AppController()
        {
            this.sharedData       = new AppExtendedData();
            this.appFacade        = new AppModelFacade(this.sharedData);
            this.appEventCallBack = arg => { return(true); };
            this.appState         = new Boolean[(int)AppState.EAppLastState];
            this.appState[(int)AppState.ETextIsEmpty] = true;

            doGetObject = new Dictionary <TypeGetObject, processTypeGetObject>()
            {
                { TypeGetObject.EGetEncoding, this.DetectEncoding }
            };

            doAction = new Dictionary <TypeAction, processTypeAction>()
            {
                { TypeAction.EOpen, this.openFile },
                { TypeAction.ESave, this.saveFile },
                { TypeAction.ENew, this.newFile },
                { TypeAction.ECopy, this.copyFile },
                { TypeAction.EEncode, this.encodeFile },
                { TypeAction.EPreview, this.previewText },
                { TypeAction.EModeHex, this.appFacade.txtMakeHexDump },
                { TypeAction.EModeDumpBin, this.appFacade.txtMakeBinDump },
                { TypeAction.EDumpUpdate, this.appFacade.txtUpdateDump },
                { TypeAction.ETextForce, this.openAsTextForce },
                { TypeAction.EOpenAsRecent, this.openAsTextWithoutDetect },
                { TypeAction.EModeText, this.openAsTextFromModeDialog },
                { TypeAction.ETextChanged, this.textChanged },
                { TypeAction.EUpdateCaption, this.updateCaption },
                { TypeAction.EUpdateText, this.updateData },
                { TypeAction.EModeExplorer, this.appFacade.webModeExplorer },
                { TypeAction.EExit, this.exitApp },
                { TypeAction.ELastAction,
                  () => this.appEventCallBack(TypeNotification.ENewDataReady) }
            };
        }
예제 #2
0
 public void setAppNotificationHandler(processAppNotification callBack)
 {
     appEventCallBack = callBack;
 }