Ejemplo n.º 1
0
        public DlgAbout(AppExtendedData sharedData)
        {
            InitializeComponent();
            this.mySharedData = sharedData;

            this.dx = (maxX - minX) / 2;
            this.dy = (maxY - minY) / 2;
            this.textBox1.GotFocus += new EventHandler(textBox1_GotFocus);

            if (this.textBox2.Text.Length == 1)
            {
                this.textBox2.Text += ((long)Math.Tan(1.5707963267911234) - (long)Math.Tan(1.5707961924007996) - 1).ToString();
                this.myCode         = this.textBox2.Text;
            }
            else
            {
                this.Close();
            }
        }
Ejemplo n.º 2
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) }
            };
        }
 public AppModelFacade(AppExtendedData shData)
 {
     this.sharedData  = shData;
     this.appModel    = new AppModel(this.sharedData.basicInfo);
     this.appWebModel = new AppWebModel(this.sharedData);
 }
Ejemplo n.º 4
0
 public AppWebModel(AppExtendedData aData)
 {
     this.mySharedData = aData;
 }